@neo4j-ndl/react-charts 2.1.21 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/LICENSES.txt +0 -295
- package/lib/NOTICE.txt +1383 -1392
- package/lib/{esm/charts/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.js} +13 -5
- package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.js +46 -0
- package/lib/{esm/charts/tests/ChartWrapperWithTooltipFormatter.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.js} +12 -13
- package/lib/{esm/index.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js} +13 -2
- package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.js +35 -0
- package/lib/{esm/charts/utils/chart-types.js → cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.js} +10 -2
- package/lib/cjs/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.js +37 -0
- package/lib/cjs/_virtual/_rolldown/runtime.js +44 -0
- package/lib/cjs/charts/Chart.js +121 -111
- package/lib/cjs/charts/Chart.js.map +1 -1
- package/lib/cjs/charts/ChartContainer.js +67 -62
- package/lib/cjs/charts/ChartContainer.js.map +1 -1
- package/lib/cjs/charts/ChartEmpty.js +45 -30
- package/lib/cjs/charts/ChartEmpty.js.map +1 -1
- package/lib/cjs/charts/ChartRender.js +112 -87
- package/lib/cjs/charts/ChartRender.js.map +1 -1
- package/lib/cjs/charts/ChartTooltip.js +111 -65
- package/lib/cjs/charts/ChartTooltip.js.map +1 -1
- package/lib/cjs/charts/Legend.js +81 -69
- package/lib/cjs/charts/Legend.js.map +1 -1
- package/lib/cjs/charts/LegendItem.js +83 -62
- package/lib/cjs/charts/LegendItem.js.map +1 -1
- package/lib/cjs/charts/LegendLayout.js +330 -348
- package/lib/cjs/charts/LegendLayout.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-instance.js +115 -122
- package/lib/cjs/charts/hooks/use-chart-instance.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-option.js +79 -80
- package/lib/cjs/charts/hooks/use-chart-option.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-refs.js +47 -44
- package/lib/cjs/charts/hooks/use-chart-refs.js.map +1 -1
- package/lib/cjs/charts/hooks/use-chart-zoom.js +102 -127
- package/lib/cjs/charts/hooks/use-chart-zoom.js.map +1 -1
- package/lib/cjs/charts/hooks/use-legend-interactions.js +127 -132
- package/lib/cjs/charts/hooks/use-legend-interactions.js.map +1 -1
- package/lib/cjs/charts/hooks/use-legend-series.js +143 -174
- package/lib/cjs/charts/hooks/use-legend-series.js.map +1 -1
- package/lib/cjs/charts/hooks/use-legend-visibility.js +66 -85
- package/lib/cjs/charts/hooks/use-legend-visibility.js.map +1 -1
- package/lib/cjs/charts/index.js +31 -40
- package/lib/cjs/charts/index.js.map +1 -1
- package/lib/cjs/charts/themes/ndl-echarts-theme.js +136 -168
- package/lib/cjs/charts/themes/ndl-echarts-theme.js.map +1 -1
- package/lib/cjs/charts/utils/aria-description.js +150 -214
- package/lib/cjs/charts/utils/aria-description.js.map +1 -1
- package/lib/cjs/charts/utils/build-chart-option.js +166 -174
- package/lib/cjs/charts/utils/build-chart-option.js.map +1 -1
- package/lib/cjs/charts/utils/chart-tooltip-formatter.js +156 -172
- package/lib/cjs/charts/utils/chart-tooltip-formatter.js.map +1 -1
- package/lib/cjs/charts/utils/chart-types.js +25 -20
- package/lib/cjs/charts/utils/chart-types.js.map +1 -1
- package/lib/cjs/charts/utils/defaults.js +69 -67
- package/lib/cjs/charts/utils/defaults.js.map +1 -1
- package/lib/cjs/charts/utils/format-utils.js +55 -66
- package/lib/cjs/charts/utils/format-utils.js.map +1 -1
- package/lib/cjs/charts/utils/legend-layout.js +54 -53
- package/lib/cjs/charts/utils/legend-layout.js.map +1 -1
- package/lib/cjs/charts/utils/legend-utils.js +82 -121
- package/lib/cjs/charts/utils/legend-utils.js.map +1 -1
- package/lib/cjs/charts/utils/scatter-tooltip-points.js +191 -266
- package/lib/cjs/charts/utils/scatter-tooltip-points.js.map +1 -1
- package/lib/cjs/charts/utils/threshold.js +89 -102
- package/lib/cjs/charts/utils/threshold.js.map +1 -1
- package/lib/cjs/charts/utils/user-option-utils.js +419 -347
- package/lib/cjs/charts/utils/user-option-utils.js.map +1 -1
- package/lib/cjs/index.js +31 -35
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/defineProperty.mjs +11 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs +24 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.mjs +12 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.mjs +11 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPrimitive.mjs +13 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/toPropertyKey.mjs +8 -0
- package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/typeof.mjs +10 -0
- package/lib/esm/charts/Chart.mjs +123 -0
- package/lib/esm/charts/Chart.mjs.map +1 -0
- package/lib/esm/charts/ChartContainer.mjs +71 -0
- package/lib/esm/charts/ChartContainer.mjs.map +1 -0
- package/lib/esm/charts/ChartEmpty.mjs +46 -0
- package/lib/esm/charts/ChartEmpty.mjs.map +1 -0
- package/lib/esm/charts/ChartRender.mjs +113 -0
- package/lib/esm/charts/ChartRender.mjs.map +1 -0
- package/lib/esm/charts/ChartTooltip.mjs +109 -0
- package/lib/esm/charts/ChartTooltip.mjs.map +1 -0
- package/lib/esm/charts/Legend.mjs +82 -0
- package/lib/esm/charts/Legend.mjs.map +1 -0
- package/lib/esm/charts/LegendItem.mjs +82 -0
- package/lib/esm/charts/LegendItem.mjs.map +1 -0
- package/lib/esm/charts/LegendLayout.mjs +337 -0
- package/lib/esm/charts/LegendLayout.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-instance.mjs +119 -0
- package/lib/esm/charts/hooks/use-chart-instance.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-option.mjs +79 -0
- package/lib/esm/charts/hooks/use-chart-option.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-refs.mjs +49 -0
- package/lib/esm/charts/hooks/use-chart-refs.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-chart-zoom.mjs +102 -0
- package/lib/esm/charts/hooks/use-chart-zoom.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-legend-interactions.mjs +138 -0
- package/lib/esm/charts/hooks/use-legend-interactions.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-legend-series.mjs +151 -0
- package/lib/esm/charts/hooks/use-legend-series.mjs.map +1 -0
- package/lib/esm/charts/hooks/use-legend-visibility.mjs +67 -0
- package/lib/esm/charts/hooks/use-legend-visibility.mjs.map +1 -0
- package/lib/esm/charts/index.mjs +27 -0
- package/lib/esm/charts/index.mjs.map +1 -0
- package/lib/esm/charts/themes/ndl-echarts-theme.mjs +139 -0
- package/lib/esm/charts/themes/ndl-echarts-theme.mjs.map +1 -0
- package/lib/esm/charts/utils/aria-description.mjs +162 -0
- package/lib/esm/charts/utils/aria-description.mjs.map +1 -0
- package/lib/esm/charts/utils/build-chart-option.mjs +184 -0
- package/lib/esm/charts/utils/build-chart-option.mjs.map +1 -0
- package/lib/esm/charts/utils/chart-tooltip-formatter.mjs +159 -0
- package/lib/esm/charts/utils/chart-tooltip-formatter.mjs.map +1 -0
- package/lib/esm/charts/utils/chart-types.mjs +24 -0
- package/lib/esm/charts/utils/chart-types.mjs.map +1 -0
- package/lib/esm/charts/utils/defaults.mjs +73 -0
- package/lib/esm/charts/utils/defaults.mjs.map +1 -0
- package/lib/esm/charts/utils/format-utils.mjs +61 -0
- package/lib/esm/charts/utils/format-utils.mjs.map +1 -0
- package/lib/esm/charts/utils/legend-layout.mjs +57 -0
- package/lib/esm/charts/utils/legend-layout.mjs.map +1 -0
- package/lib/esm/charts/utils/legend-utils.mjs +90 -0
- package/lib/esm/charts/utils/legend-utils.mjs.map +1 -0
- package/lib/esm/charts/utils/scatter-tooltip-points.mjs +215 -0
- package/lib/esm/charts/utils/scatter-tooltip-points.mjs.map +1 -0
- package/lib/esm/charts/utils/threshold.mjs +92 -0
- package/lib/esm/charts/utils/threshold.mjs.map +1 -0
- package/lib/esm/charts/utils/user-option-utils.mjs +445 -0
- package/lib/esm/charts/utils/user-option-utils.mjs.map +1 -0
- package/lib/esm/index.mjs +27 -0
- package/lib/esm/index.mjs.map +1 -0
- package/package.json +12 -16
- package/skills/ndl-react-charts/SKILL.md +2 -2
- package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js +0 -38
- package/lib/cjs/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
- package/lib/cjs/charts/tests/ChartZoomHarness.js +0 -113
- package/lib/cjs/charts/tests/ChartZoomHarness.js.map +0 -1
- package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js +0 -78
- package/lib/cjs/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
- package/lib/cjs/charts/tests/PieChartWithRerender.js +0 -46
- package/lib/cjs/charts/tests/PieChartWithRerender.js.map +0 -1
- package/lib/cjs/charts/tests/chart-test-utils.js +0 -527
- package/lib/cjs/charts/tests/chart-test-utils.js.map +0 -1
- package/lib/esm/charts/Chart.js +0 -114
- package/lib/esm/charts/Chart.js.map +0 -1
- package/lib/esm/charts/ChartContainer.js +0 -67
- package/lib/esm/charts/ChartContainer.js.map +0 -1
- package/lib/esm/charts/ChartEmpty.js +0 -33
- package/lib/esm/charts/ChartEmpty.js.map +0 -1
- package/lib/esm/charts/ChartRender.js +0 -89
- package/lib/esm/charts/ChartRender.js.map +0 -1
- package/lib/esm/charts/ChartTooltip.js +0 -64
- package/lib/esm/charts/ChartTooltip.js.map +0 -1
- package/lib/esm/charts/Legend.js +0 -71
- package/lib/esm/charts/Legend.js.map +0 -1
- package/lib/esm/charts/LegendItem.js +0 -61
- package/lib/esm/charts/LegendItem.js.map +0 -1
- package/lib/esm/charts/LegendLayout.js +0 -323
- package/lib/esm/charts/LegendLayout.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-instance.js +0 -128
- package/lib/esm/charts/hooks/use-chart-instance.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-option.js +0 -82
- package/lib/esm/charts/hooks/use-chart-option.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-refs.js +0 -48
- package/lib/esm/charts/hooks/use-chart-refs.js.map +0 -1
- package/lib/esm/charts/hooks/use-chart-zoom.js +0 -129
- package/lib/esm/charts/hooks/use-chart-zoom.js.map +0 -1
- package/lib/esm/charts/hooks/use-legend-interactions.js +0 -145
- package/lib/esm/charts/hooks/use-legend-interactions.js.map +0 -1
- package/lib/esm/charts/hooks/use-legend-series.js +0 -184
- package/lib/esm/charts/hooks/use-legend-series.js.map +0 -1
- package/lib/esm/charts/hooks/use-legend-visibility.js +0 -87
- package/lib/esm/charts/hooks/use-legend-visibility.js.map +0 -1
- package/lib/esm/charts/index.js.map +0 -1
- package/lib/esm/charts/tests/ChartWrapperWithTooltipFormatter.js.map +0 -1
- package/lib/esm/charts/tests/ChartZoomHarness.js +0 -109
- package/lib/esm/charts/tests/ChartZoomHarness.js.map +0 -1
- package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js +0 -74
- package/lib/esm/charts/tests/HorizontalBarWithVerticalSlider.js.map +0 -1
- package/lib/esm/charts/tests/PieChartWithRerender.js +0 -43
- package/lib/esm/charts/tests/PieChartWithRerender.js.map +0 -1
- package/lib/esm/charts/tests/chart-test-utils.js +0 -500
- package/lib/esm/charts/tests/chart-test-utils.js.map +0 -1
- package/lib/esm/charts/themes/ndl-echarts-theme.js +0 -172
- package/lib/esm/charts/themes/ndl-echarts-theme.js.map +0 -1
- package/lib/esm/charts/utils/aria-description.js +0 -228
- package/lib/esm/charts/utils/aria-description.js.map +0 -1
- package/lib/esm/charts/utils/build-chart-option.js +0 -193
- package/lib/esm/charts/utils/build-chart-option.js.map +0 -1
- package/lib/esm/charts/utils/chart-tooltip-formatter.js +0 -177
- package/lib/esm/charts/utils/chart-tooltip-formatter.js.map +0 -1
- package/lib/esm/charts/utils/chart-types.js.map +0 -1
- package/lib/esm/charts/utils/defaults.js +0 -73
- package/lib/esm/charts/utils/defaults.js.map +0 -1
- package/lib/esm/charts/utils/format-utils.js +0 -74
- package/lib/esm/charts/utils/format-utils.js.map +0 -1
- package/lib/esm/charts/utils/legend-layout.js +0 -59
- package/lib/esm/charts/utils/legend-layout.js.map +0 -1
- package/lib/esm/charts/utils/legend-utils.js +0 -131
- package/lib/esm/charts/utils/legend-utils.js.map +0 -1
- package/lib/esm/charts/utils/scatter-tooltip-points.js +0 -291
- package/lib/esm/charts/utils/scatter-tooltip-points.js.map +0 -1
- package/lib/esm/charts/utils/threshold.js +0 -106
- package/lib/esm/charts/utils/threshold.js.map +0 -1
- package/lib/esm/charts/utils/user-option-utils.js +0 -374
- package/lib/esm/charts/utils/user-option-utils.js.map +0 -1
- package/lib/esm/index.js.map +0 -1
|
@@ -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,yCAGoB;AACpB,iDAAsE;AAEtE,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,aAAM,CAAC,WAAW,CAAC,CAAC;AAoBxD,MAAM,gBAAgB,GAAG,CACvB,OAAqC,EAClB,EA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DAAyD;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 {\n defaultThresholdLineSeriesOption,\n tooltipExtraCssText,\n} from './defaults';\nimport { formatNumberEnUS, formatTimeAxisDate } 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\ntype AxisTooltipFormatterParams = {\n isTruncated?: () => boolean;\n name: string;\n};\n\ntype AxisTooltipOption = NonNullable<SingleXAxisOption['tooltip']> & {\n formatter?: (params: AxisTooltipFormatterParams) => string | undefined;\n};\n\nconst mergeAxisTooltip = (\n tooltip: SingleXAxisOption['tooltip'],\n): AxisTooltipOption => ({\n formatter: (params) =>\n params.isTruncated?.() === true\n ? renderToString(\n <span className=\"ndl-tooltip-content ndl-tooltip-content-simple\">\n {params.name}\n </span>,\n )\n : undefined,\n show: true,\n ...tooltip,\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: tooltipExtraCssText,\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n const sliceName = firstParam?.value[0] ?? firstParam.seriesName;\n // Only dates are formatted, so a numeric name like a year keeps\n // its digits as they are.\n const sliceLabel =\n sliceName instanceof Date\n ? formatTimeAxisDate(sliceName)\n : sliceName;\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Content\n key={sliceLabel}\n leadingElement={sliceLabel}\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 === 'scatter') {\n // `emptyCircle` always fills with white, so the interior is a real\n // circle painted with the theme's surface color. The ring is the border,\n // drawn on top of that fill. Hover replaces the interior with the\n // series color and leaves the ring in place. `focus` stays 'none':\n // any other value blurs the series, and blur wins over emphasis, so\n // the circle would never fill.\n const interiorColor = tokens.theme[theme].color.neutral.bg.weak;\n\n return {\n color,\n symbol: 'circle',\n symbolSize: 10,\n ...option,\n itemStyle: {\n borderColor: color,\n borderWidth: 2,\n color: interiorColor,\n ...option.itemStyle,\n },\n emphasis: {\n disabled: false,\n focus: 'none',\n ...option.emphasis,\n itemStyle: {\n borderColor: color,\n color,\n ...option.emphasis?.itemStyle,\n },\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: tooltipExtraCssText,\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 tooltip: mergeAxisTooltip(xAxis.tooltip),\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 tooltip: mergeAxisTooltip(yAxis.tooltip),\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\nconst VERTICAL_SLIDER_RIGHT = 10;\nconst VERTICAL_SLIDER_WIDTH = 28;\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 ? {\n right: VERTICAL_SLIDER_RIGHT,\n textStyle: {\n overflow: 'truncate' as const,\n width: 2 * (VERTICAL_SLIDER_RIGHT + VERTICAL_SLIDER_WIDTH / 2),\n },\n width: VERTICAL_SLIDER_WIDTH,\n }\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","names":["tokens","renderToString","defaultThresholdLineSeriesOption","getTooltipValueFormatter","tooltipExtraCssText","formatTimeAxisDate","ChartTooltip","formatNumberEnUS"],"sources":["../../../../src/charts/utils/user-option-utils.tsx"],"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 {\n defaultThresholdLineSeriesOption,\n tooltipExtraCssText,\n} from './defaults';\nimport { formatNumberEnUS, formatTimeAxisDate } 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\ntype AxisTooltipFormatterParams = {\n isTruncated?: () => boolean;\n name: string;\n};\n\ntype AxisTooltipOption = NonNullable<SingleXAxisOption['tooltip']> & {\n formatter?: (params: AxisTooltipFormatterParams) => string | undefined;\n};\n\nconst mergeAxisTooltip = (\n tooltip: SingleXAxisOption['tooltip'],\n): AxisTooltipOption => ({\n formatter: (params) =>\n params.isTruncated?.() === true\n ? renderToString(\n <span className=\"ndl-tooltip-content ndl-tooltip-content-simple\">\n {params.name}\n </span>,\n )\n : undefined,\n show: true,\n ...tooltip,\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: tooltipExtraCssText,\n formatter: function (params: unknown) {\n const paramsArray = Array.isArray(params) ? params : [params];\n const firstParam = paramsArray[0];\n const sliceName = firstParam?.value[0] ?? firstParam.seriesName;\n // Only dates are formatted, so a numeric name like a year keeps\n // its digits as they are.\n const sliceLabel =\n sliceName instanceof Date\n ? formatTimeAxisDate(sliceName)\n : sliceName;\n return `${renderToString(\n <span className=\"ndl-charts-chart-tooltip\">\n <ChartTooltip.Content\n key={sliceLabel}\n leadingElement={sliceLabel}\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 === 'scatter') {\n // `emptyCircle` always fills with white, so the interior is a real\n // circle painted with the theme's surface color. The ring is the border,\n // drawn on top of that fill. Hover replaces the interior with the\n // series color and leaves the ring in place. `focus` stays 'none':\n // any other value blurs the series, and blur wins over emphasis, so\n // the circle would never fill.\n const interiorColor = tokens.theme[theme].color.neutral.bg.weak;\n\n return {\n color,\n symbol: 'circle',\n symbolSize: 10,\n ...option,\n itemStyle: {\n borderColor: color,\n borderWidth: 2,\n color: interiorColor,\n ...option.itemStyle,\n },\n emphasis: {\n disabled: false,\n focus: 'none',\n ...option.emphasis,\n itemStyle: {\n borderColor: color,\n color,\n ...option.emphasis?.itemStyle,\n },\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: tooltipExtraCssText,\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 tooltip: mergeAxisTooltip(xAxis.tooltip),\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 tooltip: mergeAxisTooltip(yAxis.tooltip),\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\nconst VERTICAL_SLIDER_RIGHT = 10;\nconst VERTICAL_SLIDER_WIDTH = 28;\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 ? {\n right: VERTICAL_SLIDER_RIGHT,\n textStyle: {\n overflow: 'truncate' as const,\n width: 2 * (VERTICAL_SLIDER_RIGHT + VERTICAL_SLIDER_WIDTH / 2),\n },\n width: VERTICAL_SLIDER_WIDTH,\n }\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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuCA,MAAM,gBAAgB,OAAO,OAAOA,gBAAAA,OAAO,WAAW;AAoBtD,MAAM,oBACJ,YAAA,sBAAA,QAA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AO,SAAS,KAAK,OAAO,MAAM,OAAO,IAAI,SAAS,KAAA;AAC/D;AAEA,MAAa,gBACX,SACA,YAC6B;;CAC7B,IAAI,MAAM,QAAQ,OAAO,GACvB,OAAO,QAAQ,KAAK,WAClB,aAAa,QAAQ,OAAO,CAC9B;CAMF,MAAM,UAAU,sBAAA,YAAA,QAAA,YAAA,KAAA,IAAA,KAAA,IAAsB,QAAS,QAAQ;CAGvD,MAAM,eADJ,QAAQ,aAAa,SAAS,KAAK,QAAQ,aAAa,SAAS,IAE/D,QAAQ,aAAa,SAAS,KAAK,QAAQ,eAC3C;CACJ,MAAM,eACJ,QAAQ,aAAa,SAAS,KAAK,QAAQ;CAC7C,MAAM,aAAa,0BACjB,SACA,cACA,YACF;CAEA,OAAO,EACL,SAAS,EACP,UAAA,sBAAA,QAAA,sBAAA,QAAA,sBAAA,QAAA,sBAAA,QAAA,CAAA,GACM,eAAe,KAAA,KAAa,EAAE,WAAW,CAAA,GACzC,iBAAiB,SAAS,EAAE,YAAY,aAAa,CAAA,GAAA,CAAA,GAAA,EACzD,YAAY,aAAA,GAAA,YAAA,QAAA,YAAA,KAAA,MAAA,mBACT,QAAS,aAAA,QAAA,qBAAA,KAAA,IAAA,KAAA,IAAA,iBAAS,QAAA,GAAA,CAAA,GAAA;EACrB,MAAM;GAGJ,MAAM;GACN,MAAM;EACR;EACA,MAAM;CACR,CAAA,EACF,EACF;AACF"}
|
package/lib/cjs/index.js
CHANGED
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
Object.defineProperties(exports, {
|
|
3
|
+
__esModule: { value: true },
|
|
4
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
5
|
+
});
|
|
6
|
+
const require_charts_utils_defaults = require("./charts/utils/defaults.js");
|
|
7
|
+
const require_charts_Chart = require("./charts/Chart.js");
|
|
8
|
+
const require_charts_ChartEmpty = require("./charts/ChartEmpty.js");
|
|
9
|
+
// src/index.ts
|
|
17
10
|
/*!
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
11
|
+
*
|
|
12
|
+
* Copyright (c) "Neo4j"
|
|
13
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
14
|
+
*
|
|
15
|
+
* This file is part of Neo4j.
|
|
16
|
+
*
|
|
17
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
18
|
+
* it under the terms of the GNU General Public License as published by
|
|
19
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
20
|
+
* (at your option) any later version.
|
|
21
|
+
*
|
|
22
|
+
* This program is distributed in the hope that it will be useful,
|
|
23
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
24
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
25
|
+
* GNU General Public License for more details.
|
|
26
|
+
*
|
|
27
|
+
* You should have received a copy of the GNU General Public License
|
|
28
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
29
|
+
*/
|
|
30
|
+
exports.Chart = require_charts_Chart.Chart;
|
|
31
|
+
exports.ChartEmpty = require_charts_ChartEmpty.ChartEmpty;
|
|
32
|
+
exports.defaultThresholdLineSeriesOption = require_charts_utils_defaults.defaultThresholdLineSeriesOption;
|
|
33
|
+
|
|
38
34
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/index.ts"],"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"],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import toPropertyKey from "./toPropertyKey.mjs";
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/defineProperty.js
|
|
3
|
+
function _defineProperty(e, r, t) {
|
|
4
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
5
|
+
value: t,
|
|
6
|
+
enumerable: !0,
|
|
7
|
+
configurable: !0,
|
|
8
|
+
writable: !0
|
|
9
|
+
}) : e[r] = t, e;
|
|
10
|
+
}
|
|
11
|
+
export { _defineProperty as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import _defineProperty from "./defineProperty.mjs";
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectSpread2.js
|
|
3
|
+
function ownKeys(e, r) {
|
|
4
|
+
var t = Object.keys(e);
|
|
5
|
+
if (Object.getOwnPropertySymbols) {
|
|
6
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
7
|
+
r && (o = o.filter(function(r) {
|
|
8
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
9
|
+
})), t.push.apply(t, o);
|
|
10
|
+
}
|
|
11
|
+
return t;
|
|
12
|
+
}
|
|
13
|
+
function _objectSpread2(e) {
|
|
14
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
15
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
16
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
17
|
+
_defineProperty(e, r, t[r]);
|
|
18
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
19
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return e;
|
|
23
|
+
}
|
|
24
|
+
export { _objectSpread2 as default };
|
package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import _objectWithoutPropertiesLoose from "./objectWithoutPropertiesLoose.mjs";
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutProperties.js
|
|
3
|
+
function _objectWithoutProperties(e, t) {
|
|
4
|
+
if (null == e) return {};
|
|
5
|
+
var o, r, i = _objectWithoutPropertiesLoose(e, t);
|
|
6
|
+
if (Object.getOwnPropertySymbols) {
|
|
7
|
+
var s = Object.getOwnPropertySymbols(e);
|
|
8
|
+
for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
9
|
+
}
|
|
10
|
+
return i;
|
|
11
|
+
}
|
|
12
|
+
export { _objectWithoutProperties as default };
|
package/lib/esm/_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.mjs
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/objectWithoutPropertiesLoose.js
|
|
2
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
3
|
+
if (null == r) return {};
|
|
4
|
+
var t = {};
|
|
5
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
6
|
+
if (e.includes(n)) continue;
|
|
7
|
+
t[n] = r[n];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
}
|
|
11
|
+
export { _objectWithoutPropertiesLoose as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import _typeof from "./typeof.mjs";
|
|
2
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPrimitive.js
|
|
3
|
+
function toPrimitive(t, r) {
|
|
4
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
5
|
+
var e = t[Symbol.toPrimitive];
|
|
6
|
+
if (void 0 !== e) {
|
|
7
|
+
var i = e.call(t, r || "default");
|
|
8
|
+
if ("object" != _typeof(i)) return i;
|
|
9
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
10
|
+
}
|
|
11
|
+
return ("string" === r ? String : Number)(t);
|
|
12
|
+
}
|
|
13
|
+
export { toPrimitive as default };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import _typeof from "./typeof.mjs";
|
|
2
|
+
import toPrimitive from "./toPrimitive.mjs";
|
|
3
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/toPropertyKey.js
|
|
4
|
+
function toPropertyKey(t) {
|
|
5
|
+
var i = toPrimitive(t, "string");
|
|
6
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
7
|
+
}
|
|
8
|
+
export { toPropertyKey as default };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
// \0@oxc-project+runtime@0.156.0/helpers/esm/typeof.js
|
|
2
|
+
function _typeof(o) {
|
|
3
|
+
"@babel/helpers - typeof";
|
|
4
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
5
|
+
return typeof o;
|
|
6
|
+
} : function(o) {
|
|
7
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
8
|
+
}, _typeof(o);
|
|
9
|
+
}
|
|
10
|
+
export { _typeof as default };
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import { ChartContainer } from "./ChartContainer.mjs";
|
|
2
|
+
import { ChartRender } from "./ChartRender.mjs";
|
|
3
|
+
import { ChartRefsProvider } from "./hooks/use-chart-refs.mjs";
|
|
4
|
+
import { useLegendSeries } from "./hooks/use-legend-series.mjs";
|
|
5
|
+
import { Legend } from "./Legend.mjs";
|
|
6
|
+
import _objectWithoutProperties from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectWithoutProperties.mjs";
|
|
7
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs";
|
|
8
|
+
import { useCallback, useEffect, useState } from "react";
|
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
10
|
+
// src/charts/Chart.tsx
|
|
11
|
+
const _excluded = ["style", "legend"];
|
|
12
|
+
/*!
|
|
13
|
+
*
|
|
14
|
+
* Copyright (c) "Neo4j"
|
|
15
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
16
|
+
*
|
|
17
|
+
* This file is part of Neo4j.
|
|
18
|
+
*
|
|
19
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
20
|
+
* it under the terms of the GNU General Public License as published by
|
|
21
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
22
|
+
* (at your option) any later version.
|
|
23
|
+
*
|
|
24
|
+
* This program is distributed in the hope that it will be useful,
|
|
25
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
26
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
27
|
+
* GNU General Public License for more details.
|
|
28
|
+
*
|
|
29
|
+
* You should have received a copy of the GNU General Public License
|
|
30
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
31
|
+
*/
|
|
32
|
+
/**
|
|
33
|
+
* Bridges the rendered ECharts option into the React legend.
|
|
34
|
+
*
|
|
35
|
+
* `useLegendSeries` reads the current chart option and ECharts color state to
|
|
36
|
+
* derive the legend rows. Rendering is deferred until the chart has completed
|
|
37
|
+
* its first resize so the legend does not measure against an uninitialized
|
|
38
|
+
* chart instance.
|
|
39
|
+
*/
|
|
40
|
+
const ChartLegend = ({ chartOption, isLayoutReady, isWaitingForFirstResize, onLayoutReady }) => {
|
|
41
|
+
const legendSeries = useLegendSeries({
|
|
42
|
+
chartOption,
|
|
43
|
+
isWaitingForFirstResize
|
|
44
|
+
});
|
|
45
|
+
if (isWaitingForFirstResize) return /* @__PURE__ */ jsx("div", {
|
|
46
|
+
"aria-hidden": "true",
|
|
47
|
+
className: "ndl-chart-legend-container ndl-chart-legend-container-placeholder"
|
|
48
|
+
});
|
|
49
|
+
return /* @__PURE__ */ jsx(Legend, {
|
|
50
|
+
series: legendSeries !== null && legendSeries !== void 0 ? legendSeries : [],
|
|
51
|
+
onLayoutReady,
|
|
52
|
+
isLayoutReady
|
|
53
|
+
});
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* A chart component powered by Apache ECharts with Needle's customization and theming.
|
|
57
|
+
*
|
|
58
|
+
* The `Chart` component fills 100% of its parent's width and height. Because it
|
|
59
|
+
* relies on the container's `clientHeight` to size the canvas, **the parent element
|
|
60
|
+
* must have an explicit height** (e.g. a fixed px/rem value or a viewport unit).
|
|
61
|
+
*
|
|
62
|
+
* @example
|
|
63
|
+
* ```tsx
|
|
64
|
+
* <div style={{ height: '350px' }}>
|
|
65
|
+
* <Chart dataset={dataset} series={series} xAxis={xAxis} yAxis={yAxis} />
|
|
66
|
+
* </div>
|
|
67
|
+
* ```
|
|
68
|
+
*
|
|
69
|
+
* @remarks
|
|
70
|
+
* **Data zoom sliders.** A `dataZoom` slider passed through `option` targets
|
|
71
|
+
* the x-axis unless it is bound to an axis explicitly, so on a horizontal bar
|
|
72
|
+
* chart it zooms the value axis rather than the categories. Bind the slider to
|
|
73
|
+
* the category axis with `yAxisIndex: [0]` (or set `orient: 'vertical'`) to
|
|
74
|
+
* page through the bars instead; Needle then lays the slider out vertically on
|
|
75
|
+
* the right of the chart and reserves grid space for it. Sliders that target a
|
|
76
|
+
* continuous (`value`, `time`, or `log`) axis default to `filterMode: 'none'`
|
|
77
|
+
* so out-of-window data is clipped rather than removed, while category-axis
|
|
78
|
+
* sliders keep ECharts' `'filter'` default so the opposite value axis rescales
|
|
79
|
+
* to the visible data.
|
|
80
|
+
*
|
|
81
|
+
* **Drag-to-zoom.** Dragging in the plot area zooms the axes your `dataZoom`
|
|
82
|
+
* config targets: entries bound to a y-axis (`yAxisIndex` or
|
|
83
|
+
* `orient: 'vertical'`) make the drag select a y band, entries on both axes
|
|
84
|
+
* make it select a rectangle, and without any `dataZoom` config the drag zooms
|
|
85
|
+
* the x-axis. Set `toolbox.feature.dataZoom` through `option` to override the
|
|
86
|
+
* derived axes explicitly. When every drag-targeted axis is continuous the
|
|
87
|
+
* drag defaults to `filterMode: 'none'`, matching the slider rule above.
|
|
88
|
+
*
|
|
89
|
+
* **Axis-label tooltips.** Hovering a truncated axis label shows its full text
|
|
90
|
+
* in a tooltip. Set `xAxis.tooltip.show` or `yAxis.tooltip.show` to `false` to
|
|
91
|
+
* disable this behavior for an axis.
|
|
92
|
+
*/
|
|
93
|
+
const Chart = (_ref) => {
|
|
94
|
+
let { style, legend } = _ref, chartProps = _objectWithoutProperties(_ref, _excluded);
|
|
95
|
+
const [isWaitingForFirstResize, setIsWaitingForFirstResize] = useState(true);
|
|
96
|
+
const [chartOption, setChartOption] = useState();
|
|
97
|
+
const [isLegendLayoutReady, setIsLegendLayoutReady] = useState(!(legend === null || legend === void 0 ? void 0 : legend.isVisible));
|
|
98
|
+
const handleLegendLayoutReady = useCallback(() => {
|
|
99
|
+
setIsLegendLayoutReady(true);
|
|
100
|
+
}, []);
|
|
101
|
+
useEffect(() => {
|
|
102
|
+
if (!(legend === null || legend === void 0 ? void 0 : legend.isVisible)) setIsLegendLayoutReady(true);
|
|
103
|
+
}, [legend === null || legend === void 0 ? void 0 : legend.isVisible]);
|
|
104
|
+
const chartLayoutClassName = (legend === null || legend === void 0 ? void 0 : legend.isVisible) && !isLegendLayoutReady ? "ndl-chart-layout ndl-chart-layout-hidden" : "ndl-chart-layout";
|
|
105
|
+
return /* @__PURE__ */ jsx(ChartRefsProvider, { children: /* @__PURE__ */ jsxs(ChartContainer, {
|
|
106
|
+
style,
|
|
107
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
108
|
+
className: chartLayoutClassName,
|
|
109
|
+
children: /* @__PURE__ */ jsx(ChartRender, _objectSpread2(_objectSpread2({}, chartProps), {}, {
|
|
110
|
+
onChartOptionChange: setChartOption,
|
|
111
|
+
onFirstResizeChange: setIsWaitingForFirstResize
|
|
112
|
+
}))
|
|
113
|
+
}), (legend === null || legend === void 0 ? void 0 : legend.isVisible) && /* @__PURE__ */ jsx(ChartLegend, {
|
|
114
|
+
chartOption,
|
|
115
|
+
isLayoutReady: isLegendLayoutReady,
|
|
116
|
+
isWaitingForFirstResize,
|
|
117
|
+
onLayoutReady: handleLegendLayoutReady
|
|
118
|
+
})]
|
|
119
|
+
}) });
|
|
120
|
+
};
|
|
121
|
+
export { Chart };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=Chart.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.mjs","names":[],"sources":["../../../src/charts/Chart.tsx"],"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 *\n * **Axis-label tooltips.** Hovering a truncated axis label shows its full text\n * in a tooltip. Set `xAxis.tooltip.show` or `yAxis.tooltip.show` to `false` to\n * disable this behavior for an axis.\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(\n !legend?.isVisible,\n );\n\n const handleLegendLayoutReady = useCallback(() => {\n setIsLegendLayoutReady(true);\n }, []);\n\n useEffect(() => {\n if (!legend?.isVisible) {\n setIsLegendLayoutReady(true);\n }\n }, [legend?.isVisible]);\n\n const chartLayoutClassName =\n legend?.isVisible && !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?.isVisible && (\n <ChartLegend\n chartOption={chartOption}\n isLayoutReady={isLegendLayoutReady}\n isWaitingForFirstResize={isWaitingForFirstResize}\n onLayoutReady={handleLegendLayoutReady}\n />\n )}\n </ChartContainer>\n </ChartRefsProvider>\n );\n};\n"],"mappings":";;;;;;;;;;AAiHwB,MAAA,YAAA,CAAA,SAAO,QAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAnE/B,MAAM,eAAe,EACnB,aACA,eACA,yBACA,oBACsB;CACtB,MAAM,eAAe,gBAAgB;EACnC;EACA;CACF,CAAC;CAED,IAAI,yBACF,OACE,oBAAC,OAAD;EACE,eAAY;EACZ,WAAU;CACX,CAAA;CAIL,OACE,oBAAC,QAAD;EACE,QAAQ,iBAAA,QAAA,iBAAA,KAAA,IAAA,eAAgB,CAAC;EACV;EACA;CAChB,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCA,MAAa,SAAS,SAAiD;CAAjD,IAAA,EAAE,OAAO,WAAA,MAAW,aAAA,yBAAA,MAAA,SAAA;CACxC,MAAM,CAAC,yBAAyB,8BAA8B,SAAS,IAAI;CAC3E,MAAM,CAAC,aAAa,kBAAkB,SAAwB;CAC9D,MAAM,CAAC,qBAAqB,0BAA0B,SACpD,EAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAC,OAAQ,UACX;CAEA,MAAM,0BAA0B,kBAAkB;EAChD,uBAAuB,IAAI;CAC7B,GAAG,CAAC,CAAC;CAEL,gBAAgB;EACd,IAAI,EAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAC,OAAQ,YACX,uBAAuB,IAAI;CAE/B,GAAG,CAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IAAC,OAAQ,SAAS,CAAC;CAEtB,MAAM,wBAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IACJ,OAAQ,cAAa,CAAC,sBAClB,6CACA;CAEN,OACE,oBAAC,mBAAD,EAAA,UACE,qBAAC,gBAAD;EAAuB;EAAvB,UAAA,CACE,oBAAC,OAAD;GAAK,WAAW;GACd,UAAA,oBAAC,aAAA,eAAA,eAAA,CAAA,GACK,UAAA,GAAA,CAAA,GAAA;IACJ,qBAAqB;IACrB,qBAAqB;GACtB,CAAA,CAAA;EACE,CAAA,IAAA,WAAA,QAAA,WAAA,KAAA,IAAA,KAAA,IACJ,OAAQ,cACP,oBAAC,aAAD;GACe;GACb,eAAe;GACU;GACzB,eAAe;EAChB,CAAA,CAEW;CACC,CAAA,EAAA,CAAA;AAEvB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _objectSpread2 from "../_virtual/_@oxc-project_runtime@0.156.0/helpers/esm/objectSpread2.mjs";
|
|
2
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/charts/ChartContainer.tsx
|
|
5
|
+
/*!
|
|
6
|
+
*
|
|
7
|
+
* Copyright (c) "Neo4j"
|
|
8
|
+
* Neo4j Sweden AB [http://neo4j.com]
|
|
9
|
+
*
|
|
10
|
+
* This file is part of Neo4j.
|
|
11
|
+
*
|
|
12
|
+
* Neo4j is free software: you can redistribute it and/or modify
|
|
13
|
+
* it under the terms of the GNU General Public License as published by
|
|
14
|
+
* the Free Software Foundation, either version 3 of the License, or
|
|
15
|
+
* (at your option) any later version.
|
|
16
|
+
*
|
|
17
|
+
* This program is distributed in the hope that it will be useful,
|
|
18
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
19
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
20
|
+
* GNU General Public License for more details.
|
|
21
|
+
*
|
|
22
|
+
* You should have received a copy of the GNU General Public License
|
|
23
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
24
|
+
*/
|
|
25
|
+
const EXPANDED_LEGEND_MAX_HEIGHT_RATIO = .3;
|
|
26
|
+
/**
|
|
27
|
+
* Tracks the outer chart container height.
|
|
28
|
+
*
|
|
29
|
+
* The measured height is used to expose CSS sizing data to descendants, most
|
|
30
|
+
* notably the expanded legend max height. A ResizeObserver keeps the value in
|
|
31
|
+
* sync with parent layout changes.
|
|
32
|
+
*/
|
|
33
|
+
const useChartContainerHeight = (chartRef) => {
|
|
34
|
+
const [chartContainerHeight, setChartContainerHeight] = useState();
|
|
35
|
+
const updateChartContainerHeight = useCallback(() => {
|
|
36
|
+
var _chartRef$current;
|
|
37
|
+
setChartContainerHeight((_chartRef$current = chartRef.current) === null || _chartRef$current === void 0 ? void 0 : _chartRef$current.clientHeight);
|
|
38
|
+
}, [chartRef]);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
updateChartContainerHeight();
|
|
41
|
+
const chartContainer = chartRef.current;
|
|
42
|
+
if (!chartContainer) return;
|
|
43
|
+
const resizeObserver = new ResizeObserver(updateChartContainerHeight);
|
|
44
|
+
resizeObserver.observe(chartContainer);
|
|
45
|
+
return () => {
|
|
46
|
+
resizeObserver.disconnect();
|
|
47
|
+
};
|
|
48
|
+
}, [chartRef, updateChartContainerHeight]);
|
|
49
|
+
return chartContainerHeight;
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Provides the chart grid shell and CSS variables shared by the ECharts canvas
|
|
53
|
+
* and legend rows.
|
|
54
|
+
*
|
|
55
|
+
* The container owns the measurement ref for the full chart area so the legend
|
|
56
|
+
* can cap expanded height relative to the available chart height.
|
|
57
|
+
*/
|
|
58
|
+
const ChartContainer = ({ children, style }) => {
|
|
59
|
+
const chartRef = useRef(null);
|
|
60
|
+
const chartContainerHeight = useChartContainerHeight(chartRef);
|
|
61
|
+
const chartContainerStyle = useMemo(() => _objectSpread2(_objectSpread2({}, style), {}, { "--ndl-chart-legend-expanded-max-height": chartContainerHeight === void 0 ? void 0 : `${Math.floor(chartContainerHeight * EXPANDED_LEGEND_MAX_HEIGHT_RATIO)}px` }), [chartContainerHeight, style]);
|
|
62
|
+
return /* @__PURE__ */ jsx("div", {
|
|
63
|
+
ref: chartRef,
|
|
64
|
+
className: "ndl-chart",
|
|
65
|
+
style: chartContainerStyle,
|
|
66
|
+
children
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
export { ChartContainer };
|
|
70
|
+
|
|
71
|
+
//# sourceMappingURL=ChartContainer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChartContainer.mjs","names":[],"sources":["../../../src/charts/ChartContainer.tsx"],"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,MAAM,mCAAmC;;;;;;;;AASzC,MAAM,2BACJ,aACG;CACH,MAAM,CAAC,sBAAsB,2BAA2B,SAAiB;CAEzE,MAAM,6BAA6B,kBAAkB;;EACnD,yBAAA,oBAAwB,SAAS,aAAA,QAAA,sBAAA,KAAA,IAAA,KAAA,IAAA,kBAAS,YAAY;CACxD,GAAG,CAAC,QAAQ,CAAC;CAEb,gBAAgB;EACd,2BAA2B;EAE3B,MAAM,iBAAiB,SAAS;EAChC,IAAI,CAAC,gBACH;EAGF,MAAM,iBAAiB,IAAI,eAAe,0BAA0B;EACpE,eAAe,QAAQ,cAAc;EAErC,aAAa;GACX,eAAe,WAAW;EAC5B;CACF,GAAG,CAAC,UAAU,0BAA0B,CAAC;CAEzC,OAAO;AACT;;;;;;;;AAcA,MAAa,kBAAkB,EAAE,UAAU,YAAiC;CAC1E,MAAM,WAAW,OAAuB,IAAI;CAC5C,MAAM,uBAAuB,wBAAwB,QAAQ;CAC7D,MAAM,sBAAsB,cAAA,eAAA,eAAA,CAAA,GAGnB,KAAA,GAAA,CAAA,GAAA,EACH,0CACE,yBAAyB,KAAA,IACrB,KAAA,IACA,GAAG,KAAK,MACN,uBAAuB,gCACzB,EAAE,IAAA,CACV,GACF,CAAC,sBAAsB,KAAK,CAC9B;CAEA,OACE,oBAAC,OAAD;EAAK,KAAK;EAAU,WAAU;EAAY,OAAO;EAC9C;CACE,CAAA;AAET"}
|