@datarailsshared/dr_renderer 1.2.229-dragons → 1.2.231

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.2.229-dragons",
3
+ "version": "1.2.231",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -1,6 +1,5 @@
1
1
  const SERIES_CLASSNAMES = {
2
2
  WATERFALL_BREAKDOWN: 'waterfallBreakdown',
3
- WATERFALL_WALKTHROUGH: 'waterfallWalkthrough',
4
3
  TOTAL_SERIES: 'totalSeries',
5
4
  TREND_SERIES: 'trendSeries',
6
5
  };
@@ -26,7 +25,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
26
25
  const textColor = "#151a41";
27
26
  const chartLabelColor = "#cfd7dd";
28
27
  const HIGHCHARTS_FONT_FAMILY = 'Poppins';
29
- let firstBarColor = null;
30
28
 
31
29
  if(!Highcharts){
32
30
  Highcharts = {
@@ -84,7 +82,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
84
82
  KPI_WIDGET: 'kpi-widget',
85
83
  TEXT_WIDGET: 'text-widget',
86
84
  WATERFALL_BREAKDOWN: 'waterfall-chart-breakdown',
87
- WATERFALL_WALKTHROUGH: 'waterfall-chart-walkthrough',
88
85
  PUBLISHED_ITEM: 'published_item',
89
86
  RICH_TEXT: 'rich_text',
90
87
  EXCEL_VIEWER: 'excel_viewer',
@@ -489,7 +486,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
489
486
  rows = [];
490
487
  }
491
488
 
492
- var cols = lodash.get(this, 'point.options.colsForTotal') || this.key;
489
+ var cols = this.key;
493
490
  if (typeof (cols) == 'object' && cols.name) {
494
491
  cols = cols.name;
495
492
  }
@@ -622,7 +619,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
622
619
 
623
620
  var func = function () {
624
621
  const isWaterfallBreakdown = this.series.options.className === SERIES_CLASSNAMES.WATERFALL_BREAKDOWN;
625
- const isWaterfallWalkthrough = this.series.options.className === SERIES_CLASSNAMES.WATERFALL_WALKTHROUGH;
622
+ const isTrendSeries = this.series.options.className === SERIES_CLASSNAMES.TREND_SERIES;
623
+
626
624
  var y = parseFloat(this.y);
627
625
  if (pivotData) {
628
626
  let series_name = (this.series.name || '') + "";
@@ -632,11 +630,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
632
630
  }
633
631
  if (pivotData.rowAttrs.length == 0
634
632
  || this.series.options.className === 'totalSeries'
635
- || this.series.options.className === 'trendSeries') {
633
+ || isTrendSeries) {
636
634
  rows = [];
637
635
  }
638
-
639
- var cols = lodash.get(this, 'point.options.colsForTotal') || this.key;
636
+ var cols = this.key;
640
637
  if (!cols && is_drill_down_pie) {
641
638
  cols = this.name;
642
639
  }
@@ -651,9 +648,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
651
648
  if (variant_name && rows && rows[0] && variant_name == rows[0]) {
652
649
  rows[0] = variant_name_default_name;
653
650
  }
654
- if (isWaterfallWalkthrough) {
655
- cols = [this.key]
656
- }
651
+
657
652
  try {
658
653
  if (is_drill_down_pie && !highchartsRenderer.selfStartsWith(series_name,"Series ")) {
659
654
  let temp = cols;
@@ -661,9 +656,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
661
656
  rows = temp;
662
657
  }
663
658
 
664
- var category_text = `<span style="font-weight: bold;">
665
- ${ lodash.get(this, 'point.options.colsForTotal') ? cols[0] : cols } ${ isWaterfallBreakdown ? ': ' : ' ' }
666
- </span>`;
659
+ var category_text = `<span style="font-weight: bold;">${ cols }${ isWaterfallBreakdown ? ': ' : ' ' }</span>`;
667
660
  if (this.category) {
668
661
  category_text = '';
669
662
  }
@@ -672,7 +665,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
672
665
  series_text += ': '
673
666
  }
674
667
 
675
- if (pivotData.rowAttrs.length == 0) {
668
+ if (pivotData.rowAttrs.length == 0 && !isTrendSeries) {
676
669
  series_text = ': ';
677
670
  }
678
671
 
@@ -686,7 +679,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
686
679
 
687
680
  let formatted_value_to_return = $.pivotUtilities.getFormattedNumber(y, null, opts);
688
681
  if (aggr.value() || isWaterfallBreakdown) {
689
- formatted_value_to_return = $.pivotUtilities.getFormattedNumber(isWaterfallBreakdown ? y : aggr.value(), aggr, opts);
682
+ formatted_value_to_return = $.pivotUtilities.getFormattedNumber(
683
+ isWaterfallBreakdown || isTrendSeries ? y : aggr.value(), aggr, opts
684
+ );
690
685
  }
691
686
 
692
687
  let wrappedFormattedValue = highchartsRenderer.getSpanWrapper(formatted_value_to_return);
@@ -1042,7 +1037,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1042
1037
  if (row_n_value && row_n_value.length > 0) {
1043
1038
  ob.name = row_n_value.join(highchartsRenderer.delimer).replace('DR_Others', othersName);
1044
1039
  }
1045
-
1046
1040
  lodash.forEach(col_n_keys, function (col_n_value, index) {
1047
1041
  var agg = pivotData.getAggregator(row_n_value, col_n_value);
1048
1042
  var val = agg.value();
@@ -1093,7 +1087,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1093
1087
 
1094
1088
  const trendSeries = lodash.clone(chart_series[chart_series.length - 1]);
1095
1089
  trendSeries.className = 'trendSeries';
1096
- trendSeries.name = 'Trend Line (' + trendSeries.name + ')';
1090
+ trendSeries.name = highchartsRenderer.getTrendSeriesName(trendSeries);
1097
1091
  trendSeries.dashStyle = 'shortdot';
1098
1092
  trendSeries.type = 'line';
1099
1093
  trendSeries.data = trendSeries.data.map((el, index) => a + b * (index + 1));
@@ -1259,10 +1253,9 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1259
1253
  if (opts.trendLine) {
1260
1254
  const a = ((ySum * squareXSum) - (xSum * xySum)) / ((n * squareXSum) - (xSum * xSum));
1261
1255
  const b = ((n * xySum) - (xSum* ySum)) / ((n * squareXSum) - (xSum * xSum));
1262
-
1263
1256
  const trendSeries = lodash.clone(chart_series[chart_series.length - 1]);
1264
1257
  trendSeries.className = 'trendSeries';
1265
- trendSeries.name = 'Trend Line (' + trendSeries.name + ')';
1258
+ trendSeries.name = highchartsRenderer.getTrendSeriesName(trendSeries);
1266
1259
  trendSeries.dashStyle = 'shortdot';
1267
1260
  trendSeries.type = 'line';
1268
1261
  trendSeries.data = trendSeries.data.map((data, index) => ({name: data.name, y: a + b * (index + 1)}));
@@ -1270,7 +1263,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1270
1263
  if (colors && colors[i]) {
1271
1264
  trendSeries.color = colors[i];
1272
1265
  }
1273
-
1274
1266
  trendSerieses.push(trendSeries);
1275
1267
  }
1276
1268
  i++;
@@ -1287,7 +1279,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1287
1279
  }
1288
1280
 
1289
1281
  let weights = { line: 2,spline: 3 ,area:-2, areaspline: -1, scatter:4, column: 1 };
1290
-
1291
1282
  if (opts.comboOptions && lodash.includes(chartType,'combo') && !lodash.isEqual(row_n_keys, EMPTY_ROW_N_KEYS)) {
1292
1283
  chart_series.forEach((series, seriesIndex) => {
1293
1284
  const savedSeriesOption = lodash.find(opts.comboOptions.seriesOptions, {series: series.name});
@@ -1422,89 +1413,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1422
1413
  return chart_series;
1423
1414
  }
1424
1415
 
1425
- highchartsRenderer.ptCreateWaterfallWalkthroughSeries = function (pivotData, onlyNumbers, additionOptions, opts) {
1426
- const waterfallOptions = opts.walkthrough_options;
1427
- const chart_series = [];
1428
- let resultObject = {
1429
- data: [],
1430
- dataLabels: {
1431
- allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
1432
- enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
1433
- formatter: highchartsRenderer.defaultDataLabelFormatter(pivotData, {'chartOptions': additionOptions, total_value_options: opts.total_value_options}),
1434
- style: highchartsRenderer.getDataLabelsStyle(additionOptions),
1435
- },
1436
- upColor: waterfallOptions.colors.increase,
1437
- color: waterfallOptions.colors.decrease,
1438
- className: SERIES_CLASSNAMES.WATERFALL_WALKTHROUGH
1439
- };
1440
- resultObject = highchartsRenderer.getDataLabelsOptions(additionOptions, resultObject);
1441
- lodash.forEach(waterfallOptions.values.walkthrough, function(value, index) {
1442
-
1443
- let keys = [];
1444
- if (value.trend === 'total') {
1445
- keys = ['Total'];
1446
- } else {
1447
- _.forEach(value.key, (item) => {
1448
- const findKeyByValue = Object.keys(pivotData.dateValuesDictionary || {}).find(key => pivotData.dateValuesDictionary[key] === item);
1449
- keys.push(findKeyByValue ? findKeyByValue : item);
1450
- })
1451
- }
1452
-
1453
- const agg = pivotData.getAggregator([], keys);
1454
- let val = agg.value();
1455
-
1456
- if (val != null && $.isNumeric(val)) {
1457
- val = parseFloat(val);
1458
- } else if (onlyNumbers) {
1459
- val = NaN;
1460
- } else {
1461
- val = 0;
1462
- }
1463
-
1464
- if (value.trend === 'decrease') {
1465
- val = val * -1;
1466
- }
1467
-
1468
- const name = value.trend === 'total' ? value.formattedKey || value.key[0] : keys.join(highchartsRenderer.delimer);
1469
- let color = '';
1470
- if (value.trend !== 'total') {
1471
- if (index === 0 && !firstBarColor) {
1472
- color = waterfallOptions.colors.total;
1473
- firstBarColor = waterfallOptions.colors.total;
1474
- } else {
1475
- color = value.color
1476
- }
1477
- } else {
1478
- color = waterfallOptions.colors.total;
1479
- }
1480
-
1481
- resultObject.data.push({
1482
- y: val,
1483
- name: lodash.unescape(name).replace('DR_Others', highchartsRenderer.getOthersName(opts)),
1484
- isSum: value.trend === 'total',
1485
- isTotal: value.trend === 'total',
1486
- color,
1487
- colsForTotal: value.trend === 'total' ? keys : null,
1488
- });
1489
- });
1490
- chart_series.push(resultObject);
1491
- chart_series.push(
1492
- {
1493
- name: 'Positive',
1494
- visible: false,
1495
- color: waterfallOptions.colors.increase
1496
- });
1497
-
1498
- chart_series.push(
1499
- {
1500
- name: 'Negative',
1501
- visible: false,
1502
- color: waterfallOptions.colors.decrease
1503
- });
1504
-
1505
- return chart_series;
1506
- }
1507
-
1508
1416
  highchartsRenderer.setChartTypeBySeriesType = function (type, series) {
1509
1417
  const types = {
1510
1418
  'line-chart': 'line',
@@ -3363,121 +3271,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
3363
3271
  return highchartsRenderer.ptCreateElementAndDraw(chartOptions, opts);
3364
3272
  };
3365
3273
 
3366
- highchartsRenderer.ptRenderWaterfallWalkthrough = function (pivotData, opts) {
3367
- let chartOptions = {};
3368
- const waterfallOptions = opts?.walkthrough_options;
3369
- const additionOptions = opts.chartOptions
3370
- ? opts.chartOptions
3371
- : highchartsRenderer.getDefaultValueForChart(highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH);
3372
-
3373
- chartOptions.chart = {
3374
- type: 'waterfall',
3375
- zoomType: additionOptions && additionOptions.chart && additionOptions.chart.zoom_type ? additionOptions.chart.zoom_type : 'None',
3376
- };
3377
- if (disableAnimation) {
3378
- chartOptions.chart.animation = false;
3379
- }
3380
-
3381
- chartOptions.xAxis = {
3382
- type: 'category',
3383
- crosshair: true,
3384
- min: 0,
3385
- title: {
3386
- text : additionOptions && additionOptions.axisX ? additionOptions.axisX.name : '',
3387
- },
3388
- uniqueNames: false,
3389
- };
3390
-
3391
- highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
3392
-
3393
- chartOptions.yAxis = {
3394
- min: null,
3395
- max: null,
3396
- title: {
3397
- text: additionOptions && additionOptions.axisY ? additionOptions.axisY.name : '',
3398
- autoylabel: additionOptions && additionOptions.axisY ? additionOptions.axisY.autoylabel : ''
3399
- },
3400
- labels: {
3401
- formatter: highchartsRenderer.defaultValueLabelsFormatter(pivotData, opts)
3402
- },
3403
- };
3404
- if (additionOptions) {
3405
- highchartsRenderer.setYAxisMinMax(chartOptions.yAxis, additionOptions.axisY);
3406
- }
3407
-
3408
- chartOptions.tooltip = {
3409
- formatter: highchartsRenderer.defaultFormatterToTooltip(pivotData, opts),
3410
- valueDecimals: 2,
3411
- };
3412
-
3413
- highchartsRenderer.handleGridLines(additionOptions, chartOptions);
3414
-
3415
- if (lodash.get(opts, 'paletteOptions.widgetPalette', null)) {
3416
- const mc_palette = lodash.find(lodash.get(opts.paletteOptions, 'monochromePalettes', []), { selected: true });
3417
- chartOptions.colors = mc_palette ? mc_palette.colors : opts.paletteOptions.widgetPalette;
3418
- } else if (lodash.get(opts, 'paletteOptions.dashboardPalette.colors', null)) {
3419
- chartOptions.colors = opts.paletteOptions.dashboardPalette.colors;
3420
- }
3421
- chartOptions.series = highchartsRenderer
3422
- .ptCreateWaterfallWalkthroughSeries(pivotData, null, additionOptions, opts);
3423
-
3424
- chartOptions = highchartsRenderer.prepareAxisX(chartOptions, additionOptions, pivotData.getColKeys());
3425
- chartOptions.plotOptions = {
3426
- waterfall: {
3427
- pointPadding: 0.2,
3428
- borderWidth: 0,
3429
- borderRadius: 1,
3430
- lineWidth: 0,
3431
- },
3432
- series: {
3433
- animation: !disableAnimation,
3434
- cropThreshold: 1000,
3435
- dataLabels: {
3436
- allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
3437
- enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
3438
- formatter: highchartsRenderer.defaultDataLabelFormatter(pivotData, opts),
3439
- style: highchartsRenderer.getDataLabelsStyle(additionOptions),
3440
- inside: false
3441
- },
3442
- events: {
3443
- legendItemClick: () => {
3444
- return false;
3445
- }
3446
- }
3447
- }
3448
- };
3449
-
3450
- if (opts.drillDownListFunc) {
3451
- chartOptions.plotOptions.series.cursor = 'pointer';
3452
- chartOptions.plotOptions.series.point = {
3453
- events: {
3454
- click: opts.drillDownListFunc
3455
- }
3456
- };
3457
- }
3458
- if (waterfallOptions.colors) {
3459
- chartOptions.legend = highchartsRenderer.getOptionsForLegends(additionOptions, 3, false);
3460
- chartOptions.legend.useHTML = true;
3461
- chartOptions.legend.labelFormatter = function() {
3462
- const name = this.options.className ? 'Total': this.name;
3463
- const findTotal = _.find(this.options.data, {isTotal: true});
3464
- const color = findTotal?.color ? findTotal.color : this.color;
3465
- return '<span style="margin: 5px; vertical-align: middle; display:inline-block; background-color: '+ color + '; width: 12px; height: 12px; border-radius: 50%"></span><span style="color: #000; display: inline-block; margin: 5px; vertical-align: middle;">' + name + '</span>';
3466
- }
3467
-
3468
- chartOptions.legend.symbolPadding = 0;
3469
- chartOptions.legend.symbolWidth = 0;
3470
- chartOptions.legend.symbolHeight = 0;
3471
- chartOptions.legend.squareSymbol = false;
3472
- } else {
3473
- chartOptions.legend = {
3474
- enabled: false
3475
- }
3476
- }
3477
-
3478
- return highchartsRenderer.ptCreateElementAndDraw(chartOptions, opts);
3479
- }
3480
-
3481
3274
  highchartsRenderer.formatFieldValue = function (field, value) {
3482
3275
  let currentType = '';
3483
3276
  let format = field.format;
@@ -4546,17 +4339,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4546
4339
  }
4547
4340
  };
4548
4341
 
4549
- highchartsRenderer.waterfallConstants = {
4550
- [highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN]: {
4551
- minCategoriesCount: 2,
4552
- maxCategoriesCount: 5,
4553
- },
4554
- [highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH]: {
4555
- minCategoriesCount: 2,
4556
- maxCategoriesCount: 10,
4557
- }
4558
- };
4559
-
4560
4342
  highchartsRenderer.rhPivotView = function (rowData, options, isTable = false, widget = null) {
4561
4343
  if (!rowData || !rowData) {
4562
4344
  if (options.onlyOptions) {
@@ -4565,15 +4347,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4565
4347
  return null;
4566
4348
  }
4567
4349
 
4568
- const isWaterfall = widget
4569
- && (
4570
- widget.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN
4571
- || widget.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH
4572
- );
4573
-
4574
- if (isWaterfall) {
4575
- const maxCategories = highchartsRenderer.waterfallConstants[widget.chart_type].maxCategoriesCount;
4576
- const minCategories = highchartsRenderer.waterfallConstants[widget.chart_type].minCategoriesCount;
4350
+ if (widget && widget.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN) {
4351
+ const breakdownSettings = widget.options.breakdown_options.settings;
4352
+ const maxCategories = breakdownSettings.maxCategoriesCount;
4353
+ const minCategories = breakdownSettings.minCategoriesCount;
4577
4354
  const uniqueCategories = lodash.filter(
4578
4355
  lodash.uniq(
4579
4356
  lodash.map(rowData, row => row[widget.cols[0].name])
@@ -4583,8 +4360,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4583
4360
 
4584
4361
  if (uniqueCategories && (uniqueCategories.length > maxCategories || uniqueCategories.length < minCategories )) {
4585
4362
  options.error_has_occurred = true;
4586
- const isDateField = widget.cols[0].type === 'Date';
4587
- const commonMessagePart = `This chart support a selection of ${minCategories}-${maxCategories} items from the category section. `;
4588
4363
  options.error_params = {
4589
4364
  title: 'Data Conflict',
4590
4365
  text: `Please adjust your dashboard's reference date and filter selections as \
@@ -4833,25 +4608,19 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4833
4608
  return highchartsRenderer.getWeekNumber(dateObj);
4834
4609
  };
4835
4610
 
4836
- highchartsRenderer.check_values_not_for_convert = function (currentgraph, field_name) {
4837
- let vals_not_convert = [];
4611
+ highchartsRenderer.check_value_not_for_convert = function (currentgraph, field_name) {
4612
+ let val_not_convert = null;
4838
4613
  if (lodash.has(currentgraph, "options.chartOptions.delta_column") && currentgraph.options.chartOptions.delta_column) {
4839
4614
  let delta_options = currentgraph.options.chartOptions.delta_column;
4840
4615
  if (delta_options.field == 'series' && currentgraph.rows && currentgraph.rows[0] &&
4841
4616
  currentgraph.rows[0].name == field_name) {
4842
- vals_not_convert = [delta_options.name];
4617
+ val_not_convert = delta_options.name;
4843
4618
  } else if (delta_options.field == 'category' && currentgraph.rows && currentgraph.cols[0] &&
4844
4619
  currentgraph.cols[0].name == field_name) {
4845
- vals_not_convert = [delta_options.name];
4620
+ val_not_convert = delta_options.name;
4846
4621
  }
4847
- } else if (currentgraph.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH) {
4848
- lodash.forEach(currentgraph.options.walkthrough_options.values.walkthrough, value => {
4849
- if (value.trend === 'total') {
4850
- vals_not_convert.push(value.key[0]);
4851
- }
4852
- });
4853
4622
  }
4854
- return vals_not_convert;
4623
+ return val_not_convert;
4855
4624
  };
4856
4625
 
4857
4626
  highchartsRenderer.updateFiltersShowNames = function (filters) {
@@ -4871,8 +4640,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
4871
4640
  })
4872
4641
  };
4873
4642
 
4874
- highchartsRenderer.returnRawDataValue = function (type, value, format, field_name, vals_not_for_convert) {
4875
- if (vals_not_for_convert && vals_not_for_convert.length && lodash.includes(vals_not_for_convert, value)) {
4643
+ highchartsRenderer.returnRawDataValue = function (type, value, format, field_name, val_not_for_convert) {
4644
+ if (val_not_for_convert && val_not_for_convert == value) {
4876
4645
  return value;
4877
4646
  }
4878
4647
 
@@ -6980,16 +6749,16 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
6980
6749
  value_name: 'name',
6981
6750
  element_label: 'Name',
6982
6751
  default_value: '_Variance'
6983
- }, {
6984
- element_type: 'input',
6985
- value_name: 'formula',
6986
- element_label: 'Formula',
6987
- default_value: 'x2-x1'
6988
6752
  }, {
6989
6753
  element_type: 'input',
6990
- value_name: 'color',
6991
- element_label: 'Color',
6992
- default_value: ''
6754
+ value_name: 'formula',
6755
+ element_label: 'Formula',
6756
+ default_value: 'x2-x1'
6757
+ }, {
6758
+ element_type: 'input',
6759
+ value_name: 'color',
6760
+ element_label: 'Color',
6761
+ default_value: ''
6993
6762
  }, {
6994
6763
  element_type: 'radio',
6995
6764
  value_name: 'chart',
@@ -7113,16 +6882,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7113
6882
  legendTooltipTitle: 'Drag one field to further configure your x-axis.',
7114
6883
  legendTooltipDescription: 'The breakdown subdivides the chart by a category field for further analysis of what’s contributing to the increase or decrease.',
7115
6884
  },
7116
- [highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH]: {
7117
- name: 'Waterfall Walkthrough Chart ',
7118
- label: 'Waterfall Walkthrough Chart ',
7119
- title: 'TODO: add text',
7120
- description: 'TODO: add text',
7121
- axisName: 'Category',
7122
- startedMessage: 'TODO: add text',
7123
- axisTooltipTitle: 'TODO: add text',
7124
- legendTooltipTitle: 'TODO: add text',
7125
- },
7126
6885
  'combo-chart': {
7127
6886
  name: 'Combo Chart ',
7128
6887
  label: 'Combo Chart ',
@@ -7778,24 +7537,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
7778
7537
  highchartsRenderer.suboptions["legends"],
7779
7538
  ]
7780
7539
  },
7781
- {
7782
- type: highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH,
7783
- name: highchartsRenderer.chartsTypesInfo[highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH].name,
7784
- class: 'google-visualization-charteditor-thumbs-columnchart',
7785
- render: highchartsRenderer.ptRenderWaterfallWalkthrough,
7786
- suboptions: [
7787
- highchartsRenderer.suboptions["axisX"],
7788
- highchartsRenderer.suboptions["tooltips"],
7789
- highchartsRenderer.suboptions["label"],
7790
- highchartsRenderer.suboptions["subtitle"],
7791
- highchartsRenderer.suboptions["widget_library"],
7792
- highchartsRenderer.suboptions["chart"],
7793
- highchartsRenderer.suboptions["negative_number_format"],
7794
- highchartsRenderer.suboptions["advanced"],
7795
- highchartsRenderer.suboptions["legends"],
7796
- ],
7797
- hidden: true,
7798
- },
7799
7540
  ]
7800
7541
  },
7801
7542
  ];
@@ -8540,7 +8281,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8540
8281
  var data = res;
8541
8282
 
8542
8283
  lodash.forEach(datesFields, function (row) {
8543
- row.val_not_convert = highchartsRenderer.check_values_not_for_convert(widget, row.name);
8284
+ row.val_not_convert = highchartsRenderer.check_value_not_for_convert(widget, row.name);
8544
8285
  });
8545
8286
 
8546
8287
  if (datesFields.length > 0) {
@@ -8946,14 +8687,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
8946
8687
  return rightPosition;
8947
8688
  case 'none':
8948
8689
  return none;
8949
- }
8950
- } else if (isLine) {
8951
- return useNewUx ? leftPosition : rightPosition;
8952
- } else if (isPie) {
8953
- return useNewUx ? rightPosition : topPosition;
8954
8690
  }
8691
+ } else if (isLine) {
8692
+ return useNewUx ? leftPosition : rightPosition;
8693
+ } else if (isPie) {
8694
+ return useNewUx ? rightPosition : topPosition;
8695
+ }
8955
8696
 
8956
- return useNewUx ? topPosition : bottomPosition;
8697
+ return useNewUx ? topPosition : bottomPosition;
8957
8698
  }
8958
8699
 
8959
8700
  highchartsRenderer.setYAxisMinMax = function (yAxis, axisYOptions) {
@@ -9018,6 +8759,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
9018
8759
  }
9019
8760
  }
9020
8761
 
8762
+ highchartsRenderer.getTrendSeriesName = function(series) {
8763
+ return series.name ? 'Trend Line (' + series.name + ')' : 'Trend Line';
8764
+ }
8765
+
9021
8766
  return highchartsRenderer;
9022
8767
  };
9023
8768