@datarailsshared/dr_renderer 1.2.35 → 1.2.37
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 +34 -9
package/package.json
CHANGED
|
@@ -30,7 +30,12 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
30
30
|
// in lib it will not work
|
|
31
31
|
highchartsRenderer.elem1 = document.createElement('textarea');
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
if (lodash.isArray(default_colors)) {
|
|
34
|
+
highchartsRenderer.defaults_colors = default_colors;
|
|
35
|
+
} else {
|
|
36
|
+
highchartsRenderer.defaults_colors = default_colors.colors;
|
|
37
|
+
highchartsRenderer.variance_color = default_colors.variance_color;
|
|
38
|
+
}
|
|
34
39
|
|
|
35
40
|
highchartsRenderer.highcharts_theme = {
|
|
36
41
|
"colors": highchartsRenderer.defaults_colors,
|
|
@@ -1044,7 +1049,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1044
1049
|
};
|
|
1045
1050
|
|
|
1046
1051
|
highchartsRenderer.getVariantSeries = function (series, delta_column_options) {
|
|
1047
|
-
const varianceColor = delta_column_options.color
|
|
1052
|
+
const varianceColor = delta_column_options.color || highchartsRenderer.variance_color || Highcharts.getOptions().colors[7];
|
|
1048
1053
|
series.name = delta_column_options.name.replace('_', '');
|
|
1049
1054
|
series.color = varianceColor;
|
|
1050
1055
|
|
|
@@ -1951,7 +1956,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
1951
1956
|
labels_formatter = highchartsRenderer.persantageValueLabelsFormatter(pivotData, opts);
|
|
1952
1957
|
}
|
|
1953
1958
|
|
|
1954
|
-
const varianceColor = additionOptions.delta_column.color
|
|
1959
|
+
const varianceColor = additionOptions.delta_column.color || highchartsRenderer.variance_color || Highcharts.getOptions().colors[7];
|
|
1955
1960
|
chartOptions.yAxis[1] = {
|
|
1956
1961
|
title: {
|
|
1957
1962
|
text: additionOptions.delta_column.name.replace('_', ''),
|
|
@@ -5436,7 +5441,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5436
5441
|
name: 'Scatter chart',
|
|
5437
5442
|
label: 'Scatter Chart',
|
|
5438
5443
|
title: 'Presents the relationship between two variables.',
|
|
5439
|
-
description: "For example, the sales per sales rep, and the sales
|
|
5444
|
+
description: "For example, the sales per sales rep, and the sales rep\\'s tenure.",
|
|
5440
5445
|
axisName: 'X - Axis',
|
|
5441
5446
|
legendName: 'Data series',
|
|
5442
5447
|
startedMessage: 'To get started, drag one field (or more) to the x-axis section, and one field to the value section. Best practice: add one field to the data series section too.',
|
|
@@ -5472,7 +5477,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5472
5477
|
description: 'Ideal for visualizing KPIs.',
|
|
5473
5478
|
axisName: 'Polygon’s Edges',
|
|
5474
5479
|
legendName: 'Data series',
|
|
5475
|
-
startedMessage: 'To get started, drag one field (or more) to the ‘Polygon’s
|
|
5480
|
+
startedMessage: 'To get started, drag one field (or more) to the ‘Polygon’s Edges’ section, and one field to the value section. Best practice: add one field to the data series section too.',
|
|
5476
5481
|
axisTooltipTitle: 'Drag one or more fields to create the Polygons edges.',
|
|
5477
5482
|
legendTooltipTitle: 'Adding a field in this section will display data points in your chart for each item in that field.',
|
|
5478
5483
|
},
|
|
@@ -5495,7 +5500,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5495
5500
|
description: 'For example, comparison over time of expenses divided into subcategories. The chart describes both total expenses over time and the relation between the different sub-categories.',
|
|
5496
5501
|
axisName: 'X - Axis',
|
|
5497
5502
|
legendName: 'Data series',
|
|
5498
|
-
startedMessage: 'To get started, drag one field to the x-axis section, and one field to the value section. Best practice: we recommend adding one field to the
|
|
5503
|
+
startedMessage: 'To get started, drag one field to the x-axis section, and one field to the value section. Best practice: we recommend adding one field to the data series section too.',
|
|
5499
5504
|
axisTooltipTitle: 'Drag one or more fields here to create your x-axis. Each item within the field will appear as a different column.',
|
|
5500
5505
|
legendTooltipTitle: 'Each field item will appear as a different segment within the column.',
|
|
5501
5506
|
},
|
|
@@ -5506,7 +5511,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5506
5511
|
description: 'For example, compare Revenue subcategories across multiple regions.',
|
|
5507
5512
|
axisName: 'Y - Axis',
|
|
5508
5513
|
legendName: 'Data series',
|
|
5509
|
-
startedMessage: 'To get started, drag one field to the y-axis section, and one field to the value section. Best practice: add one field to the
|
|
5514
|
+
startedMessage: 'To get started, drag one field to the y-axis section, and one field to the value section. Best practice: add one field to the data series section too.',
|
|
5510
5515
|
axisTooltipTitle: 'Drag one or more fields here to create your y-axis.',
|
|
5511
5516
|
legendTooltipTitle: 'Each field item will appear as a different segment within the bar.',
|
|
5512
5517
|
},
|
|
@@ -5569,7 +5574,7 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5569
5574
|
title: 'Present your report or analysis in a table.',
|
|
5570
5575
|
axisName: 'Columns',
|
|
5571
5576
|
legendName: 'Rows',
|
|
5572
|
-
startedMessage: 'To get started, drag one or more fields to the
|
|
5577
|
+
startedMessage: 'To get started, drag one or more fields to the rows section, and one field to the value section. Best practice: add one or more fields to the columns section too.',
|
|
5573
5578
|
axisTooltipTitle: 'Drag one or more fields here to create your columns.',
|
|
5574
5579
|
legendTooltipTitle: 'Each field item will appear as a row within the table.',
|
|
5575
5580
|
},
|
|
@@ -5932,7 +5937,27 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
|
5932
5937
|
highchartsRenderer.suboptions["legends"],
|
|
5933
5938
|
]
|
|
5934
5939
|
}]
|
|
5935
|
-
}
|
|
5940
|
+
},
|
|
5941
|
+
{
|
|
5942
|
+
type: 'table',
|
|
5943
|
+
name: 'Table',
|
|
5944
|
+
class: 'google-visualization-charteditor-mini-table',
|
|
5945
|
+
subtypes: [{
|
|
5946
|
+
type: 'table_only',
|
|
5947
|
+
name: highchartsRenderer.chartsTypesInfo['table_only'].name,
|
|
5948
|
+
class: 'google-visualization-charteditor-thumbs-table',
|
|
5949
|
+
render: highchartsRenderer.ptRenderBasicLine,
|
|
5950
|
+
suboptions: [
|
|
5951
|
+
highchartsRenderer.suboptions["table_options_transpose"],
|
|
5952
|
+
highchartsRenderer.suboptions["negative_number_format"],
|
|
5953
|
+
highchartsRenderer.suboptions["delta_column"],
|
|
5954
|
+
highchartsRenderer.suboptions["error_policy"],
|
|
5955
|
+
highchartsRenderer.suboptions["from_version"],
|
|
5956
|
+
],
|
|
5957
|
+
default_options: {}
|
|
5958
|
+
}
|
|
5959
|
+
]
|
|
5960
|
+
},
|
|
5936
5961
|
];
|
|
5937
5962
|
|
|
5938
5963
|
highchartsRenderer.richTextSubType = {
|