@fluentui/react-charting 5.24.11 → 5.24.13

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 (157) hide show
  1. package/CHANGELOG.json +61 -1
  2. package/CHANGELOG.md +25 -2
  3. package/bundle-size/GanttChart.fixture.js +7 -0
  4. package/dist/react-charting.d.ts +128 -3
  5. package/dist/react-charting.js +1 -1
  6. package/dist/react-charting.min.js +1 -1
  7. package/etc/react-charting.api.md +44 -2
  8. package/lib/GanttChart.d.ts +1 -0
  9. package/lib/GanttChart.js +2 -0
  10. package/lib/GanttChart.js.map +1 -0
  11. package/lib/components/CommonComponents/CartesianChart.base.js +2 -1
  12. package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
  13. package/lib/components/CommonComponents/CartesianChart.types.d.ts +3 -3
  14. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  15. package/lib/components/DeclarativeChart/DeclarativeChart.js +22 -4
  16. package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  17. package/lib/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  18. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +23 -0
  19. package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  20. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  21. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +173 -63
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  23. package/lib/components/GanttChart/GanttChart.base.d.ts +3 -0
  24. package/lib/components/GanttChart/GanttChart.base.js +329 -0
  25. package/lib/components/GanttChart/GanttChart.base.js.map +1 -0
  26. package/lib/components/GanttChart/GanttChart.d.ts +7 -0
  27. package/lib/components/GanttChart/GanttChart.js +10 -0
  28. package/lib/components/GanttChart/GanttChart.js.map +1 -0
  29. package/lib/components/GanttChart/GanttChart.styles.d.ts +2 -0
  30. package/lib/components/GanttChart/GanttChart.styles.js +4 -0
  31. package/lib/components/GanttChart/GanttChart.styles.js.map +1 -0
  32. package/lib/components/GanttChart/GanttChart.types.d.ts +67 -0
  33. package/lib/components/GanttChart/GanttChart.types.js +2 -0
  34. package/lib/components/GanttChart/GanttChart.types.js.map +1 -0
  35. package/lib/components/GanttChart/index.d.ts +2 -0
  36. package/lib/components/GanttChart/index.js +3 -0
  37. package/lib/components/GanttChart/index.js.map +1 -0
  38. package/lib/components/LineChart/LineChart.base.d.ts +1 -0
  39. package/lib/components/LineChart/LineChart.base.js +34 -11
  40. package/lib/components/LineChart/LineChart.base.js.map +1 -1
  41. package/lib/components/ScatterChart/ScatterChart.base.js +37 -23
  42. package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -1
  43. package/lib/index.d.ts +3 -1
  44. package/lib/index.js +1 -0
  45. package/lib/index.js.map +1 -1
  46. package/lib/types/IDataPoint.d.ts +49 -0
  47. package/lib/types/IDataPoint.js.map +1 -1
  48. package/lib/utilities/scatterpolar-utils.d.ts +22 -0
  49. package/lib/utilities/scatterpolar-utils.js +38 -0
  50. package/lib/utilities/scatterpolar-utils.js.map +1 -0
  51. package/lib/utilities/test-data.d.ts +4 -1
  52. package/lib/utilities/test-data.js +213 -0
  53. package/lib/utilities/test-data.js.map +1 -1
  54. package/lib/utilities/utilities.d.ts +14 -6
  55. package/lib/utilities/utilities.js +25 -9
  56. package/lib/utilities/utilities.js.map +1 -1
  57. package/lib-amd/GanttChart.d.ts +1 -0
  58. package/lib-amd/GanttChart.js +6 -0
  59. package/lib-amd/GanttChart.js.map +1 -0
  60. package/lib-amd/components/CommonComponents/CartesianChart.base.js +2 -1
  61. package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
  62. package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +3 -3
  63. package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
  64. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +22 -5
  65. package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  66. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  67. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +25 -2
  68. package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  69. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  70. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +173 -62
  71. package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  72. package/lib-amd/components/GanttChart/GanttChart.base.d.ts +3 -0
  73. package/lib-amd/components/GanttChart/GanttChart.base.js +325 -0
  74. package/lib-amd/components/GanttChart/GanttChart.base.js.map +1 -0
  75. package/lib-amd/components/GanttChart/GanttChart.d.ts +7 -0
  76. package/lib-amd/components/GanttChart/GanttChart.js +12 -0
  77. package/lib-amd/components/GanttChart/GanttChart.js.map +1 -0
  78. package/lib-amd/components/GanttChart/GanttChart.styles.d.ts +2 -0
  79. package/lib-amd/components/GanttChart/GanttChart.styles.js +10 -0
  80. package/lib-amd/components/GanttChart/GanttChart.styles.js.map +1 -0
  81. package/lib-amd/components/GanttChart/GanttChart.types.d.ts +67 -0
  82. package/lib-amd/components/GanttChart/GanttChart.types.js +5 -0
  83. package/lib-amd/components/GanttChart/GanttChart.types.js.map +1 -0
  84. package/lib-amd/components/GanttChart/index.d.ts +2 -0
  85. package/lib-amd/components/GanttChart/index.js +7 -0
  86. package/lib-amd/components/GanttChart/index.js.map +1 -0
  87. package/lib-amd/components/LineChart/LineChart.base.d.ts +1 -0
  88. package/lib-amd/components/LineChart/LineChart.base.js +33 -11
  89. package/lib-amd/components/LineChart/LineChart.base.js.map +1 -1
  90. package/lib-amd/components/ScatterChart/ScatterChart.base.js +36 -23
  91. package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -1
  92. package/lib-amd/index.d.ts +3 -1
  93. package/lib-amd/index.js +3 -2
  94. package/lib-amd/index.js.map +1 -1
  95. package/lib-amd/types/IDataPoint.d.ts +49 -0
  96. package/lib-amd/types/IDataPoint.js.map +1 -1
  97. package/lib-amd/utilities/scatterpolar-utils.d.ts +22 -0
  98. package/lib-amd/utilities/scatterpolar-utils.js +43 -0
  99. package/lib-amd/utilities/scatterpolar-utils.js.map +1 -0
  100. package/lib-amd/utilities/test-data.d.ts +4 -1
  101. package/lib-amd/utilities/test-data.js +214 -2
  102. package/lib-amd/utilities/test-data.js.map +1 -1
  103. package/lib-amd/utilities/utilities.d.ts +14 -6
  104. package/lib-amd/utilities/utilities.js +27 -9
  105. package/lib-amd/utilities/utilities.js.map +1 -1
  106. package/lib-commonjs/GanttChart.d.ts +1 -0
  107. package/lib-commonjs/GanttChart.js +5 -0
  108. package/lib-commonjs/GanttChart.js.map +1 -0
  109. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +2 -1
  110. package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
  111. package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +3 -3
  112. package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
  113. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +23 -5
  114. package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
  115. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
  116. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +25 -1
  117. package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
  118. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +2 -0
  119. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +173 -62
  120. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  121. package/lib-commonjs/components/GanttChart/GanttChart.base.d.ts +3 -0
  122. package/lib-commonjs/components/GanttChart/GanttChart.base.js +332 -0
  123. package/lib-commonjs/components/GanttChart/GanttChart.base.js.map +1 -0
  124. package/lib-commonjs/components/GanttChart/GanttChart.d.ts +7 -0
  125. package/lib-commonjs/components/GanttChart/GanttChart.js +13 -0
  126. package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -0
  127. package/lib-commonjs/components/GanttChart/GanttChart.styles.d.ts +2 -0
  128. package/lib-commonjs/components/GanttChart/GanttChart.styles.js +8 -0
  129. package/lib-commonjs/components/GanttChart/GanttChart.styles.js.map +1 -0
  130. package/lib-commonjs/components/GanttChart/GanttChart.types.d.ts +67 -0
  131. package/lib-commonjs/components/GanttChart/GanttChart.types.js +3 -0
  132. package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -0
  133. package/lib-commonjs/components/GanttChart/index.d.ts +2 -0
  134. package/lib-commonjs/components/GanttChart/index.js +6 -0
  135. package/lib-commonjs/components/GanttChart/index.js.map +1 -0
  136. package/lib-commonjs/components/LineChart/LineChart.base.d.ts +1 -0
  137. package/lib-commonjs/components/LineChart/LineChart.base.js +33 -10
  138. package/lib-commonjs/components/LineChart/LineChart.base.js.map +1 -1
  139. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +36 -22
  140. package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -1
  141. package/lib-commonjs/index.d.ts +3 -1
  142. package/lib-commonjs/index.js +3 -1
  143. package/lib-commonjs/index.js.map +1 -1
  144. package/lib-commonjs/types/IDataPoint.d.ts +49 -0
  145. package/lib-commonjs/types/IDataPoint.js.map +1 -1
  146. package/lib-commonjs/utilities/scatterpolar-utils.d.ts +22 -0
  147. package/lib-commonjs/utilities/scatterpolar-utils.js +42 -0
  148. package/lib-commonjs/utilities/scatterpolar-utils.js.map +1 -0
  149. package/lib-commonjs/utilities/test-data.d.ts +4 -1
  150. package/lib-commonjs/utilities/test-data.js +214 -1
  151. package/lib-commonjs/utilities/test-data.js.map +1 -1
  152. package/lib-commonjs/utilities/utilities.d.ts +14 -6
  153. package/lib-commonjs/utilities/utilities.js +28 -10
  154. package/lib-commonjs/utilities/utilities.js.map +1 -1
  155. package/package.json +2 -2
  156. package/src/components/CommonComponents/CartesianChart.types.ts +5 -2
  157. package/src/components/GanttChart/GanttChart.types.ts +83 -0
@@ -1 +1 @@
1
- {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number | string;\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 | string; 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 IBaseDataPoint {\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 * Marker size of the points\n */\n markerSize?: number;\n\n /**\n * text labels of marker points\n */\n text?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint extends IBaseDataPoint {\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/**\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 React.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 * Defines the type of interpolation used to render the line.\n * @default 'linear'\n */\n curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;\n\n /**\n * Defines the mode of points to be rendered.\n */\n mode?:\n | 'lines'\n | 'markers'\n | 'text'\n | 'lines+markers'\n | 'text+markers'\n | 'text+lines'\n | 'text+lines+markers'\n | 'none'\n | 'gauge'\n | 'number'\n | 'delta'\n | 'number+delta'\n | 'gauge+number'\n | 'gauge+number+delta'\n | 'gauge+delta'\n | 'markers+text'\n | 'lines+text';\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 * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\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 scatter chart\n */\n scatterChartData?: IScatterChartPoints[];\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?: React.SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: React.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 | 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 * 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 | string;\n color: string;\n legend: string;\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n /**\n * Data to show in callout\n */\n data?: number | string;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\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 * 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 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\n/**\n * {@docCategory Chart}\n */\nexport interface IChart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: IImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n\n/**\n * {@docCategory IChartData}\n * ScatterChartDataPoint interface.\n */\nexport interface IScatterChartDataPoint extends IBaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n */\n x: number | Date | string;\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 IScatterChartPoints {\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: IScatterChartDataPoint[];\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 * 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 * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * Specifies the ordering options for axis categories in Cartesian charts.\n *\n * - `'default'`: Uses the original order before custom ordering was supported.\n * In some charts, this behaves the same as `'data'`.\n * - `'data'`: Preserves the order of categories as provided in the input data.\n * - `string[]`: Explicitly defines the custom order of categories as an array of category names.\n * - `'category ascending' | 'category descending'`: Orders categories alphanumerically.\n * - `'total ascending' | 'total descending'`: Orders categories by the total of their associated values.\n * - `'min ascending' | 'min descending'`: Orders by the minimum value within each category.\n * - `'max ascending' | 'max descending'`: Orders by the maximum value within each category.\n * - `'sum ascending' | 'sum descending'`: Orders by the sum of values for each category (same as 'total').\n * - `'mean ascending' | 'mean descending'`: Orders by the average of values in each category.\n * - `'median ascending' | 'median descending'`: Orders by the median value of each category.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisCategoryOrder =\n | 'default'\n | 'data'\n | string[]\n | 'category ascending'\n | 'category descending'\n | 'total ascending'\n | 'total descending'\n | 'min ascending'\n | 'min descending'\n | 'max ascending'\n | 'max descending'\n | 'sum ascending'\n | 'sum descending'\n | 'mean ascending'\n | 'mean descending'\n | 'median ascending'\n | 'median descending';\n"]}
1
+ {"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import * as React from 'react';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number | string;\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 | string; 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 IBaseDataPoint {\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 * Marker size of the points\n */\n markerSize?: number;\n\n /**\n * text labels of marker points\n */\n text?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint extends IBaseDataPoint {\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/**\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 React.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 * Defines the type of interpolation used to render the line.\n * @default 'linear'\n */\n curve?: 'linear' | 'natural' | 'step' | 'stepAfter' | 'stepBefore' | CurveFactory;\n\n /**\n * Defines the mode of points to be rendered.\n */\n mode?:\n | 'lines'\n | 'markers'\n | 'text'\n | 'lines+markers'\n | 'text+markers'\n | 'text+lines'\n | 'text+lines+markers'\n | 'none'\n | 'gauge'\n | 'number'\n | 'delta'\n | 'number+delta'\n | 'gauge+number'\n | 'gauge+number+delta'\n | 'gauge+delta'\n | 'markers+text'\n | 'lines+text';\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 * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\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 scatter chart\n */\n scatterChartData?: IScatterChartPoints[];\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?: React.SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: React.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 | 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 * 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 | string;\n color: string;\n legend: string;\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n /**\n * Data to show in callout\n */\n data?: number | string;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\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 * 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 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\n/**\n * {@docCategory Chart}\n */\nexport interface IChart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: IImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface IImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n\n/**\n * {@docCategory IChartData}\n * ScatterChartDataPoint interface.\n */\nexport interface IScatterChartDataPoint extends IBaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n */\n x: number | Date | string;\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 IScatterChartPoints {\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: IScatterChartDataPoint[];\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 * 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 * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * Specifies the ordering options for axis categories in Cartesian charts.\n *\n * - `'default'`: Uses the original order before custom ordering was supported.\n * In some charts, this behaves the same as `'data'`.\n * - `'data'`: Preserves the order of categories as provided in the input data.\n * - `string[]`: Explicitly defines the custom order of categories as an array of category names.\n * - `'category ascending' | 'category descending'`: Orders categories alphanumerically.\n * - `'total ascending' | 'total descending'`: Orders categories by the total of their associated values.\n * - `'min ascending' | 'min descending'`: Orders by the minimum value within each category.\n * - `'max ascending' | 'max descending'`: Orders by the maximum value within each category.\n * - `'sum ascending' | 'sum descending'`: Orders by the sum of values for each category (same as 'total').\n * - `'mean ascending' | 'mean descending'`: Orders by the average of values in each category.\n * - `'median ascending' | 'median descending'`: Orders by the median value of each category.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisCategoryOrder =\n | 'default'\n | 'data'\n | string[]\n | 'category ascending'\n | 'category descending'\n | 'total ascending'\n | 'total descending'\n | 'min ascending'\n | 'min descending'\n | 'max ascending'\n | 'max descending'\n | 'sum ascending'\n | 'sum descending'\n | 'mean ascending'\n | 'mean descending'\n | 'median ascending'\n | 'median descending';\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGanttChartDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: {\n start: Date | number;\n end: Date | number;\n };\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"]}
@@ -0,0 +1,22 @@
1
+ import * as React from 'react';
2
+ import { ScaleLinear } from 'd3-scale';
3
+ /**
4
+ * Helper to render categorical labels for scatterpolar charts with improved overlap logic across all series
5
+ * Now places labels at equal angles for all unique texts, regardless of data positions.
6
+ */
7
+ export declare function renderScatterPolarCategoryLabels({ allSeriesData, xAxisScale, yAxisScale, className, maybeLineOptions, minPixelGap, }: {
8
+ allSeriesData: {
9
+ data: {
10
+ x: number;
11
+ y: number;
12
+ text?: string;
13
+ }[];
14
+ }[];
15
+ xAxisScale: ScaleLinear<number, number>;
16
+ yAxisScale: ScaleLinear<number, number>;
17
+ className: string;
18
+ maybeLineOptions?: {
19
+ originXOffset?: number;
20
+ };
21
+ minPixelGap?: number;
22
+ }): React.JSX.Element[];
@@ -0,0 +1,38 @@
1
+ import * as React from 'react';
2
+ /**
3
+ * Helper to render categorical labels for scatterpolar charts with improved overlap logic across all series
4
+ * Now places labels at equal angles for all unique texts, regardless of data positions.
5
+ */
6
+ export function renderScatterPolarCategoryLabels(_a) {
7
+ var allSeriesData = _a.allSeriesData, xAxisScale = _a.xAxisScale, yAxisScale = _a.yAxisScale, className = _a.className, maybeLineOptions = _a.maybeLineOptions, _b = _a.minPixelGap, minPixelGap = _b === void 0 ? 40 : _b;
8
+ // 1. Aggregate all data points from all series
9
+ var allLabels = [];
10
+ allSeriesData.forEach(function (series) {
11
+ series.data.forEach(function (pt) {
12
+ if (pt.text) {
13
+ allLabels.push({ x: pt.x, y: pt.y, text: pt.text });
14
+ }
15
+ });
16
+ });
17
+ // 2. Deduplicate by text (angle label)
18
+ var uniqueTexts = Array.from(new Set(allLabels.map(function (l) { return l.text; })));
19
+ // 3. Place labels at equal angles
20
+ var renderedLabels = [];
21
+ var placedPositions = [];
22
+ var labelRadius = 0.7; // You can adjust this value for more/less offset
23
+ var numLabels = uniqueTexts.length;
24
+ uniqueTexts.forEach(function (text, i) {
25
+ var angle = ((2 * Math.PI) / numLabels) * i;
26
+ var originXOffset = (maybeLineOptions === null || maybeLineOptions === void 0 ? void 0 : maybeLineOptions.originXOffset) || 0;
27
+ var x = xAxisScale(labelRadius * Math.cos(angle) - originXOffset / 2);
28
+ var y = yAxisScale(labelRadius * Math.sin(angle));
29
+ // Check distance from all previously placed labels
30
+ var isFarEnough = placedPositions.every(function (pos) { return Math.sqrt(Math.pow((x - pos.x), 2) + Math.pow((y - pos.y), 2)) >= minPixelGap; });
31
+ if (renderedLabels.length === 0 || isFarEnough) {
32
+ renderedLabels.push(React.createElement("text", { key: "scatterpolar-label-".concat(text), x: x, y: y, className: className, textAnchor: "middle", alignmentBaseline: "middle", opacity: 1 }, text));
33
+ placedPositions.push({ x: x, y: y });
34
+ }
35
+ });
36
+ return renderedLabels;
37
+ }
38
+ //# sourceMappingURL=scatterpolar-utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scatterpolar-utils.js","sourceRoot":"../src/","sources":["utilities/scatterpolar-utils.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;GAGG;AACH,MAAM,UAAU,gCAAgC,CAAC,EAchD;QAbC,aAAa,mBAAA,EACb,UAAU,gBAAA,EACV,UAAU,gBAAA,EACV,SAAS,eAAA,EACT,gBAAgB,sBAAA,EAChB,mBA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UAAU,CAAC,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;QAEpD,mDAAmD;QACnD,IAAM,WAAW,GAAG,eAAe,CAAC,KAAK,CAAC,UAAA,GAAG,IAAI,OAAA,IAAI,CAAC,IAAI,CAAC,SAAA,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAI,CAAC,CAAA,GAAG,SAAA,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,EAAI,CAAC,CAAA,CAAC,IAAI,WAAW,EAA7D,CAA6D,CAAC,CAAC;QAEhH,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,IAAI,WAAW,EAAE,CAAC;YAC/C,cAAc,CAAC,IAAI,CACjB,8BACE,GAAG,EAAE,6BAAsB,IAAI,CAAE,EACjC,CAAC,EAAE,CAAC,EACJ,CAAC,EAAE,CAAC,EACJ,SAAS,EAAE,SAAS,EACpB,UAAU,EAAC,QAAQ,EACnB,iBAAiB,EAAC,QAAQ,EAC1B,OAAO,EAAE,CAAC,IAET,IAAI,CACA,CACR,CAAC;YACF,eAAe,CAAC,IAAI,CAAC,EAAE,CAAC,GAAA,EAAE,CAAC,GAAA,EAAE,CAAC,CAAC;QACjC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,cAAc,CAAC;AACxB,CAAC","sourcesContent":["import * as React from 'react';\nimport { ScaleLinear } from 'd3-scale';\n\n/**\n * Helper to render categorical labels for scatterpolar charts with improved overlap logic across all series\n * Now places labels at equal angles for all unique texts, regardless of data positions.\n */\nexport function renderScatterPolarCategoryLabels({\n allSeriesData,\n xAxisScale,\n yAxisScale,\n className,\n maybeLineOptions,\n minPixelGap = 40,\n}: {\n allSeriesData: { data: { x: number; y: number; text?: string }[] }[];\n xAxisScale: ScaleLinear<number, number>;\n yAxisScale: ScaleLinear<number, number>;\n className: string;\n maybeLineOptions?: { originXOffset?: number };\n minPixelGap?: number;\n}): React.JSX.Element[] {\n // 1. Aggregate all data points from all series\n const allLabels: { x: number; y: number; text: string }[] = [];\n allSeriesData.forEach(series => {\n series.data.forEach(pt => {\n if (pt.text) {\n allLabels.push({ x: pt.x, y: pt.y, text: pt.text });\n }\n });\n });\n\n // 2. Deduplicate by text (angle label)\n const uniqueTexts = Array.from(new Set(allLabels.map(l => l.text)));\n\n // 3. Place labels at equal angles\n const renderedLabels: React.JSX.Element[] = [];\n const placedPositions: { x: number; y: number }[] = [];\n const labelRadius = 0.7; // You can adjust this value for more/less offset\n const numLabels = uniqueTexts.length;\n\n uniqueTexts.forEach((text, i) => {\n const angle = ((2 * Math.PI) / numLabels) * i;\n const originXOffset = maybeLineOptions?.originXOffset || 0;\n const x = xAxisScale(labelRadius * Math.cos(angle) - originXOffset / 2);\n const y = yAxisScale(labelRadius * Math.sin(angle));\n\n // Check distance from all previously placed labels\n const isFarEnough = placedPositions.every(pos => Math.sqrt((x - pos.x) ** 2 + (y - pos.y) ** 2) >= minPixelGap);\n\n if (renderedLabels.length === 0 || isFarEnough) {\n renderedLabels.push(\n <text\n key={`scatterpolar-label-${text}`}\n x={x}\n y={y}\n className={className}\n textAnchor=\"middle\"\n alignmentBaseline=\"middle\"\n opacity={1}\n >\n {text}\n </text>,\n );\n placedPositions.push({ x, y });\n }\n });\n\n return renderedLabels;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { IChartDataPoint, IChartProps, IHorizontalBarChartWithAxisDataPoint, IVerticalStackedChartProps } from '../index';
1
+ import { IChartDataPoint, IChartProps, IGanttChartDataPoint, IHorizontalBarChartWithAxisDataPoint, IVerticalStackedChartProps } from '../index';
2
2
  export declare const chartPointsVBC: {
3
3
  x: number;
4
4
  y: number;
@@ -41,3 +41,6 @@ export declare const negativeChartPointsVBC: {
41
41
  xAxisCalloutData: string;
42
42
  yAxisCalloutData: string;
43
43
  }[];
44
+ export declare const ganttData: IGanttChartDataPoint[];
45
+ export declare const ganttDataWithLongY: IGanttChartDataPoint[];
46
+ export declare const ganttDataWithNumericY: IGanttChartDataPoint[];
@@ -1,4 +1,5 @@
1
1
  import { DefaultPalette } from '@fluentui/react/lib/Styling';
2
+ import { DataVizGradientPalette, DataVizPalette, getGradientFromToken, } from '../index';
2
3
  export var chartPointsVBC = [
3
4
  {
4
5
  x: 0,
@@ -259,4 +260,216 @@ export var negativeChartPointsVBC = [
259
260
  yAxisCalloutData: '37%',
260
261
  },
261
262
  ];
263
+ export var ganttData = [
264
+ {
265
+ x: {
266
+ start: new Date('2017-01-01'),
267
+ end: new Date('2017-02-02'),
268
+ },
269
+ y: 'Job-1',
270
+ legend: 'Complete',
271
+ color: DataVizPalette.success,
272
+ gradient: getGradientFromToken(DataVizGradientPalette.success),
273
+ },
274
+ {
275
+ x: {
276
+ start: new Date('2017-01-17'),
277
+ end: new Date('2017-02-17'),
278
+ },
279
+ y: 'Job-2',
280
+ legend: 'Complete',
281
+ color: DataVizPalette.success,
282
+ gradient: getGradientFromToken(DataVizGradientPalette.success),
283
+ },
284
+ {
285
+ x: {
286
+ start: new Date('2017-01-14'),
287
+ end: new Date('2017-03-14'),
288
+ },
289
+ y: 'Job-4',
290
+ legend: 'Complete',
291
+ color: DataVizPalette.success,
292
+ gradient: getGradientFromToken(DataVizGradientPalette.success),
293
+ },
294
+ {
295
+ x: {
296
+ start: new Date('2017-02-15'),
297
+ end: new Date('2017-03-15'),
298
+ },
299
+ y: 'Job-1',
300
+ legend: 'Incomplete',
301
+ color: DataVizPalette.warning,
302
+ gradient: getGradientFromToken(DataVizGradientPalette.warning),
303
+ },
304
+ {
305
+ x: {
306
+ start: new Date('2017-01-17'),
307
+ end: new Date('2017-02-17'),
308
+ },
309
+ y: 'Job-2',
310
+ legend: 'Not Started',
311
+ color: DataVizPalette.error,
312
+ gradient: getGradientFromToken(DataVizGradientPalette.error),
313
+ },
314
+ {
315
+ x: {
316
+ start: new Date('2017-03-10'),
317
+ end: new Date('2017-03-20'),
318
+ },
319
+ y: 'Job-3',
320
+ legend: 'Not Started',
321
+ color: DataVizPalette.error,
322
+ gradient: getGradientFromToken(DataVizGradientPalette.error),
323
+ },
324
+ {
325
+ x: {
326
+ start: new Date('2017-04-01'),
327
+ end: new Date('2017-04-20'),
328
+ },
329
+ y: 'Job-3',
330
+ legend: 'Not Started',
331
+ color: DataVizPalette.error,
332
+ gradient: getGradientFromToken(DataVizGradientPalette.error),
333
+ },
334
+ {
335
+ x: {
336
+ start: new Date('2017-05-18'),
337
+ end: new Date(new Date('2017-06-18')),
338
+ },
339
+ y: 'Job-3',
340
+ legend: 'Not Started',
341
+ color: DataVizPalette.error,
342
+ gradient: getGradientFromToken(DataVizGradientPalette.error),
343
+ },
344
+ ];
345
+ export var ganttDataWithLongY = [
346
+ {
347
+ x: {
348
+ start: new Date('2024-05-01'),
349
+ end: new Date('2024-05-07'),
350
+ },
351
+ y: 'Site Preparation',
352
+ legend: 'No',
353
+ color: '#637cefff',
354
+ },
355
+ {
356
+ x: {
357
+ start: new Date('2024-05-08'),
358
+ end: new Date('2024-05-21'),
359
+ },
360
+ y: 'Foundation Work',
361
+ legend: 'No',
362
+ color: '#637cefff',
363
+ },
364
+ {
365
+ x: {
366
+ start: new Date('2024-05-22'),
367
+ end: new Date('2024-06-02'),
368
+ },
369
+ y: 'Framing',
370
+ legend: 'No',
371
+ color: '#637cefff',
372
+ },
373
+ {
374
+ x: {
375
+ start: new Date('2024-06-03'),
376
+ end: new Date('2024-06-09'),
377
+ },
378
+ y: 'Roof Installation',
379
+ legend: 'No',
380
+ color: '#637cefff',
381
+ },
382
+ {
383
+ x: {
384
+ start: new Date('2024-06-10'),
385
+ end: new Date('2024-06-23'),
386
+ },
387
+ y: 'Plumbing/Electrical',
388
+ legend: 'No',
389
+ color: '#637cefff',
390
+ },
391
+ {
392
+ x: {
393
+ start: new Date('2024-07-08'),
394
+ end: new Date('2024-07-17'),
395
+ },
396
+ y: 'Exterior Finishing',
397
+ legend: 'No',
398
+ color: '#637cefff',
399
+ },
400
+ {
401
+ x: {
402
+ start: new Date('2024-06-24'),
403
+ end: new Date('2024-07-07'),
404
+ },
405
+ y: 'Interior Finishing',
406
+ legend: 'Yes (Phase 1)',
407
+ color: '#f7630cff',
408
+ },
409
+ {
410
+ x: {
411
+ start: new Date('2024-07-18'),
412
+ end: new Date('2024-07-24'),
413
+ },
414
+ y: 'Final Inspections',
415
+ legend: 'Yes (Phase 2)',
416
+ color: '#57811bff',
417
+ },
418
+ ];
419
+ export var ganttDataWithNumericY = [
420
+ {
421
+ x: {
422
+ start: new Date('2021-01-01'),
423
+ end: new Date('2022-01-10'),
424
+ },
425
+ y: 1,
426
+ legend: 'HR',
427
+ color: '#637cefff',
428
+ },
429
+ {
430
+ x: {
431
+ start: new Date('2022-01-15'),
432
+ end: new Date('2022-01-20'),
433
+ },
434
+ y: 2,
435
+ legend: 'Finance',
436
+ color: '#f7630cff',
437
+ },
438
+ {
439
+ x: {
440
+ start: new Date('2022-02-01'),
441
+ end: new Date('2022-02-08'),
442
+ },
443
+ y: 3,
444
+ legend: 'IT',
445
+ color: '#57811bff',
446
+ },
447
+ {
448
+ x: {
449
+ start: new Date('2022-02-10'),
450
+ end: new Date('2022-02-20'),
451
+ },
452
+ y: 4,
453
+ legend: 'Operations',
454
+ color: '#9373c0ff',
455
+ },
456
+ {
457
+ x: {
458
+ start: new Date('2022-03-01'),
459
+ end: new Date('2022-03-10'),
460
+ },
461
+ y: 5,
462
+ legend: 'Customer Support',
463
+ color: '#ca5010ff',
464
+ },
465
+ {
466
+ x: {
467
+ start: new Date('2022-03-05'),
468
+ end: new Date('2022-03-15'),
469
+ },
470
+ y: 6,
471
+ legend: 'Legal',
472
+ color: '#3a96ddff',
473
+ },
474
+ ];
262
475
  //# sourceMappingURL=test-data.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-data.js","sourceRoot":"../src/","sources":["utilities/test-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAS7D,MAAM,CAAC,IAAM,cAAc,GAAG;IAC5B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AC,EAAE,CAAC;QACJ,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,cAAc,CAAC,MAAM;QAC5B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;IACD;QACE,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,CAAC,KAAK;QACT,MAAM,EAAE,QAAQ;QAChB,KAAK,EAAE,cAAc,CAAC,QAAQ;QAC9B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;IACD;QACE,CAAC,EAAE,KAAK;QACR,CAAC,EAAE,KAAK;QACR,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,cAAc,CAAC,OAAO;QAC7B,gBAAgB,EAAE,YAAY;QAC9B,gBAAgB,EAAE,KAAK;KACxB;CACF,CAAC","sourcesContent":["import { DefaultPalette } from '@fluentui/react/lib/Styling';\nimport {\n IChartDataPoint,\n IChartProps,\n IHorizontalBarChartWithAxisDataPoint,\n IVSChartDataPoint,\n IVerticalStackedChartProps,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: IVerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: IVerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n];\n\nexport const emptychartPointsVSBC: IVerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: IChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const pointsDCElevateMinimumsExample: IChartDataPoint[] = [\n { legend: 'first', data: 39000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 20, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fourth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fifth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'sixth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: IChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsDCElevateMinimums: IChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: DefaultPalette.blueDark,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: DefaultPalette.accent,\n },\n {\n y: 'String Two',\n x: 5000,\n color: DefaultPalette.blueDark,\n },\n {\n y: 'String Three',\n x: 3000,\n color: DefaultPalette.blueMid,\n },\n {\n y: 'String Four',\n x: 2000,\n color: DefaultPalette.blue,\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: DefaultPalette.accent,\n },\n {\n x: 2000,\n y: 5000,\n color: DefaultPalette.blueDark,\n },\n {\n x: 3000,\n y: 3000,\n color: DefaultPalette.blueMid,\n },\n {\n x: 4000,\n y: 2000,\n color: DefaultPalette.blue,\n },\n];\n\nexport const allNegativeChartPointsVBC = [\n {\n x: 0,\n y: -10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: -30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const negativeChartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n"]}
1
+ {"version":3,"file":"test-data.js","sourceRoot":"../src/","sources":["utilities/test-data.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,EACL,sBAAsB,EACtB,cAAc,EAOd,oBAAoB,GACrB,MAAM,UAAU,CAAC;AAElB,MAAM,CAAC,IAAM,cAAc,GAAG;IAC5B;QACE,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,KAA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AAI,CAAC,YAAY,CAAC;YAC7B,GAAG,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;SAC5B;QACD,CAAC,EAAE,CAAC;QACJ,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,WAAW;KACnB;IACD;QACE,CAAC,EAAE;YACD,KAAK,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC7B,GAAG,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;SAC5B;QACD,CAAC,EAAE,CAAC;QACJ,MAAM,EAAE,YAAY;QACpB,KAAK,EAAE,WAAW;KACnB;IACD;QACE,CAAC,EAAE;YACD,KAAK,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC7B,GAAG,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;SAC5B;QACD,CAAC,EAAE,CAAC;QACJ,MAAM,EAAE,kBAAkB;QAC1B,KAAK,EAAE,WAAW;KACnB;IACD;QACE,CAAC,EAAE;YACD,KAAK,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;YAC7B,GAAG,EAAE,IAAI,IAAI,CAAC,YAAY,CAAC;SAC5B;QACD,CAAC,EAAE,CAAC;QACJ,MAAM,EAAE,OAAO;QACf,KAAK,EAAE,WAAW;KACnB;CACF,CAAC","sourcesContent":["import { DefaultPalette } from '@fluentui/react/lib/Styling';\nimport {\n DataVizGradientPalette,\n DataVizPalette,\n IChartDataPoint,\n IChartProps,\n IGanttChartDataPoint,\n IHorizontalBarChartWithAxisDataPoint,\n IVSChartDataPoint,\n IVerticalStackedChartProps,\n getGradientFromToken,\n} from '../index';\n\nexport const chartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: 50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nconst firstChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 40,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '40%',\n },\n {\n legend: 'Metadata2',\n data: 5,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '5%',\n },\n];\n\nconst secondChartPointsVSBC: IVSChartDataPoint[] = [\n {\n legend: 'Metadata1',\n data: 30,\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '30%',\n },\n {\n legend: 'Metadata2',\n data: 20,\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n];\n\nexport const chartPointsVSBC: IVerticalStackedChartProps[] = [\n { chartData: firstChartPointsVSBC, xAxisPoint: 0 },\n { chartData: secondChartPointsVSBC, xAxisPoint: 20 },\n];\n\nexport const chartPoints2VSBC: IVerticalStackedChartProps[] = [\n {\n chartData: firstChartPointsVSBC,\n xAxisPoint: 0,\n lineData: [{ y: 15, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n {\n chartData: secondChartPointsVSBC,\n xAxisPoint: 20,\n lineData: [{ y: 30, legend: 'Line1', color: DefaultPalette.yellow }],\n },\n];\n\nexport const emptychartPointsVSBC: IVerticalStackedChartProps[] = [{ chartData: [], xAxisPoint: 0 }];\n\nexport const pointsHBCWA = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Dogs',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '88%',\n },\n];\n\nexport const pointsDC: IChartDataPoint[] = [\n { legend: 'first', data: 20000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 39000, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 45000, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const pointsDCElevateMinimumsExample: IChartDataPoint[] = [\n { legend: 'first', data: 39000, color: '#E5E5E5', xAxisCalloutData: '2020/04/30' },\n { legend: 'second', data: 20, color: '#0078D4', xAxisCalloutData: '2020/04/20' },\n { legend: 'third', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fourth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'fifth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n { legend: 'sixth', data: 20, color: '#DADADA', xAxisCalloutData: '2020/04/25' },\n];\n\nexport const chartPointsDC: IChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsDCElevateMinimums: IChartProps = {\n chartTitle: 'Donut chart example',\n chartData: pointsDC,\n};\n\nexport const chartPointsHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 10000,\n y: 5000,\n legend: 'Oranges',\n color: DefaultPalette.accent,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '10%',\n },\n {\n x: 20000,\n y: 50000,\n legend: 'Grapes',\n color: DefaultPalette.blueDark,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Apples',\n color: DefaultPalette.blueMid,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '37%',\n },\n\n {\n x: 40000,\n y: 13000,\n legend: 'Bananas',\n color: DefaultPalette.blueLight,\n yAxisCalloutData: '2020/04/30',\n xAxisCalloutData: '88%',\n },\n];\n\nexport const chartPointsWithStringYAxisHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n y: 'String One',\n x: 1000,\n color: DefaultPalette.accent,\n },\n {\n y: 'String Two',\n x: 5000,\n color: DefaultPalette.blueDark,\n },\n {\n y: 'String Three',\n x: 3000,\n color: DefaultPalette.blueMid,\n },\n {\n y: 'String Four',\n x: 2000,\n color: DefaultPalette.blue,\n },\n];\n\nexport const chartPointsWithAxisToolTipHBCWA: IHorizontalBarChartWithAxisDataPoint[] = [\n {\n x: 1000,\n y: 1000,\n color: DefaultPalette.accent,\n },\n {\n x: 2000,\n y: 5000,\n color: DefaultPalette.blueDark,\n },\n {\n x: 3000,\n y: 3000,\n color: DefaultPalette.blueMid,\n },\n {\n x: 4000,\n y: 2000,\n color: DefaultPalette.blue,\n },\n];\n\nexport const allNegativeChartPointsVBC = [\n {\n x: 0,\n y: -10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: -30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const negativeChartPointsVBC = [\n {\n x: 0,\n y: 10000,\n legend: 'First',\n color: DefaultPalette.accent,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '10%',\n },\n {\n x: 10000,\n y: -50000,\n legend: 'Second',\n color: DefaultPalette.blueDark,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '20%',\n },\n {\n x: 25000,\n y: 30000,\n legend: 'Third',\n color: DefaultPalette.blueMid,\n xAxisCalloutData: '2020/04/30',\n yAxisCalloutData: '37%',\n },\n];\n\nexport const ganttData: IGanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2017-01-01'),\n end: new Date('2017-02-02'),\n },\n y: 'Job-1',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: getGradientFromToken(DataVizGradientPalette.success),\n },\n {\n x: {\n start: new Date('2017-01-17'),\n end: new Date('2017-02-17'),\n },\n y: 'Job-2',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: getGradientFromToken(DataVizGradientPalette.success),\n },\n {\n x: {\n start: new Date('2017-01-14'),\n end: new Date('2017-03-14'),\n },\n y: 'Job-4',\n legend: 'Complete',\n color: DataVizPalette.success,\n gradient: getGradientFromToken(DataVizGradientPalette.success),\n },\n {\n x: {\n start: new Date('2017-02-15'),\n end: new Date('2017-03-15'),\n },\n y: 'Job-1',\n legend: 'Incomplete',\n color: DataVizPalette.warning,\n gradient: getGradientFromToken(DataVizGradientPalette.warning),\n },\n {\n x: {\n start: new Date('2017-01-17'),\n end: new Date('2017-02-17'),\n },\n y: 'Job-2',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: getGradientFromToken(DataVizGradientPalette.error),\n },\n {\n x: {\n start: new Date('2017-03-10'),\n end: new Date('2017-03-20'),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: getGradientFromToken(DataVizGradientPalette.error),\n },\n {\n x: {\n start: new Date('2017-04-01'),\n end: new Date('2017-04-20'),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: getGradientFromToken(DataVizGradientPalette.error),\n },\n {\n x: {\n start: new Date('2017-05-18'),\n end: new Date(new Date('2017-06-18')),\n },\n y: 'Job-3',\n legend: 'Not Started',\n color: DataVizPalette.error,\n gradient: getGradientFromToken(DataVizGradientPalette.error),\n },\n];\n\nexport const ganttDataWithLongY: IGanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2024-05-01'),\n end: new Date('2024-05-07'),\n },\n y: 'Site Preparation',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-05-08'),\n end: new Date('2024-05-21'),\n },\n y: 'Foundation Work',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-05-22'),\n end: new Date('2024-06-02'),\n },\n y: 'Framing',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-03'),\n end: new Date('2024-06-09'),\n },\n y: 'Roof Installation',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-10'),\n end: new Date('2024-06-23'),\n },\n y: 'Plumbing/Electrical',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-07-08'),\n end: new Date('2024-07-17'),\n },\n y: 'Exterior Finishing',\n legend: 'No',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2024-06-24'),\n end: new Date('2024-07-07'),\n },\n y: 'Interior Finishing',\n legend: 'Yes (Phase 1)',\n color: '#f7630cff',\n },\n {\n x: {\n start: new Date('2024-07-18'),\n end: new Date('2024-07-24'),\n },\n y: 'Final Inspections',\n legend: 'Yes (Phase 2)',\n color: '#57811bff',\n },\n];\n\nexport const ganttDataWithNumericY: IGanttChartDataPoint[] = [\n {\n x: {\n start: new Date('2021-01-01'),\n end: new Date('2022-01-10'),\n },\n y: 1,\n legend: 'HR',\n color: '#637cefff',\n },\n {\n x: {\n start: new Date('2022-01-15'),\n end: new Date('2022-01-20'),\n },\n y: 2,\n legend: 'Finance',\n color: '#f7630cff',\n },\n {\n x: {\n start: new Date('2022-02-01'),\n end: new Date('2022-02-08'),\n },\n y: 3,\n legend: 'IT',\n color: '#57811bff',\n },\n {\n x: {\n start: new Date('2022-02-10'),\n end: new Date('2022-02-20'),\n },\n y: 4,\n legend: 'Operations',\n color: '#9373c0ff',\n },\n {\n x: {\n start: new Date('2022-03-01'),\n end: new Date('2022-03-10'),\n },\n y: 5,\n legend: 'Customer Support',\n color: '#ca5010ff',\n },\n {\n x: {\n start: new Date('2022-03-05'),\n end: new Date('2022-03-15'),\n },\n y: 6,\n legend: 'Legal',\n color: '#3a96ddff',\n },\n];\n"]}
@@ -3,7 +3,7 @@ import { TimeLocaleDefinition as d3TimeLocaleDefinition } from 'd3-time-format';
3
3
  import { IAccessibilityProps, IEventsAnnotationProps, ILineChartPoints, IDataPoint, IVerticalStackedBarDataPoint, IVerticalBarChartDataPoint, IHorizontalBarChartWithAxisDataPoint, ILineChartLineOptions, AxisCategoryOrder } from '../index';
4
4
  import { ITheme } from '@fluentui/react';
5
5
  import { CurveFactory } from 'd3-shape';
6
- import { IScatterChartPoints } from '../types/IDataPoint';
6
+ import { IGanttChartDataPoint, IScatterChartPoints } from '../types/IDataPoint';
7
7
  export declare const MIN_DOMAIN_MARGIN = 8;
8
8
  export declare const MIN_DONUT_RADIUS = 1;
9
9
  export type NumericAxis = D3Axis<number | {
@@ -18,7 +18,8 @@ export declare enum ChartTypes {
18
18
  GroupedVerticalBarChart = 4,
19
19
  HeatMapChart = 5,
20
20
  HorizontalBarChartWithAxis = 6,
21
- ScatterChart = 7
21
+ ScatterChart = 7,
22
+ GanttChart = 8
22
23
  }
23
24
  export declare enum XAxisTypes {
24
25
  NumericAxis = 0,
@@ -126,13 +127,14 @@ export declare function createNumericXAxis(xAxisParams: IXAxisParams, tickParams
126
127
  xScale: import("d3-scale").ScaleLinear<number, number, never>;
127
128
  tickValues: string[];
128
129
  };
130
+ export declare function getDateFormatLevel(date: Date, useUTC?: boolean): number;
129
131
  /**
130
132
  * Creating Date x axis of the Chart
131
133
  * @export
132
134
  * @param {IXAxisParams} xAxisParams
133
135
  * @param {ITickParams} tickParams
134
136
  */
135
- export declare function createDateXAxis(xAxisParams: IXAxisParams, tickParams: ITickParams, culture?: string, options?: Intl.DateTimeFormatOptions, timeFormatLocale?: d3TimeLocaleDefinition, customDateTimeFormatter?: (dateTime: Date) => string, useUTC?: boolean): {
137
+ export declare function createDateXAxis(xAxisParams: IXAxisParams, tickParams: ITickParams, culture?: string, options?: Intl.DateTimeFormatOptions, timeFormatLocale?: d3TimeLocaleDefinition, customDateTimeFormatter?: (dateTime: Date) => string, useUTC?: boolean, chartType?: ChartTypes): {
136
138
  xScale: import("d3-scale").ScaleTime<number, number, never>;
137
139
  tickValues: string[];
138
140
  };
@@ -369,12 +371,12 @@ export declare function findVerticalNumericMinMaxOfY(points: IVerticalBarChartDa
369
371
  endValue: number;
370
372
  };
371
373
  /**
372
- * Fins the min and max values of the vertical bar chart y axis data point.
374
+ * Fins the min and max values of the horizontal bar chart y axis data point.
373
375
  * @export
374
- * @param {IVerticalBarChartDataPoint[]} points
376
+ * @param {IHorizontalBarChartWithAxisDataPoint[]|IGanttChartDataPoint[]} points
375
377
  * @returns {{ startValue: number; endValue: number }}
376
378
  */
377
- export declare function findHBCWANumericMinMaxOfY(points: IHorizontalBarChartWithAxisDataPoint[], yAxisType: YAxisType | undefined): {
379
+ export declare function findHBCWANumericMinMaxOfY(points: IHorizontalBarChartWithAxisDataPoint[] | IGanttChartDataPoint[], yAxisType: YAxisType | undefined): {
378
380
  startValue: number;
379
381
  endValue: number;
380
382
  };
@@ -473,3 +475,9 @@ export declare const truncateString: (str: string, maxLength: number, ellipsis?:
473
475
  export declare const sortAxisCategories: (categoryToValues: Record<string, number[]>, categoryOrder: AxisCategoryOrder | undefined) => string[];
474
476
  export declare const getInvertedTextColor: (color: string, theme: ITheme | undefined) => string;
475
477
  export declare function getContrastTextColor(backgroundColor: string, theme: ITheme): string;
478
+ /**
479
+ * Utility function to check if an array of points is scatterpolar
480
+ * @param points - Array of chart points
481
+ * @returns true if any point has lineOptions.mode as 'scatterpolar'
482
+ */
483
+ export declare function isScatterPolarSeries(points: (ILineChartPoints | IScatterChartPoints)[]): boolean;