@datarailsshared/dr_renderer 1.2.423 → 1.2.424

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.423",
3
+ "version": "1.2.424",
4
4
  "description": "DataRails charts and tables renderer",
5
5
  "keywords": [
6
6
  "datarails",
@@ -1985,7 +1985,6 @@ let getHighchartsRenderer = function ($, document, Highcharts, default_colors, h
1985
1985
  highchartsRenderer.getDataLabelsStylesForDrillDown = function(additionOptions) {
1986
1986
  let result = highchartsRenderer.getDataLabelsOptions(additionOptions, { dataLabels: {} });
1987
1987
 
1988
- if (!result.dataLabels) return {};
1989
1988
  return {
1990
1989
  activeDataLabelStyle: {
1991
1990
  color: result.dataLabels.color,
@@ -8931,4 +8931,19 @@ describe('highcharts_renderer', () => {
8931
8931
  });
8932
8932
  });
8933
8933
 
8934
+ describe('Function getDataLabelsStylesForDrillDown', () => {
8935
+
8936
+ it('should return an object with activeDataLabelStyle containing color from dataLabels', () => {
8937
+ const mockColor = 'red';
8938
+ const additionalOptions = {
8939
+ label_option: {
8940
+ font_color: mockColor,
8941
+ },
8942
+ };
8943
+
8944
+ const result = highchartsRenderer.getDataLabelsStylesForDrillDown(additionalOptions);
8945
+ expect(result).toEqual({ activeDataLabelStyle: { color: mockColor } });
8946
+ });
8947
+ });
8948
+
8934
8949
  });