@fluentui/react-charting 5.21.31 → 5.22.0

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 (189) hide show
  1. package/CHANGELOG.json +51 -1
  2. package/CHANGELOG.md +22 -2
  3. package/dist/react-charting.d.ts +152 -0
  4. package/dist/react-charting.js +1 -1
  5. package/dist/react-charting.min.js +1 -1
  6. package/etc/react-charting.api.md +60 -0
  7. package/lib/components/DonutChart/Arc/Arc.js +22 -5
  8. package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
  9. package/lib/components/DonutChart/Arc/Arc.types.d.ts +15 -0
  10. package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
  11. package/lib/components/DonutChart/DonutChart.base.js +13 -4
  12. package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
  13. package/lib/components/DonutChart/DonutChart.types.d.ts +10 -0
  14. package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
  15. package/lib/components/DonutChart/Pie/Pie.js +8 -2
  16. package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
  17. package/lib/components/DonutChart/Pie/Pie.types.d.ts +10 -0
  18. package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
  19. package/lib/components/GaugeChart/GaugeChart.base.js +30 -6
  20. package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
  21. package/lib/components/GaugeChart/GaugeChart.types.d.ts +14 -0
  22. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  23. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +29 -6
  24. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  25. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
  26. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  27. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +26 -9
  28. package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  29. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
  30. package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  31. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +75 -30
  32. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  33. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
  34. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  35. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +29 -10
  36. package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  37. package/lib/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
  38. package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  39. package/lib/components/StackedBarChart/StackedBarChart.base.js +18 -7
  40. package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  41. package/lib/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
  42. package/lib/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  43. package/lib/components/VerticalBarChart/VerticalBarChart.base.js +79 -14
  44. package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  45. package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
  46. package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  47. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +32 -10
  48. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  49. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
  50. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  51. package/lib/index.d.ts +39 -20
  52. package/lib/index.js +20 -20
  53. package/lib/index.js.map +1 -1
  54. package/lib/types/IDataPoint.d.ts +25 -0
  55. package/lib/types/IDataPoint.js.map +1 -1
  56. package/lib/utilities/gradients.d.ts +30 -0
  57. package/lib/utilities/gradients.js +173 -0
  58. package/lib/utilities/gradients.js.map +1 -0
  59. package/lib/utilities/index.d.ts +1 -0
  60. package/lib/utilities/index.js +1 -0
  61. package/lib/utilities/index.js.map +1 -1
  62. package/lib/version.js +1 -1
  63. package/lib/version.js.map +1 -1
  64. package/lib-amd/components/DonutChart/Arc/Arc.js +21 -4
  65. package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
  66. package/lib-amd/components/DonutChart/Arc/Arc.types.d.ts +15 -0
  67. package/lib-amd/components/DonutChart/Arc/Arc.types.js.map +1 -1
  68. package/lib-amd/components/DonutChart/DonutChart.base.js +12 -3
  69. package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
  70. package/lib-amd/components/DonutChart/DonutChart.types.d.ts +10 -0
  71. package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
  72. package/lib-amd/components/DonutChart/Pie/Pie.js +7 -1
  73. package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
  74. package/lib-amd/components/DonutChart/Pie/Pie.types.d.ts +10 -0
  75. package/lib-amd/components/DonutChart/Pie/Pie.types.js.map +1 -1
  76. package/lib-amd/components/GaugeChart/GaugeChart.base.js +28 -4
  77. package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
  78. package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +14 -0
  79. package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
  80. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +28 -5
  81. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  82. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
  83. package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  84. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +25 -8
  85. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  86. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
  87. package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  88. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +74 -29
  89. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  90. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
  91. package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  92. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +28 -9
  93. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  94. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
  95. package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  96. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +17 -6
  97. package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  98. package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
  99. package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  100. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +78 -13
  101. package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  102. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
  103. package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  104. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +31 -9
  105. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  106. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
  107. package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  108. package/lib-amd/index.d.ts +39 -20
  109. package/lib-amd/index.js +36 -21
  110. package/lib-amd/index.js.map +1 -1
  111. package/lib-amd/types/IDataPoint.d.ts +25 -0
  112. package/lib-amd/types/IDataPoint.js.map +1 -1
  113. package/lib-amd/utilities/gradients.d.ts +30 -0
  114. package/lib-amd/utilities/gradients.js +180 -0
  115. package/lib-amd/utilities/gradients.js.map +1 -0
  116. package/lib-amd/utilities/index.d.ts +1 -0
  117. package/lib-amd/utilities/index.js +2 -1
  118. package/lib-amd/utilities/index.js.map +1 -1
  119. package/lib-amd/version.js +1 -1
  120. package/lib-amd/version.js.map +1 -1
  121. package/lib-commonjs/components/DonutChart/Arc/Arc.js +21 -4
  122. package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
  123. package/lib-commonjs/components/DonutChart/Arc/Arc.types.d.ts +15 -0
  124. package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
  125. package/lib-commonjs/components/DonutChart/DonutChart.base.js +12 -3
  126. package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
  127. package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +10 -0
  128. package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
  129. package/lib-commonjs/components/DonutChart/Pie/Pie.js +7 -1
  130. package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
  131. package/lib-commonjs/components/DonutChart/Pie/Pie.types.d.ts +10 -0
  132. package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
  133. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +28 -4
  134. package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
  135. package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +14 -0
  136. package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
  137. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +28 -5
  138. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
  139. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
  140. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
  141. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +25 -8
  142. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
  143. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
  144. package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
  145. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +74 -29
  146. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
  147. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
  148. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
  149. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +28 -9
  150. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
  151. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
  152. package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
  153. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +17 -6
  154. package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
  155. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
  156. package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
  157. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +78 -13
  158. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
  159. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
  160. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
  161. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +31 -9
  162. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
  163. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
  164. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
  165. package/lib-commonjs/index.d.ts +39 -20
  166. package/lib-commonjs/index.js +55 -21
  167. package/lib-commonjs/index.js.map +1 -1
  168. package/lib-commonjs/types/IDataPoint.d.ts +25 -0
  169. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  170. package/lib-commonjs/utilities/gradients.d.ts +30 -0
  171. package/lib-commonjs/utilities/gradients.js +178 -0
  172. package/lib-commonjs/utilities/gradients.js.map +1 -0
  173. package/lib-commonjs/utilities/index.d.ts +1 -0
  174. package/lib-commonjs/utilities/index.js +1 -0
  175. package/lib-commonjs/utilities/index.js.map +1 -1
  176. package/lib-commonjs/version.js +1 -1
  177. package/lib-commonjs/version.js.map +1 -1
  178. package/package.json +4 -4
  179. package/project.json +6 -1
  180. package/src/components/DonutChart/Arc/Arc.types.ts +18 -0
  181. package/src/components/DonutChart/DonutChart.types.ts +12 -0
  182. package/src/components/DonutChart/Pie/Pie.types.ts +12 -0
  183. package/src/components/GaugeChart/GaugeChart.types.ts +17 -0
  184. package/src/components/HorizontalBarChart/HorizontalBarChart.types.ts +12 -0
  185. package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +12 -0
  186. package/src/components/StackedBarChart/MultiStackedBarChart.types.ts +12 -0
  187. package/src/components/StackedBarChart/StackedBarChart.types.ts +12 -0
  188. package/src/components/VerticalBarChart/VerticalBarChart.types.ts +12 -0
  189. package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +12 -0
@@ -1,21 +1,40 @@
1
- export * from './HorizontalBarChart';
2
- export * from './DonutChart';
3
- export * from './Legends';
4
- export * from './LineChart';
5
- export * from './AreaChart';
6
- export * from './PieChart';
7
- export * from './StackedBarChart';
8
- export * from './VerticalBarChart';
9
- export * from './VerticalStackedBarChart';
10
- export * from './GroupedVerticalBarChart';
11
- export * from './CartesianChart';
12
- export * from './types/index';
13
- export * from './utilities/ChartHoverCard/index';
14
- export * from './HeatMapChart';
15
- export * from './SankeyChart';
16
- export * from './TreeChart';
17
- export * from './Sparkline';
18
- export * from './HorizontalBarChartWithAxis';
19
- export * from './utilities/colors';
20
- export * from './GaugeChart';
1
+ export type { ChartDataMode, IHorizontalBarChartProps, IHorizontalBarChartStyleProps, IHorizontalBarChartStyles, } from './HorizontalBarChart';
2
+ export { HorizontalBarChart, HorizontalBarChartVariant } from './HorizontalBarChart';
3
+ export type { IDonutChart, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart';
4
+ export { DonutChart } from './DonutChart';
5
+ export type { ILegend, ILegendOverflowData, ILegendStyleProps, ILegendSubComponentStyles, ILegendsProps, ILegendsStyles, IShapeProps, LegendShape, } from './Legends';
6
+ export { Legends, Shape } from './Legends';
7
+ export type { IColorFillBarData, IColorFillBarsProps, IEventsAnnotationProps, ILineChartProps, ILineChartStyleProps, ILineChartStyles, } from './LineChart';
8
+ export { LineChart, Textbox } from './LineChart';
9
+ export type { IAreaChartProps, IAreaChartStyleProps, IAreaChartStyles } from './AreaChart';
10
+ export { AreaChart } from './AreaChart';
11
+ export type { IPieChart, IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart';
12
+ export { PieChart } from './PieChart';
13
+ export type { IMultiStackedBarChartProps, IMultiStackedBarChartStyleProps, IMultiStackedBarChartStyles, IStackedBarChart, IStackedBarChartProps, IStackedBarChartStyleProps, IStackedBarChartStyles, } from './StackedBarChart';
14
+ export { MultiStackedBarChart, MultiStackedBarChartVariant, StackedBarChart } from './StackedBarChart';
15
+ export type { IVerticalBarChartProps, IVerticalBarChartStyleProps, IVerticalBarChartStyles } from './VerticalBarChart';
16
+ export { VerticalBarChart } from './VerticalBarChart';
17
+ export type { IVerticalStackedBarChartProps, IVerticalStackedBarChartStyleProps, IVerticalStackedBarChartStyles, } from './VerticalStackedBarChart';
18
+ export { VerticalStackedBarChart } from './VerticalStackedBarChart';
19
+ export type { IGroupedVerticalBarChartProps, IGroupedVerticalBarChartStyleProps, IGroupedVerticalBarChartStyles, } from './GroupedVerticalBarChart';
20
+ export { GroupedVerticalBarChart } from './GroupedVerticalBarChart';
21
+ export type { ICartesianChartProps, ICartesianChartStyleProps, ICartesianChartStyles, IChildProps, IModifiedCartesianChartProps, IYValueHover, } from './CartesianChart';
22
+ export { CartesianChart } from './CartesianChart';
23
+ export type { IAccessibilityProps, IBasestate, IChartDataPoint, IChartProps, ICustomizedCalloutData, ICustomizedCalloutDataPoint, IDataPoint, IGVBarChartSeriesPoint, IGVDataPoint, IGVForBarChart, IGVSingleDataPoint, IGroupedVerticalBarChartData, IHeatMapChartData, IHeatMapChartDataPoint, IHorizontalBarChartWithAxisDataPoint, IHorizontalDataPoint, ILegendDataItem, ILineChartDataPoint, ILineChartGap, ILineChartLineOptions, ILineChartPoints, ILineDataInVerticalBarChart, ILineDataInVerticalStackedBarChart, IMargins, IRefArrayData, ISankeyChartData, IVSChartDataPoint, IVerticalBarChartDataPoint, IVerticalStackedBarDataPoint, IVerticalStackedChartProps, SLink, SNode, } from './types/index';
24
+ export type { IChartHoverCardProps, IChartHoverCardStyleProps, IChartHoverCardStyles, } from './utilities/ChartHoverCard/index';
25
+ export { ChartHoverCard, getChartHoverCardStyles } from './utilities/ChartHoverCard/index';
26
+ export type { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart';
27
+ export { HeatMapChart } from './HeatMapChart';
28
+ export type { ISankeyChartAccessibilityProps, ISankeyChartProps, ISankeyChartStrings, ISankeyChartStyleProps, ISankeyChartStyles, } from './SankeyChart';
29
+ export { SankeyChart } from './SankeyChart';
30
+ export type { ITreeChartDataPoint, ITreeDataStructure, ITreeProps, ITreeState, ITreeStyleProps, ITreeStyles, } from './TreeChart';
31
+ export { NodesComposition, TreeChart, TreeTraverse } from './TreeChart';
32
+ export type { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from './Sparkline';
33
+ export { Sparkline } from './Sparkline';
34
+ export type { IHorizontalBarChartWithAxisProps, IHorizontalBarChartWithAxisStyleProps, IHorizontalBarChartWithAxisStyles, } from './HorizontalBarChartWithAxis';
35
+ export { HorizontalBarChartWithAxis } from './HorizontalBarChartWithAxis';
36
+ export { DataVizPalette, getColorFromToken, getNextColor } from './utilities/colors';
37
+ export { DataVizGradientPalette, getGradientFromToken, getNextGradient } from './utilities/gradients';
38
+ export type { IGaugeChartProps, IGaugeChartSegment, IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart';
39
+ export { GaugeChart, GaugeChartVariant, GaugeValueFormat } from './GaugeChart';
21
40
  import './version';
package/lib-amd/index.js CHANGED
@@ -1,25 +1,40 @@
1
- define(["require", "exports", "tslib", "./HorizontalBarChart", "./DonutChart", "./Legends", "./LineChart", "./AreaChart", "./PieChart", "./StackedBarChart", "./VerticalBarChart", "./VerticalStackedBarChart", "./GroupedVerticalBarChart", "./CartesianChart", "./types/index", "./utilities/ChartHoverCard/index", "./HeatMapChart", "./SankeyChart", "./TreeChart", "./Sparkline", "./HorizontalBarChartWithAxis", "./utilities/colors", "./GaugeChart", "./version"], function (require, exports, tslib_1, HorizontalBarChart_1, DonutChart_1, Legends_1, LineChart_1, AreaChart_1, PieChart_1, StackedBarChart_1, VerticalBarChart_1, VerticalStackedBarChart_1, GroupedVerticalBarChart_1, CartesianChart_1, index_1, index_2, HeatMapChart_1, SankeyChart_1, TreeChart_1, Sparkline_1, HorizontalBarChartWithAxis_1, colors_1, GaugeChart_1) {
1
+ define(["require", "exports", "./HorizontalBarChart", "./DonutChart", "./Legends", "./LineChart", "./AreaChart", "./PieChart", "./StackedBarChart", "./VerticalBarChart", "./VerticalStackedBarChart", "./GroupedVerticalBarChart", "./CartesianChart", "./utilities/ChartHoverCard/index", "./HeatMapChart", "./SankeyChart", "./TreeChart", "./Sparkline", "./HorizontalBarChartWithAxis", "./utilities/colors", "./utilities/gradients", "./GaugeChart", "./version"], function (require, exports, HorizontalBarChart_1, DonutChart_1, Legends_1, LineChart_1, AreaChart_1, PieChart_1, StackedBarChart_1, VerticalBarChart_1, VerticalStackedBarChart_1, GroupedVerticalBarChart_1, CartesianChart_1, index_1, HeatMapChart_1, SankeyChart_1, TreeChart_1, Sparkline_1, HorizontalBarChartWithAxis_1, colors_1, gradients_1, GaugeChart_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- tslib_1.__exportStar(HorizontalBarChart_1, exports);
5
- tslib_1.__exportStar(DonutChart_1, exports);
6
- tslib_1.__exportStar(Legends_1, exports);
7
- tslib_1.__exportStar(LineChart_1, exports);
8
- tslib_1.__exportStar(AreaChart_1, exports);
9
- tslib_1.__exportStar(PieChart_1, exports);
10
- tslib_1.__exportStar(StackedBarChart_1, exports);
11
- tslib_1.__exportStar(VerticalBarChart_1, exports);
12
- tslib_1.__exportStar(VerticalStackedBarChart_1, exports);
13
- tslib_1.__exportStar(GroupedVerticalBarChart_1, exports);
14
- tslib_1.__exportStar(CartesianChart_1, exports);
15
- tslib_1.__exportStar(index_1, exports);
16
- tslib_1.__exportStar(index_2, exports);
17
- tslib_1.__exportStar(HeatMapChart_1, exports);
18
- tslib_1.__exportStar(SankeyChart_1, exports);
19
- tslib_1.__exportStar(TreeChart_1, exports);
20
- tslib_1.__exportStar(Sparkline_1, exports);
21
- tslib_1.__exportStar(HorizontalBarChartWithAxis_1, exports);
22
- tslib_1.__exportStar(colors_1, exports);
23
- tslib_1.__exportStar(GaugeChart_1, exports);
4
+ exports.GaugeValueFormat = exports.GaugeChartVariant = exports.GaugeChart = exports.getNextGradient = exports.getGradientFromToken = exports.DataVizGradientPalette = exports.getNextColor = exports.getColorFromToken = exports.DataVizPalette = exports.HorizontalBarChartWithAxis = exports.Sparkline = exports.TreeTraverse = exports.TreeChart = exports.NodesComposition = exports.SankeyChart = exports.HeatMapChart = exports.getChartHoverCardStyles = exports.ChartHoverCard = exports.CartesianChart = exports.GroupedVerticalBarChart = exports.VerticalStackedBarChart = exports.VerticalBarChart = exports.StackedBarChart = exports.MultiStackedBarChartVariant = exports.MultiStackedBarChart = exports.PieChart = exports.AreaChart = exports.Textbox = exports.LineChart = exports.Shape = exports.Legends = exports.DonutChart = exports.HorizontalBarChartVariant = exports.HorizontalBarChart = void 0;
5
+ Object.defineProperty(exports, "HorizontalBarChart", { enumerable: true, get: function () { return HorizontalBarChart_1.HorizontalBarChart; } });
6
+ Object.defineProperty(exports, "HorizontalBarChartVariant", { enumerable: true, get: function () { return HorizontalBarChart_1.HorizontalBarChartVariant; } });
7
+ Object.defineProperty(exports, "DonutChart", { enumerable: true, get: function () { return DonutChart_1.DonutChart; } });
8
+ Object.defineProperty(exports, "Legends", { enumerable: true, get: function () { return Legends_1.Legends; } });
9
+ Object.defineProperty(exports, "Shape", { enumerable: true, get: function () { return Legends_1.Shape; } });
10
+ Object.defineProperty(exports, "LineChart", { enumerable: true, get: function () { return LineChart_1.LineChart; } });
11
+ Object.defineProperty(exports, "Textbox", { enumerable: true, get: function () { return LineChart_1.Textbox; } });
12
+ Object.defineProperty(exports, "AreaChart", { enumerable: true, get: function () { return AreaChart_1.AreaChart; } });
13
+ Object.defineProperty(exports, "PieChart", { enumerable: true, get: function () { return PieChart_1.PieChart; } });
14
+ Object.defineProperty(exports, "MultiStackedBarChart", { enumerable: true, get: function () { return StackedBarChart_1.MultiStackedBarChart; } });
15
+ Object.defineProperty(exports, "MultiStackedBarChartVariant", { enumerable: true, get: function () { return StackedBarChart_1.MultiStackedBarChartVariant; } });
16
+ Object.defineProperty(exports, "StackedBarChart", { enumerable: true, get: function () { return StackedBarChart_1.StackedBarChart; } });
17
+ Object.defineProperty(exports, "VerticalBarChart", { enumerable: true, get: function () { return VerticalBarChart_1.VerticalBarChart; } });
18
+ Object.defineProperty(exports, "VerticalStackedBarChart", { enumerable: true, get: function () { return VerticalStackedBarChart_1.VerticalStackedBarChart; } });
19
+ Object.defineProperty(exports, "GroupedVerticalBarChart", { enumerable: true, get: function () { return GroupedVerticalBarChart_1.GroupedVerticalBarChart; } });
20
+ Object.defineProperty(exports, "CartesianChart", { enumerable: true, get: function () { return CartesianChart_1.CartesianChart; } });
21
+ Object.defineProperty(exports, "ChartHoverCard", { enumerable: true, get: function () { return index_1.ChartHoverCard; } });
22
+ Object.defineProperty(exports, "getChartHoverCardStyles", { enumerable: true, get: function () { return index_1.getChartHoverCardStyles; } });
23
+ Object.defineProperty(exports, "HeatMapChart", { enumerable: true, get: function () { return HeatMapChart_1.HeatMapChart; } });
24
+ Object.defineProperty(exports, "SankeyChart", { enumerable: true, get: function () { return SankeyChart_1.SankeyChart; } });
25
+ Object.defineProperty(exports, "NodesComposition", { enumerable: true, get: function () { return TreeChart_1.NodesComposition; } });
26
+ Object.defineProperty(exports, "TreeChart", { enumerable: true, get: function () { return TreeChart_1.TreeChart; } });
27
+ Object.defineProperty(exports, "TreeTraverse", { enumerable: true, get: function () { return TreeChart_1.TreeTraverse; } });
28
+ Object.defineProperty(exports, "Sparkline", { enumerable: true, get: function () { return Sparkline_1.Sparkline; } });
29
+ Object.defineProperty(exports, "HorizontalBarChartWithAxis", { enumerable: true, get: function () { return HorizontalBarChartWithAxis_1.HorizontalBarChartWithAxis; } });
30
+ Object.defineProperty(exports, "DataVizPalette", { enumerable: true, get: function () { return colors_1.DataVizPalette; } });
31
+ Object.defineProperty(exports, "getColorFromToken", { enumerable: true, get: function () { return colors_1.getColorFromToken; } });
32
+ Object.defineProperty(exports, "getNextColor", { enumerable: true, get: function () { return colors_1.getNextColor; } });
33
+ Object.defineProperty(exports, "DataVizGradientPalette", { enumerable: true, get: function () { return gradients_1.DataVizGradientPalette; } });
34
+ Object.defineProperty(exports, "getGradientFromToken", { enumerable: true, get: function () { return gradients_1.getGradientFromToken; } });
35
+ Object.defineProperty(exports, "getNextGradient", { enumerable: true, get: function () { return gradients_1.getNextGradient; } });
36
+ Object.defineProperty(exports, "GaugeChart", { enumerable: true, get: function () { return GaugeChart_1.GaugeChart; } });
37
+ Object.defineProperty(exports, "GaugeChartVariant", { enumerable: true, get: function () { return GaugeChart_1.GaugeChartVariant; } });
38
+ Object.defineProperty(exports, "GaugeValueFormat", { enumerable: true, get: function () { return GaugeChart_1.GaugeValueFormat; } });
24
39
  });
25
40
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;IAAA,oDAAqC;IACrC,4CAA6B;IAC7B,yCAA0B;IAC1B,2CAA4B;IAC5B,2CAA4B;IAC5B,0CAA2B;IAC3B,iDAAkC;IAClC,kDAAmC;IACnC,yDAA0C;IAC1C,yDAA0C;IAC1C,gDAAiC;IACjC,uCAA8B;IAC9B,uCAAiD;IACjD,8CAA+B;IAC/B,6CAA8B;IAC9B,2CAA4B;IAC5B,2CAA4B;IAC5B,4DAA6C;IAC7C,wCAAmC;IACnC,4CAA6B","sourcesContent":["export * from './HorizontalBarChart';\nexport * from './DonutChart';\nexport * from './Legends';\nexport * from './LineChart';\nexport * from './AreaChart';\nexport * from './PieChart';\nexport * from './StackedBarChart';\nexport * from './VerticalBarChart';\nexport * from './VerticalStackedBarChart';\nexport * from './GroupedVerticalBarChart';\nexport * from './CartesianChart';\nexport * from './types/index';\nexport * from './utilities/ChartHoverCard/index';\nexport * from './HeatMapChart';\nexport * from './SankeyChart';\nexport * from './TreeChart';\nexport * from './Sparkline';\nexport * from './HorizontalBarChartWithAxis';\nexport * from './utilities/colors';\nexport * from './GaugeChart';\n\nimport './version';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;;IAMS,wHAAA,kBAAkB,OAAA;IAAE,+HAAA,yBAAyB,OAAA;IAE7C,wGAAA,UAAU,OAAA;IAWV,kGAAA,OAAO,OAAA;IAAE,gGAAA,KAAK,OAAA;IASd,sGAAA,SAAS,OAAA;IAAE,oGAAA,OAAO,OAAA;IAElB,sGAAA,SAAS,OAAA;IAET,oGAAA,QAAQ,OAAA;IAUR,uHAAA,oBAAoB,OAAA;IAAE,8HAAA,2BAA2B,OAAA;IAAE,kHAAA,eAAe,OAAA;IAElE,oHAAA,gBAAgB,OAAA;IAMhB,kIAAA,uBAAuB,OAAA;IAMvB,kIAAA,uBAAuB,OAAA;IASvB,gHAAA,cAAc,OAAA;IAwCd,uGAAA,cAAc,OAAA;IAAE,gHAAA,uBAAuB,OAAA;IAEvC,4GAAA,YAAY,OAAA;IAQZ,0GAAA,WAAW,OAAA;IASX,6GAAA,gBAAgB,OAAA;IAAE,sGAAA,SAAS,OAAA;IAAE,yGAAA,YAAY,OAAA;IAEzC,sGAAA,SAAS,OAAA;IAMT,wIAAA,0BAA0B,OAAA;IAC1B,wGAAA,cAAc,OAAA;IAAE,2GAAA,iBAAiB,OAAA;IAAE,sGAAA,YAAY,OAAA;IAC/C,mHAAA,sBAAsB,OAAA;IAAE,iHAAA,oBAAoB,OAAA;IAAE,4GAAA,eAAe,OAAA;IAE7D,wGAAA,UAAU,OAAA;IAAE,+GAAA,iBAAiB,OAAA;IAAE,8GAAA,gBAAgB,OAAA","sourcesContent":["export type {\n ChartDataMode,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n} from './HorizontalBarChart';\nexport { HorizontalBarChart, HorizontalBarChartVariant } from './HorizontalBarChart';\nexport type { IDonutChart, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart';\nexport { DonutChart } from './DonutChart';\nexport type {\n ILegend,\n ILegendOverflowData,\n ILegendStyleProps,\n ILegendSubComponentStyles,\n ILegendsProps,\n ILegendsStyles,\n IShapeProps,\n LegendShape,\n} from './Legends';\nexport { Legends, Shape } from './Legends';\nexport type {\n IColorFillBarData,\n IColorFillBarsProps,\n IEventsAnnotationProps,\n ILineChartProps,\n ILineChartStyleProps,\n ILineChartStyles,\n} from './LineChart';\nexport { LineChart, Textbox } from './LineChart';\nexport type { IAreaChartProps, IAreaChartStyleProps, IAreaChartStyles } from './AreaChart';\nexport { AreaChart } from './AreaChart';\nexport type { IPieChart, IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart';\nexport { PieChart } from './PieChart';\nexport type {\n IMultiStackedBarChartProps,\n IMultiStackedBarChartStyleProps,\n IMultiStackedBarChartStyles,\n IStackedBarChart,\n IStackedBarChartProps,\n IStackedBarChartStyleProps,\n IStackedBarChartStyles,\n} from './StackedBarChart';\nexport { MultiStackedBarChart, MultiStackedBarChartVariant, StackedBarChart } from './StackedBarChart';\nexport type { IVerticalBarChartProps, IVerticalBarChartStyleProps, IVerticalBarChartStyles } from './VerticalBarChart';\nexport { VerticalBarChart } from './VerticalBarChart';\nexport type {\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n} from './VerticalStackedBarChart';\nexport { VerticalStackedBarChart } from './VerticalStackedBarChart';\nexport type {\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n} from './GroupedVerticalBarChart';\nexport { GroupedVerticalBarChart } from './GroupedVerticalBarChart';\nexport type {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n IModifiedCartesianChartProps,\n IYValueHover,\n} from './CartesianChart';\nexport { CartesianChart } from './CartesianChart';\nexport type {\n IAccessibilityProps,\n IBasestate,\n IChartDataPoint,\n IChartProps,\n ICustomizedCalloutData,\n ICustomizedCalloutDataPoint,\n IDataPoint,\n IGVBarChartSeriesPoint,\n IGVDataPoint,\n IGVForBarChart,\n IGVSingleDataPoint,\n IGroupedVerticalBarChartData,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IHorizontalBarChartWithAxisDataPoint,\n IHorizontalDataPoint,\n ILegendDataItem,\n ILineChartDataPoint,\n ILineChartGap,\n ILineChartLineOptions,\n ILineChartPoints,\n ILineDataInVerticalBarChart,\n ILineDataInVerticalStackedBarChart,\n IMargins,\n IRefArrayData,\n ISankeyChartData,\n IVSChartDataPoint,\n IVerticalBarChartDataPoint,\n IVerticalStackedBarDataPoint,\n IVerticalStackedChartProps,\n SLink,\n SNode,\n} from './types/index';\nexport type {\n IChartHoverCardProps,\n IChartHoverCardStyleProps,\n IChartHoverCardStyles,\n} from './utilities/ChartHoverCard/index';\nexport { ChartHoverCard, getChartHoverCardStyles } from './utilities/ChartHoverCard/index';\nexport type { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart';\nexport { HeatMapChart } from './HeatMapChart';\nexport type {\n ISankeyChartAccessibilityProps,\n ISankeyChartProps,\n ISankeyChartStrings,\n ISankeyChartStyleProps,\n ISankeyChartStyles,\n} from './SankeyChart';\nexport { SankeyChart } from './SankeyChart';\nexport type {\n ITreeChartDataPoint,\n ITreeDataStructure,\n ITreeProps,\n ITreeState,\n ITreeStyleProps,\n ITreeStyles,\n} from './TreeChart';\nexport { NodesComposition, TreeChart, TreeTraverse } from './TreeChart';\nexport type { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from './Sparkline';\nexport { Sparkline } from './Sparkline';\nexport type {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis';\nexport { HorizontalBarChartWithAxis } from './HorizontalBarChartWithAxis';\nexport { DataVizPalette, getColorFromToken, getNextColor } from './utilities/colors';\nexport { DataVizGradientPalette, getGradientFromToken, getNextGradient } from './utilities/gradients';\nexport type { IGaugeChartProps, IGaugeChartSegment, IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart';\nexport { GaugeChart, GaugeChartVariant, GaugeValueFormat } from './GaugeChart';\n\nimport './version';\n"]}
@@ -121,6 +121,11 @@ export interface IChartDataPoint {
121
121
  * Color for the legend in the chart. If not provided, it will fallback on the default color palette.
122
122
  */
123
123
  color?: string;
124
+ /**
125
+ * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
126
+ * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
127
+ */
128
+ gradient?: [string, string];
124
129
  /**
125
130
  * placeholder data point
126
131
  */
@@ -162,6 +167,11 @@ export interface IVerticalBarChartDataPoint {
162
167
  * color for the legend in the chart
163
168
  */
164
169
  color?: string;
170
+ /**
171
+ * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
172
+ * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
173
+ */
174
+ gradient?: [string, string];
165
175
  /**
166
176
  * Callout data for x axis
167
177
  * This is an optional prop, If haven;t given legend will take
@@ -207,6 +217,11 @@ export interface IHorizontalBarChartWithAxisDataPoint {
207
217
  * color for the legend in the chart
208
218
  */
209
219
  color?: string;
220
+ /**
221
+ * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
222
+ * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
223
+ */
224
+ gradient?: [string, string];
210
225
  /**
211
226
  * Callout data for x axis
212
227
  * This is an optional prop, If haven;t given legend will take
@@ -485,6 +500,11 @@ export interface IVSChartDataPoint {
485
500
  * color for the legend in the chart
486
501
  */
487
502
  color?: string;
503
+ /**
504
+ * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
505
+ * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
506
+ */
507
+ gradient?: [string, string];
488
508
  /**
489
509
  * Callout data for x axis
490
510
  * This is an optional prop, If haven;t given legend will take
@@ -560,6 +580,11 @@ export interface IGVBarChartSeriesPoint {
560
580
  * Color for the legend in the chart
561
581
  */
562
582
  color: string;
583
+ /**
584
+ * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
585
+ * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
586
+ */
587
+ gradient?: [string, string];
563
588
  /**
564
589
  * Legend text in the chart
565
590
  */
@@ -1 +1 @@
1
- {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n"]}
1
+ {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n"]}
@@ -0,0 +1,30 @@
1
+ export declare const DataVizGradientPalette: {
2
+ gradient1: string;
3
+ gradient2: string;
4
+ gradient3: string;
5
+ gradient4: string;
6
+ gradient5: string;
7
+ gradient6: string;
8
+ gradient7: string;
9
+ gradient8: string;
10
+ gradient9: string;
11
+ gradient10: string;
12
+ gradient1Ext: string;
13
+ gradient2Ext: string;
14
+ gradient3Ext: string;
15
+ gradient4Ext: string;
16
+ gradient5Ext: string;
17
+ gradient6Ext: string;
18
+ gradient7Ext: string;
19
+ gradient8Ext: string;
20
+ gradient9Ext: string;
21
+ gradient10Ext: string;
22
+ success: string;
23
+ highSuccess: string;
24
+ warning: string;
25
+ error: string;
26
+ highError: string;
27
+ disabled: string;
28
+ };
29
+ export declare const getNextGradient: (index: number, offset?: number, isDarkTheme?: boolean) => [string, string];
30
+ export declare const getGradientFromToken: (token: string, isDarkTheme?: boolean) => [string, string];
@@ -0,0 +1,180 @@
1
+ define(["require", "exports"], function (require, exports) {
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getGradientFromToken = exports.getNextGradient = exports.DataVizGradientPalette = void 0;
5
+ exports.DataVizGradientPalette = {
6
+ gradient1: 'default.1',
7
+ gradient2: 'default.2',
8
+ gradient3: 'default.3',
9
+ gradient4: 'default.4',
10
+ gradient5: 'default.5',
11
+ gradient6: 'default.6',
12
+ gradient7: 'default.7',
13
+ gradient8: 'default.8',
14
+ gradient9: 'default.9',
15
+ gradient10: 'default.10',
16
+ // extended gradients
17
+ gradient1Ext: 'extended.1',
18
+ gradient2Ext: 'extended.2',
19
+ gradient3Ext: 'extended.3',
20
+ gradient4Ext: 'extended.4',
21
+ gradient5Ext: 'extended.5',
22
+ gradient6Ext: 'extended.6',
23
+ gradient7Ext: 'extended.7',
24
+ gradient8Ext: 'extended.8',
25
+ gradient9Ext: 'extended.9',
26
+ gradient10Ext: 'extended.10',
27
+ // status gradients
28
+ success: 'semantic.success',
29
+ highSuccess: 'semantic.highSuccess',
30
+ warning: 'semantic.warning',
31
+ error: 'semantic.error',
32
+ highError: 'semantic.highError',
33
+ disabled: 'semantic.disabled',
34
+ };
35
+ var defaultGradientPalette = {
36
+ '1': [
37
+ ['#4760D5', '#637CEF'],
38
+ ['#4F6BED', '#637CEF'], // [cornflower.shade10, cornflower.tint10],
39
+ ],
40
+ '2': [
41
+ ['#795AA6', '#9373C0'],
42
+ ['#8764B8', '#A083C9'], // [orchid.primary, orchid.tint20],
43
+ ],
44
+ '3': [
45
+ ['#159195', '#2AA0A4'],
46
+ ['#159195', '#2AA0A4'], // [teal.tint10, teal.tint20],
47
+ ],
48
+ '4': [
49
+ ['#B146C2', '#C36BD1'],
50
+ ['#B146C2', '#C36BD1'], // [lilac.primary, lilac.tint20],
51
+ ],
52
+ '5': [
53
+ ['#3487C7', '#3A96DD'],
54
+ ['#3487C7', '#3A96DD'], // [lightBlue.shade20, lightBlue.primary],
55
+ ],
56
+ '6': [
57
+ ['#0E7A0B', '#13A10E'],
58
+ ['#11910D', '#27AC22'], // [lightGreen.shade10, lightGreen.tint10],
59
+ ],
60
+ '7': [
61
+ ['#E61C99', '#EE5FB7'],
62
+ ['#E61C99', '#EE5FB7'], // [hotPink.tint10, hotPink.tint30],
63
+ ],
64
+ '8': [
65
+ ['#CA5010', '#D77440'],
66
+ ['#CA5010', '#D77440'], // [pumpkin.primary, pumpkin.tint10],
67
+ ],
68
+ '9': [
69
+ ['#57811B', '#689920'],
70
+ ['#57811B', '#689920'], // [lime.shade20, lime.shade10],
71
+ ],
72
+ '10': [
73
+ ['#937700', '#AE8C00'],
74
+ ['#937700', '#AE8C00'], // [gold.shade20, gold.shade10],
75
+ ],
76
+ };
77
+ var extendedGradientPalette = {
78
+ '1': [
79
+ ['#2C3C85', '#3C51B4'],
80
+ ['#93A4F4', '#C8D1FA'], // [cornflower.tint30, cornflower.tint40],
81
+ ],
82
+ '2': [
83
+ ['#4C3867', '#674C8C'],
84
+ ['#A083C9', '#B29AD4'], // [orchid.tint20, orchid.tint30],
85
+ ],
86
+ '3': [
87
+ ['#02494C', '#038387'],
88
+ ['#4CB4B7', '#9BD9DB'], // [teal.tint30, teal.tint40],
89
+ ],
90
+ '4': [
91
+ ['#63276D', '#863593'],
92
+ ['#C36BD1', '#CF87DA'], // [lilac.tint20, lilac.tint30],
93
+ ],
94
+ '5': [
95
+ ['#20547C', '#2C72A8'],
96
+ ['#4FA1E1', '#83BDEB'], // [lightBlue.tint10, lightBlue.tint30],
97
+ ],
98
+ '6': [
99
+ ['#0B5A08', '#0E7A0B'],
100
+ ['#27AC22', '#5EC75A'], // [lightGreen.tint10, lightGreen.tint30],
101
+ ],
102
+ '7': [
103
+ ['#AD006A', '#E3008C'],
104
+ ['#EE5FB7', '#F7ADDA'], // [hotPink.tint30, hotPink.tint40],
105
+ ],
106
+ '8': [
107
+ ['#9A3D0C', '#CA5010'],
108
+ ['#D77440', '#DF8E64'], // [pumpkin.tint20, pumpkin.tint30],
109
+ ],
110
+ '9': [
111
+ ['#405F14', '#57811B'],
112
+ ['#73AA24', '#A4CC6C'], // [lime.primary, lime.tint30],
113
+ ],
114
+ '10': [
115
+ ['#6D5700', '#937700'],
116
+ ['#D0B232', '#DAC157'], // [gold.tint20, gold.tint30],
117
+ ],
118
+ };
119
+ var semanticGradientPalette = {
120
+ success: [
121
+ ['#0C5E0C', '#107C10'],
122
+ ['#218C21', '#359B35'], // [green.tint10, green.tint20],
123
+ ],
124
+ highSuccess: [
125
+ ['#107C10', '#359B35'],
126
+ ['#359B35', '#9FD89F'], // [green.tint20, green.tint40],
127
+ ],
128
+ warning: [
129
+ ['#DE590B', '#F7630C'],
130
+ ['#DE590B', '#F87528'], // [orange.shade10, orange.tint10],
131
+ ],
132
+ error: [
133
+ ['#B10E1C', '#CC2635'],
134
+ ['#D33F4C', '#EEACB2'], // [cranberry.tint20, cranberry.tint40],
135
+ ],
136
+ highError: [
137
+ ['#6E0811', '#B10E1C'],
138
+ ['#D33F4C', '#DC626D'], // [cranberry.tint20, cranberry.tint30],
139
+ ],
140
+ disabled: [
141
+ ['#E6E6E6', '#F0F0F0'],
142
+ ['#E6E6E6', '#F0F0F0'],
143
+ ],
144
+ };
145
+ var Gradients = {
146
+ default: defaultGradientPalette,
147
+ semantic: semanticGradientPalette,
148
+ extended: extendedGradientPalette, // extended gradients
149
+ };
150
+ var DEFAULT_COLORS = Object.values(defaultGradientPalette);
151
+ var TOKENS = Object.values(exports.DataVizGradientPalette);
152
+ var getThemeSpecificGradient = function (gradients, isDarkTheme) {
153
+ if (gradients.length === 0) {
154
+ return ['', ''];
155
+ }
156
+ var colorIdx = Number(isDarkTheme);
157
+ if (colorIdx < gradients.length) {
158
+ return gradients[colorIdx];
159
+ }
160
+ return gradients[0];
161
+ };
162
+ var getNextGradient = function (index, offset, isDarkTheme) {
163
+ if (offset === void 0) { offset = 0; }
164
+ if (isDarkTheme === void 0) { isDarkTheme = false; }
165
+ var gradients = DEFAULT_COLORS[(index + offset) % DEFAULT_COLORS.length];
166
+ return getThemeSpecificGradient(gradients, isDarkTheme);
167
+ };
168
+ exports.getNextGradient = getNextGradient;
169
+ var getGradientFromToken = function (token, isDarkTheme) {
170
+ if (isDarkTheme === void 0) { isDarkTheme = false; }
171
+ if (TOKENS.indexOf(token) >= 0) {
172
+ var _a = token.split('.'), paletteName = _a[0], colorCode = _a[1];
173
+ var colors = Gradients[paletteName][colorCode];
174
+ return getThemeSpecificGradient(colors, isDarkTheme);
175
+ }
176
+ return [token, token];
177
+ };
178
+ exports.getGradientFromToken = getGradientFromToken;
179
+ });
180
+ //# sourceMappingURL=gradients.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gradients.js","sourceRoot":"../src/","sources":["utilities/gradients.ts"],"names":[],"mappings":"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","sourcesContent":["export const DataVizGradientPalette = {\n gradient1: 'default.1',\n gradient2: 'default.2',\n gradient3: 'default.3',\n gradient4: 'default.4',\n gradient5: 'default.5',\n gradient6: 'default.6',\n gradient7: 'default.7',\n gradient8: 'default.8',\n gradient9: 'default.9',\n gradient10: 'default.10',\n // extended gradients\n gradient1Ext: 'extended.1',\n gradient2Ext: 'extended.2',\n gradient3Ext: 'extended.3',\n gradient4Ext: 'extended.4',\n gradient5Ext: 'extended.5',\n gradient6Ext: 'extended.6',\n gradient7Ext: 'extended.7',\n gradient8Ext: 'extended.8',\n gradient9Ext: 'extended.9',\n gradient10Ext: 'extended.10',\n // status gradients\n success: 'semantic.success',\n highSuccess: 'semantic.highSuccess',\n warning: 'semantic.warning',\n error: 'semantic.error',\n highError: 'semantic.highError',\n disabled: 'semantic.disabled',\n};\n\n/**\n * Key: Color code.\n * Value:\n *\n * Index 0 - Default gradient for light theme\n * ├── Index 0 - start color of gradient\n * └── Index 1 - end color of gradient\n *\n * Index 1 - gradient for dark theme\n * ├── Index 0 - start color of gradient\n * └── Index 1 - end color of gradient\n */\ntype GradientPalette = { [key: string]: [string, string][] };\n\nconst defaultGradientPalette: GradientPalette = {\n '1': [\n ['#4760D5', '#637CEF'], // [cornflower.shade10, cornflower.tint10],\n ['#4F6BED', '#637CEF'], // [cornflower.shade10, cornflower.tint10],\n ],\n '2': [\n ['#795AA6', '#9373C0'], // [orchid.shade20, orchid.tint10],\n ['#8764B8', '#A083C9'], // [orchid.primary, orchid.tint20],\n ],\n '3': [\n ['#159195', '#2AA0A4'], // [teal.tint10, teal.tint20],\n ['#159195', '#2AA0A4'], // [teal.tint10, teal.tint20],\n ],\n '4': [\n ['#B146C2', '#C36BD1'], // [lilac.primary, lilac.tint20],\n ['#B146C2', '#C36BD1'], // [lilac.primary, lilac.tint20],\n ],\n '5': [\n ['#3487C7', '#3A96DD'], // [lightBlue.shade10, lightBlue.primary],\n ['#3487C7', '#3A96DD'], // [lightBlue.shade20, lightBlue.primary],\n ],\n '6': [\n ['#0E7A0B', '#13A10E'], // [lightGreen.shade20, lightGreen.primary],\n ['#11910D', '#27AC22'], // [lightGreen.shade10, lightGreen.tint10],\n ],\n '7': [\n ['#E61C99', '#EE5FB7'], // [hotPink.tint10, hotPink.tint30],\n ['#E61C99', '#EE5FB7'], // [hotPink.tint10, hotPink.tint30],\n ],\n '8': [\n ['#CA5010', '#D77440'], // [pumpkin.primary, pumpkin.tint20],\n ['#CA5010', '#D77440'], // [pumpkin.primary, pumpkin.tint10],\n ],\n '9': [\n ['#57811B', '#689920'], // [lime.shade20, lime.shade10],\n ['#57811B', '#689920'], // [lime.shade20, lime.shade10],\n ],\n '10': [\n ['#937700', '#AE8C00'], // [gold.shade20, gold.shade10],\n ['#937700', '#AE8C00'], // [gold.shade20, gold.shade10],\n ],\n};\n\nconst extendedGradientPalette: GradientPalette = {\n '1': [\n ['#2C3C85', '#3C51B4'], // [cornflower.shade30, cornflower.shade20],\n ['#93A4F4', '#C8D1FA'], // [cornflower.tint30, cornflower.tint40],\n ],\n '2': [\n ['#4C3867', '#674C8C'], // [orchid.shade30, orchid.shade20],\n ['#A083C9', '#B29AD4'], // [orchid.tint20, orchid.tint30],\n ],\n '3': [\n ['#02494C', '#038387'], // [teal.shade30, teal.primary],\n ['#4CB4B7', '#9BD9DB'], // [teal.tint30, teal.tint40],\n ],\n '4': [\n ['#63276D', '#863593'], // [lilac.shade30, lilac.shade20],\n ['#C36BD1', '#CF87DA'], // [lilac.tint20, lilac.tint30],\n ],\n '5': [\n ['#20547C', '#2C72A8'], // [lightBlue.shade30, lightBlue.shade20],\n ['#4FA1E1', '#83BDEB'], // [lightBlue.tint10, lightBlue.tint30],\n ],\n '6': [\n ['#0B5A08', '#0E7A0B'], // [lightGreen.shade30, lightGreen.shade20],\n ['#27AC22', '#5EC75A'], // [lightGreen.tint10, lightGreen.tint30],\n ],\n '7': [\n ['#AD006A', '#E3008C'], // [hotPink.shade20, hotPink.primary],\n ['#EE5FB7', '#F7ADDA'], // [hotPink.tint30, hotPink.tint40],\n ],\n '8': [\n ['#9A3D0C', '#CA5010'], // [pumpkin.shade20, pumpkin.primary],\n ['#D77440', '#DF8E64'], // [pumpkin.tint20, pumpkin.tint30],\n ],\n '9': [\n ['#405F14', '#57811B'], // [lime.shade30, lime.shade20],\n ['#73AA24', '#A4CC6C'], // [lime.primary, lime.tint30],\n ],\n '10': [\n ['#6D5700', '#937700'], // [gold.shade30, gold.shade20],\n ['#D0B232', '#DAC157'], // [gold.tint20, gold.tint30],\n ],\n};\n\nconst semanticGradientPalette: GradientPalette = {\n success: [\n ['#0C5E0C', '#107C10'], // [green.shade20, green.primary],\n ['#218C21', '#359B35'], // [green.tint10, green.tint20],\n ],\n highSuccess: [\n ['#107C10', '#359B35'], // [green.primary, green.tint20],\n ['#359B35', '#9FD89F'], // [green.tint20, green.tint40],\n ],\n warning: [\n ['#DE590B', '#F7630C'], // [orange.shade10, orange.primary],\n ['#DE590B', '#F87528'], // [orange.shade10, orange.tint10],\n ],\n error: [\n ['#B10E1C', '#CC2635'], // [cranberry.shade10, cranberry.tint10],\n ['#D33F4C', '#EEACB2'], // [cranberry.tint20, cranberry.tint40],\n ],\n highError: [\n ['#6E0811', '#B10E1C'], // [cranberry.shade30, cranberry.shade10],\n ['#D33F4C', '#DC626D'], // [cranberry.tint20, cranberry.tint30],\n ],\n disabled: [\n ['#E6E6E6', '#F0F0F0'],\n ['#E6E6E6', '#F0F0F0'],\n ],\n};\n\nconst Gradients: { [key: string]: GradientPalette } = {\n default: defaultGradientPalette, // base gradients\n semantic: semanticGradientPalette, // status gradients\n extended: extendedGradientPalette, // extended gradients\n};\n\nconst DEFAULT_COLORS = Object.values(defaultGradientPalette);\nconst TOKENS = Object.values(DataVizGradientPalette);\n\nconst getThemeSpecificGradient = (gradients: [string, string][], isDarkTheme: boolean): [string, string] => {\n if (gradients.length === 0) {\n return ['', ''];\n }\n\n const colorIdx = Number(isDarkTheme);\n\n if (colorIdx < gradients.length) {\n return gradients[colorIdx];\n }\n\n return gradients[0];\n};\n\nexport const getNextGradient = (index: number, offset: number = 0, isDarkTheme: boolean = false): [string, string] => {\n const gradients = DEFAULT_COLORS[(index + offset) % DEFAULT_COLORS.length];\n return getThemeSpecificGradient(gradients, isDarkTheme);\n};\n\nexport const getGradientFromToken = (token: string, isDarkTheme: boolean = false): [string, string] => {\n if (TOKENS.indexOf(token) >= 0) {\n const [paletteName, colorCode] = token.split('.');\n const colors = Gradients[paletteName][colorCode];\n\n return getThemeSpecificGradient(colors, isDarkTheme);\n }\n return [token, token];\n};\n"]}
@@ -1,4 +1,5 @@
1
1
  export * from './ChartHoverCard/index';
2
2
  export * from './utilities';
3
3
  export * from './colors';
4
+ export * from './gradients';
4
5
  export * from './vbc-utils';
@@ -1,9 +1,10 @@
1
- define(["require", "exports", "tslib", "./ChartHoverCard/index", "./utilities", "./colors", "./vbc-utils"], function (require, exports, tslib_1, index_1, utilities_1, colors_1, vbc_utils_1) {
1
+ define(["require", "exports", "tslib", "./ChartHoverCard/index", "./utilities", "./colors", "./gradients", "./vbc-utils"], function (require, exports, tslib_1, index_1, utilities_1, colors_1, gradients_1, vbc_utils_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  tslib_1.__exportStar(index_1, exports);
5
5
  tslib_1.__exportStar(utilities_1, exports);
6
6
  tslib_1.__exportStar(colors_1, exports);
7
+ tslib_1.__exportStar(gradients_1, exports);
7
8
  tslib_1.__exportStar(vbc_utils_1, exports);
8
9
  });
9
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utilities/index.ts"],"names":[],"mappings":";;;IAAA,uCAAuC;IACvC,2CAA4B;IAC5B,wCAAyB;IACzB,2CAA4B","sourcesContent":["export * from './ChartHoverCard/index';\nexport * from './utilities';\nexport * from './colors';\nexport * from './vbc-utils';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utilities/index.ts"],"names":[],"mappings":";;;IAAA,uCAAuC;IACvC,2CAA4B;IAC5B,wCAAyB;IACzB,2CAA4B;IAC5B,2CAA4B","sourcesContent":["export * from './ChartHoverCard/index';\nexport * from './utilities';\nexport * from './colors';\nexport * from './gradients';\nexport * from './vbc-utils';\n"]}
@@ -1,6 +1,6 @@
1
1
  define(["require", "exports", "@fluentui/set-version"], function (require, exports, set_version_1) {
2
2
  "use strict";
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- (0, set_version_1.setVersion)('@fluentui/react-charting', '5.21.31');
4
+ (0, set_version_1.setVersion)('@fluentui/react-charting', '5.22.0');
5
5
  });
6
6
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;;IAGA,IAAA,wBAAU,EAAC,0BAA0B,EAAE,SAAS,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.21.31');"]}
1
+ {"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;;IAGA,IAAA,wBAAU,EAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.22.0');"]}