@datarailsshared/dr_renderer 1.4.39 → 1.4.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datarailsshared/dr_renderer",
3
- "version": "1.4.39",
3
+ "version": "1.4.42",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -64,6 +64,7 @@ const CHART_TYPES = {
64
64
  GAUGE_CHART_DYNAMIC_GOAL: 'gauge-chart-dynamic-goal',
65
65
  GAUGE_CHART_CATEGORIES_SUMMARY: 'gauge-chart-categories-summary',
66
66
  KPI_WIDGET: 'kpi-widget',
67
+ SMART_KPI: 'smart-kpi',
67
68
  TEXT_WIDGET: 'text-widget',
68
69
  WATERFALL_BREAKDOWN: 'waterfall-chart-breakdown',
69
70
  WATERFALL_WALKTHROUGH: 'waterfall-chart-walkthrough',
@@ -6109,6 +6110,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
6109
6110
 
6110
6111
  if (option) {
6111
6112
  const type = option.category_type;
6113
+
6114
+ const existingOptionValue = lodash.get(existing_options, type);
6115
+ if (!option.elements) {
6116
+ return existingOptionValue || option.default_value;
6117
+ }
6118
+
6112
6119
  lodash.forEach(option.elements, function (elem) {
6113
6120
  if (existing_options && lodash.has(existing_options, type + '.' + elem.value_name)) {
6114
6121
  valToReturn[elem.value_name] = lodash.get(existing_options, type + '.' + elem.value_name);
@@ -7593,6 +7600,40 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7593
7600
  ],
7594
7601
  default_value: ''
7595
7602
  }]
7603
+ },
7604
+ gauge_goal: {
7605
+ is_hidden: true,
7606
+ categorys_class: 'google-visualization-charteditor-mini-more',
7607
+ category_label: 'Gauge goal',
7608
+ category_type: 'goal',
7609
+ elements: [
7610
+ {
7611
+ element_type: 'input',
7612
+ value_name: 'title',
7613
+ element_label: 'Goal title',
7614
+ default_value: 'Goal',
7615
+ },
7616
+ {
7617
+ element_type: 'input',
7618
+ value_name: 'value',
7619
+ element_label: 'Goal value',
7620
+ default_value: 1000000,
7621
+ },
7622
+ ],
7623
+ },
7624
+ gauge_segments: {
7625
+ is_hidden: true,
7626
+ categorys_class: 'google-visualization-charteditor-mini-more',
7627
+ category_label: 'Gauge segments',
7628
+ category_type: 'segments',
7629
+ default_value: GAUGE_OPTIONS_DEFAULT.segments,
7630
+ },
7631
+ gauge_is_absolute: {
7632
+ is_hidden: true,
7633
+ categorys_class: 'google-visualization-charteditor-mini-more',
7634
+ category_label: 'Gauge is absolute value',
7635
+ category_type: 'isAbsoluteValue',
7636
+ default_value: false,
7596
7637
  }
7597
7638
  };
7598
7639
 
@@ -7826,12 +7867,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7826
7867
  axisTooltipTitle: ' Best practice: we recommend no more than one segment.',
7827
7868
  legendTooltipTitle: 'To create a drill-down within this category, drag a field here.',
7828
7869
  },
7870
+
7829
7871
  [highchartsRenderer.CHART_TYPES.GAUGE_CHART_ENHANCED]: {
7830
7872
  name: 'Gauge chart',
7831
7873
  categoryLabel: 'Gauge',
7832
7874
  displayLabelInEditor: highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL),
7833
7875
  label: highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL) ? 'Static goal' : 'Gauge',
7834
- title: 'Measures progress toward a goal or a KPI.',
7876
+ title: highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL)
7877
+ ? 'Measures progress toward a goal or a KPI.'
7878
+ : 'Track actual performance against targets from your budget or forecast files.',
7835
7879
  axisName: 'X-Axis',
7836
7880
  legendName: 'Data Series',
7837
7881
  startedMessage: 'To get started, drag one field to the value section. Best practice: Drag one field to the filter section, and filter as required.',
@@ -7843,17 +7887,16 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7843
7887
  },
7844
7888
  },
7845
7889
 
7846
- // TODO: update descriptions if required
7847
7890
  [highchartsRenderer.CHART_TYPES.GAUGE_CHART_DYNAMIC_GOAL]: {
7848
7891
  name: 'Gauge chart with dynamic goal',
7849
7892
  categoryLabel: 'Gauge',
7850
7893
  displayLabelInEditor: true,
7851
7894
  iconType: highchartsRenderer.CHART_TYPES.GAUGE_CHART_ENHANCED,
7852
7895
  label: 'Dynamic goal',
7853
- title: 'Measures progress toward a goal or a KPI.',
7896
+ title: 'Track actual performance against manually set targets.',
7854
7897
  axisName: 'Goal',
7855
7898
  legendName: 'Data Series',
7856
- startedMessage: 'To get started, drag one field to the value section. Best practice: Drag one field to the filter section, and filter as required.',
7899
+ startedMessage: 'To get started, drag a field to the Value section and set the Goal with a field that references your planning files (e.g., Scenario or Version Name)',
7857
7900
  categoryContainerSettings: {
7858
7901
  multiple: false,
7859
7902
  singleFieldReplacement: true,
@@ -7875,6 +7918,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7875
7918
  legendName: 'Data Series',
7876
7919
  startedMessage: '',
7877
7920
  },
7921
+ [highchartsRenderer.CHART_TYPES.SMART_KPI]: {
7922
+ name: 'Smart Kpi',
7923
+ label: 'Smart KPI',
7924
+ title: 'Present a single Key Performance Indicator.',
7925
+ axisName: 'X-Axis',
7926
+ legendName: 'Data Series',
7927
+ startedMessage: 'To get started, drag one field to the value section. Best practice: Drag one field to the filter section, and filter as required.',
7928
+ },
7878
7929
  'kpi-widget': {
7879
7930
  name: 'Kpi ',
7880
7931
  label: 'KPI',
@@ -8285,6 +8336,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8285
8336
  highchartsRenderer.suboptions["subtitle"],
8286
8337
  highchartsRenderer.suboptions["table_options_gauge"],
8287
8338
  highchartsRenderer.suboptions["table_design_options"],
8339
+ highchartsRenderer.suboptions["gauge_goal"],
8340
+ highchartsRenderer.suboptions["gauge_segments"],
8341
+ highchartsRenderer.suboptions["gauge_is_absolute"],
8288
8342
  ]
8289
8343
  },
8290
8344
  {
@@ -8298,6 +8352,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8298
8352
  highchartsRenderer.suboptions["subtitle"],
8299
8353
  highchartsRenderer.suboptions["table_options_gauge"],
8300
8354
  highchartsRenderer.suboptions["table_design_options"],
8355
+ highchartsRenderer.suboptions["gauge_goal"],
8356
+ highchartsRenderer.suboptions["gauge_segments"],
8357
+ highchartsRenderer.suboptions["gauge_is_absolute"],
8301
8358
  ],
8302
8359
  hidden: !highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL),
8303
8360
  },
@@ -8341,6 +8398,23 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8341
8398
  highchartsRenderer.suboptions["negative_number_format"],
8342
8399
  highchartsRenderer.suboptions["legends"],
8343
8400
  ]
8401
+ },
8402
+ {
8403
+ type: 'smart-kpi',
8404
+ hidden: true,
8405
+ name: highchartsRenderer.chartsTypesInfo['smart-kpi'].name,
8406
+ class: 'google-visualization-charteditor-thumbs-kpi',
8407
+ render: () => { throw new Error('Smart KPI widget is not implemented yet'); },
8408
+ suboptions: [
8409
+ highchartsRenderer.suboptions["value"],
8410
+ highchartsRenderer.suboptions["range"],
8411
+ highchartsRenderer.suboptions["widget_library"],
8412
+ highchartsRenderer.suboptions["name"],
8413
+ highchartsRenderer.suboptions["table_options_transpose"],
8414
+ highchartsRenderer.suboptions["table_design_options"],
8415
+ highchartsRenderer.suboptions["negative_number_format"],
8416
+ highchartsRenderer.suboptions["legends"],
8417
+ ]
8344
8418
  }]
8345
8419
  },
8346
8420
  {