@fluentui/react-charting 5.24.2 → 5.24.4

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.
Files changed (192) hide show
  1. package/CHANGELOG.json +79 -1
  2. package/CHANGELOG.md +28 -2
  3. package/dist/react-charting.d.ts +204 -38
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +65 -12
  7. package/lib/ScatterChart.d.ts +1 -0
  8. package/lib/ScatterChart.js +2 -0
  9. package/lib/ScatterChart.js.map +1 -0
  10. package/lib/components/AreaChart/AreaChart.base.d.ts +1 -0
  11. package/lib/components/AreaChart/AreaChart.base.js +4 -1
  12. package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.base.js +47 -11
  14. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  15. package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
  16. package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  17. package/lib/components/CommonComponents/CartesianChart.types.d.ts +33 -3
  18. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  19. package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
  20. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  21. package/lib/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  22. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +9 -1
  23. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  24. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
  25. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +317 -126
  26. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  27. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
  28. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +22 -3
  29. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  30. package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
  31. package/lib/components/HeatMapChart/HeatMapChart.base.js +95 -37
  32. package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  33. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
  34. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +24 -3
  35. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  36. package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
  37. package/lib/components/ScatterChart/ScatterChart.base.js +482 -0
  38. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
  39. package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
  40. package/lib/components/ScatterChart/ScatterChart.js +10 -0
  41. package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
  42. package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
  43. package/lib/components/ScatterChart/ScatterChart.styles.js +19 -0
  44. package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
  45. package/lib/components/ScatterChart/ScatterChart.types.d.ts +47 -0
  46. package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
  47. package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
  48. package/lib/components/ScatterChart/index.d.ts +2 -0
  49. package/lib/components/ScatterChart/index.js +3 -0
  50. package/lib/components/ScatterChart/index.js.map +1 -0
  51. package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
  52. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +27 -6
  53. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  54. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
  55. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +48 -31
  56. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  57. package/lib/index.d.ts +3 -1
  58. package/lib/index.js +1 -0
  59. package/lib/index.js.map +1 -1
  60. package/lib/types/IDataPoint.d.ts +91 -11
  61. package/lib/types/IDataPoint.js.map +1 -1
  62. package/lib/utilities/SVGTooltipText.d.ts +4 -0
  63. package/lib/utilities/SVGTooltipText.js +1 -2
  64. package/lib/utilities/SVGTooltipText.js.map +1 -1
  65. package/lib/utilities/utilities.d.ts +32 -5
  66. package/lib/utilities/utilities.js +132 -2
  67. package/lib/utilities/utilities.js.map +1 -1
  68. package/lib-amd/ScatterChart.d.ts +1 -0
  69. package/lib-amd/ScatterChart.js +6 -0
  70. package/lib-amd/ScatterChart.js.map +1 -0
  71. package/lib-amd/components/AreaChart/AreaChart.base.d.ts +1 -0
  72. package/lib-amd/components/AreaChart/AreaChart.base.js +4 -1
  73. package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
  74. package/lib-amd/components/CommonComponents/CartesianChart.base.js +47 -11
  75. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  76. package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
  77. package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  78. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +33 -3
  79. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  80. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
  81. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  82. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  83. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
  84. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  85. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
  86. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
  87. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  88. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
  89. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
  90. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  91. package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
  92. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +94 -36
  93. package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  94. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
  95. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
  96. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  97. package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
  98. package/lib-amd/components/ScatterChart/ScatterChart.base.js +476 -0
  99. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
  100. package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
  101. package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
  102. package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
  103. package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
  104. package/lib-amd/components/ScatterChart/ScatterChart.styles.js +23 -0
  105. package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
  106. package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +47 -0
  107. package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
  108. package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
  109. package/lib-amd/components/ScatterChart/index.d.ts +2 -0
  110. package/lib-amd/components/ScatterChart/index.js +7 -0
  111. package/lib-amd/components/ScatterChart/index.js.map +1 -0
  112. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
  113. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
  114. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  115. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
  116. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
  117. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  118. package/lib-amd/index.d.ts +3 -1
  119. package/lib-amd/index.js +3 -2
  120. package/lib-amd/index.js.map +1 -1
  121. package/lib-amd/types/IDataPoint.d.ts +91 -11
  122. package/lib-amd/types/IDataPoint.js.map +1 -1
  123. package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
  124. package/lib-amd/utilities/SVGTooltipText.js +1 -2
  125. package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
  126. package/lib-amd/utilities/utilities.d.ts +32 -5
  127. package/lib-amd/utilities/utilities.js +135 -2
  128. package/lib-amd/utilities/utilities.js.map +1 -1
  129. package/lib-commonjs/ScatterChart.d.ts +1 -0
  130. package/lib-commonjs/ScatterChart.js +5 -0
  131. package/lib-commonjs/ScatterChart.js.map +1 -0
  132. package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +1 -0
  133. package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -1
  134. package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
  135. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +47 -11
  136. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  137. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
  138. package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
  139. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +33 -3
  140. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  141. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
  142. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  143. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  144. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
  145. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  146. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
  147. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
  148. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  149. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
  150. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
  151. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  152. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
  153. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +94 -36
  154. package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
  155. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
  156. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
  157. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  158. package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
  159. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +485 -0
  160. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
  161. package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
  162. package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
  163. package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
  164. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
  165. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +23 -0
  166. package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
  167. package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +47 -0
  168. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
  169. package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
  170. package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
  171. package/lib-commonjs/components/ScatterChart/index.js +6 -0
  172. package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
  173. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
  174. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
  175. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  176. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
  177. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
  178. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  179. package/lib-commonjs/index.d.ts +3 -1
  180. package/lib-commonjs/index.js +3 -1
  181. package/lib-commonjs/index.js.map +1 -1
  182. package/lib-commonjs/types/IDataPoint.d.ts +91 -11
  183. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  184. package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
  185. package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
  186. package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
  187. package/lib-commonjs/utilities/utilities.d.ts +32 -5
  188. package/lib-commonjs/utilities/utilities.js +135 -2
  189. package/lib-commonjs/utilities/utilities.js.map +1 -1
  190. package/package.json +2 -2
  191. package/src/components/CommonComponents/CartesianChart.types.ts +45 -2
  192. package/src/components/ScatterChart/ScatterChart.types.ts +67 -0
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getStyles = void 0;
4
+ var tslib_1 = require("tslib");
5
+ var Styling_1 = require("@fluentui/react/lib/Styling");
6
+ var getStyles = function (props) {
7
+ var _a;
8
+ return {
9
+ tooltip: tslib_1.__assign(tslib_1.__assign({}, props.theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: props.theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: props.theme.semanticColors.bodyText }),
10
+ markerLabel: {
11
+ fontSize: Styling_1.FontSizes.medium,
12
+ fill: props.theme.semanticColors.bodyText,
13
+ textAnchor: 'middle',
14
+ selectors: (_a = {},
15
+ _a[Styling_1.HighContrastSelector] = {
16
+ fill: 'CanvasText',
17
+ },
18
+ _a),
19
+ },
20
+ };
21
+ };
22
+ exports.getStyles = getStyles;
23
+ //# sourceMappingURL=ScatterChart.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScatterChart.styles.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.styles.ts"],"names":[],"mappings":";;;;AAAA,uDAA8E;AAGvE,IAAM,SAAS,GAAG,UAAC,KAA8B;;IACtD,OAAO;QACL,OAAO,wCACF,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,KAC5B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,cAAc,EACtD,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,QAAQ,GAC5C;QACD,WAAW,EAAE;YACX,QAAQ,EAAE,mBAAS,CAAC,MAAM;YAC1B,IAAI,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,QAAQ;YAC1C,UAAU,EAAE,QAAQ;YACpB,SAAS;gBACP,GAAC,8BAAoB,IAAG;oBACtB,IAAI,EAAE,YAAY;iBACnB;mBACF;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA1BW,QAAA,SAAS,aA0BpB","sourcesContent":["import { FontSizes, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { IScatterChartStyleProps, IScatterChartStyles } from './ScatterChart.types';\n\nexport const getStyles = (props: IScatterChartStyleProps): IScatterChartStyles => {\n return {\n tooltip: {\n ...props.theme!.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: props.theme!.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: props.theme!.semanticColors.bodyText,\n },\n markerLabel: {\n fontSize: FontSizes.medium,\n fill: props.theme!.semanticColors.bodyText,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n };\n};\n"]}
@@ -0,0 +1,47 @@
1
+ import { IRenderFunction } from '@fluentui/react/lib/Utilities';
2
+ import { IChartProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData, ICustomizedCalloutData } from '../../types/index';
3
+ import { ICartesianChartProps, ICartesianChartStyleProps, ICartesianChartStyles, IChildProps } from '../CommonComponents/index';
4
+ import { IStyle } from '@fluentui/react';
5
+ export type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };
6
+ /**
7
+ * Line Chart properties
8
+ * {@docCategory LineChart}
9
+ */
10
+ export interface IScatterChartProps extends ICartesianChartProps {
11
+ /**
12
+ * Data to render in the chart.
13
+ */
14
+ data: IChartProps;
15
+ /**
16
+ * Call to provide customized styling that will layer on top of the variant rules.
17
+ */
18
+ styles?: IScatterChartStyles;
19
+ /**
20
+ * Define a custom callout renderer for a data point
21
+ */
22
+ onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;
23
+ /**
24
+ * Callback for getting callout description message
25
+ */
26
+ getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;
27
+ /**
28
+ * The prop used to define the culture to localized the numbers
29
+ */
30
+ culture?: string;
31
+ }
32
+ /**
33
+ * Scatter Chart styles
34
+ * {@docCategory ScatterChart}
35
+ */
36
+ export interface IScatterChartStyles extends ICartesianChartStyles {
37
+ /**
38
+ * Style for the marker label
39
+ */
40
+ markerLabel?: IStyle;
41
+ }
42
+ /**
43
+ * Scatter Chart style properties
44
+ * {@docCategory ScatterChart}
45
+ */
46
+ export interface IScatterChartStyleProps extends ICartesianChartStyleProps {
47
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=ScatterChart.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScatterChart.types.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.types.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { IRenderFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IChartProps,\n ILineChartPoints,\n IMargins,\n IBasestate,\n IRefArrayData,\n ICustomizedCalloutData,\n} from '../../types/index';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n} from '../CommonComponents/index';\nimport { IStyle } from '@fluentui/react';\n\nexport type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface IScatterChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IScatterChartStyles;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n}\n\n/**\n * Scatter Chart styles\n * {@docCategory ScatterChart}\n */\nexport interface IScatterChartStyles extends ICartesianChartStyles {\n /**\n * Style for the marker label\n */\n markerLabel?: IStyle;\n}\n\n/**\n * Scatter Chart style properties\n * {@docCategory ScatterChart}\n */\nexport interface IScatterChartStyleProps extends ICartesianChartStyleProps {}\n"]}
@@ -0,0 +1,2 @@
1
+ export * from './ScatterChart';
2
+ export * from './ScatterChart.types';
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ var tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./ScatterChart"), exports);
5
+ tslib_1.__exportStar(require("./ScatterChart.types"), exports);
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ScatterChart/index.ts"],"names":[],"mappings":";;;AAAA,yDAA+B;AAC/B,+DAAqC","sourcesContent":["export * from './ScatterChart';\nexport * from './ScatterChart.types';\n"]}
@@ -91,4 +91,6 @@ export declare class VerticalBarChartBase extends React.Component<IVerticalBarCh
91
91
  private _getDomainMargins;
92
92
  private _isChartEmpty;
93
93
  private _getChartTitle;
94
+ private _getOrderedXAxisLabels;
95
+ private _mapCategoryToValues;
94
96
  }
@@ -491,6 +491,26 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
491
491
  (_this._isHavingLine ? ' and 1 line' : '') +
492
492
  '. ');
493
493
  };
494
+ _this._getOrderedXAxisLabels = function () {
495
+ if (_this._xAxisType !== index_2.XAxisTypes.StringAxis) {
496
+ return [];
497
+ }
498
+ return (0, index_2.sortAxisCategories)(_this._mapCategoryToValues(), _this.props.xAxisCategoryOrder);
499
+ };
500
+ _this._mapCategoryToValues = function () {
501
+ var categoryToValues = {};
502
+ _this._points.forEach(function (point) {
503
+ var xValue = point.x;
504
+ if (!categoryToValues[xValue]) {
505
+ categoryToValues[xValue] = [];
506
+ }
507
+ categoryToValues[xValue].push(point.y);
508
+ if (point.lineData) {
509
+ categoryToValues[xValue].push(point.lineData.y);
510
+ }
511
+ });
512
+ return categoryToValues;
513
+ };
494
514
  (0, Utilities_1.initializeComponentRef)(_this);
495
515
  _this.state = {
496
516
  color: '',
@@ -510,10 +530,6 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
510
530
  _this._calloutId = (0, Utilities_1.getId)('callout');
511
531
  _this._tooltipId = (0, Utilities_1.getId)('VCTooltipID_');
512
532
  _this._refArray = [];
513
- _this._xAxisType =
514
- _this.props.data && _this.props.data.length > 0
515
- ? (0, index_2.getTypeOfAxis)(_this.props.data[0].x, true)
516
- : index_2.XAxisTypes.StringAxis;
517
533
  _this._emptyChartId = (0, Utilities_1.getId)('_VBC_empty');
518
534
  _this._domainMargin = MIN_DOMAIN_MARGIN;
519
535
  _this._cartesianChartRef = React.createRef();
@@ -531,7 +547,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
531
547
  VerticalBarChartBase.prototype.render = function () {
532
548
  var _this = this;
533
549
  this._adjustProps();
534
- this._xAxisLabels = this._points.map(function (point) { return point.x; });
550
+ this._xAxisLabels = this._getOrderedXAxisLabels();
535
551
  this._yMax = Math.max((0, d3_array_1.max)(this._points, function (point) { return point.y; }), this.props.yMaxValue || 0);
536
552
  this._yMin = Math.min((0, d3_array_1.min)(this._points, function (point) { return point.y; }), this.props.yMinValue || 0);
537
553
  var legendBars = this._getLegendData(this._points, this.props.theme.palette);
@@ -569,6 +585,10 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
569
585
  configurable: true
570
586
  });
571
587
  VerticalBarChartBase.prototype._adjustProps = function () {
588
+ this._xAxisType =
589
+ this.props.data && this.props.data.length > 0
590
+ ? (0, index_2.getTypeOfAxis)(this.props.data[0].x, true)
591
+ : index_2.XAxisTypes.StringAxis;
572
592
  this._points = this.props.data || [];
573
593
  this._barWidth = (0, index_2.getBarWidth)(this.props.barWidth, this.props.maxBarWidth, undefined, this.props.mode);
574
594
  var palette = this.props.theme.palette;
@@ -914,6 +934,7 @@ var VerticalBarChartBase = /** @class */ (function (_super) {
914
934
  VerticalBarChartBase.defaultProps = {
915
935
  maxBarWidth: 24,
916
936
  useUTC: true,
937
+ xAxisCategoryOrder: 'default',
917
938
  };
918
939
  return VerticalBarChartBase;
919
940
  }(React.Component));