@neo4j-ndl/react-charts 1.3.8 → 1.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/lib/cjs/charts/Chart.js.map +1 -1
  2. package/lib/cjs/charts/ChartContainer.js.map +1 -1
  3. package/lib/cjs/charts/ChartEmpty.js +1 -1
  4. package/lib/cjs/charts/ChartEmpty.js.map +1 -1
  5. package/lib/cjs/charts/ChartRender.js +1 -1
  6. package/lib/cjs/charts/ChartRender.js.map +1 -1
  7. package/lib/cjs/charts/ChartTooltip.js +1 -1
  8. package/lib/cjs/charts/ChartTooltip.js.map +1 -1
  9. package/lib/cjs/charts/Legend.js +1 -1
  10. package/lib/cjs/charts/Legend.js.map +1 -1
  11. package/lib/cjs/charts/LegendItem.js +1 -1
  12. package/lib/cjs/charts/LegendItem.js.map +1 -1
  13. package/lib/cjs/charts/LegendLayout.js +1 -1
  14. package/lib/cjs/charts/LegendLayout.js.map +1 -1
  15. package/lib/cjs/charts/hooks/use-chart-instance.js +1 -1
  16. package/lib/cjs/charts/hooks/use-chart-instance.js.map +1 -1
  17. package/lib/cjs/charts/hooks/use-chart-option.js +1 -1
  18. package/lib/cjs/charts/hooks/use-chart-option.js.map +1 -1
  19. package/lib/cjs/charts/hooks/use-chart-refs.js +1 -1
  20. package/lib/cjs/charts/hooks/use-chart-refs.js.map +1 -1
  21. package/lib/cjs/charts/hooks/use-chart-zoom.js +1 -1
  22. package/lib/cjs/charts/hooks/use-chart-zoom.js.map +1 -1
  23. package/lib/cjs/charts/hooks/use-legend-interactions.js +1 -1
  24. package/lib/cjs/charts/hooks/use-legend-interactions.js.map +1 -1
  25. package/lib/cjs/charts/hooks/use-legend-series.js +1 -1
  26. package/lib/cjs/charts/hooks/use-legend-series.js.map +1 -1
  27. package/lib/cjs/charts/hooks/use-legend-visibility.js +1 -1
  28. package/lib/cjs/charts/hooks/use-legend-visibility.js.map +1 -1
  29. package/lib/cjs/charts/index.js +1 -1
  30. package/lib/cjs/charts/index.js.map +1 -1
  31. package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js.map +1 -1
  32. package/lib/cjs/charts/tests/ChartZoomHarness.js +1 -1
  33. package/lib/cjs/charts/tests/ChartZoomHarness.js.map +1 -1
  34. package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js +1 -1
  35. package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js.map +1 -1
  36. package/lib/cjs/charts/tests/PieChartWithRerender.js +1 -1
  37. package/lib/cjs/charts/tests/PieChartWithRerender.js.map +1 -1
  38. package/lib/cjs/charts/tests/chart-test-utils.js +1 -1
  39. package/lib/cjs/charts/tests/chart-test-utils.js.map +1 -1
  40. package/lib/cjs/charts/themes/ndl-echarts-theme.js +1 -1
  41. package/lib/cjs/charts/themes/ndl-echarts-theme.js.map +1 -1
  42. package/lib/cjs/charts/utils/aria-description.js +1 -1
  43. package/lib/cjs/charts/utils/aria-description.js.map +1 -1
  44. package/lib/cjs/charts/utils/build-chart-option.js +1 -1
  45. package/lib/cjs/charts/utils/build-chart-option.js.map +1 -1
  46. package/lib/cjs/charts/utils/chart-tooltip-formatter.js.map +1 -1
  47. package/lib/cjs/charts/utils/chart-types.js +1 -1
  48. package/lib/cjs/charts/utils/chart-types.js.map +1 -1
  49. package/lib/cjs/charts/utils/defaults.js +1 -1
  50. package/lib/cjs/charts/utils/defaults.js.map +1 -1
  51. package/lib/cjs/charts/utils/format-utils.js +1 -1
  52. package/lib/cjs/charts/utils/format-utils.js.map +1 -1
  53. package/lib/cjs/charts/utils/legend-layout.js +1 -1
  54. package/lib/cjs/charts/utils/legend-layout.js.map +1 -1
  55. package/lib/cjs/charts/utils/legend-utils.js +1 -1
  56. package/lib/cjs/charts/utils/legend-utils.js.map +1 -1
  57. package/lib/cjs/charts/utils/threshold.js +1 -1
  58. package/lib/cjs/charts/utils/threshold.js.map +1 -1
  59. package/lib/cjs/charts/utils/user-option-utils.js +1 -1
  60. package/lib/cjs/charts/utils/user-option-utils.js.map +1 -1
  61. package/lib/cjs/index.js +1 -1
  62. package/lib/cjs/index.js.map +1 -1
  63. package/lib/esm/charts/Chart.js.map +1 -1
  64. package/lib/esm/charts/ChartContainer.js.map +1 -1
  65. package/lib/esm/charts/ChartEmpty.js +1 -1
  66. package/lib/esm/charts/ChartEmpty.js.map +1 -1
  67. package/lib/esm/charts/ChartRender.js +1 -1
  68. package/lib/esm/charts/ChartRender.js.map +1 -1
  69. package/lib/esm/charts/ChartTooltip.js +1 -1
  70. package/lib/esm/charts/ChartTooltip.js.map +1 -1
  71. package/lib/esm/charts/Legend.js +1 -1
  72. package/lib/esm/charts/Legend.js.map +1 -1
  73. package/lib/esm/charts/LegendItem.js +1 -1
  74. package/lib/esm/charts/LegendItem.js.map +1 -1
  75. package/lib/esm/charts/LegendLayout.js +1 -1
  76. package/lib/esm/charts/LegendLayout.js.map +1 -1
  77. package/lib/esm/charts/hooks/use-chart-instance.js +1 -1
  78. package/lib/esm/charts/hooks/use-chart-instance.js.map +1 -1
  79. package/lib/esm/charts/hooks/use-chart-option.js +1 -1
  80. package/lib/esm/charts/hooks/use-chart-option.js.map +1 -1
  81. package/lib/esm/charts/hooks/use-chart-refs.js +1 -1
  82. package/lib/esm/charts/hooks/use-chart-refs.js.map +1 -1
  83. package/lib/esm/charts/hooks/use-chart-zoom.js +1 -1
  84. package/lib/esm/charts/hooks/use-chart-zoom.js.map +1 -1
  85. package/lib/esm/charts/hooks/use-legend-interactions.js +1 -1
  86. package/lib/esm/charts/hooks/use-legend-interactions.js.map +1 -1
  87. package/lib/esm/charts/hooks/use-legend-series.js +1 -1
  88. package/lib/esm/charts/hooks/use-legend-series.js.map +1 -1
  89. package/lib/esm/charts/hooks/use-legend-visibility.js +1 -1
  90. package/lib/esm/charts/hooks/use-legend-visibility.js.map +1 -1
  91. package/lib/esm/charts/index.js +1 -1
  92. package/lib/esm/charts/index.js.map +1 -1
  93. package/lib/esm/charts/tests/ChartWrapperWithTooltipFormatter.js.map +1 -1
  94. package/lib/esm/charts/tests/ChartZoomHarness.js +1 -1
  95. package/lib/esm/charts/tests/ChartZoomHarness.js.map +1 -1
  96. package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js +1 -1
  97. package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js.map +1 -1
  98. package/lib/esm/charts/tests/PieChartWithRerender.js +1 -1
  99. package/lib/esm/charts/tests/PieChartWithRerender.js.map +1 -1
  100. package/lib/esm/charts/tests/chart-test-utils.js +1 -1
  101. package/lib/esm/charts/tests/chart-test-utils.js.map +1 -1
  102. package/lib/esm/charts/themes/ndl-echarts-theme.js +1 -1
  103. package/lib/esm/charts/themes/ndl-echarts-theme.js.map +1 -1
  104. package/lib/esm/charts/utils/aria-description.js +1 -1
  105. package/lib/esm/charts/utils/aria-description.js.map +1 -1
  106. package/lib/esm/charts/utils/build-chart-option.js +1 -1
  107. package/lib/esm/charts/utils/build-chart-option.js.map +1 -1
  108. package/lib/esm/charts/utils/chart-tooltip-formatter.js.map +1 -1
  109. package/lib/esm/charts/utils/chart-types.js +1 -1
  110. package/lib/esm/charts/utils/chart-types.js.map +1 -1
  111. package/lib/esm/charts/utils/defaults.js +1 -1
  112. package/lib/esm/charts/utils/defaults.js.map +1 -1
  113. package/lib/esm/charts/utils/format-utils.js +1 -1
  114. package/lib/esm/charts/utils/format-utils.js.map +1 -1
  115. package/lib/esm/charts/utils/legend-layout.js +1 -1
  116. package/lib/esm/charts/utils/legend-layout.js.map +1 -1
  117. package/lib/esm/charts/utils/legend-utils.js +1 -1
  118. package/lib/esm/charts/utils/legend-utils.js.map +1 -1
  119. package/lib/esm/charts/utils/threshold.js +1 -1
  120. package/lib/esm/charts/utils/threshold.js.map +1 -1
  121. package/lib/esm/charts/utils/user-option-utils.js +1 -1
  122. package/lib/esm/charts/utils/user-option-utils.js.map +1 -1
  123. package/lib/esm/index.js +1 -1
  124. package/lib/esm/index.js.map +1 -1
  125. package/lib/types/charts/Chart.d.ts +1 -1
  126. package/lib/types/charts/ChartContainer.d.ts +1 -1
  127. package/lib/types/charts/ChartRender.d.ts +1 -1
  128. package/lib/types/charts/ChartTooltip.d.ts +1 -1
  129. package/lib/types/charts/Legend.d.ts +1 -1
  130. package/lib/types/charts/LegendItem.d.ts +1 -1
  131. package/lib/types/charts/LegendLayout.d.ts +1 -1
  132. package/lib/types/charts/hooks/use-chart-instance.d.ts +1 -1
  133. package/lib/types/charts/hooks/use-chart-option.d.ts +1 -1
  134. package/lib/types/charts/hooks/use-chart-refs.d.ts +1 -1
  135. package/lib/types/charts/hooks/use-chart-zoom.d.ts +1 -1
  136. package/lib/types/charts/hooks/use-legend-interactions.d.ts +1 -1
  137. package/lib/types/charts/hooks/use-legend-series.d.ts +1 -1
  138. package/lib/types/charts/hooks/use-legend-visibility.d.ts +1 -1
  139. package/lib/types/charts/index.d.ts +1 -1
  140. package/lib/types/charts/tests/ChartWrapperWithTooltipFormatter.d.ts +1 -1
  141. package/lib/types/charts/tests/ChartZoomHarness.d.ts +1 -1
  142. package/lib/types/charts/tests/HorizontalBarWithVerticalSlider.d.ts +1 -1
  143. package/lib/types/charts/tests/PieChartWithRerender.d.ts +1 -1
  144. package/lib/types/charts/tests/chart-test-utils.d.ts +1 -1
  145. package/lib/types/charts/utils/aria-description.d.ts +1 -1
  146. package/lib/types/charts/utils/build-chart-option.d.ts +1 -1
  147. package/lib/types/charts/utils/chart-tooltip-formatter.d.ts +1 -1
  148. package/lib/types/charts/utils/chart-types.d.ts +1 -1
  149. package/lib/types/charts/utils/defaults.d.ts +1 -1
  150. package/lib/types/charts/utils/format-utils.d.ts +1 -1
  151. package/lib/types/charts/utils/legend-layout.d.ts +1 -1
  152. package/lib/types/charts/utils/legend-utils.d.ts +1 -1
  153. package/lib/types/charts/utils/threshold.d.ts +1 -1
  154. package/lib/types/charts/utils/user-option-utils.d.ts +1 -1
  155. package/lib/types/index.d.ts +1 -1
  156. package/package.json +3 -3
  157. package/skills/ndl-react-charts/SKILL.md +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"user-option-utils.js","sourceRoot":"","sources":["../../../../src/charts/utils/user-option-utils.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0CAAyC;AAEzC,6CAAkD;AAElD,kDAA+C;AAC/C,uEAAqE;AAOrE,yCAA8D;AAC9D,iDAAkD;AAElD,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,aAAM,CAAC,WAAW,CAAC,CAAC;AAWjD,MAAM,WAAW,GAAG,CACzB,MAAoB,EACpB,QAA0B,OAAO,EACjC,UAGC,EACD,OAAoB,EACL,EAAE;IACjB,MAAM,MAAM,GAAG,OAAO,aAAP,OAAO,cAAP,OAAO,GAAI,aAAa,CAAC;IAExC,OAAO,MAAM,CAAC,GAAG,CACf,CACE,MAGuC,EACvC,QAAgB,CAAC,EACH,EAAE;;QAChB,IAAI,MAAM,KAAK,SAAS,EAAE,CAAC;YACzB,OAAO,EAAE,CAAC;QACZ,CAAC;QAED,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;YACvC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC;YACrB,CAAC,CAAC,CAAC,MAAA,MAAM,CAAC,KAAK,mCAAI,MAAM,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC;QAEpD,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,EAAE,CAAC;YACpC,MAAM,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC;YACpC,mEAAmE;YACnE,0EAA0E;YAC1E,MAAM,iBAAiB,GAAG,iBAAiB,gBAAgB,EAAE,CAAC;YAC9D,qCACE,UAAU,EAAE,CAAC,EACb,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,2CAAgC,CAAC,SAAS,IAClD,MAAM,KACT,SAAS,kBACP,IAAI,EAAE,QAAQ,EACd,K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,KAAK,KAAK,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,KAC3D,UAAU,EAAE,YAAY,KACrB,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,QAAQ,KAC7B,IAAI,EAAE;oBACJ,+BAA+B;oBAC/B,yDAAyD;oBACzD,IAAI,EAAE,GAAG;oBACT,IAAI,EAAE,GAAG;iBACV,EACD,IAAI,EAAE,IAAI,GACX;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,YAAY,gBA4CvB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport { type EChartsOption, type SeriesOption } from 'echarts';\nimport { renderToString } from 'react-dom/server';\n\nimport { ChartTooltip } from '../ChartTooltip';\nimport { getTooltipValueFormatter } from './chart-tooltip-formatter';\nimport {\n type EchartsSeries,\n type HexColor,\n type NeedleSeries,\n type ThresholdLineSeriesOption,\n} from './chart-types';\nimport { defaultThresholdLineSeriesOption } from './defaults';\nimport { formatNumberEnUS } from './format-utils';\n\nconst defaultColors = Object.values(tokens.categorical);\n\ntype SingleXAxisOption = Exclude<\n NonNullable<EChartsOption['xAxis']>,\n unknown[]\n>;\ntype SingleYAxisOption = Exclude<\n NonNullable<EChartsOption['yAxis']>,\n unknown[]\n>;\n\nexport const mergeSeries = (\n series: NeedleSeries,\n theme: 'light' | 'dark' = 'light',\n userOption?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >,\n palette?: HexColor[],\n): EchartsSeries => {\n const colors = palette ?? defaultColors;\n\n return series.map(\n (\n option:\n | SeriesOption\n | ThresholdLineSeriesOption<'warning'>\n | ThresholdLineSeriesOption<'danger'>,\n index: number = 0,\n ): SeriesOption => {\n if (option === undefined) {\n return {};\n }\n\n const color = Array.isArray(option.color)\n ? option.color[index]\n : (option.color ?? colors[index % colors.length]);\n\n if (option.type === 'thresholdLine') {\n const { notificationType } = option;\n // Needed to differentiate between normal lines and threshold lines\n // as we are unable to inject custom properties into echarts series lines.\n const thresholdLineName = `thresholdLine-${notificationType}`;\n return {\n symbolSize: 9,\n symbol: 'none',\n condition: defaultThresholdLineSeriesOption.condition,\n ...option,\n lineStyle: {\n type: 'dashed',\n width: 2,\n ...option.lineStyle,\n },\n name: thresholdLineName,\n type: 'line',\n data: [\n [option.xAxis[0], option.yAxis],\n [option.xAxis[1], option.yAxis],\n ],\n };\n }\n\n if (option.type === 'line') {\n const shadow = tokens.theme[theme].boxShadow.raised;\n const shadowParts = shadow.split(/ (?=\\d+px|rgba?\\()/);\n\n return {\n type: 'line',\n symbolSize: 9,\n color,\n symbol: 'none',\n ...option,\n lineStyle: {\n type: 'solid' as const,\n width: 2,\n ...option.lineStyle,\n },\n emphasis: {\n disabled: true,\n focus: 'series',\n ...option.emphasis,\n itemStyle: {\n borderColor: tokens.theme[theme].color.neutral.bg.weak,\n shadowBlur: parseInt(shadowParts[2]),\n shadowColor: shadowParts[4],\n shadowOffsetX: parseInt(shadowParts[0]),\n shadowOffsetY: parseInt(shadowParts[1]),\n ...option.emphasis?.itemStyle,\n },\n label: { show: false },\n ...option.emphasis,\n },\n };\n }\n\n if (option.type === 'pie') {\n const valueFormatter = getTooltipValueFormatter(userOption);\n\n return {\n animationDuration: 600,\n animationType: 'scale',\n selectedMode: 'single',\n ...option,\n // Blur opacity is set to 1 to prevent other slices from\n // being opacitated when hovering a slice where the emphasis is enabled (used for scale effect)\n blur: {\n itemStyle: {\n opacity: 1,\n ...option.blur?.itemStyle,\n },\n label: {\n opacity: 1,\n ...option.blur?.label,\n },\n ...option.blur,\n },\n // Emphasis is enabled and used to apply the scale effect when hovering the pie chart slices.\n emphasis: {\n disabled: false,\n focus: 'self',\n scale: true,\n scaleSize: 5,\n ...option.emphasis,\n },\n itemStyle: {\n borderColor: tokens.theme[theme].color.neutral.bg.weak,\n borderWidth: 1,\n ...option.itemStyle,\n },\n label: {\n backgroundColor: 'transparent',\n color: tokens.theme[theme].color.neutral.text.weak,\n formatter: '{d}%',\n ...option.label,\n },\n labelLine: {\n length: 5,\n show: true,\n ...option.labelLine,\n },\n tooltip: {\n trigger: 'item',\n confine: true,\n // Reset the default tooltip css styling\n padding: 0,\n borderRadius: 0,\n borderWidth: 0,\n extraCssText: 'box-shadow: none; background-color: transparent;',\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Content\n key={firstParam?.value[0] ?? firstParam.seriesName}\n leadingElement={\n firstParam?.value[0] ?? firstParam.seriesName\n }\n trailingElement={valueFormatter(\n Array.isArray(firstParam.value)\n ? firstParam.value[1]\n : firstParam.value,\n )}\n indentSquareColor={firstParam.color}\n />\n </span>,\n )}`;\n },\n ...option.tooltip,\n },\n };\n }\n\n if (option.type === 'bar') {\n const valueFormatter = getTooltipValueFormatter(userOption);\n\n return {\n barMaxWidth: 16,\n ...option,\n blur: {\n itemStyle: {\n opacity: 0.3,\n ...option.blur?.itemStyle,\n },\n ...option.blur,\n },\n emphasis: {\n disabled: true,\n focus: 'series',\n ...option.emphasis,\n },\n itemStyle: {\n borderWidth: 20,\n color,\n ...option.itemStyle,\n },\n markLine: {\n emphasis: {\n disabled: true,\n lineStyle: {\n width: 20,\n ...option.markLine?.emphasis?.lineStyle,\n },\n ...option.markLine?.emphasis,\n },\n lineStyle: {\n width: 20,\n ...option.markLine?.lineStyle,\n },\n },\n tooltip: {\n trigger: 'axis',\n confine: true,\n // Reset the default tooltip css styling\n padding: 0,\n borderRadius: 0,\n borderWidth: 0,\n extraCssText: 'box-shadow: none; background-color: transparent;',\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Title>{firstParam.name}</ChartTooltip.Title>\n <ChartTooltip.Content\n key={firstParam?.value[0] ?? firstParam.seriesName}\n leadingElement={firstParam.seriesName}\n trailingElement={valueFormatter(\n Array.isArray(firstParam.value)\n ? firstParam.value[1]\n : firstParam.value,\n )}\n indentSquareColor={firstParam.color}\n />\n </span>,\n )}`;\n },\n ...option.tooltip,\n },\n };\n }\n\n return option;\n },\n );\n};\n\nexport const mergeXAxis = (\n xAxis: EChartsOption['xAxis'],\n theme: 'light' | 'dark' = 'light',\n): EChartsOption['xAxis'] => {\n if (xAxis === undefined) {\n return [];\n }\n\n if (Array.isArray(xAxis)) {\n return xAxis.map((axis) =>\n mergeXAxis(axis, theme),\n ) as EChartsOption['xAxis'];\n }\n\n const baseXAxis = {\n ...xAxis,\n axisLabel: {\n formatter: {\n day: '{dd} {MMM}',\n hour: '{HH}:{mm}',\n millisecond: '{hh}:{mm}:{ss} {SSS}',\n minute: '{HH}:{mm}',\n month: '{MMM}',\n none: '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}',\n second: '{HH}:{mm}:{ss}',\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}',\n },\n margin: 16,\n overflow: 'truncate',\n ...xAxis?.axisLabel,\n },\n axisLine: {\n lineStyle: {\n ...xAxis?.axisLine?.lineStyle,\n },\n ...xAxis?.axisLine,\n },\n axisTick: {\n ...xAxis?.axisTick,\n lineStyle: {\n ...xAxis?.axisTick?.lineStyle,\n },\n show: true,\n ...xAxis?.axisTick,\n },\n splitLine: { show: false, ...xAxis?.splitLine },\n } as SingleXAxisOption;\n\n if (xAxis.type === 'time') {\n const timeXAxis = {\n ...baseXAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseXAxis.axisLabel,\n },\n } as SingleXAxisOption;\n\n return timeXAxis;\n }\n\n if (xAxis.type === 'value' || xAxis.type === 'log') {\n const xAxisFormatter =\n xAxis.axisLabel && 'formatter' in xAxis.axisLabel\n ? xAxis.axisLabel.formatter\n : undefined;\n const valueXAxis = {\n ...baseXAxis,\n axisLabel: {\n ...baseXAxis.axisLabel,\n formatter: xAxisFormatter ?? formatNumberEnUS,\n },\n } as SingleXAxisOption;\n\n return valueXAxis;\n }\n\n if (xAxis.type === 'category') {\n const categoryXAxis = {\n ...baseXAxis,\n axisLabel: {\n width: 80,\n ...baseXAxis?.axisLabel,\n },\n axisTick: {\n alignWithLabel: true,\n ...baseXAxis?.axisTick,\n },\n } as SingleXAxisOption;\n return categoryXAxis;\n }\n\n return baseXAxis;\n};\n\nexport const mergeYAxis = (\n yAxis: EChartsOption['yAxis'],\n theme: 'light' | 'dark' = 'light',\n): EChartsOption['yAxis'] => {\n if (yAxis === undefined) {\n return [];\n }\n\n if (Array.isArray(yAxis)) {\n return yAxis.map((axis) =>\n mergeYAxis(axis, theme),\n ) as EChartsOption['yAxis'];\n }\n\n const baseYAxis = {\n ...yAxis,\n axisLabel: {\n margin: 8,\n overflow: 'truncate',\n ...yAxis?.axisLabel,\n },\n axisLine: {\n ...yAxis?.axisLine,\n lineStyle: {\n ...yAxis?.axisLine?.lineStyle,\n },\n show: true,\n },\n axisTick: {\n show: false,\n ...yAxis?.axisTick,\n lineStyle: {\n width: 1,\n ...yAxis?.axisTick?.lineStyle,\n },\n },\n splitLine: { show: true, ...yAxis?.splitLine },\n } as SingleYAxisOption;\n\n if (yAxis.type === 'time') {\n const timeYAxis = {\n ...baseYAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseYAxis.axisLabel,\n },\n splitLine: { show: false, ...baseYAxis?.splitLine },\n } as SingleYAxisOption;\n\n return timeYAxis;\n }\n\n if (yAxis.type === 'value' || yAxis.type === 'log') {\n const yAxisFormatter =\n yAxis.axisLabel && 'formatter' in yAxis.axisLabel\n ? yAxis.axisLabel.formatter\n : undefined;\n const valueYAxis = {\n ...baseYAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseYAxis.axisLabel,\n formatter: yAxisFormatter ?? formatNumberEnUS,\n },\n splitLine: { show: false, ...baseYAxis?.splitLine },\n } as SingleYAxisOption;\n\n return valueYAxis;\n }\n\n if (yAxis.type === 'category') {\n const categoryYAxis = {\n ...baseYAxis,\n axisLabel: {\n width: 100,\n ...baseYAxis?.axisLabel,\n },\n } as SingleYAxisOption;\n\n return categoryYAxis;\n }\n\n return baseYAxis;\n};\n\ntype SingleDataZoomOption = Exclude<\n NonNullable<EChartsOption['dataZoom']>,\n unknown[]\n>;\n\ntype MergeDataZoomAxes = {\n xAxis?: EChartsOption['xAxis'];\n yAxis?: EChartsOption['yAxis'];\n};\n\nexport type DataZoomTargetAxes = {\n xAxisIndices: number[];\n yAxisIndices: number[];\n};\n\nconst normalizeAxisIndices = (axisIndex: unknown): number[] => {\n if (typeof axisIndex === 'number') {\n return [axisIndex];\n }\n\n if (Array.isArray(axisIndex)) {\n return axisIndex.filter((index): index is number => {\n return typeof index === 'number';\n });\n }\n\n return [];\n};\n\n/**\n * Resolves the axes a single dataZoom entry targets, mirroring ECharts' own\n * resolution order: explicit `xAxisIndex`/`yAxisIndex` win (`false` meaning\n * \"not this axis\"); when no index is given, `orient: 'vertical'` targets the\n * first y-axis and horizontal/unset targets the first x-axis.\n */\nconst getSingleDataZoomTargets = (\n dataZoom: SingleDataZoomOption | undefined,\n): DataZoomTargetAxes => {\n if (dataZoom?.type !== 'slider' && dataZoom?.type !== 'inside') {\n return { xAxisIndices: [], yAxisIndices: [] };\n }\n\n const hasAxisIndex =\n dataZoom.xAxisIndex !== undefined || dataZoom.yAxisIndex !== undefined;\n\n if (hasAxisIndex) {\n return {\n xAxisIndices: normalizeAxisIndices(dataZoom.xAxisIndex),\n yAxisIndices: normalizeAxisIndices(dataZoom.yAxisIndex),\n };\n }\n\n return dataZoom.orient === 'vertical'\n ? { xAxisIndices: [], yAxisIndices: [0] }\n : { xAxisIndices: [0], yAxisIndices: [] };\n};\n\n/**\n * Union of the axis indices targeted by all slider/inside entries in a\n * dataZoom config, using the same per-entry resolution as ECharts (explicit\n * axis indices first, then orientation).\n */\nexport const getDataZoomTargetAxes = (\n dataZoom: EChartsOption['dataZoom'],\n): DataZoomTargetAxes => {\n const entries = Array.isArray(dataZoom) ? dataZoom : [dataZoom];\n const targets: DataZoomTargetAxes = { xAxisIndices: [], yAxisIndices: [] };\n\n for (const entry of entries) {\n const entryTargets = getSingleDataZoomTargets(entry);\n\n for (const index of entryTargets.xAxisIndices) {\n if (!targets.xAxisIndices.includes(index)) {\n targets.xAxisIndices.push(index);\n }\n }\n\n for (const index of entryTargets.yAxisIndices) {\n if (!targets.yAxisIndices.includes(index)) {\n targets.yAxisIndices.push(index);\n }\n }\n }\n\n return targets;\n};\n\n/**\n * A slider is vertical when the consumer sets `orient: 'vertical'`, or when it\n * only targets a y-axis, which makes ECharts infer the vertical orientation.\n */\nexport const isVerticalSlider = (\n dataZoom: SingleDataZoomOption | undefined,\n): boolean => {\n if (dataZoom?.type !== 'slider') {\n return false;\n }\n\n if (dataZoom.orient !== undefined) {\n return dataZoom.orient === 'vertical';\n }\n\n const targets = getSingleDataZoomTargets(dataZoom);\n\n return targets.yAxisIndices.length > 0 && targets.xAxisIndices.length === 0;\n};\n\n/**\n * Axis types where windowing (`filterMode: 'none'`) beats ECharts' default\n * data filtering. Filtering a continuous axis removes whole data items outside\n * the window, which makes bars and points vanish instead of clipping them.\n * Category axes keep the `'filter'` default so paging through categories still\n * rescales the opposite value axis to the visible data.\n */\nconst WINDOWED_FILTER_AXIS_TYPES = ['log', 'time', 'value'];\n\nconst getSingleAxisOption = (\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndex: unknown,\n): { type?: string } | undefined => {\n if (!Array.isArray(axis)) {\n return axis as { type?: string } | undefined;\n }\n\n const index =\n typeof axisIndex === 'number'\n ? axisIndex\n : Array.isArray(axisIndex) && typeof axisIndex[0] === 'number'\n ? axisIndex[0]\n : 0;\n\n return axis[index] as { type?: string } | undefined;\n};\n\n/**\n * Resolves the slider's target axis the way ECharts does (explicit axis index\n * first, then orientation) and returns `'none'` when that axis is continuous.\n * Returns `undefined` (keep ECharts' `'filter'` default) for category axes and\n * for sliders that target both axes at once.\n */\nconst getSliderDefaultFilterMode = (\n dataZoom: SingleDataZoomOption,\n axes: MergeDataZoomAxes | undefined,\n): 'none' | undefined => {\n const targets = getSingleDataZoomTargets(dataZoom);\n const isXAxisTarget = targets.xAxisIndices.length > 0;\n const isYAxisTarget = targets.yAxisIndices.length > 0;\n\n if (isXAxisTarget === isYAxisTarget) {\n return undefined;\n }\n\n const targetAxis = isYAxisTarget\n ? getSingleAxisOption(axes?.yAxis, dataZoom.yAxisIndex)\n : getSingleAxisOption(axes?.xAxis, dataZoom.xAxisIndex);\n\n return targetAxis?.type !== undefined &&\n WINDOWED_FILTER_AXIS_TYPES.includes(targetAxis.type)\n ? 'none'\n : undefined;\n};\n\nexport const mergeDataZoom = (\n dataZoom: EChartsOption['dataZoom'],\n axes?: MergeDataZoomAxes,\n): EChartsOption['dataZoom'] => {\n if (Array.isArray(dataZoom)) {\n return dataZoom.map((option) =>\n mergeDataZoom(option, axes),\n ) as EChartsOption['dataZoom'];\n }\n\n const isSlider = dataZoom?.type === 'slider';\n const isInside = dataZoom?.type === 'inside';\n\n if (isSlider) {\n const filterMode = getSliderDefaultFilterMode(dataZoom, axes);\n const layoutDefaults = isVerticalSlider(dataZoom)\n ? { right: 10, width: 28 }\n : { bottom: 10, height: 28 };\n\n return {\n ...(filterMode !== undefined && { filterMode }),\n ...layoutDefaults,\n show: true,\n type: 'slider',\n ...dataZoom,\n };\n } else if (isInside) {\n // Only pin the default x-axis binding on entries that actually target the\n // x-axis; y-targeting entries (explicit `yAxisIndex` or\n // `orient: 'vertical'`) keep their own binding.\n const targets = getSingleDataZoomTargets(dataZoom);\n const hasDefaultXAxisTarget =\n dataZoom.xAxisIndex === undefined && targets.xAxisIndices.length > 0;\n\n return {\n filterMode: 'none',\n ...(hasDefaultXAxisTarget && { xAxisIndex: [0] }),\n zoomOnMouseWheel: false,\n ...dataZoom,\n };\n }\n\n return dataZoom;\n};\n\ntype MergeToolboxContext = MergeDataZoomAxes & {\n dataZoom?: EChartsOption['dataZoom'];\n};\n\nconst isContinuousAxisOption = (\n axisOption: { type?: string } | undefined,\n): boolean => {\n return (\n axisOption?.type !== undefined &&\n WINDOWED_FILTER_AXIS_TYPES.includes(axisOption.type)\n );\n};\n\nconst areTargetAxesContinuous = (\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndices: number[] | 'all',\n): boolean => {\n if (axisIndices === 'all') {\n const axisOptions = Array.isArray(axis) ? axis : [axis];\n\n return (\n axisOptions.length > 0 &&\n axisOptions.every((axisOption) => {\n return isContinuousAxisOption(axisOption as { type?: string });\n })\n );\n }\n\n return axisIndices.every((axisIndex) => {\n return isContinuousAxisOption(getSingleAxisOption(axis, axisIndex));\n });\n};\n\n/**\n * Returns `'none'` when every axis targeted by the drag-to-zoom brush is\n * continuous (`value`/`time`/`log`), matching the slider rule: filtering a\n * continuous axis removes whole data items outside the selection instead of\n * clipping them. Category (or unknown) targets keep ECharts' `'filter'`\n * default.\n */\nconst getBrushDefaultFilterMode = (\n context: MergeToolboxContext | undefined,\n xAxisTargets: number[] | 'all' | false,\n yAxisTargets: number[] | 'all' | false,\n): 'none' | undefined => {\n const checks: boolean[] = [];\n\n if (xAxisTargets !== false) {\n checks.push(areTargetAxesContinuous(context?.xAxis, xAxisTargets));\n }\n\n if (yAxisTargets !== false) {\n checks.push(areTargetAxesContinuous(context?.yAxis, yAxisTargets));\n }\n\n return checks.length > 0 && checks.every(Boolean) ? 'none' : undefined;\n};\n\nexport const mergeToolbox = (\n toolbox: EChartsOption['toolbox'],\n context?: MergeToolboxContext,\n): EChartsOption['toolbox'] => {\n if (Array.isArray(toolbox)) {\n return toolbox.map((option) =>\n mergeToolbox(option, context),\n ) as EChartsOption['toolbox'];\n }\n\n // The drag-to-zoom brush follows the axes the dataZoom config targets, so\n // zoom direction is configured in one place. Without any dataZoom config it\n // keeps the historical default: all x-axes on, y off.\n const targets = getDataZoomTargetAxes(context?.dataZoom);\n const hasTargets =\n targets.xAxisIndices.length > 0 || targets.yAxisIndices.length > 0;\n const xAxisTargets: number[] | 'all' | false = hasTargets\n ? targets.xAxisIndices.length > 0 && targets.xAxisIndices\n : 'all';\n const yAxisTargets: number[] | false =\n targets.yAxisIndices.length > 0 && targets.yAxisIndices;\n const filterMode = getBrushDefaultFilterMode(\n context,\n xAxisTargets,\n yAxisTargets,\n );\n\n return {\n feature: {\n dataZoom: {\n ...(filterMode !== undefined && { filterMode }),\n ...(xAxisTargets !== 'all' && { xAxisIndex: xAxisTargets }),\n yAxisIndex: yAxisTargets,\n ...toolbox?.feature?.dataZoom,\n icon: {\n // This hack removes the icons.\n // Due to: https://github.com/apache/echarts/issues/10274\n back: '-',\n zoom: '-',\n },\n show: true,\n },\n },\n };\n};\n"]}
1
+ {"version":3,"file":"user-option-utils.js","sourceRoot":"","sources":["../../../../src/charts/utils/user-option-utils.tsx"],"names":[],"mappings":";;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,0CAAyC;AAEzC,6CAAkD;AAElD,kDAA+C;AAC/C,uEAAqE;AAOrE,yCAA8D;AAC9D,iDAAkD;AAElD,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,aAAM,CAAC,WAAW,CAAC,CAAC;AAWjD,MAAM,WAAW,GAAG,CACzB,MAAoB,EACpB,QAA0B,OAAO,EACjC,UAGC,EACD,OAAoB,EACL,EAAE;IACjB,MAAM,MAAM,GAAG,OAAO,aAA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,IAAA,oBAAY,EAAC,MAAM,EAAE,OAAO,CAAC,CACF,CAAC;IAChC,CAAC;IAED,0EAA0E;IAC1E,4EAA4E;IAC5E,sDAAsD;IACtD,MAAM,OAAO,GAAG,IAAA,6BAAqB,EAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,QAAQ,CAAC,CAAC;IACzD,MAAM,UAAU,GACd,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,CAAC;IACrE,MAAM,YAAY,GAA6B,UAAU;QACvD,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,YAAY;QACzD,CAAC,CAAC,KAAK,CAAC;IACV,MAAM,YAAY,GAChB,OAAO,CAAC,YAAY,CAAC,MAAM,GAAG,CAAC,IAAI,OAAO,CAAC,YAAY,CAAC;IAC1D,MAAM,UAAU,GAAG,yBAAyB,CAC1C,OAAO,EACP,YAAY,EACZ,YAAY,CACb,CAAC;IAEF,OAAO;QACL,OAAO,EAAE;YACP,QAAQ,4EACH,CAAC,UAAU,KAAK,SAAS,IAAI,EAAE,UAAU,EAAE,CAAC,GAC5C,CAAC,YAAY,KAAK,KAAK,IAAI,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC,KAC3D,UAAU,EAAE,YAAY,KACrB,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,0CAAE,QAAQ,KAC7B,IAAI,EAAE;oBACJ,+BAA+B;oBAC/B,yDAAyD;oBACzD,IAAI,EAAE,GAAG;oBACT,IAAI,EAAE,GAAG;iBACV,EACD,IAAI,EAAE,IAAI,GACX;SACF;KACF,CAAC;AACJ,CAAC,CAAC;AA5CW,QAAA,YAAY,gBA4CvB","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\nimport { type EChartsOption, type SeriesOption } from 'echarts';\nimport { renderToString } from 'react-dom/server';\n\nimport { ChartTooltip } from '../ChartTooltip';\nimport { getTooltipValueFormatter } from './chart-tooltip-formatter';\nimport {\n type EchartsSeries,\n type HexColor,\n type NeedleSeries,\n type ThresholdLineSeriesOption,\n} from './chart-types';\nimport { defaultThresholdLineSeriesOption } from './defaults';\nimport { formatNumberEnUS } from './format-utils';\n\nconst defaultColors = Object.values(tokens.categorical);\n\ntype SingleXAxisOption = Exclude<\n NonNullable<EChartsOption['xAxis']>,\n unknown[]\n>;\ntype SingleYAxisOption = Exclude<\n NonNullable<EChartsOption['yAxis']>,\n unknown[]\n>;\n\nexport const mergeSeries = (\n series: NeedleSeries,\n theme: 'light' | 'dark' = 'light',\n userOption?: Omit<\n EChartsOption,\n 'series' | 'dataset' | 'legend' | 'xAxis' | 'yAxis'\n >,\n palette?: HexColor[],\n): EchartsSeries => {\n const colors = palette ?? defaultColors;\n\n return series.map(\n (\n option:\n | SeriesOption\n | ThresholdLineSeriesOption<'warning'>\n | ThresholdLineSeriesOption<'danger'>,\n index: number = 0,\n ): SeriesOption => {\n if (option === undefined) {\n return {};\n }\n\n const color = Array.isArray(option.color)\n ? option.color[index]\n : (option.color ?? colors[index % colors.length]);\n\n if (option.type === 'thresholdLine') {\n const { notificationType } = option;\n // Needed to differentiate between normal lines and threshold lines\n // as we are unable to inject custom properties into echarts series lines.\n const thresholdLineName = `thresholdLine-${notificationType}`;\n return {\n symbolSize: 9,\n symbol: 'none',\n condition: defaultThresholdLineSeriesOption.condition,\n ...option,\n lineStyle: {\n type: 'dashed',\n width: 2,\n ...option.lineStyle,\n },\n name: thresholdLineName,\n type: 'line',\n data: [\n [option.xAxis[0], option.yAxis],\n [option.xAxis[1], option.yAxis],\n ],\n };\n }\n\n if (option.type === 'line') {\n const shadow = tokens.theme[theme].boxShadow.raised;\n const shadowParts = shadow.split(/ (?=\\d+px|rgba?\\()/);\n\n return {\n type: 'line',\n symbolSize: 9,\n color,\n symbol: 'none',\n ...option,\n lineStyle: {\n type: 'solid' as const,\n width: 2,\n ...option.lineStyle,\n },\n emphasis: {\n disabled: true,\n focus: 'series',\n ...option.emphasis,\n itemStyle: {\n borderColor: tokens.theme[theme].color.neutral.bg.weak,\n shadowBlur: parseInt(shadowParts[2]),\n shadowColor: shadowParts[4],\n shadowOffsetX: parseInt(shadowParts[0]),\n shadowOffsetY: parseInt(shadowParts[1]),\n ...option.emphasis?.itemStyle,\n },\n label: { show: false },\n ...option.emphasis,\n },\n };\n }\n\n if (option.type === 'pie') {\n const valueFormatter = getTooltipValueFormatter(userOption);\n\n return {\n animationDuration: 600,\n animationType: 'scale',\n selectedMode: 'single',\n ...option,\n // Blur opacity is set to 1 to prevent other slices from\n // being opacitated when hovering a slice where the emphasis is enabled (used for scale effect)\n blur: {\n itemStyle: {\n opacity: 1,\n ...option.blur?.itemStyle,\n },\n label: {\n opacity: 1,\n ...option.blur?.label,\n },\n ...option.blur,\n },\n // Emphasis is enabled and used to apply the scale effect when hovering the pie chart slices.\n emphasis: {\n disabled: false,\n focus: 'self',\n scale: true,\n scaleSize: 5,\n ...option.emphasis,\n },\n itemStyle: {\n borderColor: tokens.theme[theme].color.neutral.bg.weak,\n borderWidth: 1,\n ...option.itemStyle,\n },\n label: {\n backgroundColor: 'transparent',\n color: tokens.theme[theme].color.neutral.text.weak,\n formatter: '{d}%',\n ...option.label,\n },\n labelLine: {\n length: 5,\n show: true,\n ...option.labelLine,\n },\n tooltip: {\n trigger: 'item',\n confine: true,\n // Reset the default tooltip css styling\n padding: 0,\n borderRadius: 0,\n borderWidth: 0,\n extraCssText: 'box-shadow: none; background-color: transparent;',\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Content\n key={firstParam?.value[0] ?? firstParam.seriesName}\n leadingElement={\n firstParam?.value[0] ?? firstParam.seriesName\n }\n trailingElement={valueFormatter(\n Array.isArray(firstParam.value)\n ? firstParam.value[1]\n : firstParam.value,\n )}\n indentSquareColor={firstParam.color}\n />\n </span>,\n )}`;\n },\n ...option.tooltip,\n },\n };\n }\n\n if (option.type === 'bar') {\n const valueFormatter = getTooltipValueFormatter(userOption);\n\n return {\n barMaxWidth: 16,\n ...option,\n blur: {\n itemStyle: {\n opacity: 0.3,\n ...option.blur?.itemStyle,\n },\n ...option.blur,\n },\n emphasis: {\n disabled: true,\n focus: 'series',\n ...option.emphasis,\n },\n itemStyle: {\n borderWidth: 20,\n color,\n ...option.itemStyle,\n },\n markLine: {\n emphasis: {\n disabled: true,\n lineStyle: {\n width: 20,\n ...option.markLine?.emphasis?.lineStyle,\n },\n ...option.markLine?.emphasis,\n },\n lineStyle: {\n width: 20,\n ...option.markLine?.lineStyle,\n },\n },\n tooltip: {\n trigger: 'axis',\n confine: true,\n // Reset the default tooltip css styling\n padding: 0,\n borderRadius: 0,\n borderWidth: 0,\n extraCssText: 'box-shadow: none; background-color: transparent;',\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Title>{firstParam.name}</ChartTooltip.Title>\n <ChartTooltip.Content\n key={firstParam?.value[0] ?? firstParam.seriesName}\n leadingElement={firstParam.seriesName}\n trailingElement={valueFormatter(\n Array.isArray(firstParam.value)\n ? firstParam.value[1]\n : firstParam.value,\n )}\n indentSquareColor={firstParam.color}\n />\n </span>,\n )}`;\n },\n ...option.tooltip,\n },\n };\n }\n\n return option;\n },\n );\n};\n\nexport const mergeXAxis = (\n xAxis: EChartsOption['xAxis'],\n theme: 'light' | 'dark' = 'light',\n): EChartsOption['xAxis'] => {\n if (xAxis === undefined) {\n return [];\n }\n\n if (Array.isArray(xAxis)) {\n return xAxis.map((axis) =>\n mergeXAxis(axis, theme),\n ) as EChartsOption['xAxis'];\n }\n\n const baseXAxis = {\n ...xAxis,\n axisLabel: {\n formatter: {\n day: '{dd} {MMM}',\n hour: '{HH}:{mm}',\n millisecond: '{hh}:{mm}:{ss} {SSS}',\n minute: '{HH}:{mm}',\n month: '{MMM}',\n none: '{yyyy}-{MM}-{dd} {hh}:{mm}:{ss} {SSS}',\n second: '{HH}:{mm}:{ss}',\n year: '{yearStyle|{yyyy}}\\n{monthStyle|{MMM}}',\n },\n margin: 16,\n overflow: 'truncate',\n ...xAxis?.axisLabel,\n },\n axisLine: {\n lineStyle: {\n ...xAxis?.axisLine?.lineStyle,\n },\n ...xAxis?.axisLine,\n },\n axisTick: {\n ...xAxis?.axisTick,\n lineStyle: {\n ...xAxis?.axisTick?.lineStyle,\n },\n show: true,\n ...xAxis?.axisTick,\n },\n splitLine: { show: false, ...xAxis?.splitLine },\n } as SingleXAxisOption;\n\n if (xAxis.type === 'time') {\n const timeXAxis = {\n ...baseXAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseXAxis.axisLabel,\n },\n } as SingleXAxisOption;\n\n return timeXAxis;\n }\n\n if (xAxis.type === 'value' || xAxis.type === 'log') {\n const xAxisFormatter =\n xAxis.axisLabel && 'formatter' in xAxis.axisLabel\n ? xAxis.axisLabel.formatter\n : undefined;\n const valueXAxis = {\n ...baseXAxis,\n axisLabel: {\n ...baseXAxis.axisLabel,\n formatter: xAxisFormatter ?? formatNumberEnUS,\n },\n } as SingleXAxisOption;\n\n return valueXAxis;\n }\n\n if (xAxis.type === 'category') {\n const categoryXAxis = {\n ...baseXAxis,\n axisLabel: {\n width: 80,\n ...baseXAxis?.axisLabel,\n },\n axisTick: {\n alignWithLabel: true,\n ...baseXAxis?.axisTick,\n },\n } as SingleXAxisOption;\n return categoryXAxis;\n }\n\n return baseXAxis;\n};\n\nexport const mergeYAxis = (\n yAxis: EChartsOption['yAxis'],\n theme: 'light' | 'dark' = 'light',\n): EChartsOption['yAxis'] => {\n if (yAxis === undefined) {\n return [];\n }\n\n if (Array.isArray(yAxis)) {\n return yAxis.map((axis) =>\n mergeYAxis(axis, theme),\n ) as EChartsOption['yAxis'];\n }\n\n const baseYAxis = {\n ...yAxis,\n axisLabel: {\n margin: 8,\n overflow: 'truncate',\n ...yAxis?.axisLabel,\n },\n axisLine: {\n ...yAxis?.axisLine,\n lineStyle: {\n ...yAxis?.axisLine?.lineStyle,\n },\n show: true,\n },\n axisTick: {\n show: false,\n ...yAxis?.axisTick,\n lineStyle: {\n width: 1,\n ...yAxis?.axisTick?.lineStyle,\n },\n },\n splitLine: { show: true, ...yAxis?.splitLine },\n } as SingleYAxisOption;\n\n if (yAxis.type === 'time') {\n const timeYAxis = {\n ...baseYAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseYAxis.axisLabel,\n },\n splitLine: { show: false, ...baseYAxis?.splitLine },\n } as SingleYAxisOption;\n\n return timeYAxis;\n }\n\n if (yAxis.type === 'value' || yAxis.type === 'log') {\n const yAxisFormatter =\n yAxis.axisLabel && 'formatter' in yAxis.axisLabel\n ? yAxis.axisLabel.formatter\n : undefined;\n const valueYAxis = {\n ...baseYAxis,\n axisLabel: {\n hideOverlap: true,\n ...baseYAxis.axisLabel,\n formatter: yAxisFormatter ?? formatNumberEnUS,\n },\n splitLine: { show: false, ...baseYAxis?.splitLine },\n } as SingleYAxisOption;\n\n return valueYAxis;\n }\n\n if (yAxis.type === 'category') {\n const categoryYAxis = {\n ...baseYAxis,\n axisLabel: {\n width: 100,\n ...baseYAxis?.axisLabel,\n },\n } as SingleYAxisOption;\n\n return categoryYAxis;\n }\n\n return baseYAxis;\n};\n\ntype SingleDataZoomOption = Exclude<\n NonNullable<EChartsOption['dataZoom']>,\n unknown[]\n>;\n\ntype MergeDataZoomAxes = {\n xAxis?: EChartsOption['xAxis'];\n yAxis?: EChartsOption['yAxis'];\n};\n\nexport type DataZoomTargetAxes = {\n xAxisIndices: number[];\n yAxisIndices: number[];\n};\n\nconst normalizeAxisIndices = (axisIndex: unknown): number[] => {\n if (typeof axisIndex === 'number') {\n return [axisIndex];\n }\n\n if (Array.isArray(axisIndex)) {\n return axisIndex.filter((index): index is number => {\n return typeof index === 'number';\n });\n }\n\n return [];\n};\n\n/**\n * Resolves the axes a single dataZoom entry targets, mirroring ECharts' own\n * resolution order: explicit `xAxisIndex`/`yAxisIndex` win (`false` meaning\n * \"not this axis\"); when no index is given, `orient: 'vertical'` targets the\n * first y-axis and horizontal/unset targets the first x-axis.\n */\nconst getSingleDataZoomTargets = (\n dataZoom: SingleDataZoomOption | undefined,\n): DataZoomTargetAxes => {\n if (dataZoom?.type !== 'slider' && dataZoom?.type !== 'inside') {\n return { xAxisIndices: [], yAxisIndices: [] };\n }\n\n const hasAxisIndex =\n dataZoom.xAxisIndex !== undefined || dataZoom.yAxisIndex !== undefined;\n\n if (hasAxisIndex) {\n return {\n xAxisIndices: normalizeAxisIndices(dataZoom.xAxisIndex),\n yAxisIndices: normalizeAxisIndices(dataZoom.yAxisIndex),\n };\n }\n\n return dataZoom.orient === 'vertical'\n ? { xAxisIndices: [], yAxisIndices: [0] }\n : { xAxisIndices: [0], yAxisIndices: [] };\n};\n\n/**\n * Union of the axis indices targeted by all slider/inside entries in a\n * dataZoom config, using the same per-entry resolution as ECharts (explicit\n * axis indices first, then orientation).\n */\nexport const getDataZoomTargetAxes = (\n dataZoom: EChartsOption['dataZoom'],\n): DataZoomTargetAxes => {\n const entries = Array.isArray(dataZoom) ? dataZoom : [dataZoom];\n const targets: DataZoomTargetAxes = { xAxisIndices: [], yAxisIndices: [] };\n\n for (const entry of entries) {\n const entryTargets = getSingleDataZoomTargets(entry);\n\n for (const index of entryTargets.xAxisIndices) {\n if (!targets.xAxisIndices.includes(index)) {\n targets.xAxisIndices.push(index);\n }\n }\n\n for (const index of entryTargets.yAxisIndices) {\n if (!targets.yAxisIndices.includes(index)) {\n targets.yAxisIndices.push(index);\n }\n }\n }\n\n return targets;\n};\n\n/**\n * A slider is vertical when the consumer sets `orient: 'vertical'`, or when it\n * only targets a y-axis, which makes ECharts infer the vertical orientation.\n */\nexport const isVerticalSlider = (\n dataZoom: SingleDataZoomOption | undefined,\n): boolean => {\n if (dataZoom?.type !== 'slider') {\n return false;\n }\n\n if (dataZoom.orient !== undefined) {\n return dataZoom.orient === 'vertical';\n }\n\n const targets = getSingleDataZoomTargets(dataZoom);\n\n return targets.yAxisIndices.length > 0 && targets.xAxisIndices.length === 0;\n};\n\n/**\n * Axis types where windowing (`filterMode: 'none'`) beats ECharts' default\n * data filtering. Filtering a continuous axis removes whole data items outside\n * the window, which makes bars and points vanish instead of clipping them.\n * Category axes keep the `'filter'` default so paging through categories still\n * rescales the opposite value axis to the visible data.\n */\nconst WINDOWED_FILTER_AXIS_TYPES = ['log', 'time', 'value'];\n\nconst getSingleAxisOption = (\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndex: unknown,\n): { type?: string } | undefined => {\n if (!Array.isArray(axis)) {\n return axis as { type?: string } | undefined;\n }\n\n const index =\n typeof axisIndex === 'number'\n ? axisIndex\n : Array.isArray(axisIndex) && typeof axisIndex[0] === 'number'\n ? axisIndex[0]\n : 0;\n\n return axis[index] as { type?: string } | undefined;\n};\n\n/**\n * Resolves the slider's target axis the way ECharts does (explicit axis index\n * first, then orientation) and returns `'none'` when that axis is continuous.\n * Returns `undefined` (keep ECharts' `'filter'` default) for category axes and\n * for sliders that target both axes at once.\n */\nconst getSliderDefaultFilterMode = (\n dataZoom: SingleDataZoomOption,\n axes: MergeDataZoomAxes | undefined,\n): 'none' | undefined => {\n const targets = getSingleDataZoomTargets(dataZoom);\n const isXAxisTarget = targets.xAxisIndices.length > 0;\n const isYAxisTarget = targets.yAxisIndices.length > 0;\n\n if (isXAxisTarget === isYAxisTarget) {\n return undefined;\n }\n\n const targetAxis = isYAxisTarget\n ? getSingleAxisOption(axes?.yAxis, dataZoom.yAxisIndex)\n : getSingleAxisOption(axes?.xAxis, dataZoom.xAxisIndex);\n\n return targetAxis?.type !== undefined &&\n WINDOWED_FILTER_AXIS_TYPES.includes(targetAxis.type)\n ? 'none'\n : undefined;\n};\n\nexport const mergeDataZoom = (\n dataZoom: EChartsOption['dataZoom'],\n axes?: MergeDataZoomAxes,\n): EChartsOption['dataZoom'] => {\n if (Array.isArray(dataZoom)) {\n return dataZoom.map((option) =>\n mergeDataZoom(option, axes),\n ) as EChartsOption['dataZoom'];\n }\n\n const isSlider = dataZoom?.type === 'slider';\n const isInside = dataZoom?.type === 'inside';\n\n if (isSlider) {\n const filterMode = getSliderDefaultFilterMode(dataZoom, axes);\n const layoutDefaults = isVerticalSlider(dataZoom)\n ? { right: 10, width: 28 }\n : { bottom: 10, height: 28 };\n\n return {\n ...(filterMode !== undefined && { filterMode }),\n ...layoutDefaults,\n show: true,\n type: 'slider',\n ...dataZoom,\n };\n } else if (isInside) {\n // Only pin the default x-axis binding on entries that actually target the\n // x-axis; y-targeting entries (explicit `yAxisIndex` or\n // `orient: 'vertical'`) keep their own binding.\n const targets = getSingleDataZoomTargets(dataZoom);\n const hasDefaultXAxisTarget =\n dataZoom.xAxisIndex === undefined && targets.xAxisIndices.length > 0;\n\n return {\n filterMode: 'none',\n ...(hasDefaultXAxisTarget && { xAxisIndex: [0] }),\n zoomOnMouseWheel: false,\n ...dataZoom,\n };\n }\n\n return dataZoom;\n};\n\ntype MergeToolboxContext = MergeDataZoomAxes & {\n dataZoom?: EChartsOption['dataZoom'];\n};\n\nconst isContinuousAxisOption = (\n axisOption: { type?: string } | undefined,\n): boolean => {\n return (\n axisOption?.type !== undefined &&\n WINDOWED_FILTER_AXIS_TYPES.includes(axisOption.type)\n );\n};\n\nconst areTargetAxesContinuous = (\n axis: EChartsOption['xAxis'] | EChartsOption['yAxis'],\n axisIndices: number[] | 'all',\n): boolean => {\n if (axisIndices === 'all') {\n const axisOptions = Array.isArray(axis) ? axis : [axis];\n\n return (\n axisOptions.length > 0 &&\n axisOptions.every((axisOption) => {\n return isContinuousAxisOption(axisOption as { type?: string });\n })\n );\n }\n\n return axisIndices.every((axisIndex) => {\n return isContinuousAxisOption(getSingleAxisOption(axis, axisIndex));\n });\n};\n\n/**\n * Returns `'none'` when every axis targeted by the drag-to-zoom brush is\n * continuous (`value`/`time`/`log`), matching the slider rule: filtering a\n * continuous axis removes whole data items outside the selection instead of\n * clipping them. Category (or unknown) targets keep ECharts' `'filter'`\n * default.\n */\nconst getBrushDefaultFilterMode = (\n context: MergeToolboxContext | undefined,\n xAxisTargets: number[] | 'all' | false,\n yAxisTargets: number[] | 'all' | false,\n): 'none' | undefined => {\n const checks: boolean[] = [];\n\n if (xAxisTargets !== false) {\n checks.push(areTargetAxesContinuous(context?.xAxis, xAxisTargets));\n }\n\n if (yAxisTargets !== false) {\n checks.push(areTargetAxesContinuous(context?.yAxis, yAxisTargets));\n }\n\n return checks.length > 0 && checks.every(Boolean) ? 'none' : undefined;\n};\n\nexport const mergeToolbox = (\n toolbox: EChartsOption['toolbox'],\n context?: MergeToolboxContext,\n): EChartsOption['toolbox'] => {\n if (Array.isArray(toolbox)) {\n return toolbox.map((option) =>\n mergeToolbox(option, context),\n ) as EChartsOption['toolbox'];\n }\n\n // The drag-to-zoom brush follows the axes the dataZoom config targets, so\n // zoom direction is configured in one place. Without any dataZoom config it\n // keeps the historical default: all x-axes on, y off.\n const targets = getDataZoomTargetAxes(context?.dataZoom);\n const hasTargets =\n targets.xAxisIndices.length > 0 || targets.yAxisIndices.length > 0;\n const xAxisTargets: number[] | 'all' | false = hasTargets\n ? targets.xAxisIndices.length > 0 && targets.xAxisIndices\n : 'all';\n const yAxisTargets: number[] | false =\n targets.yAxisIndices.length > 0 && targets.yAxisIndices;\n const filterMode = getBrushDefaultFilterMode(\n context,\n xAxisTargets,\n yAxisTargets,\n );\n\n return {\n feature: {\n dataZoom: {\n ...(filterMode !== undefined && { filterMode }),\n ...(xAxisTargets !== 'all' && { xAxisIndex: xAxisTargets }),\n yAxisIndex: yAxisTargets,\n ...toolbox?.feature?.dataZoom,\n icon: {\n // This hack removes the icons.\n // Due to: https://github.com/apache/echarts/issues/10274\n back: '-',\n zoom: '-',\n },\n show: true,\n },\n },\n };\n};\n"]}
package/lib/cjs/index.js CHANGED
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- /**
17
+ /*!
18
18
  *
19
19
  * Copyright (c) "Neo4j"
20
20
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CAAyB","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nexport * from './charts';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,2CAAyB","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nexport * from './charts';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"Chart.js","sourceRoot":"","sources":["../../../src/charts/Chart.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,WAAW,EACX,aAAa,EACb,uBAAuB,EACvB,aAAa,GACI,EAAE,EAAE;IACrB,MAAM,YAAY,GAAG,eAAe,CAAC;QACnC,WAAW;QACX,uBAAuB;KACxB,CAAC,CAAC;IAEH,IAAI,uBAAuB,EAAE,CAAC;QAC5B,OAAO,CACL,6BACc,MAAM,EAClB,SAAS,EAAC,mEAAmE,GAC7E,CACH,CAAC;IACJ,CAAC;IAED,OAAO,CACL,KAAC,MAAM,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KAAK,aAC1B,cAAK,SAAS,EAAE,oBAAoB,YAClC,KAAC,WAAW,oBACN,UAAU,IACd,mBAAmB,EAAE,cAAc,EACnC,mBAAmB,EAAE,0BAA0B,IAC/C,GACE,EACL,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,CACf,KAAC,WAAW,IACV,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,mBAAmB,EAClC,uBAAuB,EAAE,uBAAuB,EAChD,aAAa,EAAE,uBAAuB,GACtC,CACH,IACc,GACC,CACrB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { EChartsOption } from 'echarts';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { ChartContainer } from './ChartContainer';\nimport { ChartRender } from './ChartRender';\nimport { ChartRefsProvider } from './hooks/use-chart-refs';\nimport { useLegendSeries } from './hooks/use-legend-series';\nimport { Legend } from './Legend';\nimport { type ChartProps } from './utils/chart-types';\n\ntype ChartLegendProps = {\n chartOption: EChartsOption | undefined;\n isLayoutReady: boolean;\n isWaitingForFirstResize: boolean;\n onLayoutReady?: () => void;\n};\n\n/**\n * Bridges the rendered ECharts option into the React legend.\n *\n * `useLegendSeries` reads the current chart option and ECharts color state to\n * derive the legend rows. Rendering is deferred until the chart has completed\n * its first resize so the legend does not measure against an uninitialized\n * chart instance.\n */\nconst ChartLegend = ({\n chartOption,\n isLayoutReady,\n isWaitingForFirstResize,\n onLayoutReady,\n}: ChartLegendProps) => {\n const legendSeries = useLegendSeries({\n chartOption,\n isWaitingForFirstResize,\n });\n\n if (isWaitingForFirstResize) {\n return (\n <div\n aria-hidden=\"true\"\n className=\"ndl-chart-legend-container ndl-chart-legend-container-placeholder\"\n />\n );\n }\n\n return (\n <Legend\n series={legendSeries ?? []}\n onLayoutReady={onLayoutReady}\n isLayoutReady={isLayoutReady}\n />\n );\n};\n\n/**\n * A chart component powered by Apache ECharts with Needle's customization and theming.\n *\n * The `Chart` component fills 100% of its parent's width and height. Because it\n * relies on the container's `clientHeight` to size the canvas, **the parent element\n * must have an explicit height** (e.g. a fixed px/rem value or a viewport unit).\n *\n * @example\n * ```tsx\n * <div style={{ height: '350px' }}>\n * <Chart dataset={dataset} series={series} xAxis={xAxis} yAxis={yAxis} />\n * </div>\n * ```\n *\n * @remarks\n * **Data zoom sliders.** A `dataZoom` slider passed through `option` targets\n * the x-axis unless it is bound to an axis explicitly, so on a horizontal bar\n * chart it zooms the value axis rather than the categories. Bind the slider to\n * the category axis with `yAxisIndex: [0]` (or set `orient: 'vertical'`) to\n * page through the bars instead; Needle then lays the slider out vertically on\n * the right of the chart and reserves grid space for it. Sliders that target a\n * continuous (`value`, `time`, or `log`) axis default to `filterMode: 'none'`\n * so out-of-window data is clipped rather than removed, while category-axis\n * sliders keep ECharts' `'filter'` default so the opposite value axis rescales\n * to the visible data.\n *\n * **Drag-to-zoom.** Dragging in the plot area zooms the axes your `dataZoom`\n * config targets: entries bound to a y-axis (`yAxisIndex` or\n * `orient: 'vertical'`) make the drag select a y band, entries on both axes\n * make it select a rectangle, and without any `dataZoom` config the drag zooms\n * the x-axis. Set `toolbox.feature.dataZoom` through `option` to override the\n * derived axes explicitly. When every drag-targeted axis is continuous the\n * drag defaults to `filterMode: 'none'`, matching the slider rule above.\n */\nexport const Chart = ({ style, legend, ...chartProps }: ChartProps) => {\n const [isWaitingForFirstResize, setIsWaitingForFirstResize] = useState(true);\n const [chartOption, setChartOption] = useState<EChartsOption>();\n const [isLegendLayoutReady, setIsLegendLayoutReady] = useState(!legend?.show);\n\n const handleLegendLayoutReady = useCallback(() => {\n setIsLegendLayoutReady(true);\n }, []);\n\n useEffect(() => {\n if (!legend?.show) {\n setIsLegendLayoutReady(true);\n }\n }, [legend?.show]);\n\n const chartLayoutClassName =\n legend?.show && !isLegendLayoutReady\n ? 'ndl-chart-layout ndl-chart-layout-hidden'\n : 'ndl-chart-layout';\n\n return (\n <ChartRefsProvider>\n <ChartContainer style={style}>\n <div className={chartLayoutClassName}>\n <ChartRender\n {...chartProps}\n onChartOptionChange={setChartOption}\n onFirstResizeChange={setIsWaitingForFirstResize}\n />\n </div>\n {legend?.show && (\n <ChartLegend\n chartOption={chartOption}\n isLayoutReady={isLegendLayoutReady}\n isWaitingForFirstResize={isWaitingForFirstResize}\n onLayoutReady={handleLegendLayoutReady}\n />\n )}\n </ChartContainer>\n </ChartRefsProvider>\n );\n};\n"]}
1
+ {"version":3,"file":"Chart.js","sourceRoot":"","sources":["../../../src/charts/Chart.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAsBA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEzD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAUlC;;;;;;;GAOG;AACH,MAAM,WAAW,GAAG,CAAC,EACnB,WAAW,EACX,aAAa,EACb,uBAAuB,EACvB,aAAa,GACI,EAAE,EAAE;IACrB,MAAM,YAAY,GAAG,eAAe,CAAC;QACnC,WAAW;QACX,uBAAuB;KACxB,CAAC,CAAC;IA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,CAAC,mBAAmB;QAClC,CAAC,CAAC,0CAA0C;QAC5C,CAAC,CAAC,kBAAkB,CAAC;IAEzB,OAAO,CACL,KAAC,iBAAiB,cAChB,MAAC,cAAc,IAAC,KAAK,EAAE,KAAK,aAC1B,cAAK,SAAS,EAAE,oBAAoB,YAClC,KAAC,WAAW,oBACN,UAAU,IACd,mBAAmB,EAAE,cAAc,EACnC,mBAAmB,EAAE,0BAA0B,IAC/C,GACE,EACL,CAAA,MAAM,aAAN,MAAM,uBAAN,MAAM,CAAE,IAAI,KAAI,CACf,KAAC,WAAW,IACV,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,mBAAmB,EAClC,uBAAuB,EAAE,uBAAuB,EAChD,aAAa,EAAE,uBAAuB,GACtC,CACH,IACc,GACC,CACrB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type { EChartsOption } from 'echarts';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { ChartContainer } from './ChartContainer';\nimport { ChartRender } from './ChartRender';\nimport { ChartRefsProvider } from './hooks/use-chart-refs';\nimport { useLegendSeries } from './hooks/use-legend-series';\nimport { Legend } from './Legend';\nimport { type ChartProps } from './utils/chart-types';\n\ntype ChartLegendProps = {\n chartOption: EChartsOption | undefined;\n isLayoutReady: boolean;\n isWaitingForFirstResize: boolean;\n onLayoutReady?: () => void;\n};\n\n/**\n * Bridges the rendered ECharts option into the React legend.\n *\n * `useLegendSeries` reads the current chart option and ECharts color state to\n * derive the legend rows. Rendering is deferred until the chart has completed\n * its first resize so the legend does not measure against an uninitialized\n * chart instance.\n */\nconst ChartLegend = ({\n chartOption,\n isLayoutReady,\n isWaitingForFirstResize,\n onLayoutReady,\n}: ChartLegendProps) => {\n const legendSeries = useLegendSeries({\n chartOption,\n isWaitingForFirstResize,\n });\n\n if (isWaitingForFirstResize) {\n return (\n <div\n aria-hidden=\"true\"\n className=\"ndl-chart-legend-container ndl-chart-legend-container-placeholder\"\n />\n );\n }\n\n return (\n <Legend\n series={legendSeries ?? []}\n onLayoutReady={onLayoutReady}\n isLayoutReady={isLayoutReady}\n />\n );\n};\n\n/**\n * A chart component powered by Apache ECharts with Needle's customization and theming.\n *\n * The `Chart` component fills 100% of its parent's width and height. Because it\n * relies on the container's `clientHeight` to size the canvas, **the parent element\n * must have an explicit height** (e.g. a fixed px/rem value or a viewport unit).\n *\n * @example\n * ```tsx\n * <div style={{ height: '350px' }}>\n * <Chart dataset={dataset} series={series} xAxis={xAxis} yAxis={yAxis} />\n * </div>\n * ```\n *\n * @remarks\n * **Data zoom sliders.** A `dataZoom` slider passed through `option` targets\n * the x-axis unless it is bound to an axis explicitly, so on a horizontal bar\n * chart it zooms the value axis rather than the categories. Bind the slider to\n * the category axis with `yAxisIndex: [0]` (or set `orient: 'vertical'`) to\n * page through the bars instead; Needle then lays the slider out vertically on\n * the right of the chart and reserves grid space for it. Sliders that target a\n * continuous (`value`, `time`, or `log`) axis default to `filterMode: 'none'`\n * so out-of-window data is clipped rather than removed, while category-axis\n * sliders keep ECharts' `'filter'` default so the opposite value axis rescales\n * to the visible data.\n *\n * **Drag-to-zoom.** Dragging in the plot area zooms the axes your `dataZoom`\n * config targets: entries bound to a y-axis (`yAxisIndex` or\n * `orient: 'vertical'`) make the drag select a y band, entries on both axes\n * make it select a rectangle, and without any `dataZoom` config the drag zooms\n * the x-axis. Set `toolbox.feature.dataZoom` through `option` to override the\n * derived axes explicitly. When every drag-targeted axis is continuous the\n * drag defaults to `filterMode: 'none'`, matching the slider rule above.\n */\nexport const Chart = ({ style, legend, ...chartProps }: ChartProps) => {\n const [isWaitingForFirstResize, setIsWaitingForFirstResize] = useState(true);\n const [chartOption, setChartOption] = useState<EChartsOption>();\n const [isLegendLayoutReady, setIsLegendLayoutReady] = useState(!legend?.show);\n\n const handleLegendLayoutReady = useCallback(() => {\n setIsLegendLayoutReady(true);\n }, []);\n\n useEffect(() => {\n if (!legend?.show) {\n setIsLegendLayoutReady(true);\n }\n }, [legend?.show]);\n\n const chartLayoutClassName =\n legend?.show && !isLegendLayoutReady\n ? 'ndl-chart-layout ndl-chart-layout-hidden'\n : 'ndl-chart-layout';\n\n return (\n <ChartRefsProvider>\n <ChartContainer style={style}>\n <div className={chartLayoutClassName}>\n <ChartRender\n {...chartProps}\n onChartOptionChange={setChartOption}\n onFirstResizeChange={setIsWaitingForFirstResize}\n />\n </div>\n {legend?.show && (\n <ChartLegend\n chartOption={chartOption}\n isLayoutReady={isLegendLayoutReady}\n isWaitingForFirstResize={isWaitingForFirstResize}\n onLayoutReady={handleLegendLayoutReady}\n />\n )}\n </ChartContainer>\n </ChartRefsProvider>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ChartContainer.js","sourceRoot":"","sources":["../../../src/charts/ChartContainer.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAG,CAC9B,QAAgD,EAChD,EAAE;IACF,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,EAAU,CAAC;IAE3E,MAAM,0BAA0B,GAAG,WAAW,CAAC,GAAG,EAAE;;QAClD,uBAAuB,CAAC,MAAA,QAAQ,CAAC,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B [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type React from 'react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nconst EXPANDED_LEGEND_MAX_HEIGHT_RATIO = 0.3;\n\n/**\n * Tracks the outer chart container height.\n *\n * The measured height is used to expose CSS sizing data to descendants, most\n * notably the expanded legend max height. A ResizeObserver keeps the value in\n * sync with parent layout changes.\n */\nconst useChartContainerHeight = (\n chartRef: React.RefObject<HTMLDivElement | null>,\n) => {\n const [chartContainerHeight, setChartContainerHeight] = useState<number>();\n\n const updateChartContainerHeight = useCallback(() => {\n setChartContainerHeight(chartRef.current?.clientHeight);\n }, [chartRef]);\n\n useEffect(() => {\n updateChartContainerHeight();\n\n const chartContainer = chartRef.current;\n if (!chartContainer) {\n return;\n }\n\n const resizeObserver = new ResizeObserver(updateChartContainerHeight);\n resizeObserver.observe(chartContainer);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [chartRef, updateChartContainerHeight]);\n\n return chartContainerHeight;\n};\n\ntype ChartContainerProps = {\n children: React.ReactNode;\n style?: React.CSSProperties;\n};\n\n/**\n * Provides the chart grid shell and CSS variables shared by the ECharts canvas\n * and legend rows.\n *\n * The container owns the measurement ref for the full chart area so the legend\n * can cap expanded height relative to the available chart height.\n */\nexport const ChartContainer = ({ children, style }: ChartContainerProps) => {\n const chartRef = useRef<HTMLDivElement>(null);\n const chartContainerHeight = useChartContainerHeight(chartRef);\n const chartContainerStyle = useMemo(\n () =>\n ({\n ...style,\n '--ndl-chart-legend-expanded-max-height':\n chartContainerHeight === undefined\n ? undefined\n : `${Math.floor(\n chartContainerHeight * EXPANDED_LEGEND_MAX_HEIGHT_RATIO,\n )}px`,\n }) as React.CSSProperties,\n [chartContainerHeight, style],\n );\n\n return (\n <div ref={chartRef} className=\"ndl-chart\" style={chartContainerStyle}>\n {children}\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"ChartContainer.js","sourceRoot":"","sources":["../../../src/charts/ChartContainer.tsx"],"names":[],"mappings":";AAsBA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE1E,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAE7C;;;;;;GAMG;AACH,MAAM,uBAAuB,GAAG,CAC9B,QAAgD,EAChD,EAAE;IACF,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,EAAU,CAAC;IAE3E,MAAM,0BAA0B,GAAG,WAAW,CAAC,GAAG,EAAE;;QAClD,uBAAuB,CAAC,MAAA,QAAQ,CAAC,OAAO,0CAAE,YAAY,CAAC,CAAC;IAC1D,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,SAAS,CAAC,GAAG,EAAE;QACb,0BAA0B,EAAE,CAAC;QAE7B,MAAM,cAAc,GAAG,QAAQ,CAAC,OAAO,CAAC;QACxC,IAAI,CAAC,cAAc,EAAE,CAAC;YACpB,OAAO;QACT,CAAC;QAED,MAAM,cAAc,GAAG,IAAI,cAAc,CAAC,0BAA0B,CAAC,CAAC;QACtE,cAAc,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;QAEvC,OAAO,GAAG,EAAE;YACV,cAAc,CAAC,UAAU,EAAE,CAAC;QAC9B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,0BAA0B,CAAC,CAAC,CAAC;IAE3C,OAAO,oBAAoB,CAAC;AAC9B,CAAC,CAAC;AAOF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAuB,EAAE,EAAE;IACzE,MAAM,QAAQ,GAAG,MAAM,CAAiB,IAAI,CAAC,CAAC;IAC9C,MAAM,oBAAoB,GAAG,uBAAuB,CAAC,QAAQ,CAAC,CAAC;IAC/D,MAAM,mBAAmB,GAAG,OAAO,CACjC,GAAG,EAAE,CACH,iCACK,KAAK,KACR,wCAAwC,EACtC,oBAAoB,KAAK,SAAS;YAChC,CAAC,CAAC,SAAS;YACX,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CACX,oBAAoB,GAAG,gCAAgC,CACxD,IAAI,IACY,EAC3B,CAAC,oBAAoB,EAAE,KAAK,CAAC,CAC9B,CAAC;IAEF,OAAO,CACL,cAAK,GAAG,EAAE,QAAQ,EAAE,SAAS,EAAC,WAAW,EAAC,KAAK,EAAE,mBAAmB,YACjE,QAAQ,GACL,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport type React from 'react';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nconst EXPANDED_LEGEND_MAX_HEIGHT_RATIO = 0.3;\n\n/**\n * Tracks the outer chart container height.\n *\n * The measured height is used to expose CSS sizing data to descendants, most\n * notably the expanded legend max height. A ResizeObserver keeps the value in\n * sync with parent layout changes.\n */\nconst useChartContainerHeight = (\n chartRef: React.RefObject<HTMLDivElement | null>,\n) => {\n const [chartContainerHeight, setChartContainerHeight] = useState<number>();\n\n const updateChartContainerHeight = useCallback(() => {\n setChartContainerHeight(chartRef.current?.clientHeight);\n }, [chartRef]);\n\n useEffect(() => {\n updateChartContainerHeight();\n\n const chartContainer = chartRef.current;\n if (!chartContainer) {\n return;\n }\n\n const resizeObserver = new ResizeObserver(updateChartContainerHeight);\n resizeObserver.observe(chartContainer);\n\n return () => {\n resizeObserver.disconnect();\n };\n }, [chartRef, updateChartContainerHeight]);\n\n return chartContainerHeight;\n};\n\ntype ChartContainerProps = {\n children: React.ReactNode;\n style?: React.CSSProperties;\n};\n\n/**\n * Provides the chart grid shell and CSS variables shared by the ECharts canvas\n * and legend rows.\n *\n * The container owns the measurement ref for the full chart area so the legend\n * can cap expanded height relative to the available chart height.\n */\nexport const ChartContainer = ({ children, style }: ChartContainerProps) => {\n const chartRef = useRef<HTMLDivElement>(null);\n const chartContainerHeight = useChartContainerHeight(chartRef);\n const chartContainerStyle = useMemo(\n () =>\n ({\n ...style,\n '--ndl-chart-legend-expanded-max-height':\n chartContainerHeight === undefined\n ? undefined\n : `${Math.floor(\n chartContainerHeight * EXPANDED_LEGEND_MAX_HEIGHT_RATIO,\n )}px`,\n }) as React.CSSProperties,\n [chartContainerHeight, style],\n );\n\n return (\n <div ref={chartRef} className=\"ndl-chart\" style={chartContainerStyle}>\n {children}\n </div>\n );\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"ChartEmpty.js","sourceRoot":"","sources":["../../../src/charts/ChartEmpty.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,gCAAgC;IACtC,GAAG,EAAE,mBAAmB;CAIzB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,OAAO,GAAG,mBAAmB,EAC7B,IAAI,GAAG,MAAM,GACG;IAChB,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,IAAI,IAAC,SAAS,EAAC,4BAA4B,GAAG,EAC/C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,YAAE,OAAO,GAAc,EACvD,MAAM,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Typography } from '@neo4j-ndl/react';\nimport {\n ChartPieIconOutline,\n PresentationChartBarIconOutline,\n PresentationChartLineIconOutline,\n} from '@neo4j-ndl/react/icons';\n\nimport { type ChartEmptyProps } from './utils/chart-types';\n\nconst chartEmptyIcons = {\n bar: PresentationChartBarIconOutline,\n line: PresentationChartLineIconOutline,\n pie: ChartPieIconOutline,\n} satisfies Record<\n NonNullable<ChartEmptyProps['type']>,\n React.ComponentType<{ className?: string }>\n>;\n\nexport function ChartEmpty({\n action,\n message = 'No data available',\n type = 'line',\n}: ChartEmptyProps): React.JSX.Element {\n const Icon = chartEmptyIcons[type];\n\n return (\n <div className=\"ndl-chart-empty-state\">\n <Icon className=\"ndl-chart-empty-state-icon\" />\n <Typography variant=\"body-medium\">{message}</Typography>\n {action}\n </div>\n );\n}\n"]}
1
+ {"version":3,"file":"ChartEmpty.js","sourceRoot":"","sources":["../../../src/charts/ChartEmpty.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,+BAA+B,EAC/B,gCAAgC,GACjC,MAAM,wBAAwB,CAAC;AAIhC,MAAM,eAAe,GAAG;IACtB,GAAG,EAAE,+BAA+B;IACpC,IAAI,EAAE,gCAAgC;IACtC,GAAG,EAAE,mBAAmB;CAIzB,CAAC;AAEF,MAAM,UAAU,UAAU,CAAC,EACzB,MAAM,EACN,OAAO,GAAG,mBAAmB,EAC7B,IAAI,GAAG,MAAM,GACG;IAChB,MAAM,IAAI,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;IAEnC,OAAO,CACL,eAAK,SAAS,EAAC,uBAAuB,aACpC,KAAC,IAAI,IAAC,SAAS,EAAC,4BAA4B,GAAG,EAC/C,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,YAAE,OAAO,GAAc,EACvD,MAAM,IACH,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Typography } from '@neo4j-ndl/react';\nimport {\n ChartPieIconOutline,\n PresentationChartBarIconOutline,\n PresentationChartLineIconOutline,\n} from '@neo4j-ndl/react/icons';\n\nimport { type ChartEmptyProps } from './utils/chart-types';\n\nconst chartEmptyIcons = {\n bar: PresentationChartBarIconOutline,\n line: PresentationChartLineIconOutline,\n pie: ChartPieIconOutline,\n} satisfies Record<\n NonNullable<ChartEmptyProps['type']>,\n React.ComponentType<{ className?: string }>\n>;\n\nexport function ChartEmpty({\n action,\n message = 'No data available',\n type = 'line',\n}: ChartEmptyProps): React.JSX.Element {\n const Icon = chartEmptyIcons[type];\n\n return (\n <div className=\"ndl-chart-empty-state\">\n <Icon className=\"ndl-chart-empty-state-icon\" />\n <Typography variant=\"body-medium\">{message}</Typography>\n {action}\n </div>\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
3
  *
4
4
  * Copyright (c) "Neo4j"
5
5
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"ChartRender.js","sourceRoot":"","sources":["../../../src/charts/ChartRender.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,gBAAgB,IAAI,mBAAmB,EACvC,mB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S,EAAC,kBAAkB,GAAG,CAAC;AACnE,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useNeedleTheme } from '@neo4j-ndl/react';\nimport type { EChartsOption } from 'echarts';\nimport { useEffect, useMemo } from 'react';\n\nimport {\n useChartLifecycle,\n useChartLoading,\n useChartResize,\n} from './hooks/use-chart-instance';\nimport { useChartOption } from './hooks/use-chart-option';\nimport { useChartRefsContext } from './hooks/use-chart-refs';\nimport { useChartZoom } from './hooks/use-chart-zoom';\nimport {\n hasCategoryXAxis as getHasCategoryXAxis,\n hasMarkAreaInSeries,\n} from './utils/build-chart-option';\nimport type { ChartProps } from './utils/chart-types';\nimport { defaultChartSettings } from './utils/defaults';\nimport { normalizeThresholdLines } from './utils/threshold';\nimport {\n mergeDataZoom,\n mergeSeries,\n mergeXAxis,\n mergeYAxis,\n} from './utils/user-option-utils';\n\ntype ChartRenderProps = Omit<ChartProps, 'legend' | 'style'> & {\n onChartOptionChange: (chartOption: EChartsOption | undefined) => void;\n onFirstResizeChange: (isWaitingForFirstResize: boolean) => void;\n};\n\n/**\n * Owns the ECharts instance element and coordinates chart-specific hooks.\n *\n * The component normalizes user props into Needle-themed ECharts options,\n * initializes/resizes the chart instance, applies loading and zoom behavior, and\n * reports derived chart state back to `Chart` for legend rendering.\n */\nexport const ChartRender = ({\n callbacks,\n dataset,\n isChartZoomDisabled = false,\n isLoading,\n onChartOptionChange,\n onFirstResizeChange,\n option: userOption,\n palette,\n series: propsSeries,\n settings = defaultChartSettings,\n xAxis: propXAxis,\n yAxis: propYAxis,\n}: ChartRenderProps) => {\n const { chartEchartRef } = useChartRefsContext();\n const dataZoomOptions = (userOption as EChartsOption)?.dataZoom;\n const toolboxOptions = (userOption as EChartsOption)?.toolbox;\n const { theme } = useNeedleTheme();\n\n const thresholdLines = useMemo(\n () => normalizeThresholdLines(propsSeries),\n [propsSeries],\n );\n const dataZoom = useMemo(\n () =>\n mergeDataZoom(dataZoomOptions, { xAxis: propXAxis, yAxis: propYAxis }),\n [dataZoomOptions, propXAxis, propYAxis],\n );\n const series = useMemo(\n () => mergeSeries(propsSeries, theme, userOption, palette),\n [palette, propsSeries, theme, userOption],\n );\n const xAxis = useMemo(() => mergeXAxis(propXAxis, theme), [propXAxis, theme]);\n const yAxis = useMemo(() => mergeYAxis(propYAxis, theme), [propYAxis, theme]);\n const hasCategoryXAxis = getHasCategoryXAxis(xAxis);\n const hasMarkArea = hasMarkAreaInSeries(series);\n\n /**\n * Hook responsibilities:\n * - `useChartLifecycle` creates/disposes the ECharts instance and updates theme data.\n * - `useChartResize` keeps the canvas sized to its container before first render.\n * - `useChartOption` builds and applies the merged ECharts option.\n * - `useChartZoom` attaches consumer zoom callbacks.\n * - `useChartLoading` synchronizes the loading overlay with chart readiness.\n */\n useChartLifecycle({ palette, theme });\n const { isWaitingForFirstResize } = useChartResize();\n const chartOption = useChartOption({\n dataZoom,\n dataset,\n hasCategoryXAxis,\n hasMarkArea,\n propsSeries,\n series,\n settings,\n thresholdLines,\n toolboxOptions,\n userOption,\n xAxis,\n yAxis,\n });\n useChartZoom({ callbacks, isChartZoomDisabled });\n useChartLoading({\n isLoading,\n isWaitingForFirstResize,\n theme,\n });\n\n useEffect(() => {\n onFirstResizeChange(isWaitingForFirstResize);\n }, [isWaitingForFirstResize, onFirstResizeChange]);\n\n useEffect(() => {\n onChartOptionChange(chartOption);\n }, [chartOption, onChartOptionChange]);\n\n return <div ref={chartEchartRef} className=\"ndl-chart-echart\" />;\n};\n"]}
1
+ {"version":3,"file":"ChartRender.js","sourceRoot":"","sources":["../../../src/charts/ChartRender.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EACL,gBAAgB,IAAI,mBAAmB,EACvC,mBAAmB,GACpB,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AAC5D,OAAO,EACL,aAAa,EACb,WAAW,EACX,UAAU,EACV,UAAU,GACX,MAAM,2BAA2B,CAAC;AAOnC;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,SAAS,EACT,OAAO,EACP,mBAAmB,GAAG,KAAK,EAC3B,SAAS,EACT,mBAAmB,EACnB,mBAAmB,EACnB,MAAM,EAAE,UAAU,EAClB,OAAO,EACP,MAAM,EAAE,WAAW,EACnB,QAAQ,GAAG,oBAAoB,EAC/B,KAAK,EAAE,SAAS,EAChB,KAAK,EAAE,SAAS,GACC,EAAE,EAAE;IACrB,MAAM,EAAE,cAAc,EAAE,GAAG,mBAAmB,EAAE,CAAC;IACjD,MAAM,eAAe,GAAI,UAA4B,aAA5B,UAAU,uBAAV,UAAU,CAAoB,QAAQ,CAAC;IAChE,MAAM,cAAc,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AW;QACX,WAAW;QACX,MAAM;QACN,QAAQ;QACR,cAAc;QACd,cAAc;QACd,UAAU;QACV,KAAK;QACL,KAAK;KACN,CAAC,CAAC;IACH,YAAY,CAAC,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC,CAAC;IACjD,eAAe,CAAC;QACd,SAAS;QACT,uBAAuB;QACvB,KAAK;KACN,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,mBAAmB,CAAC,uBAAuB,CAAC,CAAC;IAC/C,CAAC,EAAE,CAAC,uBAAuB,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEnD,SAAS,CAAC,GAAG,EAAE;QACb,mBAAmB,CAAC,WAAW,CAAC,CAAC;IACnC,CAAC,EAAE,CAAC,WAAW,EAAE,mBAAmB,CAAC,CAAC,CAAC;IAEvC,OAAO,cAAK,GAAG,EAAE,cAAc,EAAE,SAAS,EAAC,kBAAkB,GAAG,CAAC;AACnE,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { useNeedleTheme } from '@neo4j-ndl/react';\nimport type { EChartsOption } from 'echarts';\nimport { useEffect, useMemo } from 'react';\n\nimport {\n useChartLifecycle,\n useChartLoading,\n useChartResize,\n} from './hooks/use-chart-instance';\nimport { useChartOption } from './hooks/use-chart-option';\nimport { useChartRefsContext } from './hooks/use-chart-refs';\nimport { useChartZoom } from './hooks/use-chart-zoom';\nimport {\n hasCategoryXAxis as getHasCategoryXAxis,\n hasMarkAreaInSeries,\n} from './utils/build-chart-option';\nimport type { ChartProps } from './utils/chart-types';\nimport { defaultChartSettings } from './utils/defaults';\nimport { normalizeThresholdLines } from './utils/threshold';\nimport {\n mergeDataZoom,\n mergeSeries,\n mergeXAxis,\n mergeYAxis,\n} from './utils/user-option-utils';\n\ntype ChartRenderProps = Omit<ChartProps, 'legend' | 'style'> & {\n onChartOptionChange: (chartOption: EChartsOption | undefined) => void;\n onFirstResizeChange: (isWaitingForFirstResize: boolean) => void;\n};\n\n/**\n * Owns the ECharts instance element and coordinates chart-specific hooks.\n *\n * The component normalizes user props into Needle-themed ECharts options,\n * initializes/resizes the chart instance, applies loading and zoom behavior, and\n * reports derived chart state back to `Chart` for legend rendering.\n */\nexport const ChartRender = ({\n callbacks,\n dataset,\n isChartZoomDisabled = false,\n isLoading,\n onChartOptionChange,\n onFirstResizeChange,\n option: userOption,\n palette,\n series: propsSeries,\n settings = defaultChartSettings,\n xAxis: propXAxis,\n yAxis: propYAxis,\n}: ChartRenderProps) => {\n const { chartEchartRef } = useChartRefsContext();\n const dataZoomOptions = (userOption as EChartsOption)?.dataZoom;\n const toolboxOptions = (userOption as EChartsOption)?.toolbox;\n const { theme } = useNeedleTheme();\n\n const thresholdLines = useMemo(\n () => normalizeThresholdLines(propsSeries),\n [propsSeries],\n );\n const dataZoom = useMemo(\n () =>\n mergeDataZoom(dataZoomOptions, { xAxis: propXAxis, yAxis: propYAxis }),\n [dataZoomOptions, propXAxis, propYAxis],\n );\n const series = useMemo(\n () => mergeSeries(propsSeries, theme, userOption, palette),\n [palette, propsSeries, theme, userOption],\n );\n const xAxis = useMemo(() => mergeXAxis(propXAxis, theme), [propXAxis, theme]);\n const yAxis = useMemo(() => mergeYAxis(propYAxis, theme), [propYAxis, theme]);\n const hasCategoryXAxis = getHasCategoryXAxis(xAxis);\n const hasMarkArea = hasMarkAreaInSeries(series);\n\n /**\n * Hook responsibilities:\n * - `useChartLifecycle` creates/disposes the ECharts instance and updates theme data.\n * - `useChartResize` keeps the canvas sized to its container before first render.\n * - `useChartOption` builds and applies the merged ECharts option.\n * - `useChartZoom` attaches consumer zoom callbacks.\n * - `useChartLoading` synchronizes the loading overlay with chart readiness.\n */\n useChartLifecycle({ palette, theme });\n const { isWaitingForFirstResize } = useChartResize();\n const chartOption = useChartOption({\n dataZoom,\n dataset,\n hasCategoryXAxis,\n hasMarkArea,\n propsSeries,\n series,\n settings,\n thresholdLines,\n toolboxOptions,\n userOption,\n xAxis,\n yAxis,\n });\n useChartZoom({ callbacks, isChartZoomDisabled });\n useChartLoading({\n isLoading,\n isWaitingForFirstResize,\n theme,\n });\n\n useEffect(() => {\n onFirstResizeChange(isWaitingForFirstResize);\n }, [isWaitingForFirstResize, onFirstResizeChange]);\n\n useEffect(() => {\n onChartOptionChange(chartOption);\n }, [chartOption, onChartOptionChange]);\n\n return <div ref={chartEchartRef} className=\"ndl-chart-echart\" />;\n};\n"]}
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- /**
13
+ /*!
14
14
  *
15
15
  * Copyright (c) "Neo4j"
16
16
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"ChartTooltip.js","sourceRoot":"","sources":["../../../src/charts/ChartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,OAAO,EACP,eAAe,EACf,QAAQ,EACR,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAQpC,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,qBAAqB,CAAC,EAClE,QAAQ,EACR,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,GACe;IAClB,OAAO,CACL,KAAC,OAAO,IACN,MAAM,EA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EAAE,cAAc,EAAE,eAAe,EAAE,GAC7D,YAAY,CAAC;oBAEf,OAAO,CACL,eAEE,SAAS,EAAE,kEAAkE,gBAAgB,EAAE,aAE/F,KAAC,eAAe,IAAC,OAAO,EAAE,gBAAgB,GAAI,EAC9C,KAAC,UAAU,IACT,OAAO,EAAC,aAAa,EACrB,SAAS,EAAC,4DAA4D,YAErE,cAAc,GACJ,EACb,KAAC,UAAU,IACT,OAAO,EAAC,OAAO,EACf,SAAS,EAAC,gEAAgE,YAEzE,eAAe,GACL,KAfR,gBAAgB,EAAE,EAAE,CAgBrB,CACP,CAAC;gBACJ,CAAC,CAAC,IACA,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,SAAS,kBAAkB,CAAC,EAGb;QAHa,EACnD,GAAG,OAEmC,EADnC,SAAS,cAFuC,OAGpD,CADa;IAEZ,OAAO,KAAC,QAAQ,kBAAC,GAAG,EAAE,GAAG,IAAM,SAAS,EAAI,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;IACxD,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;CACzB,CAAC,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n Popover,\n StatusIndicator,\n TextLink,\n Typography,\n} from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n} from './utils/chart-types';\n\nexport const ChartTooltipComponent = function ChartTooltipComponent({\n children,\n isOpen,\n style,\n anchorPosition,\n ref,\n}: ChartTooltipProps) {\n return (\n <Popover\n isOpen={isOpen}\n anchorPosition={anchorPosition}\n placement=\"middle-end-middle-start\"\n >\n <Popover.Content ref={ref} style={style}>\n {children}\n </Popover.Content>\n </Popover>\n );\n};\n\ntype ChartTooltipTitleProps = {\n children: React.ReactNode;\n ref?: React.Ref<HTMLSpanElement>;\n};\n\nconst ChartTooltipTitle = function ChartTooltipTitle({\n children,\n ref,\n}: ChartTooltipTitleProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-title`);\n\n return (\n <Typography ref={ref} variant=\"body-small\" className={classes}>\n {children}\n </Typography>\n );\n};\n\nconst ChartTooltipContent = function ChartTooltipContent({\n leadingElement,\n trailingElement,\n indentSquareColor,\n notifications,\n ref,\n}: ChartTooltipContentProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-content`);\n\n return (\n <div ref={ref} className={classes}>\n <div className=\"ndl-charts-chart-tooltip-content-line\">\n {indentSquareColor && (\n <div\n className=\"ndl-charts-chart-tooltip-content-indent-square\"\n style={{ backgroundColor: indentSquareColor }}\n />\n )}\n {leadingElement && (\n <Typography\n variant={trailingElement ? 'body-medium' : 'label'}\n className=\"ndl-charts-chart-tooltip-content-left-element\"\n >\n {leadingElement}\n </Typography>\n )}\n {trailingElement && (\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-trailing-element\"\n >\n {trailingElement}\n </Typography>\n )}\n </div>\n\n {notifications &&\n notifications.map((notification) => {\n const { id, notificationType, leadingElement, trailingElement } =\n notification;\n\n return (\n <div\n key={`notification-${id}`}\n className={`ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`}\n >\n <StatusIndicator variant={notificationType} />\n <Typography\n variant=\"body-medium\"\n className=\"ndl-charts-chart-tooltip-content-notification-left-element\"\n >\n {leadingElement}\n </Typography>\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-notification-trailing-element\"\n >\n {trailingElement}\n </Typography>\n </div>\n );\n })}\n </div>\n );\n};\n\nconst ChartTooltipLink = function ChartTooltipAction({\n ref,\n ...restProps\n}: React.ComponentProps<typeof TextLink>) {\n return <TextLink ref={ref} {...restProps} />;\n};\n\nconst ChartTooltip = Object.assign(ChartTooltipComponent, {\n Content: ChartTooltipContent,\n Link: ChartTooltipLink,\n Title: ChartTooltipTitle,\n});\n\nexport { ChartTooltip };\n"]}
1
+ {"version":3,"file":"ChartTooltip.js","sourceRoot":"","sources":["../../../src/charts/ChartTooltip.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EACL,OAAO,EACP,eAAe,EACf,QAAQ,EACR,UAAU,GACX,MAAM,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AAQpC,MAAM,CAAC,MAAM,qBAAqB,GAAG,SAAS,qBAAqB,CAAC,EAClE,QAAQ,EACR,MAAM,EACN,KAAK,EACL,cAAc,EACd,GAAG,GACe;IAClB,OAAO,CACL,KAAC,OAAO,IACN,MAAM,EAAE,MAAM,EACd,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAC,yBAAyB,YAEnC,KAAC,OAAO,CAAC,OAAO,IAAC,GAAG,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,YACpC,QAAQ,GACO,GACV,CACX,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,iBAAiB,GAAG,SAAS,iBAAiB,CAAC,EACnD,QAAQ,EACR,GAAG,GACoB;IACvB,MAAM,OAAO,GAAG,UAAU,CAAC,gCAAgC,CAAC,CAAC;IAE7D,OAAO,CACL,KAAC,UAAU,IAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,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A,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,gBAAgB,GAAG,SAAS,kBAAkB,CAAC,EAGb;QAHa,EACnD,GAAG,OAEmC,EADnC,SAAS,cAFuC,OAGpD,CADa;IAEZ,OAAO,KAAC,QAAQ,kBAAC,GAAG,EAAE,GAAG,IAAM,SAAS,EAAI,CAAC;AAC/C,CAAC,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,CAAC,qBAAqB,EAAE;IACxD,OAAO,EAAE,mBAAmB;IAC5B,IAAI,EAAE,gBAAgB;IACtB,KAAK,EAAE,iBAAiB;CACzB,CAAC,CAAC;AAEH,OAAO,EAAE,YAAY,EAAE,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport {\n Popover,\n StatusIndicator,\n TextLink,\n Typography,\n} from '@neo4j-ndl/react';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport {\n type ChartTooltipContentProps,\n type ChartTooltipProps,\n} from './utils/chart-types';\n\nexport const ChartTooltipComponent = function ChartTooltipComponent({\n children,\n isOpen,\n style,\n anchorPosition,\n ref,\n}: ChartTooltipProps) {\n return (\n <Popover\n isOpen={isOpen}\n anchorPosition={anchorPosition}\n placement=\"middle-end-middle-start\"\n >\n <Popover.Content ref={ref} style={style}>\n {children}\n </Popover.Content>\n </Popover>\n );\n};\n\ntype ChartTooltipTitleProps = {\n children: React.ReactNode;\n ref?: React.Ref<HTMLSpanElement>;\n};\n\nconst ChartTooltipTitle = function ChartTooltipTitle({\n children,\n ref,\n}: ChartTooltipTitleProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-title`);\n\n return (\n <Typography ref={ref} variant=\"body-small\" className={classes}>\n {children}\n </Typography>\n );\n};\n\nconst ChartTooltipContent = function ChartTooltipContent({\n leadingElement,\n trailingElement,\n indentSquareColor,\n notifications,\n ref,\n}: ChartTooltipContentProps) {\n const classes = classNames(`ndl-charts-chart-tooltip-content`);\n\n return (\n <div ref={ref} className={classes}>\n <div className=\"ndl-charts-chart-tooltip-content-line\">\n {indentSquareColor && (\n <div\n className=\"ndl-charts-chart-tooltip-content-indent-square\"\n style={{ backgroundColor: indentSquareColor }}\n />\n )}\n {leadingElement && (\n <Typography\n variant={trailingElement ? 'body-medium' : 'label'}\n className=\"ndl-charts-chart-tooltip-content-left-element\"\n >\n {leadingElement}\n </Typography>\n )}\n {trailingElement && (\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-trailing-element\"\n >\n {trailingElement}\n </Typography>\n )}\n </div>\n\n {notifications &&\n notifications.map((notification) => {\n const { id, notificationType, leadingElement, trailingElement } =\n notification;\n\n return (\n <div\n key={`notification-${id}`}\n className={`ndl-charts-chart-tooltip-content-notification ndl-notification-${notificationType}`}\n >\n <StatusIndicator variant={notificationType} />\n <Typography\n variant=\"body-medium\"\n className=\"ndl-charts-chart-tooltip-content-notification-left-element\"\n >\n {leadingElement}\n </Typography>\n <Typography\n variant=\"label\"\n className=\"ndl-charts-chart-tooltip-content-notification-trailing-element\"\n >\n {trailingElement}\n </Typography>\n </div>\n );\n })}\n </div>\n );\n};\n\nconst ChartTooltipLink = function ChartTooltipAction({\n ref,\n ...restProps\n}: React.ComponentProps<typeof TextLink>) {\n return <TextLink ref={ref} {...restProps} />;\n};\n\nconst ChartTooltip = Object.assign(ChartTooltipComponent, {\n Content: ChartTooltipContent,\n Link: ChartTooltipLink,\n Title: ChartTooltipTitle,\n});\n\nexport { ChartTooltip };\n"]}
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
- /**
13
+ /*!
14
14
  *
15
15
  * Copyright (c) "Neo4j"
16
16
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"Legend.js","sourceRoot":"","sources":["../../../src/charts/Legend.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAOiC,EAAE,EAAE;QAPrC,EACrB,SAAS,EACT,MAAM,EACN,aAAa,GAAG,IAAI,EACpB,aAAa,EACb,cAAc,OAEwC,EADnD,SAAS,cANS,2EAOtB,CADa;IAEZ,MAAM,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAAC;QACpD,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,EAAE,eAAe,EAAE,GAAG,uBAAuB,CAAC;QAClD,cAAc,EAAE,sBAAsB;QACtC,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,EAAE,sBAAsB,EAAE,GAAG,mBAAmB,CACpD,sBAAsB,CACvB,CAAC;IAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,MAAM,CAAC,sBAAsB,CAAC,CAAC,MAAM,CACvE,OAAO,CACR,CAAC,MAAM,CAAC;IACT,MAAM,kBAAkB,GAAG,oBAAoB,KAAK,MAAM,CAAC,MAAM,CAAC;IAClE,MAAM,kBAAkB,GAAG,MAAM,C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sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n useLegendHoverHighlight,\n useLegendSelection,\n} from './hooks/use-legend-interactions';\nimport { useLegendVisibility } from './hooks/use-legend-visibility';\nimport { LegendItem } from './LegendItem';\nimport { LegendLayout } from './LegendLayout';\nimport { type CommonProps, type LegendProps } from './utils/chart-types';\n\ntype LegendComponentProps = LegendProps & {\n isLayoutReady?: boolean;\n onLayoutReady?: () => void;\n};\n\n/**\n * Renders the interactive chart legend and keeps legend state synchronized with\n * ECharts.\n *\n * The component owns the React-side selected-series state, mirrors it into the\n * shared ref consumed when rebuilding chart options, and wires item hover/click\n * interactions back to the ECharts instance.\n */\nexport const Legend = ({\n className,\n series,\n isLayoutReady = true,\n onLayoutReady,\n htmlAttributes,\n ...restProps\n}: Omit<CommonProps<'div', LegendComponentProps>, 'ref'>) => {\n const { renderedSelectedSeries } = useLegendSelection({\n series,\n });\n\n const { toggleHighlight } = useLegendHoverHighlight({\n selectedSeries: renderedSelectedSeries,\n series,\n });\n\n const { toggleLegendVisibility } = useLegendVisibility(\n renderedSelectedSeries,\n );\n\n const selectedSeriesLength = Object.values(renderedSelectedSeries).filter(\n Boolean,\n ).length;\n const isAllSeriesVisible = selectedSeriesLength === series.length;\n const hasMoreThanOneItem = series.length > 1;\n\n return (\n <LegendLayout\n className={className}\n isLayoutReady={isLayoutReady}\n itemCount={series.length}\n onLayoutReady={onLayoutReady}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {series.map((currentSeries, index) => (\n <LegendItem\n key={currentSeries.name ?? index}\n name={currentSeries.name}\n color={currentSeries.color}\n hasButtons={hasMoreThanOneItem && currentSeries.name !== undefined}\n onLegendItemMouseEnter={() => toggleHighlight(currentSeries, true)}\n onLegendItemMouseLeave={() => toggleHighlight(currentSeries, false)}\n onLegendItemClick={() => {\n const isOnlyVisible =\n renderedSelectedSeries[currentSeries.name ?? ''] &&\n selectedSeriesLength === 1;\n\n toggleLegendVisibility(\n currentSeries.name,\n isAllSeriesVisible,\n isOnlyVisible,\n );\n }}\n selected={\n !isAllSeriesVisible &&\n renderedSelectedSeries[currentSeries.name ?? '']\n }\n deSelected={\n currentSeries.name === undefined\n ? false\n : !renderedSelectedSeries[currentSeries.name]\n }\n >\n {currentSeries.name ?? `Series ${index}`}\n </LegendItem>\n ))}\n </LegendLayout>\n );\n};\n"]}
1
+ {"version":3,"file":"Legend.js","sourceRoot":"","sources":["../../../src/charts/Legend.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,uBAAuB,EACvB,kBAAkB,GACnB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAQ9C;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,EAOiC,EAAE,EAAE;QAPrC,EACrB,SAAS,EACT,MAAM,EACN,aAAa,GAAG,IAAI,EACpB,aAAa,EACb,cAAc,OAEwC,EADnD,SAAS,cANS,2EAOtB,CADa;IAEZ,MAAM,EAAE,sBAAsB,EAAE,GAAG,kBAAkB,CAAC;QACpD,MAAM;KACP,CAAC,CAAC;IAEH,MAAM,EAAE,eAAe,EAAE,GAAG,uBAAuB,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A,aAAa,CAAC,IAAI,mCAAI,EAAE,CAAC,EAElD,UAAU,EACR,aAAa,CAAC,IAAI,KAAK,SAAS;oBAC9B,CAAC,CAAC,KAAK;oBACP,CAAC,CAAC,CAAC,sBAAsB,CAAC,aAAa,CAAC,IAAI,CAAC,YAGhD,MAAA,aAAa,CAAC,IAAI,mCAAI,UAAU,KAAK,EAAE,IA3BnC,MAAA,aAAa,CAAC,IAAI,mCAAI,KAAK,CA4BrB,CACd,CAAA;SAAA,CAAC,IACW,CAChB,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n useLegendHoverHighlight,\n useLegendSelection,\n} from './hooks/use-legend-interactions';\nimport { useLegendVisibility } from './hooks/use-legend-visibility';\nimport { LegendItem } from './LegendItem';\nimport { LegendLayout } from './LegendLayout';\nimport { type CommonProps, type LegendProps } from './utils/chart-types';\n\ntype LegendComponentProps = LegendProps & {\n isLayoutReady?: boolean;\n onLayoutReady?: () => void;\n};\n\n/**\n * Renders the interactive chart legend and keeps legend state synchronized with\n * ECharts.\n *\n * The component owns the React-side selected-series state, mirrors it into the\n * shared ref consumed when rebuilding chart options, and wires item hover/click\n * interactions back to the ECharts instance.\n */\nexport const Legend = ({\n className,\n series,\n isLayoutReady = true,\n onLayoutReady,\n htmlAttributes,\n ...restProps\n}: Omit<CommonProps<'div', LegendComponentProps>, 'ref'>) => {\n const { renderedSelectedSeries } = useLegendSelection({\n series,\n });\n\n const { toggleHighlight } = useLegendHoverHighlight({\n selectedSeries: renderedSelectedSeries,\n series,\n });\n\n const { toggleLegendVisibility } = useLegendVisibility(\n renderedSelectedSeries,\n );\n\n const selectedSeriesLength = Object.values(renderedSelectedSeries).filter(\n Boolean,\n ).length;\n const isAllSeriesVisible = selectedSeriesLength === series.length;\n const hasMoreThanOneItem = series.length > 1;\n\n return (\n <LegendLayout\n className={className}\n isLayoutReady={isLayoutReady}\n itemCount={series.length}\n onLayoutReady={onLayoutReady}\n htmlAttributes={htmlAttributes}\n {...restProps}\n >\n {series.map((currentSeries, index) => (\n <LegendItem\n key={currentSeries.name ?? index}\n name={currentSeries.name}\n color={currentSeries.color}\n hasButtons={hasMoreThanOneItem && currentSeries.name !== undefined}\n onLegendItemMouseEnter={() => toggleHighlight(currentSeries, true)}\n onLegendItemMouseLeave={() => toggleHighlight(currentSeries, false)}\n onLegendItemClick={() => {\n const isOnlyVisible =\n renderedSelectedSeries[currentSeries.name ?? ''] &&\n selectedSeriesLength === 1;\n\n toggleLegendVisibility(\n currentSeries.name,\n isAllSeriesVisible,\n isOnlyVisible,\n );\n }}\n selected={\n !isAllSeriesVisible &&\n renderedSelectedSeries[currentSeries.name ?? '']\n }\n deSelected={\n currentSeries.name === undefined\n ? false\n : !renderedSelectedSeries[currentSeries.name]\n }\n >\n {currentSeries.name ?? `Series ${index}`}\n </LegendItem>\n ))}\n </LegendLayout>\n );\n};\n"]}
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- /**
13
+ /*!
14
14
  *
15
15
  * Copyright (c) "Neo4j"
16
16
  * Neo4j Sweden AB [http://neo4j.com]
@@ -1 +1 @@
1
- {"version":3,"file":"LegendItem.js","sourceRoot":"","sources":["../../../src/charts/LegendItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;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K,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK;iBACtC,YAGzB,QAAQ,KAAK,IAAI,IAAI,CACpB,KAAC,gBAAgB,IAAC,SAAS,EAAC,wCAAwC,GAAG,CACxE,GACI,EACP,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,4BAA4B,YACrE,QAAQ,GACE,KACH,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/**\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Typography } from '@neo4j-ndl/react';\nimport { CheckIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type LegendItemProps } from './utils/chart-types';\nimport { isThresholdLine } from './utils/threshold';\n\n/**\n * Renders a single legend entry with its series color, selection indicator, and\n * optional button semantics.\n *\n * Threshold-line series are intentionally skipped because they are chart\n * annotations rather than user-toggleable data series.\n */\nexport const LegendItem = ({\n children,\n as,\n className,\n name,\n selected,\n deSelected,\n onLegendItemClick,\n color,\n hasButtons = true,\n ref,\n onLegendItemMouseEnter,\n onLegendItemMouseLeave,\n ...restProps\n}: LegendItemProps) => {\n const Component = as ?? (hasButtons ? 'button' : 'div');\n\n const classes = classNames(\n 'ndl-chart-legend-item',\n {\n 'ndl-chart-legend-item-deselected': deSelected,\n 'ndl-chart-legend-item-selected': selected,\n },\n className,\n );\n\n // We don't want to display threshold lines in the legend\n if (isThresholdLine(name) ?? false) {\n return null;\n }\n\n return (\n <Component\n className={classes}\n ref={ref}\n data-labelname={name}\n title={name}\n onClick={hasButtons ? onLegendItemClick : undefined}\n onMouseEnter={onLegendItemMouseEnter}\n onMouseLeave={onLegendItemMouseLeave}\n {...restProps}\n >\n <span\n className=\"ndl-chart-legend-item-square\"\n style={\n {\n '--ndl-chart-legend-item-color': color,\n backgroundColor: deSelected === true ? 'transparent' : color,\n } as React.CSSProperties\n }\n >\n {selected === true && (\n <CheckIconOutline className=\"ndl-chart-legend-item-square-checkmark\" />\n )}\n </span>\n <Typography variant=\"body-medium\" className=\"ndl-chart-legend-item-text\">\n {children}\n </Typography>\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"LegendItem.js","sourceRoot":"","sources":["../../../src/charts/LegendItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,EAcT,EAAE,EAAE;;QAdK,EACzB,QAAQ,EACR,EAAE,EACF,SAAS,EACT,IAAI,EACJ,QAAQ,EACR,UAAU,EACV,iBAAiB,EACjB,KAAK,EACL,UAAU,GAAG,IAAI,EACjB,GAAG,EACH,sBAAsB,EACtB,sBAAsB,OAEN,EADb,SAAS,cAba,wKAc1B,CADa;IAEZ,MAAM,SAAS,GAAG,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,OAAO,GAAG,UAAU,CACxB,uBAAuB,EACvB;QACE,kCAAkC,EAAE,UAAU;QAC9C,gCAAgC,EAAE,QAAQ;KAC3C,EACD,SAAS,CACV,CAAC;IAEF,yDAAyD;IACzD,IAAI,MAAA,eAAe,CAAC,IAAI,CAAC,mCAAI,KAAK,EAAE,CAAC;QACnC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,MAAC,SAAS,kBACR,SAAS,EAAE,OAAO,EAClB,GAAG,EAAE,GAAG,oBACQ,IAAI,EACpB,KAAK,EAAE,IAAI,EACX,OAAO,EAAE,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,SAAS,EACnD,YAAY,EAAE,sBAAsB,EACpC,YAAY,EAAE,sBAAsB,IAChC,SAAS,eAEb,eACE,SAAS,EAAC,8BAA8B,EACxC,KAAK,EACH;oBACE,+BAA+B,EAAE,KAAK;oBACtC,eAAe,EAAE,UAAU,KAAK,IAAI,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,KAAK;iBACtC,YAGzB,QAAQ,KAAK,IAAI,IAAI,CACpB,KAAC,gBAAgB,IAAC,SAAS,EAAC,wCAAwC,GAAG,CACxE,GACI,EACP,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,EAAC,SAAS,EAAC,4BAA4B,YACrE,QAAQ,GACE,KACH,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Typography } from '@neo4j-ndl/react';\nimport { CheckIconOutline } from '@neo4j-ndl/react/icons';\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type LegendItemProps } from './utils/chart-types';\nimport { isThresholdLine } from './utils/threshold';\n\n/**\n * Renders a single legend entry with its series color, selection indicator, and\n * optional button semantics.\n *\n * Threshold-line series are intentionally skipped because they are chart\n * annotations rather than user-toggleable data series.\n */\nexport const LegendItem = ({\n children,\n as,\n className,\n name,\n selected,\n deSelected,\n onLegendItemClick,\n color,\n hasButtons = true,\n ref,\n onLegendItemMouseEnter,\n onLegendItemMouseLeave,\n ...restProps\n}: LegendItemProps) => {\n const Component = as ?? (hasButtons ? 'button' : 'div');\n\n const classes = classNames(\n 'ndl-chart-legend-item',\n {\n 'ndl-chart-legend-item-deselected': deSelected,\n 'ndl-chart-legend-item-selected': selected,\n },\n className,\n );\n\n // We don't want to display threshold lines in the legend\n if (isThresholdLine(name) ?? false) {\n return null;\n }\n\n return (\n <Component\n className={classes}\n ref={ref}\n data-labelname={name}\n title={name}\n onClick={hasButtons ? onLegendItemClick : undefined}\n onMouseEnter={onLegendItemMouseEnter}\n onMouseLeave={onLegendItemMouseLeave}\n {...restProps}\n >\n <span\n className=\"ndl-chart-legend-item-square\"\n style={\n {\n '--ndl-chart-legend-item-color': color,\n backgroundColor: deSelected === true ? 'transparent' : color,\n } as React.CSSProperties\n }\n >\n {selected === true && (\n <CheckIconOutline className=\"ndl-chart-legend-item-square-checkmark\" />\n )}\n </span>\n <Typography variant=\"body-medium\" className=\"ndl-chart-legend-item-text\">\n {children}\n </Typography>\n </Component>\n );\n};\n"]}
@@ -10,7 +10,7 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  return t;
11
11
  };
12
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
- /**
13
+ /*!
14
14
  *
15
15
  * Copyright (c) "Neo4j"
16
16
  * Neo4j Sweden AB [http://neo4j.com]