@fluentui/react-charts 0.0.0-nightly-20251110-0407.1 → 0.0.0-nightly-20251111-0407.1
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/CHANGELOG.md +13 -13
- package/dist/index.d.ts +12 -44
- package/lib/components/AreaChart/useAreaChartStyles.styles.js +8 -5
- package/lib/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.js +59 -39
- package/lib/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js +5 -5
- package/lib/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.js +129 -129
- package/lib/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js +13 -10
- package/lib/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js +2 -6
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js +3 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -0
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js +23 -8
- package/lib/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js +2 -2
- package/lib/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.js +3 -3
- package/lib/components/GanttChart/GanttChart.js.map +1 -1
- package/lib/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +8 -5
- package/lib/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +25 -12
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +4 -4
- package/lib/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.js +97 -37
- package/lib/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib/components/Legends/useLegendsStyles.styles.raw.js +10 -11
- package/lib/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib/components/LineChart/LineChart.js +1 -1
- package/lib/components/LineChart/LineChart.js.map +1 -1
- package/lib/components/LineChart/useLineChartStyles.styles.js +12 -9
- package/lib/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js +13 -10
- package/lib/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.js +1 -1
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js +10 -7
- package/lib/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +10 -7
- package/lib/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +8 -5
- package/lib/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib/utilities/Common.styles.js +1 -2
- package/lib/utilities/Common.styles.js.map +1 -1
- package/lib/utilities/Common.styles.raw.js +1 -2
- package/lib/utilities/Common.styles.raw.js.map +1 -1
- package/lib/utilities/utilities.js +16 -13
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js +11 -14
- package/lib-commonjs/components/AreaChart/useAreaChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js +74 -102
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js +4 -4
- package/lib-commonjs/components/ChartTable/useChartTableStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.js +129 -128
- package/lib-commonjs/components/CommonComponents/CartesianChart.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js +16 -19
- package/lib-commonjs/components/CommonComponents/useCartesianChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js +0 -14
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js +2 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +3 -0
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js +25 -16
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js +1 -1
- package/lib-commonjs/components/DonutChart/Arc/useArcStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js +2 -2
- package/lib-commonjs/components/DonutChart/useDonutChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.js +3 -3
- package/lib-commonjs/components/GanttChart/GanttChart.js.map +1 -1
- package/lib-commonjs/components/GanttChart/GanttChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js +11 -14
- package/lib-commonjs/components/GroupedVerticalBarChart/useGroupedVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js +47 -34
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js +3 -3
- package/lib-commonjs/components/HorizontalBarChart/useHorizontalBarChartStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js +2 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js +144 -86
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.js.map +1 -1
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js +9 -10
- package/lib-commonjs/components/Legends/useLegendsStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js +1 -1
- package/lib-commonjs/components/LineChart/LineChart.js.map +1 -1
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js +15 -18
- package/lib-commonjs/components/LineChart/useLineChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js +16 -19
- package/lib-commonjs/components/SankeyChart/useSankeyChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js +13 -16
- package/lib-commonjs/components/ScatterChart/useScatterChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js +13 -16
- package/lib-commonjs/components/VerticalBarChart/useVerticalBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js +11 -14
- package/lib-commonjs/components/VerticalStackedBarChart/useVerticalStackedBarChartStyles.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.js +1 -2
- package/lib-commonjs/utilities/Common.styles.js.map +1 -1
- package/lib-commonjs/utilities/Common.styles.raw.js +1 -2
- package/lib-commonjs/utilities/Common.styles.raw.js.map +1 -1
- package/lib-commonjs/utilities/utilities.js +16 -13
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +13 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HighContrastSelector","tokens","typographyStyles","
|
|
1
|
+
{"version":3,"names":["HighContrastSelector","tokens","typographyStyles","getTooltipStyle","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","top","spacingVerticalNone","backgroundColor","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","color","colorNeutralForeground1","getAxisTitleStyle","caption2Strong","fontStyle","colorNeutralForeground2","fill","getBarLabelStyle","caption1Strong","forcedColorAdjust","getMarkerLabelStyle","textAnchor"],"sources":["Common.styles.js"],"sourcesContent":["import { HighContrastSelector } from '../utilities/utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nexport const getTooltipStyle = ()=>{\n return {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: tokens.spacingHorizontalS,\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1\n };\n};\nexport const getAxisTitleStyle = ()=>{\n return {\n ...typographyStyles.caption2Strong,\n fontStyle: 'normal',\n textAlign: 'center',\n color: tokens.colorNeutralForeground2,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n };\n};\nexport const getBarLabelStyle = ()=>{\n return {\n ...typographyStyles.caption1Strong,\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto'\n };\n};\nexport const getMarkerLabelStyle = ()=>{\n return {\n ...typographyStyles.body1,\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n [HighContrastSelector]: {\n fill: 'CanvasText'\n }\n };\n};\n"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,uBAAuB;AAChE,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAI;EAC/B,OAAO;IACH,GAAGD,gBAAgB,CAACE,KAAK;IACzBC,OAAO,EAAE,MAAM;IACfC,aAAa,EAAE,QAAQ;IACvBC,OAAO,EAAEN,MAAM,CAACO,kBAAkB;IAClCC,QAAQ,EAAE,UAAU;IACpBC,SAAS,EAAE,QAAQ;IACnBC,GAAG,EAAEV,MAAM,CAACW,mBAAmB;IAC/BC,eAAe,EAAEZ,MAAM,CAACa,uBAAuB;IAC/CC,YAAY,EAAEd,MAAM,CAACe,iBAAiB;IACtCC,aAAa,EAAE,MAAM;IACrBC,KAAK,EAAEjB,MAAM,CAACkB;EAClB,CAAC;AACL,CAAC;AACD,OAAO,MAAMC,iBAAiB,GAAGA,CAAA,KAAI;EACjC,OAAO;IACH,GAAGlB,gBAAgB,CAACmB,cAAc;IAClCC,SAAS,EAAE,QAAQ;IACnBZ,SAAS,EAAE,QAAQ;IACnBQ,KAAK,EAAEjB,MAAM,CAACsB,uBAAuB;IACrCC,IAAI,EAAEvB,MAAM,CAACkB,uBAAuB;IACpC,CAACnB,oBAAoB,GAAG;MACpBwB,IAAI,EAAE;IACV;EACJ,CAAC;AACL,CAAC;AACD,OAAO,MAAMC,gBAAgB,GAAGA,CAAA,KAAI;EAChC,OAAO;IACH,GAAGvB,gBAAgB,CAACwB,cAAc;IAClCF,IAAI,EAAEvB,MAAM,CAACkB,uBAAuB;IACpCQ,iBAAiB,EAAE;EACvB,CAAC;AACL,CAAC;AACD,OAAO,MAAMC,mBAAmB,GAAGA,CAAA,KAAI;EACnC,OAAO;IACH,GAAG1B,gBAAgB,CAACE,KAAK;IACzBoB,IAAI,EAAEvB,MAAM,CAACkB,uBAAuB;IACpCU,UAAU,EAAE,QAAQ;IACpB,CAAC7B,oBAAoB,GAAG;MACpBwB,IAAI,EAAE;IACV;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { HighContrastSelector } from '../utilities/utilities';
|
|
2
2
|
import { tokens, typographyStyles } from '@fluentui/react-theme';
|
|
3
|
-
import { shorthands } from '@griffel/react';
|
|
4
3
|
export const getTooltipStyle = ()=>{
|
|
5
4
|
return {
|
|
6
5
|
...typographyStyles.body1,
|
|
7
6
|
display: 'flex',
|
|
8
7
|
flexDirection: 'column',
|
|
9
|
-
|
|
8
|
+
padding: tokens.spacingHorizontalS,
|
|
10
9
|
position: 'absolute',
|
|
11
10
|
textAlign: 'center',
|
|
12
11
|
top: tokens.spacingVerticalNone,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/utilities/Common.styles.ts"],"sourcesContent":["import { HighContrastSelector } from '../utilities/utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/utilities/Common.styles.ts"],"sourcesContent":["import { HighContrastSelector } from '../utilities/utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\nimport { type GriffelStyle } from '@griffel/react';\n\nexport const getTooltipStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.body1,\n display: 'flex',\n flexDirection: 'column',\n padding: tokens.spacingHorizontalS,\n position: 'absolute',\n textAlign: 'center',\n top: tokens.spacingVerticalNone,\n backgroundColor: tokens.colorNeutralBackground1,\n borderRadius: tokens.borderRadiusSmall,\n pointerEvents: 'none',\n color: tokens.colorNeutralForeground1,\n };\n};\n\nexport const getAxisTitleStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.caption2Strong,\n fontStyle: 'normal',\n textAlign: 'center',\n color: tokens.colorNeutralForeground2,\n fill: tokens.colorNeutralForeground1,\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n };\n};\n\nexport const getBarLabelStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.caption1Strong, // Confirm styles\n fill: tokens.colorNeutralForeground1,\n forcedColorAdjust: 'auto',\n };\n};\n\nexport const getMarkerLabelStyle = (): GriffelStyle => {\n return {\n ...typographyStyles.body1,\n fill: tokens.colorNeutralForeground1,\n textAnchor: 'middle',\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n };\n};\n"],"names":["HighContrastSelector","tokens","typographyStyles","getTooltipStyle","body1","display","flexDirection","padding","spacingHorizontalS","position","textAlign","top","spacingVerticalNone","backgroundColor","colorNeutralBackground1","borderRadius","borderRadiusSmall","pointerEvents","color","colorNeutralForeground1","getAxisTitleStyle","caption2Strong","fontStyle","colorNeutralForeground2","fill","getBarLabelStyle","caption1Strong","forcedColorAdjust","getMarkerLabelStyle","textAnchor"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,yBAAyB;AAC9D,SAASC,MAAM,EAAEC,gBAAgB,QAAQ,wBAAwB;AAGjE,OAAO,MAAMC,kBAAkB;IAC7B,OAAO;QACL,GAAGD,iBAAiBE,KAAK;QACzBC,SAAS;QACTC,eAAe;QACfC,SAASN,OAAOO,kBAAkB;QAClCC,UAAU;QACVC,WAAW;QACXC,KAAKV,OAAOW,mBAAmB;QAC/BC,iBAAiBZ,OAAOa,uBAAuB;QAC/CC,cAAcd,OAAOe,iBAAiB;QACtCC,eAAe;QACfC,OAAOjB,OAAOkB,uBAAuB;IACvC;AACF,EAAE;AAEF,OAAO,MAAMC,oBAAoB;IAC/B,OAAO;QACL,GAAGlB,iBAAiBmB,cAAc;QAClCC,WAAW;QACXZ,WAAW;QACXQ,OAAOjB,OAAOsB,uBAAuB;QACrCC,MAAMvB,OAAOkB,uBAAuB;QACpC,CAACnB,qBAAqB,EAAE;YACtBwB,MAAM;QACR;IACF;AACF,EAAE;AAEF,OAAO,MAAMC,mBAAmB;IAC9B,OAAO;QACL,GAAGvB,iBAAiBwB,cAAc;QAClCF,MAAMvB,OAAOkB,uBAAuB;QACpCQ,mBAAmB;IACrB;AACF,EAAE;AAEF,OAAO,MAAMC,sBAAsB;IACjC,OAAO;QACL,GAAG1B,iBAAiBE,KAAK;QACzBoB,MAAMvB,OAAOkB,uBAAuB;QACpCU,YAAY;QACZ,CAAC7B,qBAAqB,EAAE;YACtBwB,MAAM;QACR;IACF;AACF,EAAE"}
|
|
@@ -503,7 +503,7 @@ function handleFloatingPointPrecisionError(num) {
|
|
|
503
503
|
}
|
|
504
504
|
return dataPointsArray;
|
|
505
505
|
}
|
|
506
|
-
export function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
|
|
506
|
+
export function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl, axisData) {
|
|
507
507
|
const { yMinMaxValues = {
|
|
508
508
|
startValue: 0,
|
|
509
509
|
endValue: 0
|
|
@@ -545,6 +545,9 @@ export function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
|
|
|
545
545
|
yAxis.tickValues(customTickValues);
|
|
546
546
|
}
|
|
547
547
|
yAxisElement ? d3Select(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true') : '';
|
|
548
|
+
axisData.yAxisDomainValues = yAxisScale.domain();
|
|
549
|
+
var _yAxis_tickValues;
|
|
550
|
+
axisData.yAxisTickText = ((_yAxis_tickValues = yAxis.tickValues()) !== null && _yAxis_tickValues !== void 0 ? _yAxis_tickValues : yAxisScale.ticks(yAxisTickCount)).map(yAxis.tickFormat());
|
|
548
551
|
return yAxisScale;
|
|
549
552
|
}
|
|
550
553
|
export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, chartType, useSecondaryYScale = false, roundedTicks = false, scaleType, _useRtl) {
|
|
@@ -597,13 +600,8 @@ export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDatas
|
|
|
597
600
|
if (customTickValues) {
|
|
598
601
|
yAxis.tickValues(customTickValues);
|
|
599
602
|
axisData.yAxisDomainValues = customTickValues;
|
|
600
|
-
} else {
|
|
601
|
-
|
|
602
|
-
axisData.yAxisDomainValues = yAxisScale.ticks();
|
|
603
|
-
} else {
|
|
604
|
-
yAxis.tickValues(domainValues);
|
|
605
|
-
axisData.yAxisDomainValues = domainValues;
|
|
606
|
-
}
|
|
603
|
+
} else if (scaleType !== 'log') {
|
|
604
|
+
yAxis.tickValues(domainValues);
|
|
607
605
|
}
|
|
608
606
|
const tickFormat = (domainValue, index, defaultFormat)=>{
|
|
609
607
|
if (tickValues && tickText && typeof tickText[index] !== 'undefined') {
|
|
@@ -620,6 +618,9 @@ export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDatas
|
|
|
620
618
|
};
|
|
621
619
|
yAxis.tickFormat((v, i)=>tickFormat(v, i, yAxisScale.tickFormat(yAxisTickCount)));
|
|
622
620
|
yAxisElement ? d3Select(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true').style('direction', 'ltr').style('unicode-bidi', 'isolate').style('text-anchor', !useSecondaryYScale && (_useRtl ? 'start' : 'end')) : '';
|
|
621
|
+
axisData.yAxisDomainValues = yAxisScale.domain();
|
|
622
|
+
var _yAxis_tickValues;
|
|
623
|
+
axisData.yAxisTickText = ((_yAxis_tickValues = yAxis.tickValues()) !== null && _yAxis_tickValues !== void 0 ? _yAxis_tickValues : yAxisScale.ticks(yAxisTickCount)).map(yAxis.tickFormat());
|
|
623
624
|
return yAxisScale;
|
|
624
625
|
}
|
|
625
626
|
/**
|
|
@@ -627,7 +628,7 @@ export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDatas
|
|
|
627
628
|
* @param yAxisParams
|
|
628
629
|
* @param dataPoints
|
|
629
630
|
* @param isRtl
|
|
630
|
-
*/ export const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints, isRtl, barWidth)=>{
|
|
631
|
+
*/ export const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints, isRtl, axisData, barWidth)=>{
|
|
631
632
|
const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding, tickValues, tickText } = yAxisParams;
|
|
632
633
|
let yAxisPaddingValue = yAxisPadding !== null && yAxisPadding !== void 0 ? yAxisPadding : 0.5;
|
|
633
634
|
yAxisPaddingValue = yAxisPaddingValue === 1 ? 0.99 : yAxisPaddingValue;
|
|
@@ -648,6 +649,7 @@ export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDatas
|
|
|
648
649
|
};
|
|
649
650
|
const yAxis = axis.tickPadding(tickPadding).tickValues(customTickValues).tickFormat(tickFormat);
|
|
650
651
|
yAxisElement ? d3Select(yAxisElement).call(yAxis).selectAll('text') : '';
|
|
652
|
+
axisData.yAxisTickText = yAxis.tickValues().map(yAxis.tickFormat());
|
|
651
653
|
return yAxisScale;
|
|
652
654
|
};
|
|
653
655
|
/**
|
|
@@ -655,7 +657,7 @@ export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDatas
|
|
|
655
657
|
* @param yAxisParams
|
|
656
658
|
* @param dataPoints
|
|
657
659
|
* @param isRtl
|
|
658
|
-
*/ export const createStringYAxis = (yAxisParams, dataPoints, isRtl, barWidth, chartType)=>{
|
|
660
|
+
*/ export const createStringYAxis = (yAxisParams, dataPoints, isRtl, axisData, barWidth, chartType)=>{
|
|
659
661
|
const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding = 0, containerWidth, tickValues, tickText } = yAxisParams;
|
|
660
662
|
const yAxisScale = d3ScaleBand().domain(dataPoints).range([
|
|
661
663
|
containerHeight - margins.bottom,
|
|
@@ -680,6 +682,7 @@ export function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDatas
|
|
|
680
682
|
axis.tickSizeInner(-(containerWidth - margins.left - margins.right));
|
|
681
683
|
}
|
|
682
684
|
yAxisElement ? d3Select(yAxisElement).call(yAxis).selectAll('text') : '';
|
|
685
|
+
axisData.yAxisTickText = yAxis.tickValues().map(yAxis.tickFormat());
|
|
683
686
|
return yAxisScale;
|
|
684
687
|
};
|
|
685
688
|
/**
|
|
@@ -1012,12 +1015,12 @@ export function tooltipOfAxislabels(axistooltipProps) {
|
|
|
1012
1015
|
* @param {number} width
|
|
1013
1016
|
* @param {boolean} isRTL
|
|
1014
1017
|
* @returns {IDomainNRange}
|
|
1015
|
-
*/ export function domainRangeOfNumericForHorizontalBarChartWithAxis(points, margins, containerWidth, isRTL,
|
|
1018
|
+
*/ export function domainRangeOfNumericForHorizontalBarChartWithAxis(points, margins, containerWidth, isRTL, X_ORIGIN) {
|
|
1016
1019
|
const longestBars = computeLongestBars(groupChartDataByYValue(points), X_ORIGIN);
|
|
1017
1020
|
const xMax = longestBars.longestPositiveBar;
|
|
1018
1021
|
const xMin = longestBars.longestNegativeBar;
|
|
1019
|
-
const rMin =
|
|
1020
|
-
const rMax =
|
|
1022
|
+
const rMin = margins.left;
|
|
1023
|
+
const rMax = containerWidth - margins.right;
|
|
1021
1024
|
return isRTL ? {
|
|
1022
1025
|
dStartValue: xMax,
|
|
1023
1026
|
dEndValue: Math.min(xMin, X_ORIGIN),
|