@datarailsshared/dr_renderer 1.4.40 → 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.40",
3
+ "version": "1.4.42",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -6110,6 +6110,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
6110
6110
 
6111
6111
  if (option) {
6112
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
+
6113
6119
  lodash.forEach(option.elements, function (elem) {
6114
6120
  if (existing_options && lodash.has(existing_options, type + '.' + elem.value_name)) {
6115
6121
  valToReturn[elem.value_name] = lodash.get(existing_options, type + '.' + elem.value_name);
@@ -7594,6 +7600,40 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7594
7600
  ],
7595
7601
  default_value: ''
7596
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,
7597
7637
  }
7598
7638
  };
7599
7639
 
@@ -7827,12 +7867,15 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7827
7867
  axisTooltipTitle: ' Best practice: we recommend no more than one segment.',
7828
7868
  legendTooltipTitle: 'To create a drill-down within this category, drag a field here.',
7829
7869
  },
7870
+
7830
7871
  [highchartsRenderer.CHART_TYPES.GAUGE_CHART_ENHANCED]: {
7831
7872
  name: 'Gauge chart',
7832
7873
  categoryLabel: 'Gauge',
7833
7874
  displayLabelInEditor: highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL),
7834
7875
  label: highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL) ? 'Static goal' : 'Gauge',
7835
- 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.',
7836
7879
  axisName: 'X-Axis',
7837
7880
  legendName: 'Data Series',
7838
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.',
@@ -7844,17 +7887,16 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7844
7887
  },
7845
7888
  },
7846
7889
 
7847
- // TODO: update descriptions if required
7848
7890
  [highchartsRenderer.CHART_TYPES.GAUGE_CHART_DYNAMIC_GOAL]: {
7849
7891
  name: 'Gauge chart with dynamic goal',
7850
7892
  categoryLabel: 'Gauge',
7851
7893
  displayLabelInEditor: true,
7852
7894
  iconType: highchartsRenderer.CHART_TYPES.GAUGE_CHART_ENHANCED,
7853
7895
  label: 'Dynamic goal',
7854
- title: 'Measures progress toward a goal or a KPI.',
7896
+ title: 'Track actual performance against manually set targets.',
7855
7897
  axisName: 'Goal',
7856
7898
  legendName: 'Data Series',
7857
- 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)',
7858
7900
  categoryContainerSettings: {
7859
7901
  multiple: false,
7860
7902
  singleFieldReplacement: true,
@@ -8294,6 +8336,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8294
8336
  highchartsRenderer.suboptions["subtitle"],
8295
8337
  highchartsRenderer.suboptions["table_options_gauge"],
8296
8338
  highchartsRenderer.suboptions["table_design_options"],
8339
+ highchartsRenderer.suboptions["gauge_goal"],
8340
+ highchartsRenderer.suboptions["gauge_segments"],
8341
+ highchartsRenderer.suboptions["gauge_is_absolute"],
8297
8342
  ]
8298
8343
  },
8299
8344
  {
@@ -8307,6 +8352,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8307
8352
  highchartsRenderer.suboptions["subtitle"],
8308
8353
  highchartsRenderer.suboptions["table_options_gauge"],
8309
8354
  highchartsRenderer.suboptions["table_design_options"],
8355
+ highchartsRenderer.suboptions["gauge_goal"],
8356
+ highchartsRenderer.suboptions["gauge_segments"],
8357
+ highchartsRenderer.suboptions["gauge_is_absolute"],
8310
8358
  ],
8311
8359
  hidden: !highchartsRenderer.hasFeature(FEATURES.ENABLE_GAUGE_DYNAMIC_GOAL),
8312
8360
  },