@fluentui/react-charts 9.3.3 → 9.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +27 -7
  2. package/dist/index.d.ts +4 -0
  3. package/lib/components/AreaChart/AreaChart.js +188 -36
  4. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  5. package/lib/components/ChartTable/ChartTable.js +14 -12
  6. package/lib/components/ChartTable/ChartTable.js.map +1 -1
  7. package/lib/components/ChartTable/useChartTableStyles.styles.js +3 -3
  8. package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  9. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
  10. package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  11. package/lib/components/CommonComponents/CartesianChart.js +5 -6
  12. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  13. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +3 -2
  14. package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  15. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js +2 -1
  16. package/lib/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  17. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +3 -2
  18. package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  19. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
  20. package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  21. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +106 -63
  22. package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  23. package/lib/components/DonutChart/useDonutChartStyles.styles.js +3 -2
  24. package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  25. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js +2 -1
  26. package/lib/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  27. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js +3 -2
  28. package/lib/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  29. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js +2 -1
  30. package/lib/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  31. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js +3 -2
  32. package/lib/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  33. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -1
  34. package/lib/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  35. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +3 -2
  36. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  37. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
  38. package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  39. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +3 -2
  40. package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  41. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -1
  42. package/lib/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  43. package/lib/types/DataPoint.js.map +1 -1
  44. package/lib/utilities/utilities.js +63 -18
  45. package/lib/utilities/utilities.js.map +1 -1
  46. package/lib-commonjs/components/AreaChart/AreaChart.js +188 -36
  47. package/lib-commonjs/components/AreaChart/AreaChart.js.map +1 -1
  48. package/lib-commonjs/components/ChartTable/ChartTable.js +13 -12
  49. package/lib-commonjs/components/ChartTable/ChartTable.js.map +1 -1
  50. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +3 -3
  51. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
  52. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +2 -2
  53. package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
  54. package/lib-commonjs/components/CommonComponents/CartesianChart.js +5 -6
  55. package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
  56. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +7 -1
  57. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
  58. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js +2 -1
  59. package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.raw.js.map +1 -1
  60. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +7 -1
  61. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
  62. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
  63. package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
  64. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +106 -63
  65. package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
  66. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +7 -1
  67. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
  68. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js +2 -1
  69. package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.raw.js.map +1 -1
  70. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js +7 -1
  71. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.js.map +1 -1
  72. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js +2 -1
  73. package/lib-commonjs/components/FunnelChart/useFunnelChartStyles.styles.raw.js.map +1 -1
  74. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js +7 -1
  75. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.js.map +1 -1
  76. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js +2 -1
  77. package/lib-commonjs/components/GaugeChart/useGaugeChartStyles.styles.raw.js.map +1 -1
  78. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +7 -1
  79. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
  80. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +2 -1
  81. package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
  82. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +7 -1
  83. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
  84. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js +2 -1
  85. package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.raw.js.map +1 -1
  86. package/lib-commonjs/types/DataPoint.js.map +1 -1
  87. package/lib-commonjs/utilities/utilities.js +63 -18
  88. package/lib-commonjs/utilities/utilities.js.map +1 -1
  89. package/package.json +13 -13
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/SankeyChart/useSankeyChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SankeyChartProps, SankeyChartStyles } from './SankeyChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getTooltipStyle } from '../../utilities/index';\n\nexport const sankeyChartClassNames: SlotClassNames<SankeyChartStyles> = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart',\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n toolTip: getTooltipStyle() as GriffelStyle,\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px',\n },\n chartWrapper: {\n overflow: 'auto',\n },\n chart: {\n display: 'block',\n },\n});\n\nexport const useSankeyChartStyles = (props: SankeyChartProps): SankeyChartStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, props.styles?.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/),\n nodeTextContainer: mergeClasses(\n sankeyChartClassNames.nodeTextContainer,\n baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/,\n ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/),\n chartWrapper: mergeClasses(\n sankeyChartClassNames.chartWrapper,\n props.reflowProps?.mode === 'min-width' ? baseStyles.chartWrapper : '',\n props.styles?.chartWrapper,\n ),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, props.styles?.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","HighContrastSelector","getTooltipStyle","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","body1","display","width","height","flexDirection","overflow","fill","colorNeutralBackground1","strokeWidth","marginTop","marginLeft","marginBottom","marginRight","useSankeyChartStyles","props","baseStyles","styles","reflowProps","mode"],"mappings":"AAAA;;;;;;;;;;;;IASaM,qBAAAA;;;IAoDAsB,oBAAAA;;;;uBA3D0C,iBAAiB;4BAG/B,wBAAwB;uBAC5B,wBAAwB;AAGtD,8BAAiE;IACtErB,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,mBAAmB;IACnBC,SAAS;IACTC,cAAc;IACdC,OAAO;AACT,EAAE;AACF,MAAMC,gBAAYd,iBAAAA,EAAW;IAC3BO,MAAM;QACJ,GAAGJ,4BAAAA,CAAiBY,KAAK;QACzBC,SAAS;QACTC,OAAO;QACPC,QAAQ;QACRC,eAAe;QACfC,UAAU;IACZ;IACAX,OAAO;QACLY,MAAMnB,kBAAAA,CAAOoB,uBAAuB;QACpCC,aAAa;QACb,CAACnB,2BAAAA,CAAqB,EAAE;YACtBiB,MAAM;QACR;IACF;IACAb,OAAO;QACLa,MAAM;QACN,CAACjB,2BAAAA,CAAqB,EAAE;YACtBiB,MAAM;QACR;IACF;IACAV,SAASN,0BAAAA;IACTK,mBAAmB;QACjB,UAAU;YACR,CAACN,2BAAAA,CAAqB,EAAE;gBACtBiB,MAAM;YACR;QACF;QAEAG,WAAW;QACXC,YAAY;QACZC,cAAc;QACdC,aAAa;IACf;IACAf,cAAc;QACZQ,UAAU;IACZ;IACAP,OAAO;QACLG,SAAS;IACX;AACF;AAEO,6BAA6B,CAACa;QAI+BA,eAU9DA,oBACAA,gBAEiEA;IAhBrE,MAAMC,aAAahB;IAEnB,OAAO;QACLP,UAAMN,mBAAAA,EAAaK,sBAAsBC,IAAI,EAAEuB,WAAWvB,IAAI,EAAA,CAAEsB,gBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,kBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,cAActB,IAAI;QAClFC,WAAOP,mBAAAA,EAAaK,sBAAsBE,KAAK,EAAEsB,WAAWtB,KAAK,CAAC,uBAAuB;QACzFC,WAAOR,mBAAAA,EAAaK,sBAAsBG,KAAK,EAAEqB,WAAWrB,KAAK,CAAC,uBAAuB;QACzFC,uBAAmBT,mBAAAA,EACjBK,sBAAsBI,iBAAiB,EACvCoB,WAAWpB,iBAAiB,CAAC,mCAAmC;QAElEC,aAASV,mBAAAA,EAAaK,sBAAsBK,OAAO,EAAEmB,WAAWnB,OAAO,CAAC,yBAAyB;QACjGC,kBAAcX,mBAAAA,EACZK,sBAAsBM,YAAY,EAClCiB,CAAAA,CAAAA,qBAAAA,MAAMG,WAAAA,AAAW,MAAA,QAAjBH,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,mBAAmBI,IAAAA,AAAI,MAAK,cAAcH,WAAWlB,YAAY,GAAG,IAAA,CACpEiB,iBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAcjB,YAAY;QAE5BC,WAAOZ,mBAAAA,EAAaK,sBAAsBO,KAAK,EAAEiB,WAAWjB,KAAK,EAAA,CAAEgB,iBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAchB,KAAK;IACxF;AACF,EAAE"}
1
+ {"version":3,"sources":["../src/components/SankeyChart/useSankeyChartStyles.styles.ts"],"sourcesContent":["'use client';\n\nimport { GriffelStyle, makeStyles, mergeClasses } from '@griffel/react';\nimport type { SankeyChartProps, SankeyChartStyles } from './SankeyChart.types';\nimport type { SlotClassNames } from '@fluentui/react-utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { HighContrastSelector } from '../../utilities/index';\nimport { getTooltipStyle } from '../../utilities/index';\n\nexport const sankeyChartClassNames: SlotClassNames<SankeyChartStyles> = {\n root: 'fui-sc__root',\n nodes: 'fui-sc__nodes',\n links: 'fui-sc__links',\n nodeTextContainer: 'fui-sc__nodeTextContainer',\n toolTip: 'fui-sc__toolTip',\n chartWrapper: 'fui-sc__chartWrapper',\n chart: 'fui-sc__chart',\n};\nconst useStyles = makeStyles({\n root: {\n ...typographyStyles.body1,\n display: 'flex',\n width: '100%',\n height: '100%',\n flexDirection: 'column',\n overflow: 'hidden',\n textAlign: 'left',\n },\n links: {\n fill: tokens.colorNeutralBackground1,\n strokeWidth: '3px',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n nodes: {\n fill: '#F5F5F5',\n [HighContrastSelector]: {\n fill: 'Canvas',\n },\n },\n toolTip: getTooltipStyle() as GriffelStyle,\n nodeTextContainer: {\n '& text': {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n\n marginTop: '4px',\n marginLeft: '8px',\n marginBottom: '4px',\n marginRight: '8px',\n },\n chartWrapper: {\n overflow: 'auto',\n },\n chart: {\n display: 'block',\n },\n});\n\nexport const useSankeyChartStyles = (props: SankeyChartProps): SankeyChartStyles => {\n const baseStyles = useStyles();\n\n return {\n root: mergeClasses(sankeyChartClassNames.root, baseStyles.root, props.styles?.root),\n nodes: mergeClasses(sankeyChartClassNames.nodes, baseStyles.nodes /*, props.styles?.nodes*/),\n links: mergeClasses(sankeyChartClassNames.links, baseStyles.links /*, props.styles?.links*/),\n nodeTextContainer: mergeClasses(\n sankeyChartClassNames.nodeTextContainer,\n baseStyles.nodeTextContainer /*, props.styles?.nodeTextContainer*/,\n ),\n toolTip: mergeClasses(sankeyChartClassNames.toolTip, baseStyles.toolTip /*, props.styles?.toolTip*/),\n chartWrapper: mergeClasses(\n sankeyChartClassNames.chartWrapper,\n props.reflowProps?.mode === 'min-width' ? baseStyles.chartWrapper : '',\n props.styles?.chartWrapper,\n ),\n chart: mergeClasses(sankeyChartClassNames.chart, baseStyles.chart, props.styles?.chart),\n };\n};\n"],"names":["makeStyles","mergeClasses","tokens","typographyStyles","HighContrastSelector","getTooltipStyle","sankeyChartClassNames","root","nodes","links","nodeTextContainer","toolTip","chartWrapper","chart","useStyles","body1","display","width","height","flexDirection","overflow","textAlign","fill","colorNeutralBackground1","strokeWidth","marginTop","marginLeft","marginBottom","marginRight","useSankeyChartStyles","props","baseStyles","styles","reflowProps","mode"],"mappings":"AAAA;;;;;;;;;;;;IASaM,qBAAAA;;;wBAqDAuB;eAAAA;;;uBA5D0C,iBAAiB;4BAG/B,wBAAwB;uBAC5B,wBAAwB;AAGtD,8BAAiE;IACtEtB,MAAM;IACNC,OAAO;IACPC,OAAO;IACPC,mBAAmB;IACnBC,SAAS;IACTC,cAAc;IACdC,OAAO;AACT,EAAE;AACF,MAAMC,gBAAYd,iBAAAA,EAAW;IAC3BO,MAAM;QACJ,GAAGJ,4BAAAA,CAAiBY,KAAK;QACzBC,SAAS;QACTC,OAAO;QACPC,QAAQ;QACRC,eAAe;QACfC,UAAU;QACVC,WAAW;IACb;IACAZ,OAAO;QACLa,MAAMpB,kBAAAA,CAAOqB,uBAAuB;QACpCC,aAAa;QACb,CAACpB,2BAAAA,CAAqB,EAAE;YACtBkB,MAAM;QACR;IACF;IACAd,OAAO;QACLc,MAAM;QACN,CAAClB,2BAAAA,CAAqB,EAAE;YACtBkB,MAAM;QACR;IACF;IACAX,SAASN,0BAAAA;IACTK,mBAAmB;QACjB,UAAU;YACR,CAACN,2BAAAA,CAAqB,EAAE;gBACtBkB,MAAM;YACR;QACF;QAEAG,WAAW;QACXC,YAAY;QACZC,cAAc;QACdC,aAAa;IACf;IACAhB,cAAc;QACZQ,UAAU;IACZ;IACAP,OAAO;QACLG,SAAS;IACX;AACF;AAEO,6BAA6B,CAACc;QAI+BA,eAU9DA,oBACAA,gBAEiEA;IAhBrE,MAAMC,aAAajB;IAEnB,OAAO;QACLP,UAAMN,mBAAAA,EAAaK,sBAAsBC,IAAI,EAAEwB,WAAWxB,IAAI,EAAA,CAAEuB,gBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,kBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,cAAcvB,IAAI;QAClFC,WAAOP,mBAAAA,EAAaK,sBAAsBE,KAAK,EAAEuB,WAAWvB,KAAK,CAAC,uBAAuB;QACzFC,WAAOR,mBAAAA,EAAaK,sBAAsBG,KAAK,EAAEsB,WAAWtB,KAAK,CAAC,uBAAuB;QACzFC,uBAAmBT,mBAAAA,EACjBK,sBAAsBI,iBAAiB,EACvCqB,WAAWrB,iBAAiB,CAAC,mCAAmC;QAElEC,SAASV,uBAAAA,EAAaK,sBAAsBK,OAAO,EAAEoB,WAAWpB,OAAO,CAAC,yBAAyB;QACjGC,kBAAcX,mBAAAA,EACZK,sBAAsBM,YAAY,EAClCkB,CAAAA,CAAAA,qBAAAA,MAAMG,WAAAA,AAAW,MAAA,QAAjBH,uBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,mBAAmBI,IAAAA,AAAI,MAAK,cAAcH,WAAWnB,YAAY,GAAG,IAAA,CACpEkB,iBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAclB,YAAY;QAE5BC,WAAOZ,mBAAAA,EAAaK,sBAAsBO,KAAK,EAAEkB,WAAWlB,KAAK,EAAA,CAAEiB,iBAAAA,MAAME,MAAAA,AAAM,MAAA,QAAZF,mBAAAA,KAAAA,IAAAA,KAAAA,IAAAA,eAAcjB,KAAK;IACxF;AACF,EAAE"}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/DataPoint.ts"],"sourcesContent":["import { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\n\nexport interface Basestate {\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 RefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory ChartProps}\n */\nexport interface Margins {\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 ChartData}\n */\nexport interface DataPoint {\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 ChartData}\n */\nexport interface VerticalStackedBarDataPoint extends Omit<DataPoint, '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 ChartData}\n */\nexport interface HorizontalDataPoint {\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 * Total value of a single point bar chart.\n */\n total?: number;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface ChartDataPoint {\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?: HorizontalDataPoint;\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface VerticalBarChartDataPoint {\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?: LineDataInVerticalBarChart;\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface HorizontalBarChartWithAxisDataPoint {\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineDataInVerticalBarChart {\n y: VerticalBarChartDataPoint['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 ChartData}\n */\ninterface BaseDataPoint {\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?: AccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: AccessibilityProps;\n\n /**\n * Marker size of the points\n */\n markerSize?: number;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineChartDataPoint extends BaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\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 * text labels of marker points\n */\n text?: string;\n\n /**\n * Per-point marker color (overrides series color when present)\n */\n markerColor?: string;\n}\n\n/**\n * {@docCategory ChartData}\n * ScatterChartDataPoint interface.\n */\nexport interface ScatterChartDataPoint extends BaseDataPoint {\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 * Marker size of the points\n */\n markerSize?: number;\n\n /**\n * text labels of marker points\n */\n text?: string;\n\n /**\n * Per-point marker color (overrides series color when present)\n */\n markerColor?: string;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineChartGap {\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 ChartProps}\n */\nexport interface LineChartLineOptions 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 * 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 | 'lines+markers+text';\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineChartPoints {\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: LineChartDataPoint[] | ScatterChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: LineChartGap[];\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?: LineChartLineOptions;\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 ChartProps}\n */\nexport interface ChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: AccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: ChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: AccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: LineChartPoints[];\n\n /**\n * data for the points in the scatter chart\n */\n scatterChartData?: ScatterChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: SankeyChartData;\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 ChartProps}\n */\nexport interface AccessibilityProps {\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 ChartData}\n */\nexport interface VSChartDataPoint {\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 * 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?: AccessibilityProps;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n}\n\n/**\n * {@docCategory ChartProps}\n */\nexport interface VerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: VSChartDataPoint[];\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?: LineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineDataInVerticalStackedBarChart {\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?: LineChartLineOptions;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface GVBarChartSeriesPoint {\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?: AccessibilityProps;\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 ChartData}\n */\nexport interface GroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: GVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: AccessibilityProps;\n}\n\nexport interface GVDataPoint {\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 GVSingleDataPoint {\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]: GVDataPoint;\n}\n\nexport interface GVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: GVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface CustomizedCalloutDataPoint {\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 ChartData}\n */\nexport interface CustomizedCalloutData {\n x: number | string | Date;\n values: CustomizedCalloutDataPoint[];\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface Chart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: ImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface ImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n\nexport interface HeatMapChartDataPoint {\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface HeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: HeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface SankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface SNodeExtra {\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 SLinkExtra {\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<SNodeExtra, SLinkExtra>;\nexport type SLink = SankeyLink<SNodeExtra, SLinkExtra>;\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 GanttChartDataPoint {\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ScatterChartPoints {\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: ScatterChartDataPoint[];\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 * Available scale types for axes.\n *\n * - `'default'`: Uses an automatic scale (linear, band, or time) based on axis data type.\n * - `'log'`: Uses a logarithmic scale. Only supported for numeric axes in LineChart and ScatterChart.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisScaleType = 'default' | 'log';\n\n/**\n * Configuration options for an axis.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisProps = {\n /**\n * Defines the step between tick marks on the axis.\n * Works in combination with `tick0`.\n * Must be a positive number.\n *\n * - **Log scale**:\n * - Ticks are placed at `10^(n * tickStep)` where `n` is the tick index.\n * - Example: `tickStep = 2` → ticks at 1, 100, 10,000...\n * - Example: `tickStep = log10(5)` → ticks at 1, 5, 25, 125...\n * - Special format `\"L<f>\"`: Creates ticks that are linearly spaced in value (not position).\n * - Example: `tick0 = 0.1`, `tickStep = \"L0.5\"` → ticks at 0.1, 0.6, 1.1, 1.6...\n *\n * - **Date axis**:\n * - Must be in milliseconds.\n * - Example: one day = `tickStep = 86400000`.\n * - Special format `\"M<n>\"`: Places ticks every `n` months.\n * - Example: `tick0 = \"2000-01-15\"`, `tickStep = \"M3\"` → ticks on the 15th every third month.\n * - Example: `tickStep = \"M48\"` → ticks every 4 years.\n */\n tickStep?: number | string;\n\n /**\n * Sets the reference value for axis ticks.\n * Works in combination with `tickStep`.\n *\n * - **Log scale**:\n * - `tick0` must be given as the logarithm of the reference tick.\n * - Example: to align ticks with 100, use `tick0 = 2`.\n * - Exception: when `tickStep` uses `\"L<f>\"`, you can specify the raw value directly.\n */\n tick0?: number | Date;\n};\n\n/**\n * Represents a single data point in a series.\n */\nexport interface DataPointV2<X extends string | number | Date, Y extends string | number | Date> {\n /**\n * X-axis value of the data point.\n */\n x: X;\n\n /**\n * Y-axis value of the data point.\n */\n y: Y;\n\n /**\n * Optional click handler for the data point.\n */\n onClick?: () => void;\n\n /**\n * Custom text to show in the callout in place of the x-axis value.\n */\n xAxisCalloutData?: string;\n\n /**\n * Custom text to show in the callout in place of the y-axis value.\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility properties for the data point.\n */\n callOutAccessibilityData?: AccessibilityProps;\n\n /**\n * Custom marker size for the data point.\n */\n markerSize?: number;\n\n /**\n * Optional text to annotate or label the data point.\n */\n text?: string;\n\n /**\n * Color of the data point. If not provided, it will inherit the series color.\n */\n color?: string;\n}\n\n/**\n * Base interface for a series.\n */\nexport interface DataSeries {\n /**\n * Name of the series to be displayed in the legend.\n */\n legend: string;\n\n /**\n * Shape used in the legend (e.g., circle, square).\n */\n legendShape?: LegendShape;\n\n /**\n * Color of the series.\n */\n color?: string;\n\n /**\n * Opacity of the series.\n */\n opacity?: number;\n\n /**\n * Gradient fill for the series (start and end colors).\n */\n gradient?: [string, string];\n\n /**\n * Whether this series should be plotted against a secondary Y-axis.\n */\n useSecondaryYScale?: boolean;\n\n /**\n * Callback invoked when the legend item is clicked.\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n}\n\n/**\n * Represents a bar series.\n */\nexport interface BarSeries<X extends string | number | Date, Y extends string | number | Date> extends DataSeries {\n /**\n * Type discriminator: always 'bar' for this series.\n */\n type: 'bar';\n\n /**\n * Array of data points for the series.\n */\n data: DataPointV2<X, Y>[];\n\n /**\n * Optional group identifier for the series.\n */\n key?: string;\n}\n\n/**\n * Represents a line series.\n */\nexport interface LineSeries<X extends string | number | Date, Y extends string | number | Date> extends DataSeries {\n /**\n * Type discriminator: always 'line' for this series.\n */\n type: 'line';\n\n /**\n * Array of data points for the series.\n */\n data: DataPointV2<X, Y>[];\n\n /**\n * Optional gaps to render in the line.\n */\n gaps?: LineChartGap[];\n\n /**\n * Additional line rendering options (e.g., stroke width, curve type).\n */\n lineOptions?: LineChartLineOptions;\n\n /**\n * If true, hides dots for inactive (unfocused/unhovered) data points.\n */\n hideInactiveDots?: boolean;\n\n /**\n * Callback invoked when the line itself is clicked.\n */\n onLineClick?: () => void;\n}\n"],"names":[],"mappings":"AA4rCA;;CAEC,GACD,WA8BC"}
1
+ {"version":3,"sources":["../src/types/DataPoint.ts"],"sourcesContent":["import { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\nimport { CurveFactory } from 'd3-shape';\nimport { SankeyLink, SankeyNode } from 'd3-sankey';\n\nexport interface Basestate {\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 RefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory ChartProps}\n */\nexport interface Margins {\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 ChartData}\n */\nexport interface DataPoint {\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 ChartData}\n */\nexport interface VerticalStackedBarDataPoint extends Omit<DataPoint, '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 ChartData}\n */\nexport interface HorizontalDataPoint {\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 * Total value of a single point bar chart.\n */\n total?: number;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface ChartDataPoint {\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?: HorizontalDataPoint;\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface VerticalBarChartDataPoint {\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?: LineDataInVerticalBarChart;\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface HorizontalBarChartWithAxisDataPoint {\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineDataInVerticalBarChart {\n y: VerticalBarChartDataPoint['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 ChartData}\n */\ninterface BaseDataPoint {\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?: AccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: AccessibilityProps;\n\n /**\n * Marker size of the points\n */\n markerSize?: number;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineChartDataPoint extends BaseDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\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 * text labels of marker points\n */\n text?: string;\n\n /**\n * Per-point marker color (overrides series color when present)\n */\n markerColor?: string;\n}\n\n/**\n * {@docCategory ChartData}\n * ScatterChartDataPoint interface.\n */\nexport interface ScatterChartDataPoint extends BaseDataPoint {\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 * Marker size of the points\n */\n markerSize?: number;\n\n /**\n * text labels of marker points\n */\n text?: string;\n\n /**\n * Per-point marker color (overrides series color when present)\n */\n markerColor?: string;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineChartGap {\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 ChartProps}\n */\nexport interface LineChartLineOptions 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 * 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 | 'lines+markers+text';\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineChartPoints {\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: LineChartDataPoint[] | ScatterChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: LineChartGap[];\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?: LineChartLineOptions;\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 ChartProps}\n */\nexport interface ChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: AccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: ChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: AccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: LineChartPoints[];\n\n /**\n * data for the points in the scatter chart\n */\n scatterChartData?: ScatterChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: SankeyChartData;\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 ChartProps}\n */\nexport interface AccessibilityProps {\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 ChartData}\n */\nexport interface VSChartDataPoint {\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 * 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?: AccessibilityProps;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n}\n\n/**\n * {@docCategory ChartProps}\n */\nexport interface VerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: VSChartDataPoint[];\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?: LineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface LineDataInVerticalStackedBarChart {\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?: LineChartLineOptions;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface GVBarChartSeriesPoint {\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?: AccessibilityProps;\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 ChartData}\n */\nexport interface GroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: GVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: AccessibilityProps;\n}\n\nexport interface GVDataPoint {\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 GVSingleDataPoint {\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]: GVDataPoint;\n}\n\nexport interface GVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: GVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface CustomizedCalloutDataPoint {\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 ChartData}\n */\nexport interface CustomizedCalloutData {\n x: number | string | Date;\n values: CustomizedCalloutDataPoint[];\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface Chart {\n chartContainer: HTMLElement | null;\n toImage?: (opts?: ImageExportOptions) => Promise<string>;\n}\n\n/**\n * {@docCategory Chart}\n */\nexport interface ImageExportOptions {\n width?: number;\n height?: number;\n scale?: number;\n background?: string;\n}\n\nexport interface HeatMapChartDataPoint {\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface HeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: HeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory ChartData}\n */\nexport interface SankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface SNodeExtra {\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 SLinkExtra {\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<SNodeExtra, SLinkExtra>;\nexport type SLink = SankeyLink<SNodeExtra, SLinkExtra>;\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 GanttChartDataPoint {\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?: AccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ScatterChartPoints {\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: ScatterChartDataPoint[];\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 * Available scale types for axes.\n *\n * - `'default'`: Uses an automatic scale (linear, band, or time) based on axis data type.\n * - `'log'`: Uses a logarithmic scale. Only supported for numeric axes in LineChart and ScatterChart.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisScaleType = 'default' | 'log';\n\n/**\n * Configuration options for an axis.\n *\n * {@docCategory CartesianChart}\n */\nexport type AxisProps = {\n /**\n * Defines the step between tick marks on the axis.\n * Works in combination with `tick0`.\n * Must be a positive number.\n *\n * - **Log scale**:\n * - Ticks are placed at `10^(n * tickStep)` where `n` is the tick index.\n * - Example: `tickStep = 2` → ticks at 1, 100, 10,000...\n * - Example: `tickStep = log10(5)` → ticks at 1, 5, 25, 125...\n * - Special format `\"L<f>\"`: Creates ticks that are linearly spaced in value (not position).\n * - Example: `tick0 = 0.1`, `tickStep = \"L0.5\"` → ticks at 0.1, 0.6, 1.1, 1.6...\n *\n * - **Date axis**:\n * - Must be in milliseconds.\n * - Example: one day = `tickStep = 86400000`.\n * - Special format `\"M<n>\"`: Places ticks every `n` months.\n * - Example: `tick0 = \"2000-01-15\"`, `tickStep = \"M3\"` → ticks on the 15th every third month.\n * - Example: `tickStep = \"M48\"` → ticks every 4 years.\n */\n tickStep?: number | string;\n\n /**\n * Sets the reference value for axis ticks.\n * Works in combination with `tickStep`.\n *\n * - **Log scale**:\n * - `tick0` must be given as the logarithm of the reference tick.\n * - Example: to align ticks with 100, use `tick0 = 2`.\n * - Exception: when `tickStep` uses `\"L<f>\"`, you can specify the raw value directly.\n */\n tick0?: number | Date;\n\n /**\n * Sets the text displayed at each tick position specified by `tickValues`. Used with `tickValues`.\n */\n tickText?: string[];\n};\n\n/**\n * Represents a single data point in a series.\n */\nexport interface DataPointV2<X extends string | number | Date, Y extends string | number | Date> {\n /**\n * X-axis value of the data point.\n */\n x: X;\n\n /**\n * Y-axis value of the data point.\n */\n y: Y;\n\n /**\n * Optional click handler for the data point.\n */\n onClick?: () => void;\n\n /**\n * Custom text to show in the callout in place of the x-axis value.\n */\n xAxisCalloutData?: string;\n\n /**\n * Custom text to show in the callout in place of the y-axis value.\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility properties for the data point.\n */\n callOutAccessibilityData?: AccessibilityProps;\n\n /**\n * Custom marker size for the data point.\n */\n markerSize?: number;\n\n /**\n * Optional text to annotate or label the data point.\n */\n text?: string;\n\n /**\n * Color of the data point. If not provided, it will inherit the series color.\n */\n color?: string;\n}\n\n/**\n * Base interface for a series.\n */\nexport interface DataSeries {\n /**\n * Name of the series to be displayed in the legend.\n */\n legend: string;\n\n /**\n * Shape used in the legend (e.g., circle, square).\n */\n legendShape?: LegendShape;\n\n /**\n * Color of the series.\n */\n color?: string;\n\n /**\n * Opacity of the series.\n */\n opacity?: number;\n\n /**\n * Gradient fill for the series (start and end colors).\n */\n gradient?: [string, string];\n\n /**\n * Whether this series should be plotted against a secondary Y-axis.\n */\n useSecondaryYScale?: boolean;\n\n /**\n * Callback invoked when the legend item is clicked.\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n}\n\n/**\n * Represents a bar series.\n */\nexport interface BarSeries<X extends string | number | Date, Y extends string | number | Date> extends DataSeries {\n /**\n * Type discriminator: always 'bar' for this series.\n */\n type: 'bar';\n\n /**\n * Array of data points for the series.\n */\n data: DataPointV2<X, Y>[];\n\n /**\n * Optional group identifier for the series.\n */\n key?: string;\n}\n\n/**\n * Represents a line series.\n */\nexport interface LineSeries<X extends string | number | Date, Y extends string | number | Date> extends DataSeries {\n /**\n * Type discriminator: always 'line' for this series.\n */\n type: 'line';\n\n /**\n * Array of data points for the series.\n */\n data: DataPointV2<X, Y>[];\n\n /**\n * Optional gaps to render in the line.\n */\n gaps?: LineChartGap[];\n\n /**\n * Additional line rendering options (e.g., stroke width, curve type).\n */\n lineOptions?: LineChartLineOptions;\n\n /**\n * If true, hides dots for inactive (unfocused/unhovered) data points.\n */\n hideInactiveDots?: boolean;\n\n /**\n * Callback invoked when the line itself is clicked.\n */\n onLineClick?: () => void;\n}\n"],"names":[],"mappings":"AAisCA;;CAEC,GACD,WA8BC"}
@@ -297,7 +297,7 @@ function defaultYAxisTickFormatter(value) {
297
297
  return yAxisTickFormatterInternal(value);
298
298
  }
299
299
  function createNumericXAxis(xAxisParams, tickParams, chartType, culture, scaleType, _useRtl) {
300
- const { domainNRangeValues, showRoundOffXTickValues = false, xAxistickSize = 6, tickPadding = 10, xAxisCount, xAxisElement, hideTickOverlap, calcMaxLabelWidth, tickStep, tick0 } = xAxisParams;
300
+ const { domainNRangeValues, showRoundOffXTickValues = false, xAxistickSize = 6, tickPadding = 10, xAxisCount, xAxisElement, hideTickOverlap, calcMaxLabelWidth, tickStep, tick0, tickText } = xAxisParams;
301
301
  const xAxisScale = createNumericScale(scaleType).domain([
302
302
  domainNRangeValues.dStartValue,
303
303
  domainNRangeValues.dEndValue
@@ -308,6 +308,9 @@ function createNumericXAxis(xAxisParams, tickParams, chartType, culture, scaleTy
308
308
  showRoundOffXTickValues && xAxisScale.nice();
309
309
  let tickCount = xAxisCount !== null && xAxisCount !== void 0 ? xAxisCount : 6;
310
310
  const tickFormat = (domainValue, _index, defaultFormat)=>{
311
+ if (tickParams.tickValues && tickText && typeof tickText[_index] !== 'undefined') {
312
+ return tickText[_index];
313
+ }
311
314
  if (tickParams.tickFormat) {
312
315
  return (0, _d3format.format)(tickParams.tickFormat)(domainValue);
313
316
  }
@@ -529,7 +532,7 @@ function getDateFormatLevel(date, useUTC) {
529
532
  return (_matchedFormat_formatLevel = matchedFormat === null || matchedFormat === void 0 ? void 0 : matchedFormat.formatLevel) !== null && _matchedFormat_formatLevel !== void 0 ? _matchedFormat_formatLevel : 7;
530
533
  }
531
534
  function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLocale, customDateTimeFormatter, useUTC, chartType) {
532
- const { domainNRangeValues, xAxisElement, tickPadding = 6, xAxistickSize = 6, xAxisCount, calcMaxLabelWidth, tickStep, tick0 } = xAxisParams;
535
+ const { domainNRangeValues, xAxisElement, tickPadding = 6, xAxistickSize = 6, xAxisCount, calcMaxLabelWidth, tickStep, tick0, tickText } = xAxisParams;
533
536
  const isUtcSet = useUTC === true || useUTC === 'utc';
534
537
  const xAxisScale = isUtcSet ? (0, _d3scale.scaleUtc)() : (0, _d3scale.scaleTime)();
535
538
  xAxisScale.domain([
@@ -555,6 +558,9 @@ function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLo
555
558
  const formatOptions = options !== null && options !== void 0 ? options : (0, _chartutilities.getMultiLevelDateTimeFormatOptions)(lowestFormatLevel, highestFormatLevel);
556
559
  const formatFn = getMultiLevelD3DateFormatter(lowestFormatLevel, highestFormatLevel, locale, isUtcSet);
557
560
  const tickFormat = (domainValue, _index)=>{
561
+ if (tickParams.tickValues && tickText && typeof tickText[_index] !== 'undefined') {
562
+ return tickText[_index];
563
+ }
558
564
  if (customDateTimeFormatter) {
559
565
  return customDateTimeFormatter(domainValue);
560
566
  }
@@ -599,7 +605,7 @@ function createDateXAxis(xAxisParams, tickParams, culture, options, timeFormatLo
599
605
  };
600
606
  }
601
607
  function createStringXAxis(xAxisParams, tickParams, dataset, culture, _useRtl) {
602
- const { domainNRangeValues, xAxistickSize = 6, tickPadding = 10, xAxisPadding = 0.1, xAxisInnerPadding, xAxisOuterPadding, containerWidth, hideTickOverlap, calcMaxLabelWidth } = xAxisParams;
608
+ const { domainNRangeValues, xAxistickSize = 6, tickPadding = 10, xAxisPadding = 0.1, xAxisInnerPadding, xAxisOuterPadding, containerWidth, hideTickOverlap, calcMaxLabelWidth, tickText } = xAxisParams;
603
609
  const xAxisScale = (0, _d3scale.scaleBand)().domain(dataset).range([
604
610
  domainNRangeValues.rStartValue,
605
611
  domainNRangeValues.rEndValue
@@ -607,7 +613,10 @@ function createStringXAxis(xAxisParams, tickParams, dataset, culture, _useRtl) {
607
613
  var _tickParams_tickValues;
608
614
  let tickValues = (_tickParams_tickValues = tickParams.tickValues) !== null && _tickParams_tickValues !== void 0 ? _tickParams_tickValues : dataset;
609
615
  const tickFormat = (domainValue, _index)=>{
610
- return (0, _chartutilities.formatToLocaleString)(domainValue, culture);
616
+ if (tickParams.tickValues && tickText && typeof tickText[_index] !== 'undefined') {
617
+ return tickText[_index];
618
+ }
619
+ return domainValue;
611
620
  };
612
621
  if (hideTickOverlap) {
613
622
  let nonOverlappingTickValues = [];
@@ -708,7 +717,7 @@ function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
708
717
  const { yMinMaxValues = {
709
718
  startValue: 0,
710
719
  endValue: 0
711
- }, yAxisElement = null, yMaxValue = 0, yMinValue = 0, containerHeight, margins, tickPadding = 12, maxOfYVal = 0, yAxisTickFormat, yAxisTickCount = 4, tickValues, tickStep, tick0 } = yAxisParams;
720
+ }, yAxisElement = null, yMaxValue = 0, yMinValue = 0, containerHeight, margins, tickPadding = 12, maxOfYVal = 0, yAxisTickFormat, yAxisTickCount = 4, tickValues, tickStep, tick0, tickText } = yAxisParams;
712
721
  // maxOfYVal coming from horizontal bar chart with axis (Calculation done at base file)
713
722
  const tempVal = maxOfYVal || yMinMaxValues.endValue;
714
723
  const finalYmax = tempVal > yMaxValue ? tempVal : yMaxValue;
@@ -722,7 +731,20 @@ function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
722
731
  ]);
723
732
  const axis = isRtl ? (0, _d3axis.axisRight)(yAxisScale) : (0, _d3axis.axisLeft)(yAxisScale);
724
733
  const yAxis = axis.tickPadding(tickPadding).ticks(yAxisTickCount);
725
- yAxisTickFormat ? yAxis.tickFormat(yAxisTickFormat) : yAxis.tickFormat(defaultYAxisTickFormatter);
734
+ const tickFormat = (domainValue, index)=>{
735
+ if (tickValues && tickText && typeof tickText[index] !== 'undefined') {
736
+ return tickText[index];
737
+ }
738
+ if (typeof yAxisTickFormat === 'function') {
739
+ return yAxisTickFormat(domainValue, index);
740
+ }
741
+ if (typeof yAxisTickFormat === 'string') {
742
+ return (0, _d3format.format)(yAxisTickFormat)(domainValue);
743
+ }
744
+ const value = typeof domainValue === 'number' ? domainValue : domainValue.valueOf();
745
+ return defaultYAxisTickFormatter(value);
746
+ };
747
+ yAxis.tickFormat(tickFormat);
726
748
  let customTickValues;
727
749
  if (tickValues) {
728
750
  customTickValues = tickValues;
@@ -739,7 +761,7 @@ function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, cha
739
761
  const { yMinMaxValues = {
740
762
  startValue: 0,
741
763
  endValue: 0
742
- }, yAxisElement = null, yMaxValue = 0, yMinValue = 0, containerHeight, containerWidth, margins, tickPadding = 12, maxOfYVal = 0, yAxisTickFormat, yAxisTickCount = 4, eventAnnotationProps, eventLabelHeight, tickValues, tickStep, tick0 } = yAxisParams;
764
+ }, yAxisElement = null, yMaxValue = 0, yMinValue = 0, containerHeight, containerWidth, margins, tickPadding = 12, maxOfYVal = 0, yAxisTickFormat, yAxisTickCount = 4, eventAnnotationProps, eventLabelHeight, tickValues, tickStep, tick0, tickText } = yAxisParams;
743
765
  // maxOfYVal coming from only area chart and Grouped vertical bar chart(Calculation done at base file)
744
766
  const tempVal = maxOfYVal || yMinMaxValues.endValue || 0;
745
767
  const finalYmax = tempVal > yMaxValue ? tempVal : yMaxValue;
@@ -794,15 +816,24 @@ function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, cha
794
816
  }
795
817
  }
796
818
  const tickFormat = (domainValue, index, defaultFormat)=>{
819
+ if (tickValues && tickText && typeof tickText[index] !== 'undefined') {
820
+ return tickText[index];
821
+ }
822
+ if (typeof yAxisTickFormat === 'function') {
823
+ return yAxisTickFormat(domainValue, index);
824
+ }
825
+ if (typeof yAxisTickFormat === 'string') {
826
+ return (0, _d3format.format)(yAxisTickFormat)(domainValue);
827
+ }
797
828
  const value = typeof domainValue === 'number' ? domainValue : domainValue.valueOf();
798
829
  return (defaultFormat === null || defaultFormat === void 0 ? void 0 : defaultFormat(value)) === '' ? '' : defaultYAxisTickFormatter(value);
799
830
  };
800
- yAxisTickFormat ? yAxis.tickFormat(yAxisTickFormat) : yAxis.tickFormat((v, i)=>tickFormat(v, i, yAxisScale.tickFormat(yAxisTickCount)));
831
+ yAxis.tickFormat((v, i)=>tickFormat(v, i, yAxisScale.tickFormat(yAxisTickCount)));
801
832
  yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true').style('direction', 'ltr').style('unicode-bidi', 'isolate').style('text-anchor', !useSecondaryYScale && (_useRtl ? 'start' : 'end')) : '';
802
833
  return yAxisScale;
803
834
  }
804
835
  const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints, isRtl, barWidth)=>{
805
- const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding } = yAxisParams;
836
+ const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding, tickValues, tickText } = yAxisParams;
806
837
  let yAxisPaddingValue = yAxisPadding !== null && yAxisPadding !== void 0 ? yAxisPadding : 0.5;
807
838
  yAxisPaddingValue = yAxisPaddingValue === 1 ? 0.99 : yAxisPaddingValue;
808
839
  const yAxisScale = (0, _d3scale.scaleBand)().domain(dataPoints).range([
@@ -810,15 +841,22 @@ const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints,
810
841
  margins.top
811
842
  ]).padding(yAxisPaddingValue);
812
843
  const axis = isRtl ? (0, _d3axis.axisRight)(yAxisScale) : (0, _d3axis.axisLeft)(yAxisScale);
813
- const yAxis = axis.tickPadding(tickPadding).ticks(dataPoints);
814
- if (yAxisTickFormat) {
815
- yAxis.tickFormat(yAxisTickFormat);
816
- }
844
+ const customTickValues = tickValues !== null && tickValues !== void 0 ? tickValues : dataPoints;
845
+ const tickFormat = (domainValue, _index)=>{
846
+ if (tickValues && tickText && typeof tickText[_index] !== 'undefined') {
847
+ return tickText[_index];
848
+ }
849
+ if (typeof yAxisTickFormat === 'function') {
850
+ return yAxisTickFormat(domainValue, _index);
851
+ }
852
+ return domainValue;
853
+ };
854
+ const yAxis = axis.tickPadding(tickPadding).tickValues(customTickValues).tickFormat(tickFormat);
817
855
  yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text') : '';
818
856
  return yAxisScale;
819
857
  };
820
858
  const createStringYAxis = (yAxisParams, dataPoints, isRtl, barWidth, chartType)=>{
821
- const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding = 0, containerWidth } = yAxisParams;
859
+ const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding = 0, containerWidth, tickValues, tickText } = yAxisParams;
822
860
  const yAxisScale = (0, _d3scale.scaleBand)().domain(dataPoints).range([
823
861
  containerHeight - margins.bottom,
824
862
  margins.top
@@ -827,13 +865,20 @@ const createStringYAxis = (yAxisParams, dataPoints, isRtl, barWidth, chartType)=
827
865
  yAxisScale.paddingInner(1).paddingOuter(0);
828
866
  }
829
867
  const axis = isRtl ? (0, _d3axis.axisRight)(yAxisScale) : (0, _d3axis.axisLeft)(yAxisScale);
830
- const yAxis = axis.tickPadding(tickPadding).tickValues(dataPoints).tickSize(0);
868
+ const customTickValues = tickValues !== null && tickValues !== void 0 ? tickValues : dataPoints;
869
+ const tickFormat = (domainValue, _index)=>{
870
+ if (tickValues && tickText && typeof tickText[_index] !== 'undefined') {
871
+ return tickText[_index];
872
+ }
873
+ if (typeof yAxisTickFormat === 'function') {
874
+ return yAxisTickFormat(domainValue, _index);
875
+ }
876
+ return domainValue;
877
+ };
878
+ const yAxis = axis.tickPadding(tickPadding).tickValues(customTickValues).tickFormat(tickFormat).tickSize(0);
831
879
  if (chartType === 3) {
832
880
  axis.tickSizeInner(-(containerWidth - margins.left - margins.right));
833
881
  }
834
- if (yAxisTickFormat) {
835
- yAxis.tickFormat(yAxisTickFormat);
836
- }
837
882
  yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text') : '';
838
883
  return yAxisScale;
839
884
  };