@fluentui/react-charts 9.3.27 → 9.3.28

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 (78) hide show
  1. package/CHANGELOG.md +23 -2
  2. package/dist/index.d.cts +51 -0
  3. package/dist/index.d.ts +51 -0
  4. package/lib/components/AreaChart/AreaChart.js +33 -3
  5. package/lib/components/AreaChart/AreaChart.js.map +1 -1
  6. package/lib/components/CommonComponents/CartesianChart.js +6 -0
  7. package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
  8. package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
  9. package/lib/components/CommonComponents/ChartPopover.js +2 -1
  10. package/lib/components/CommonComponents/ChartPopover.js.map +1 -1
  11. package/lib/components/GanttChart/GanttChart.js +1 -0
  12. package/lib/components/GanttChart/GanttChart.js.map +1 -1
  13. package/lib/components/GaugeChart/GaugeChart.js +33 -12
  14. package/lib/components/GaugeChart/GaugeChart.js.map +1 -1
  15. package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
  16. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +25 -25
  17. package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
  18. package/lib/components/HeatMapChart/HeatMapChart.js +1 -0
  19. package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
  20. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -1
  21. package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
  22. package/lib/components/Legends/Legends.js +15 -18
  23. package/lib/components/Legends/Legends.js.map +1 -1
  24. package/lib/components/Legends/OverflowMenu.js +13 -10
  25. package/lib/components/Legends/OverflowMenu.js.map +1 -1
  26. package/lib/components/LineChart/LineChart.js +17 -13
  27. package/lib/components/LineChart/LineChart.js.map +1 -1
  28. package/lib/components/ScatterChart/ScatterChart.js +2 -1
  29. package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
  30. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js +1 -0
  31. package/lib/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.js.map +1 -1
  32. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js +52 -44
  33. package/lib/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.js.map +1 -1
  34. package/lib/components/VerticalBarChart/VerticalBarChart.js +2 -1
  35. package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
  36. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -0
  37. package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
  38. package/lib/types/DataPoint.js.map +1 -1
  39. package/lib/utilities/test-data/specialChartNames.js +11 -0
  40. package/lib/utilities/test-data/specialChartNames.js.map +1 -0
  41. package/lib-commonjs/components/AreaChart/AreaChart.cjs +33 -3
  42. package/lib-commonjs/components/AreaChart/AreaChart.cjs.map +1 -1
  43. package/lib-commonjs/components/CommonComponents/CartesianChart.cjs +6 -0
  44. package/lib-commonjs/components/CommonComponents/CartesianChart.cjs.map +1 -1
  45. package/lib-commonjs/components/CommonComponents/CartesianChart.types.cjs.map +1 -1
  46. package/lib-commonjs/components/CommonComponents/ChartPopover.cjs +2 -1
  47. package/lib-commonjs/components/CommonComponents/ChartPopover.cjs.map +1 -1
  48. package/lib-commonjs/components/GanttChart/GanttChart.cjs +1 -0
  49. package/lib-commonjs/components/GanttChart/GanttChart.cjs.map +1 -1
  50. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs +33 -12
  51. package/lib-commonjs/components/GaugeChart/GaugeChart.cjs.map +1 -1
  52. package/lib-commonjs/components/GaugeChart/GaugeChart.types.cjs.map +1 -1
  53. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs +24 -23
  54. package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.cjs.map +1 -1
  55. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs +1 -0
  56. package/lib-commonjs/components/HeatMapChart/HeatMapChart.cjs.map +1 -1
  57. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs +2 -1
  58. package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.cjs.map +1 -1
  59. package/lib-commonjs/components/Legends/Legends.cjs +15 -17
  60. package/lib-commonjs/components/Legends/Legends.cjs.map +1 -1
  61. package/lib-commonjs/components/Legends/OverflowMenu.cjs +12 -9
  62. package/lib-commonjs/components/Legends/OverflowMenu.cjs.map +1 -1
  63. package/lib-commonjs/components/LineChart/LineChart.cjs +17 -13
  64. package/lib-commonjs/components/LineChart/LineChart.cjs.map +1 -1
  65. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs +2 -1
  66. package/lib-commonjs/components/ScatterChart/ScatterChart.cjs.map +1 -1
  67. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs +1 -0
  68. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteExpressionEvaluator.cjs.map +1 -1
  69. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs +52 -44
  70. package/lib-commonjs/components/VegaDeclarativeChart/VegaLiteSchemaAdapter.cjs.map +1 -1
  71. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs +2 -1
  72. package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.cjs.map +1 -1
  73. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs +1 -0
  74. package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.cjs.map +1 -1
  75. package/lib-commonjs/types/DataPoint.cjs.map +1 -1
  76. package/lib-commonjs/utilities/test-data/specialChartNames.cjs +21 -0
  77. package/lib-commonjs/utilities/test-data/specialChartNames.cjs.map +1 -0
  78. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/Legends/OverflowMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { Menu, MenuTrigger, MenuPopover, MenuList, MenuItemCheckbox } from '@fluentui/react-menu';\nimport { MenuButton } from '@fluentui/react-button';\nimport { useOverflowMenu } from '@fluentui/react-overflow';\n\nexport const OverflowMenu: React.FC<{\n itemIds: string[];\n title: string;\n items: JSXElement[];\n}> = ({ itemIds, title, items }) => {\n const { ref, overflowCount, isOverflowing } = useOverflowMenu<HTMLButtonElement>();\n let displayLabel = title;\n displayLabel = title === '' ? `+${overflowCount} items` : `+${overflowCount} ${title}`;\n\n if (!isOverflowing) {\n return null;\n }\n const remainingItemsCount = itemIds.length - overflowCount;\n const checkedLegends: string[] = [];\n const menuList = [];\n for (let i = remainingItemsCount; i < itemIds.length; i++) {\n const buttonElement = items[i];\n const value = `${buttonElement.props['data-title'] ?? i}`;\n if (buttonElement.props['data-selected']) {\n checkedLegends.push(value);\n }\n menuList.push(\n <MenuItemCheckbox\n key={i}\n name=\"legends\"\n value={value}\n // Full-list position so counts match the listbox.\n aria-setsize={itemIds.length}\n aria-posinset={i + 1}\n // Hide the checkmark so the row matches the listbox legend; selection is conveyed via aria-checked.\n checkmark={null}\n onClick={e => buttonElement.props.onClick?.(e)}\n // The content is smaller than the row, so handle hover/focus on the item to cover its full area.\n onMouseEnter={() => buttonElement.props.onMouseOver?.()}\n onMouseLeave={() => buttonElement.props.onMouseOut?.()}\n onFocus={() => buttonElement.props.onFocus?.()}\n onBlur={() => buttonElement.props.onBlur?.()}\n >\n {React.cloneElement(buttonElement, {\n onClick: undefined,\n onMouseOver: undefined,\n onMouseOut: undefined,\n onFocus: undefined,\n onBlur: undefined,\n })}\n </MenuItemCheckbox>,\n );\n }\n return (\n <Menu>\n <MenuTrigger disableButtonEnhancement>\n <MenuButton ref={ref}>{displayLabel}</MenuButton>\n </MenuTrigger>\n\n <MenuPopover>\n <MenuList aria-label=\"Legends\" checkedValues={{ legends: checkedLegends }}>\n {menuList}\n </MenuList>\n </MenuPopover>\n </Menu>\n );\n};\n"],"names":["React","Menu","MenuTrigger","MenuPopover","MenuList","MenuItemCheckbox","MenuButton","useOverflowMenu","OverflowMenu","itemIds","title","items","ref","overflowCount","isOverflowing","displayLabel","remainingItemsCount","length","checkedLegends","menuList","i","buttonElement","value","props","push","key","name","aria-setsize","aria-posinset","checkmark","onClick","e","onMouseEnter","onMouseOver","onMouseLeave","onMouseOut","onFocus","onBlur","cloneElement","undefined","disableButtonEnhancement","aria-label","checkedValues","legends"],"mappings":"AAAA;;;;;+BAQaQ;;;;;;;iEANU,QAAQ;2BAE4C,uBAAuB;6BACvE,yBAAyB;+BACpB,2BAA2B;AAEpD,qBAIF,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAE;IAC7B,MAAM,EAAEC,GAAG,EAAEC,aAAa,EAAEC,aAAa,EAAE,OAAGP,8BAAAA;IAC9C,IAAIQ,eAAeL;IACnBK,eAAeL,UAAU,KAAK,CAAC,CAAC,EAAEG,cAAc,MAAM,CAAC,GAAG,CAAC,CAAC,EAAEA,cAAc,CAAC,EAAEH,OAAO;IAEtF,IAAI,CAACI,eAAe;QAClB,OAAO;IACT;IACA,MAAME,sBAAsBP,QAAQQ,MAAM,GAAGJ;IAC7C,MAAMK,iBAA2B,EAAE;IACnC,MAAMC,WAAW,EAAE;IACnB,IAAK,IAAIC,IAAIJ,qBAAqBI,IAAIX,QAAQQ,MAAM,EAAEG,IAAK;QACzD,MAAMC,gBAAgBV,KAAK,CAACS,EAAE;YACbC;QAAjB,MAAMC,QAAQ,GAAGD,CAAAA,iCAAAA,cAAcE,KAAK,CAAC,aAAA,AAAa,MAAA,QAAjCF,mCAAAA,KAAAA,IAAAA,iCAAqCD,GAAG;QACzD,IAAIC,cAAcE,KAAK,CAAC,gBAAgB,EAAE;YACxCL,eAAeM,IAAI,CAACF;QACtB;QACAH,SAASK,IAAI,CAAA,WAAA,GACX,OAAA,aAAA,CAACnB,2BAAAA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A,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,sBAAAA,EAAAA;QAAYsC,0BAAAA;qBACX,OAAA,aAAA,CAAClC,uBAAAA,EAAAA;QAAWM,KAAKA;OAAMG,gBAAAA,WAAAA,GAGzB,OAAA,aAAA,CAACZ,sBAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,mBAAAA,EAAAA;QAASqC,cAAW;QAAUC,eAAe;YAAEC,SAASzB;QAAe;OACrEC;AAKX,EAAE"}
1
+ {"version":3,"sources":["../src/components/Legends/OverflowMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport type { JSXElement } from '@fluentui/react-utilities';\nimport { Menu, MenuTrigger, MenuPopover, MenuList, MenuItemCheckbox } from '@fluentui/react-menu';\nimport { MenuButton } from '@fluentui/react-button';\nimport { useOverflowMenu, useOverflowVisibility } from '@fluentui/react-overflow';\n\nexport const OverflowMenu: React.FC<{\n itemIds: string[];\n title: string;\n items: JSXElement[];\n}> = ({ itemIds, title, items }) => {\n const { ref, isOverflowing } = useOverflowMenu<HTMLButtonElement>();\n const { itemVisibility } = useOverflowVisibility();\n\n if (!isOverflowing) {\n return null;\n }\n const checkedLegends: string[] = [];\n const menuList = [];\n for (let index = 0; index < items.length; index++) {\n const itemId = itemIds[index];\n if (itemVisibility[itemId] !== false) {\n continue;\n }\n const buttonElement = items[index];\n const value = `${buttonElement.props['data-title'] ?? index}`;\n if (buttonElement.props['data-selected']) {\n checkedLegends.push(value);\n }\n menuList.push(\n <MenuItemCheckbox\n key={itemId}\n name=\"legends\"\n value={value}\n // Full-list position so counts match the listbox.\n aria-setsize={itemIds.length}\n aria-posinset={index + 1}\n // Hide the checkmark so the row matches the listbox legend; selection is conveyed via aria-checked.\n checkmark={null}\n onClick={e => buttonElement.props.onClick?.(e)}\n // The content is smaller than the row, so handle hover/focus on the item to cover its full area.\n onMouseEnter={() => buttonElement.props.onMouseOver?.()}\n onMouseLeave={() => buttonElement.props.onMouseOut?.()}\n onFocus={() => buttonElement.props.onFocus?.()}\n onBlur={() => buttonElement.props.onBlur?.()}\n >\n {React.cloneElement(buttonElement, {\n onClick: undefined,\n onMouseOver: undefined,\n onMouseOut: undefined,\n onFocus: undefined,\n onBlur: undefined,\n })}\n </MenuItemCheckbox>,\n );\n }\n const displayLabel = title === '' ? `+${menuList.length} items` : `+${menuList.length} ${title}`;\n\n return (\n <Menu>\n <MenuTrigger disableButtonEnhancement>\n <MenuButton ref={ref}>{displayLabel}</MenuButton>\n </MenuTrigger>\n\n <MenuPopover>\n <MenuList aria-label=\"Legends\" checkedValues={{ legends: checkedLegends }}>\n {menuList}\n </MenuList>\n </MenuPopover>\n </Menu>\n );\n};\n"],"names":["React","Menu","MenuTrigger","MenuPopover","MenuList","MenuItemCheckbox","MenuButton","useOverflowMenu","useOverflowVisibility","OverflowMenu","itemIds","title","items","ref","isOverflowing","itemVisibility","checkedLegends","menuList","index","length","itemId","buttonElement","value","props","push","key","name","aria-setsize","aria-posinset","checkmark","onClick","e","onMouseEnter","onMouseOver","onMouseLeave","onMouseOut","onFocus","onBlur","cloneElement","undefined","displayLabel","disableButtonEnhancement","aria-label","checkedValues","legends"],"mappings":"AAAA;;;;;+BAQaS;;;;;;;iEANU,QAAQ;2BAE4C,uBAAuB;6BACvE,yBAAyB;+BACG,2BAA2B;AAE3E,qBAIF,CAAC,EAAEC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAE;IAC7B,MAAM,EAAEC,GAAG,EAAEC,aAAa,EAAE,OAAGP,8BAAAA;IAC/B,MAAM,EAAEQ,cAAc,EAAE,OAAGP,oCAAAA;IAE3B,IAAI,CAACM,eAAe;QAClB,OAAO;IACT;IACA,MAAME,iBAA2B,EAAE;IACnC,MAAMC,WAAW,EAAE;IACnB,IAAK,IAAIC,QAAQ,GAAGA,QAAQN,MAAMO,MAAM,EAAED,QAAS;QACjD,MAAME,SAASV,OAAO,CAACQ,MAAM;QAC7B,IAAIH,cAAc,CAAC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;;YACfgB,QAAQ;oBAAMhB,6BAAAA;uBAAAA,+BAAAA,CAAAA,uBAAAA,cAAcE,KAAK,AAALA,EAAMc,MAAAA,AAAM,MAAA,QAA1BhB,gCAAAA,KAAAA,IAAAA,KAAAA,IAAAA,4BAAAA,IAAAA,CAAAA;;yBAEbrB,OAAMsC,YAAY,CAACjB,eAAe;YACjCS,SAASS;YACTN,aAAaM;YACbJ,YAAYI;YACZH,SAASG;YACTF,QAAQE;QACV;IAGN;IACA,MAAMC,eAAe7B,UAAU,KAAK,CAAC,CAAC,EAAEM,SAASE,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAEF,SAASE,MAAM,CAAC,CAAC,EAAER,OAAO;IAEhG,OAAA,WAAA,GACE,OAAA,aAAA,CAACV,eAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,sBAAAA,EAAAA;QAAYuC,0BAAAA;qBACX,OAAA,aAAA,CAACnC,uBAAAA,EAAAA;QAAWO,KAAKA;OAAM2B,gBAAAA,WAAAA,GAGzB,OAAA,aAAA,CAACrC,sBAAAA,EAAAA,MAAAA,WAAAA,GACC,OAAA,aAAA,CAACC,mBAAAA,EAAAA;QAASsC,cAAW;QAAUC,eAAe;YAAEC,SAAS5B;QAAe;OACrEC;AAKX,EAAE"}
@@ -300,7 +300,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
300
300
  setActiveLegend('');
301
301
  },
302
302
  hoverAction: ()=>{
303
- _handleChartMouseLeave();
303
+ _dismissCallout();
304
304
  setActiveLegend(legendTitle);
305
305
  },
306
306
  ...representativePoint.legendShape && {
@@ -329,7 +329,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
329
329
  setActiveLegend('');
330
330
  },
331
331
  hoverAction: ()=>{
332
- _handleChartMouseLeave();
332
+ _dismissCallout();
333
333
  setActiveLegend(title);
334
334
  },
335
335
  opacity: _getColorFillBarOpacity(colorFillBar),
@@ -419,6 +419,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
419
419
  const bordersForLine = [];
420
420
  const pointsForLine = [];
421
421
  const legendVal = _points[i].legend;
422
+ const seriesAriaLabel = `${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`;
422
423
  const lineColor = _points[i].color;
423
424
  const verticaLineHeight = containerHeight - margins.bottom + 6;
424
425
  const useSecondaryYScale = !!(_points[i].useSecondaryYScale && _yScaleSecondary);
@@ -469,7 +470,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
469
470
  onMouseOut: _handleMouseOut,
470
471
  strokeWidth: activePoint === circleId ? DEFAULT_LINE_STROKE_SIZE : 0,
471
472
  stroke: activePoint === circleId ? lineColor : '',
472
- role: "img",
473
+ role: "option",
473
474
  "aria-label": (_points_i_data__text = _points[i].data[0].text) !== null && _points_i_data__text !== void 0 ? _points_i_data__text : _getAriaLabel(i, 0),
474
475
  ref: (e)=>{
475
476
  _refCallback(e, circleId);
@@ -542,7 +543,9 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
542
543
  onMouseOut: _handleMouseOut,
543
544
  ..._getClickHandler(_points[i].onLineClick),
544
545
  opacity: 1,
545
- tabIndex: isLegendSelected ? 0 : undefined
546
+ tabIndex: isLegendSelected ? 0 : undefined,
547
+ role: props.optimizeLargeData ? 'option' : undefined,
548
+ "aria-label": props.optimizeLargeData ? seriesAriaLabel : undefined
546
549
  }));
547
550
  } else if (shouldDrawLines) {
548
551
  var _points_i_lineOptions10, _points_i_lineOptions11;
@@ -609,7 +612,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
609
612
  onMouseOver: (event)=>_onMouseOverLargeDataset(i, verticaLineHeight, event, yScale),
610
613
  onFocus: (event)=>_onFocusLargeDataset(i, verticaLineHeight, event, yScale, k),
611
614
  onMouseOut: _handleMouseOut,
612
- role: "img",
615
+ role: "option",
613
616
  "aria-label": (_points_i_data_k_text = _points[i].data[k].text) !== null && _points_i_data_k_text !== void 0 ? _points_i_data_k_text : _getAriaLabel(i, k)
614
617
  }));
615
618
  }
@@ -665,7 +668,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
665
668
  fill: ((_points_i_data_ = _points[i].data[j - 1]) === null || _points_i_data_ === void 0 ? void 0 : _points_i_data_.markerColor) || _getPointFill(lineColor, circleId, j, false),
666
669
  stroke: ((_points_i_data_1 = _points[i].data[j - 1]) === null || _points_i_data_1 === void 0 ? void 0 : _points_i_data_1.markerColor) || lineColor,
667
670
  strokeWidth: strokeWidth,
668
- role: "img",
671
+ role: "option",
669
672
  "aria-label": (_points_i_data__text1 = _points[i].data[j - 1].text) !== null && _points_i_data__text1 !== void 0 ? _points_i_data__text1 : _getAriaLabel(i, j - 1)
670
673
  }), !_isScatterPolar && supportsTextMode && text && /*#__PURE__*/ _react.createElement("text", {
671
674
  key: `${circleId}-label`,
@@ -693,7 +696,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
693
696
  fill: ((_points_i_data_2 = _points[i].data[j - 1]) === null || _points_i_data_2 === void 0 ? void 0 : _points_i_data_2.markerColor) || _getPointFill(lineColor, circleId, j, false),
694
697
  stroke: ((_points_i_data_3 = _points[i].data[j - 1]) === null || _points_i_data_3 === void 0 ? void 0 : _points_i_data_3.markerColor) || lineColor,
695
698
  strokeWidth: strokeWidth,
696
- role: "img",
699
+ role: "option",
697
700
  "aria-label": _getAriaLabel(i, j - 1),
698
701
  tabIndex: isLegendSelected ? 0 : undefined
699
702
  }));
@@ -739,7 +742,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
739
742
  fill: _getPointFill(lineColor, lastCircleId, j, true),
740
743
  stroke: lineColor,
741
744
  strokeWidth: strokeWidth,
742
- role: "img",
745
+ role: "option",
743
746
  "aria-label": (_points_i_data_j_text = _points[i].data[j].text) !== null && _points_i_data_j_text !== void 0 ? _points_i_data_j_text : _getAriaLabel(i, j)
744
747
  }), !_isScatterPolar && lastSupportsTextMode && lastText && /*#__PURE__*/ _react.createElement("text", {
745
748
  key: `${lastCircleId}-label`,
@@ -766,7 +769,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
766
769
  fill: ((_points_i_data_j = _points[i].data[j]) === null || _points_i_data_j === void 0 ? void 0 : _points_i_data_j.markerColor) || _getPointFill(lineColor, lastCircleId, j, true),
767
770
  stroke: ((_points_i_data_j1 = _points[i].data[j]) === null || _points_i_data_j1 === void 0 ? void 0 : _points_i_data_j1.markerColor) || lineColor,
768
771
  strokeWidth: strokeWidth,
769
- role: "img",
772
+ role: "option",
770
773
  "aria-label": _getAriaLabel(i, j),
771
774
  tabIndex: isLegendSelected ? 0 : undefined
772
775
  }), /*#__PURE__*/ _react.createElement("circle", {
@@ -886,8 +889,8 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
886
889
  }
887
890
  lines.push(/*#__PURE__*/ _react.createElement("g", {
888
891
  key: `line_${i}`,
889
- role: "region",
890
- "aria-label": `${legendVal}, line ${i + 1} of ${_points.length} with ${_points[i].data.length} data points.`
892
+ role: "listbox",
893
+ "aria-label": props.optimizeLargeData ? `${legendVal} data series` : seriesAriaLabel
891
894
  }, bordersForLine, linesForLine, pointsForLine));
892
895
  }
893
896
  return lines;
@@ -1126,7 +1129,7 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
1126
1129
  function _handleMouseOut() {
1127
1130
  (0, _d3selection.select)(`#${_verticalLine}`).attr('visibility', 'hidden');
1128
1131
  }
1129
- function _handleChartMouseLeave() {
1132
+ function _dismissCallout() {
1130
1133
  _uniqueCallOutID = null;
1131
1134
  setActivePoint('');
1132
1135
  if (isPopoverOpen) {
@@ -1297,7 +1300,8 @@ const LineChart = /*#__PURE__*/ _react.forwardRef(({ isCalloutForStack = true, .
1297
1300
  } : {},
1298
1301
  getDomainNRangeValues: _getDomainNRangeValues,
1299
1302
  createStringYAxis: _index1.createStringYAxis,
1300
- onChartMouseLeave: _handleChartMouseLeave,
1303
+ onChartMouseLeave: _dismissCallout,
1304
+ onChartBlur: _dismissCallout,
1301
1305
  enableFirstRenderOptimization: props.enablePerfOptimization && _firstRenderOptimization,
1302
1306
  componentRef: cartesianChartRef,
1303
1307
  children: (props)=>{