@datarailsshared/dr_renderer 1.2.235-dragons → 1.2.236
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 +1 -1
- package/src/highcharts_renderer.js +38 -299
package/package.json
CHANGED
|
@@ -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
|
};
|
|
@@ -83,7 +82,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
83
82
|
KPI_WIDGET: 'kpi-widget',
|
|
84
83
|
TEXT_WIDGET: 'text-widget',
|
|
85
84
|
WATERFALL_BREAKDOWN: 'waterfall-chart-breakdown',
|
|
86
|
-
WATERFALL_WALKTHROUGH: 'waterfall-chart-walkthrough',
|
|
87
85
|
PUBLISHED_ITEM: 'published_item',
|
|
88
86
|
RICH_TEXT: 'rich_text',
|
|
89
87
|
EXCEL_VIEWER: 'excel_viewer',
|
|
@@ -488,7 +486,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
488
486
|
rows = [];
|
|
489
487
|
}
|
|
490
488
|
|
|
491
|
-
var cols =
|
|
489
|
+
var cols = this.key;
|
|
492
490
|
if (typeof (cols) == 'object' && cols.name) {
|
|
493
491
|
cols = cols.name;
|
|
494
492
|
}
|
|
@@ -621,7 +619,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
621
619
|
|
|
622
620
|
var func = function () {
|
|
623
621
|
const isWaterfallBreakdown = this.series.options.className === SERIES_CLASSNAMES.WATERFALL_BREAKDOWN;
|
|
624
|
-
const isWaterfallWalkthrough = this.series.options.className === SERIES_CLASSNAMES.WATERFALL_WALKTHROUGH;
|
|
625
622
|
const isTrendSeries = this.series.options.className === SERIES_CLASSNAMES.TREND_SERIES;
|
|
626
623
|
|
|
627
624
|
var y = parseFloat(this.y);
|
|
@@ -636,8 +633,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
636
633
|
|| isTrendSeries) {
|
|
637
634
|
rows = [];
|
|
638
635
|
}
|
|
639
|
-
|
|
640
|
-
var cols = lodash.get(this, 'point.options.colsForTotal') || this.key;
|
|
636
|
+
var cols = this.key;
|
|
641
637
|
if (!cols && is_drill_down_pie) {
|
|
642
638
|
cols = this.name;
|
|
643
639
|
}
|
|
@@ -652,6 +648,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
652
648
|
if (variant_name && rows && rows[0] && variant_name == rows[0]) {
|
|
653
649
|
rows[0] = variant_name_default_name;
|
|
654
650
|
}
|
|
651
|
+
|
|
655
652
|
try {
|
|
656
653
|
if (is_drill_down_pie && !highchartsRenderer.selfStartsWith(series_name,"Series ")) {
|
|
657
654
|
let temp = cols;
|
|
@@ -659,9 +656,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
659
656
|
rows = temp;
|
|
660
657
|
}
|
|
661
658
|
|
|
662
|
-
var category_text = `<span style="font-weight: bold;"
|
|
663
|
-
${ lodash.get(this, 'point.options.colsForTotal') ? isWaterfallWalkthrough ? this.key : cols[0] : cols } ${ isWaterfallBreakdown ? ': ' : ' ' }
|
|
664
|
-
</span>`;
|
|
659
|
+
var category_text = `<span style="font-weight: bold;">${ cols }${ isWaterfallBreakdown ? ': ' : ' ' }</span>`;
|
|
665
660
|
if (this.category) {
|
|
666
661
|
category_text = '';
|
|
667
662
|
}
|
|
@@ -685,7 +680,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
685
680
|
let formatted_value_to_return = $.pivotUtilities.getFormattedNumber(y, null, opts);
|
|
686
681
|
if (aggr.value() || isWaterfallBreakdown) {
|
|
687
682
|
formatted_value_to_return = $.pivotUtilities.getFormattedNumber(
|
|
688
|
-
isWaterfallBreakdown ||
|
|
683
|
+
isWaterfallBreakdown || isTrendSeries ? y : aggr.value(), aggr, opts
|
|
689
684
|
);
|
|
690
685
|
}
|
|
691
686
|
|
|
@@ -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();
|
|
@@ -1259,7 +1253,6 @@ 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
1258
|
trendSeries.name = highchartsRenderer.getTrendSeriesName(trendSeries);
|
|
@@ -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,86 +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.color) {
|
|
1471
|
-
color = value.color;
|
|
1472
|
-
} else {
|
|
1473
|
-
if (value.trend === 'total') color = waterfallOptions.colors.total;
|
|
1474
|
-
if (value.trend === 'decrease') color = waterfallOptions.colors.decrease;
|
|
1475
|
-
if (value.trend === 'increase') color = waterfallOptions.colors.increase;
|
|
1476
|
-
}
|
|
1477
|
-
|
|
1478
|
-
resultObject.data.push({
|
|
1479
|
-
y: val,
|
|
1480
|
-
name: lodash.unescape(name).replace('DR_Others', highchartsRenderer.getOthersName(opts)),
|
|
1481
|
-
isSum: value.trend === 'total',
|
|
1482
|
-
isTotal: value.trend === 'total',
|
|
1483
|
-
color,
|
|
1484
|
-
colsForTotal: value.trend === 'total' ? keys : null,
|
|
1485
|
-
});
|
|
1486
|
-
});
|
|
1487
|
-
chart_series.push(resultObject);
|
|
1488
|
-
chart_series.push(
|
|
1489
|
-
{
|
|
1490
|
-
name: 'Positive',
|
|
1491
|
-
visible: false,
|
|
1492
|
-
color: waterfallOptions.colors.increase
|
|
1493
|
-
});
|
|
1494
|
-
|
|
1495
|
-
chart_series.push(
|
|
1496
|
-
{
|
|
1497
|
-
name: 'Negative',
|
|
1498
|
-
visible: false,
|
|
1499
|
-
color: waterfallOptions.colors.decrease
|
|
1500
|
-
});
|
|
1501
|
-
|
|
1502
|
-
return chart_series;
|
|
1503
|
-
}
|
|
1504
|
-
|
|
1505
1416
|
highchartsRenderer.setChartTypeBySeriesType = function (type, series) {
|
|
1506
1417
|
const types = {
|
|
1507
1418
|
'line-chart': 'line',
|
|
@@ -3360,121 +3271,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
3360
3271
|
return highchartsRenderer.ptCreateElementAndDraw(chartOptions, opts);
|
|
3361
3272
|
};
|
|
3362
3273
|
|
|
3363
|
-
highchartsRenderer.ptRenderWaterfallWalkthrough = function (pivotData, opts) {
|
|
3364
|
-
let chartOptions = {};
|
|
3365
|
-
const waterfallOptions = opts?.walkthrough_options;
|
|
3366
|
-
const additionOptions = opts.chartOptions
|
|
3367
|
-
? opts.chartOptions
|
|
3368
|
-
: highchartsRenderer.getDefaultValueForChart(highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH);
|
|
3369
|
-
|
|
3370
|
-
chartOptions.chart = {
|
|
3371
|
-
type: 'waterfall',
|
|
3372
|
-
zoomType: additionOptions && additionOptions.chart && additionOptions.chart.zoom_type ? additionOptions.chart.zoom_type : 'None',
|
|
3373
|
-
};
|
|
3374
|
-
if (disableAnimation) {
|
|
3375
|
-
chartOptions.chart.animation = false;
|
|
3376
|
-
}
|
|
3377
|
-
|
|
3378
|
-
chartOptions.xAxis = {
|
|
3379
|
-
type: 'category',
|
|
3380
|
-
crosshair: true,
|
|
3381
|
-
min: 0,
|
|
3382
|
-
title: {
|
|
3383
|
-
text : additionOptions && additionOptions.axisX ? additionOptions.axisX.name : '',
|
|
3384
|
-
},
|
|
3385
|
-
uniqueNames: false,
|
|
3386
|
-
};
|
|
3387
|
-
|
|
3388
|
-
highchartsRenderer.setTitleAndSubTitle(chartOptions, opts, additionOptions);
|
|
3389
|
-
|
|
3390
|
-
chartOptions.yAxis = {
|
|
3391
|
-
min: null,
|
|
3392
|
-
max: null,
|
|
3393
|
-
title: {
|
|
3394
|
-
text: additionOptions && additionOptions.axisY ? additionOptions.axisY.name : '',
|
|
3395
|
-
autoylabel: additionOptions && additionOptions.axisY ? additionOptions.axisY.autoylabel : ''
|
|
3396
|
-
},
|
|
3397
|
-
labels: {
|
|
3398
|
-
formatter: highchartsRenderer.defaultValueLabelsFormatter(pivotData, opts)
|
|
3399
|
-
},
|
|
3400
|
-
};
|
|
3401
|
-
if (additionOptions) {
|
|
3402
|
-
highchartsRenderer.setYAxisMinMax(chartOptions.yAxis, additionOptions.axisY);
|
|
3403
|
-
}
|
|
3404
|
-
|
|
3405
|
-
chartOptions.tooltip = {
|
|
3406
|
-
formatter: highchartsRenderer.defaultFormatterToTooltip(pivotData, opts),
|
|
3407
|
-
valueDecimals: 2,
|
|
3408
|
-
};
|
|
3409
|
-
|
|
3410
|
-
highchartsRenderer.handleGridLines(additionOptions, chartOptions);
|
|
3411
|
-
|
|
3412
|
-
if (lodash.get(opts, 'paletteOptions.widgetPalette', null)) {
|
|
3413
|
-
const mc_palette = lodash.find(lodash.get(opts.paletteOptions, 'monochromePalettes', []), { selected: true });
|
|
3414
|
-
chartOptions.colors = mc_palette ? mc_palette.colors : opts.paletteOptions.widgetPalette;
|
|
3415
|
-
} else if (lodash.get(opts, 'paletteOptions.dashboardPalette.colors', null)) {
|
|
3416
|
-
chartOptions.colors = opts.paletteOptions.dashboardPalette.colors;
|
|
3417
|
-
}
|
|
3418
|
-
chartOptions.series = highchartsRenderer
|
|
3419
|
-
.ptCreateWaterfallWalkthroughSeries(pivotData, null, additionOptions, opts);
|
|
3420
|
-
|
|
3421
|
-
chartOptions = highchartsRenderer.prepareAxisX(chartOptions, additionOptions, pivotData.getColKeys());
|
|
3422
|
-
chartOptions.plotOptions = {
|
|
3423
|
-
waterfall: {
|
|
3424
|
-
pointPadding: 0.2,
|
|
3425
|
-
borderWidth: 0,
|
|
3426
|
-
borderRadius: 1,
|
|
3427
|
-
lineWidth: 0,
|
|
3428
|
-
},
|
|
3429
|
-
series: {
|
|
3430
|
-
animation: !disableAnimation,
|
|
3431
|
-
cropThreshold: 1000,
|
|
3432
|
-
dataLabels: {
|
|
3433
|
-
allowOverlap: additionOptions && additionOptions.label ? additionOptions.label.overlap : false,
|
|
3434
|
-
enabled: additionOptions && additionOptions.label ? additionOptions.label.show : true,
|
|
3435
|
-
formatter: highchartsRenderer.defaultDataLabelFormatter(pivotData, opts),
|
|
3436
|
-
style: highchartsRenderer.getDataLabelsStyle(additionOptions),
|
|
3437
|
-
inside: false
|
|
3438
|
-
},
|
|
3439
|
-
events: {
|
|
3440
|
-
legendItemClick: () => {
|
|
3441
|
-
return false;
|
|
3442
|
-
}
|
|
3443
|
-
}
|
|
3444
|
-
}
|
|
3445
|
-
};
|
|
3446
|
-
|
|
3447
|
-
if (opts.drillDownListFunc) {
|
|
3448
|
-
chartOptions.plotOptions.series.cursor = 'pointer';
|
|
3449
|
-
chartOptions.plotOptions.series.point = {
|
|
3450
|
-
events: {
|
|
3451
|
-
click: opts.drillDownListFunc
|
|
3452
|
-
}
|
|
3453
|
-
};
|
|
3454
|
-
}
|
|
3455
|
-
if (waterfallOptions.colors) {
|
|
3456
|
-
chartOptions.legend = highchartsRenderer.getOptionsForLegends(additionOptions, 3, false);
|
|
3457
|
-
chartOptions.legend.useHTML = true;
|
|
3458
|
-
chartOptions.legend.labelFormatter = function() {
|
|
3459
|
-
const name = this.options.className ? 'Total': this.name;
|
|
3460
|
-
const findTotal = _.find(this.options.data, {isTotal: true});
|
|
3461
|
-
const color = findTotal?.color ? findTotal.color : this.color;
|
|
3462
|
-
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>';
|
|
3463
|
-
}
|
|
3464
|
-
|
|
3465
|
-
chartOptions.legend.symbolPadding = 0;
|
|
3466
|
-
chartOptions.legend.symbolWidth = 0;
|
|
3467
|
-
chartOptions.legend.symbolHeight = 0;
|
|
3468
|
-
chartOptions.legend.squareSymbol = false;
|
|
3469
|
-
} else {
|
|
3470
|
-
chartOptions.legend = {
|
|
3471
|
-
enabled: false
|
|
3472
|
-
}
|
|
3473
|
-
}
|
|
3474
|
-
|
|
3475
|
-
return highchartsRenderer.ptCreateElementAndDraw(chartOptions, opts);
|
|
3476
|
-
}
|
|
3477
|
-
|
|
3478
3274
|
highchartsRenderer.formatFieldValue = function (field, value) {
|
|
3479
3275
|
let currentType = '';
|
|
3480
3276
|
let format = field.format;
|
|
@@ -4543,17 +4339,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
4543
4339
|
}
|
|
4544
4340
|
};
|
|
4545
4341
|
|
|
4546
|
-
highchartsRenderer.waterfallConstants = {
|
|
4547
|
-
[highchartsRenderer.CHART_TYPES.WATERFALL_BREAKDOWN]: {
|
|
4548
|
-
minCategoriesCount: 2,
|
|
4549
|
-
maxCategoriesCount: 5,
|
|
4550
|
-
},
|
|
4551
|
-
[highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH]: {
|
|
4552
|
-
minCategoriesCount: 2,
|
|
4553
|
-
maxCategoriesCount: 10,
|
|
4554
|
-
}
|
|
4555
|
-
};
|
|
4556
|
-
|
|
4557
4342
|
highchartsRenderer.rhPivotView = function (rowData, options, isTable = false, widget = null) {
|
|
4558
4343
|
if (!rowData || !rowData) {
|
|
4559
4344
|
if (options.onlyOptions) {
|
|
@@ -4562,28 +4347,16 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
4562
4347
|
return null;
|
|
4563
4348
|
}
|
|
4564
4349
|
|
|
4565
|
-
|
|
4566
|
-
|
|
4567
|
-
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4574
|
-
|
|
4575
|
-
uniqueCategories = lodash.filter(
|
|
4576
|
-
lodash.uniq(
|
|
4577
|
-
lodash.map(rowData, row => row[widget.cols[0].name])
|
|
4578
|
-
),
|
|
4579
|
-
value => !!value
|
|
4580
|
-
);
|
|
4581
|
-
} else {
|
|
4582
|
-
uniqueCategories = lodash.filter(
|
|
4583
|
-
lodash.get(widget, 'options.walkthrough_options.values.walkthrough'),
|
|
4584
|
-
(category) => category.trend !== 'total'
|
|
4585
|
-
);
|
|
4586
|
-
}
|
|
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;
|
|
4354
|
+
const uniqueCategories = lodash.filter(
|
|
4355
|
+
lodash.uniq(
|
|
4356
|
+
lodash.map(rowData, row => row[widget.cols[0].name])
|
|
4357
|
+
),
|
|
4358
|
+
value => !!value
|
|
4359
|
+
);
|
|
4587
4360
|
|
|
4588
4361
|
if (uniqueCategories && (uniqueCategories.length > maxCategories || uniqueCategories.length < minCategories )) {
|
|
4589
4362
|
options.error_has_occurred = true;
|
|
@@ -4835,25 +4608,19 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
4835
4608
|
return highchartsRenderer.getWeekNumber(dateObj);
|
|
4836
4609
|
};
|
|
4837
4610
|
|
|
4838
|
-
highchartsRenderer.
|
|
4839
|
-
let
|
|
4611
|
+
highchartsRenderer.check_value_not_for_convert = function (currentgraph, field_name) {
|
|
4612
|
+
let val_not_convert = null;
|
|
4840
4613
|
if (lodash.has(currentgraph, "options.chartOptions.delta_column") && currentgraph.options.chartOptions.delta_column) {
|
|
4841
4614
|
let delta_options = currentgraph.options.chartOptions.delta_column;
|
|
4842
4615
|
if (delta_options.field == 'series' && currentgraph.rows && currentgraph.rows[0] &&
|
|
4843
4616
|
currentgraph.rows[0].name == field_name) {
|
|
4844
|
-
|
|
4617
|
+
val_not_convert = delta_options.name;
|
|
4845
4618
|
} else if (delta_options.field == 'category' && currentgraph.rows && currentgraph.cols[0] &&
|
|
4846
4619
|
currentgraph.cols[0].name == field_name) {
|
|
4847
|
-
|
|
4620
|
+
val_not_convert = delta_options.name;
|
|
4848
4621
|
}
|
|
4849
|
-
} else if (currentgraph.chart_type === highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH) {
|
|
4850
|
-
lodash.forEach(currentgraph.options.walkthrough_options.values.walkthrough, value => {
|
|
4851
|
-
if (value.trend === 'total') {
|
|
4852
|
-
vals_not_convert.push(value.key[0]);
|
|
4853
|
-
}
|
|
4854
|
-
});
|
|
4855
4622
|
}
|
|
4856
|
-
return
|
|
4623
|
+
return val_not_convert;
|
|
4857
4624
|
};
|
|
4858
4625
|
|
|
4859
4626
|
highchartsRenderer.updateFiltersShowNames = function (filters) {
|
|
@@ -4873,8 +4640,8 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
4873
4640
|
})
|
|
4874
4641
|
};
|
|
4875
4642
|
|
|
4876
|
-
highchartsRenderer.returnRawDataValue = function (type, value, format, field_name,
|
|
4877
|
-
if (
|
|
4643
|
+
highchartsRenderer.returnRawDataValue = function (type, value, format, field_name, val_not_for_convert) {
|
|
4644
|
+
if (val_not_for_convert && val_not_for_convert == value) {
|
|
4878
4645
|
return value;
|
|
4879
4646
|
}
|
|
4880
4647
|
|
|
@@ -4970,7 +4737,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
4970
4737
|
};
|
|
4971
4738
|
|
|
4972
4739
|
highchartsRenderer.isSystemField = function (field) {
|
|
4973
|
-
var regex = new RegExp("^(Parent_Name|Parent_Id|FileBox_ID|FileBox_Name|DataMapper_Name|Doc_ID|Doc_version|Label|Submission_Date|User|table_id|Latest_In_Dim|Tab_name|CP_Name|DT_.+|VT_.+|System_.+)$", "m");
|
|
4740
|
+
var regex = new RegExp("^(Calc_Model_Name|Calc_Model_ID|Parent_Name|Parent_Id|FileBox_ID|FileBox_Name|DataMapper_Name|Doc_ID|Doc_version|Label|Submission_Date|User|table_id|Latest_In_Dim|Tab_name|CP_Name|DT_.+|VT_.+|System_.+)$", "m");
|
|
4974
4741
|
|
|
4975
4742
|
return (field.category && field.category.includes("")) || regex.test(field.name)
|
|
4976
4743
|
};
|
|
@@ -6982,16 +6749,16 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
6982
6749
|
value_name: 'name',
|
|
6983
6750
|
element_label: 'Name',
|
|
6984
6751
|
default_value: '_Variance'
|
|
6985
|
-
}, {
|
|
6986
|
-
element_type: 'input',
|
|
6987
|
-
value_name: 'formula',
|
|
6988
|
-
element_label: 'Formula',
|
|
6989
|
-
default_value: 'x2-x1'
|
|
6990
6752
|
}, {
|
|
6991
6753
|
element_type: 'input',
|
|
6992
|
-
value_name: '
|
|
6993
|
-
element_label: '
|
|
6994
|
-
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: ''
|
|
6995
6762
|
}, {
|
|
6996
6763
|
element_type: 'radio',
|
|
6997
6764
|
value_name: 'chart',
|
|
@@ -7115,16 +6882,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
7115
6882
|
legendTooltipTitle: 'Drag one field to further configure your x-axis.',
|
|
7116
6883
|
legendTooltipDescription: 'The breakdown subdivides the chart by a category field for further analysis of what’s contributing to the increase or decrease.',
|
|
7117
6884
|
},
|
|
7118
|
-
[highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH]: {
|
|
7119
|
-
name: 'Waterfall Walkthrough Chart ',
|
|
7120
|
-
label: 'Waterfall Walkthrough Chart ',
|
|
7121
|
-
title: 'TODO: add text',
|
|
7122
|
-
description: 'TODO: add text',
|
|
7123
|
-
axisName: 'Category',
|
|
7124
|
-
startedMessage: 'TODO: add text',
|
|
7125
|
-
axisTooltipTitle: 'TODO: add text',
|
|
7126
|
-
legendTooltipTitle: 'TODO: add text',
|
|
7127
|
-
},
|
|
7128
6885
|
'combo-chart': {
|
|
7129
6886
|
name: 'Combo Chart ',
|
|
7130
6887
|
label: 'Combo Chart ',
|
|
@@ -7780,24 +7537,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
7780
7537
|
highchartsRenderer.suboptions["legends"],
|
|
7781
7538
|
]
|
|
7782
7539
|
},
|
|
7783
|
-
{
|
|
7784
|
-
type: highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH,
|
|
7785
|
-
name: highchartsRenderer.chartsTypesInfo[highchartsRenderer.CHART_TYPES.WATERFALL_WALKTHROUGH].name,
|
|
7786
|
-
class: 'google-visualization-charteditor-thumbs-columnchart',
|
|
7787
|
-
render: highchartsRenderer.ptRenderWaterfallWalkthrough,
|
|
7788
|
-
suboptions: [
|
|
7789
|
-
highchartsRenderer.suboptions["axisX"],
|
|
7790
|
-
highchartsRenderer.suboptions["tooltips"],
|
|
7791
|
-
highchartsRenderer.suboptions["label"],
|
|
7792
|
-
highchartsRenderer.suboptions["subtitle"],
|
|
7793
|
-
highchartsRenderer.suboptions["widget_library"],
|
|
7794
|
-
highchartsRenderer.suboptions["chart"],
|
|
7795
|
-
highchartsRenderer.suboptions["negative_number_format"],
|
|
7796
|
-
highchartsRenderer.suboptions["advanced"],
|
|
7797
|
-
highchartsRenderer.suboptions["legends"],
|
|
7798
|
-
],
|
|
7799
|
-
hidden: true,
|
|
7800
|
-
},
|
|
7801
7540
|
]
|
|
7802
7541
|
},
|
|
7803
7542
|
];
|
|
@@ -8542,7 +8281,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
8542
8281
|
var data = res;
|
|
8543
8282
|
|
|
8544
8283
|
lodash.forEach(datesFields, function (row) {
|
|
8545
|
-
row.val_not_convert = highchartsRenderer.
|
|
8284
|
+
row.val_not_convert = highchartsRenderer.check_value_not_for_convert(widget, row.name);
|
|
8546
8285
|
});
|
|
8547
8286
|
|
|
8548
8287
|
if (datesFields.length > 0) {
|
|
@@ -8948,14 +8687,14 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
8948
8687
|
return rightPosition;
|
|
8949
8688
|
case 'none':
|
|
8950
8689
|
return none;
|
|
8951
|
-
}
|
|
8952
|
-
} else if (isLine) {
|
|
8953
|
-
return useNewUx ? leftPosition : rightPosition;
|
|
8954
|
-
} else if (isPie) {
|
|
8955
|
-
return useNewUx ? rightPosition : topPosition;
|
|
8956
8690
|
}
|
|
8691
|
+
} else if (isLine) {
|
|
8692
|
+
return useNewUx ? leftPosition : rightPosition;
|
|
8693
|
+
} else if (isPie) {
|
|
8694
|
+
return useNewUx ? rightPosition : topPosition;
|
|
8695
|
+
}
|
|
8957
8696
|
|
|
8958
|
-
|
|
8697
|
+
return useNewUx ? topPosition : bottomPosition;
|
|
8959
8698
|
}
|
|
8960
8699
|
|
|
8961
8700
|
highchartsRenderer.setYAxisMinMax = function (yAxis, axisYOptions) {
|