@datarailsshared/dr_renderer 1.4.118 → 1.4.121
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
@@ -709,7 +709,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
709
709
|
|
710
710
|
if (is_drill_down_pie && (highchartsRenderer.selfStartsWith(series_name, "Series ") || isChartWithMultiValues)) {
|
711
711
|
rows = [];
|
712
|
-
|
712
|
+
|
713
|
+
if (isChartWithMultiValues) {
|
714
|
+
cols = pivotData.getColKeys()[0];
|
715
|
+
}
|
713
716
|
}
|
714
717
|
|
715
718
|
if (pivotData.rowAttrs.length == 0
|
@@ -872,7 +875,10 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
|
|
872
875
|
|
873
876
|
if (is_drill_down_pie && (highchartsRenderer.selfStartsWith(series_name,"Series ") || isChartWithMultiValues)) {
|
874
877
|
rows = [];
|
875
|
-
|
878
|
+
|
879
|
+
if (isChartWithMultiValues) {
|
880
|
+
cols = pivotData.getColKeys()[0];
|
881
|
+
}
|
876
882
|
}
|
877
883
|
|
878
884
|
if (pivotData.rowAttrs.length == 0
|
@@ -648,15 +648,17 @@ describe('highcharts_renderer', () => {
|
|
648
648
|
funcContext.y = 500;
|
649
649
|
});
|
650
650
|
|
651
|
-
it('should handle drill-down pie when series name starts with "Series "', () => {
|
651
|
+
it('should handle drill-down pie when series name starts with "Series " and chart does not have multi values', () => {
|
652
652
|
highchartsRenderer.selfStartsWith.and.returnValue(true);
|
653
653
|
highchartsRenderer.getSeriesNameInFormatterContext.and.returnValue('Series 1');
|
654
|
+
highchartsRenderer.isChartWithMultiValues.and.returnValue(false);
|
654
655
|
|
655
656
|
opts = { chartOptions: {} };
|
656
657
|
let fn = highchartsRenderer.defaultDataLabelFormatter(mockPivotData, opts, true);
|
657
658
|
let result = fn.call(funcContext);
|
658
659
|
|
659
660
|
expect(highchartsRenderer.selfStartsWith).toHaveBeenCalledWith('Series 1', 'Series ');
|
661
|
+
expect(highchartsRenderer.isChartWithMultiValues).toHaveBeenCalledWith(mockPivotData);
|
660
662
|
expect(result).toBe('500');
|
661
663
|
});
|
662
664
|
|