@fluentui/react-charts 0.0.0-nightly-20251110-0407.1 → 0.0.0-nightly-20251112-0406.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 +34 -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 +1 -2
- package/lib/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +56 -32
- 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 +0 -1
- package/lib-commonjs/components/CommonComponents/useChartPopoverStyles.styles.raw.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +56 -32
- 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 +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Common.styles.js"],"sourcesContent":["import { HighContrastSelector } from '../utilities/utilities';\nimport { tokens, typographyStyles } from '@fluentui/react-theme';\
|
|
1
|
+
{"version":3,"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"],"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":";;;;;;;;;;;IAiBaoB,iBAAiB;;;oBAYD;;;IAOhBQ,mBAAmB;;;mBAlCJ;;;;2BAFS,wBAAwB;4BACpB,uBAAuB;AACzD,MAAMzB,kBAAkBA,CAAA,KAAI;IAC/B,OAAO;QACH,GAAGD,4BAAgB,CAACE,KAAK;QACzBC,OAAO,EAAE,MAAM;QACfC,aAAa,EAAE,QAAQ;QACvBC,OAAO,EAAEN,kBAAM,CAACO,kBAAkB;QAClCC,QAAQ,EAAE,UAAU;QACpBC,SAAS,EAAE,QAAQ;QACnBC,GAAG,EAAEV,kBAAM,CAACW,mBAAmB;QAC/BC,eAAe,EAAEZ,kBAAM,CAACa,uBAAuB;QAC/CC,YAAY,EAAEd,kBAAM,CAACe,iBAAiB;QACtCC,aAAa,EAAE,MAAM;QACrBC,KAAK,EAAEjB,kBAAM,CAACkB,uBAAAA;IAClB,CAAC;AACL,CAAC;AACM,0BAA0BC,CAAA,KAAI;IACjC,OAAO;QACH,GAAGlB,4BAAgB,CAACmB,cAAc;QAClCC,SAAS,EAAE,QAAQ;QACnBZ,SAAS,EAAE,QAAQ;QACnBQ,KAAK,EAAEjB,kBAAM,CAACsB,uBAAuB;QACrCC,IAAI,EAAEvB,kBAAM,CAACkB,uBAAuB;QACpC,CAACnB,+BAAoB,CAAA,EAAG;YACpBwB,IAAI,EAAE;QACV;IACJ,CAAC;AACL,CAAC;AACM,MAAMC,mBAAmBA,CAAA,KAAI;IAChC,OAAO;QACH,GAAGvB,4BAAgB,CAACwB,cAAc;QAClCF,IAAI,EAAEvB,kBAAM,CAACkB,uBAAuB;QACpCQ,iBAAiB,EAAE;IACvB,CAAC;AACL,CAAC;AACM,4BAA4BC,CAAA,KAAI;IACnC,OAAO;QACH,GAAG1B,4BAAgB,CAACE,KAAK;QACzBoB,IAAI,EAAEvB,kBAAM,CAACkB,uBAAuB;QACpCU,UAAU,EAAE,QAAQ;QACpB,CAAC7B,+BAAoB,CAAA,EAAG;YACpBwB,IAAI,EAAE;QACV;IACJ,CAAC;AACL,CAAC"}
|
|
@@ -24,13 +24,12 @@ _export(exports, {
|
|
|
24
24
|
});
|
|
25
25
|
const _utilities = require("../utilities/utilities");
|
|
26
26
|
const _reacttheme = require("@fluentui/react-theme");
|
|
27
|
-
const _react = require("@griffel/react");
|
|
28
27
|
const getTooltipStyle = ()=>{
|
|
29
28
|
return {
|
|
30
29
|
..._reacttheme.typographyStyles.body1,
|
|
31
30
|
display: 'flex',
|
|
32
31
|
flexDirection: 'column',
|
|
33
|
-
|
|
32
|
+
padding: _reacttheme.tokens.spacingHorizontalS,
|
|
34
33
|
position: 'absolute',
|
|
35
34
|
textAlign: 'center',
|
|
36
35
|
top: _reacttheme.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":";;;;;;;;;;;IAoBaoB,iBAAAA;;;oBAaAK;;;IAQAG,mBAAAA;;;mBArCAzB;;;;2BAJwB,yBAAyB;4BACrB,wBAAwB;AAG1D,MAAMA,kBAAkB;IAC7B,OAAO;QACL,GAAGD,4BAAAA,CAAiBE,KAAK;QACzBC,SAAS;QACTC,eAAe;QACfC,SAASN,kBAAAA,CAAOO,kBAAkB;QAClCC,UAAU;QACVC,WAAW;QACXC,KAAKV,kBAAAA,CAAOW,mBAAmB;QAC/BC,iBAAiBZ,kBAAAA,CAAOa,uBAAuB;QAC/CC,cAAcd,kBAAAA,CAAOe,iBAAiB;QACtCC,eAAe;QACfC,OAAOjB,kBAAAA,CAAOkB,uBAAuB;IACvC;AACF,EAAE;AAEK,0BAA0B;IAC/B,OAAO;QACL,GAAGjB,4BAAAA,CAAiBmB,cAAc;QAClCC,WAAW;QACXZ,WAAW;QACXQ,OAAOjB,kBAAAA,CAAOsB,uBAAuB;QACrCC,MAAMvB,kBAAAA,CAAOkB,uBAAuB;QACpC,CAACnB,+BAAAA,CAAqB,EAAE;YACtBwB,MAAM;QACR;IACF;AACF,EAAE;AAEK,MAAMC,mBAAmB;IAC9B,OAAO;QACL,GAAGvB,4BAAAA,CAAiBwB,cAAc;QAClCF,MAAMvB,kBAAAA,CAAOkB,uBAAuB;QACpCQ,mBAAmB;IACrB;AACF,EAAE;AAEK,4BAA4B;IACjC,OAAO;QACL,GAAGzB,4BAAAA,CAAiBE,KAAK;QACzBoB,MAAMvB,kBAAAA,CAAOkB,uBAAuB;QACpCU,YAAY;QACZ,CAAC7B,+BAAAA,CAAqB,EAAE;YACtBwB,MAAM;QACR;IACF;AACF,EAAE"}
|
|
@@ -713,7 +713,7 @@ function prepareDatapoints(maxVal, minVal, splitInto, isIntegralDataset, rounded
|
|
|
713
713
|
}
|
|
714
714
|
return dataPointsArray;
|
|
715
715
|
}
|
|
716
|
-
function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
|
|
716
|
+
function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl, axisData) {
|
|
717
717
|
const { yMinMaxValues = {
|
|
718
718
|
startValue: 0,
|
|
719
719
|
endValue: 0
|
|
@@ -755,6 +755,9 @@ function createYAxisForHorizontalBarChartWithAxis(yAxisParams, isRtl) {
|
|
|
755
755
|
yAxis.tickValues(customTickValues);
|
|
756
756
|
}
|
|
757
757
|
yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true') : '';
|
|
758
|
+
axisData.yAxisDomainValues = yAxisScale.domain();
|
|
759
|
+
var _yAxis_tickValues;
|
|
760
|
+
axisData.yAxisTickText = ((_yAxis_tickValues = yAxis.tickValues()) !== null && _yAxis_tickValues !== void 0 ? _yAxis_tickValues : yAxisScale.ticks(yAxisTickCount)).map(yAxis.tickFormat());
|
|
758
761
|
return yAxisScale;
|
|
759
762
|
}
|
|
760
763
|
function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, chartType, useSecondaryYScale = false, roundedTicks = false, scaleType, _useRtl) {
|
|
@@ -807,13 +810,8 @@ function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, cha
|
|
|
807
810
|
if (customTickValues) {
|
|
808
811
|
yAxis.tickValues(customTickValues);
|
|
809
812
|
axisData.yAxisDomainValues = customTickValues;
|
|
810
|
-
} else {
|
|
811
|
-
|
|
812
|
-
axisData.yAxisDomainValues = yAxisScale.ticks();
|
|
813
|
-
} else {
|
|
814
|
-
yAxis.tickValues(domainValues);
|
|
815
|
-
axisData.yAxisDomainValues = domainValues;
|
|
816
|
-
}
|
|
813
|
+
} else if (scaleType !== 'log') {
|
|
814
|
+
yAxis.tickValues(domainValues);
|
|
817
815
|
}
|
|
818
816
|
const tickFormat = (domainValue, index, defaultFormat)=>{
|
|
819
817
|
if (tickValues && tickText && typeof tickText[index] !== 'undefined') {
|
|
@@ -830,9 +828,12 @@ function createNumericYAxis(yAxisParams, isRtl, axisData, isIntegralDataset, cha
|
|
|
830
828
|
};
|
|
831
829
|
yAxis.tickFormat((v, i)=>tickFormat(v, i, yAxisScale.tickFormat(yAxisTickCount)));
|
|
832
830
|
yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text').attr('aria-hidden', 'true').style('direction', 'ltr').style('unicode-bidi', 'isolate').style('text-anchor', !useSecondaryYScale && (_useRtl ? 'start' : 'end')) : '';
|
|
831
|
+
axisData.yAxisDomainValues = yAxisScale.domain();
|
|
832
|
+
var _yAxis_tickValues;
|
|
833
|
+
axisData.yAxisTickText = ((_yAxis_tickValues = yAxis.tickValues()) !== null && _yAxis_tickValues !== void 0 ? _yAxis_tickValues : yAxisScale.ticks(yAxisTickCount)).map(yAxis.tickFormat());
|
|
833
834
|
return yAxisScale;
|
|
834
835
|
}
|
|
835
|
-
const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints, isRtl, barWidth)=>{
|
|
836
|
+
const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints, isRtl, axisData, barWidth)=>{
|
|
836
837
|
const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding, tickValues, tickText } = yAxisParams;
|
|
837
838
|
let yAxisPaddingValue = yAxisPadding !== null && yAxisPadding !== void 0 ? yAxisPadding : 0.5;
|
|
838
839
|
yAxisPaddingValue = yAxisPaddingValue === 1 ? 0.99 : yAxisPaddingValue;
|
|
@@ -853,9 +854,10 @@ const createStringYAxisForHorizontalBarChartWithAxis = (yAxisParams, dataPoints,
|
|
|
853
854
|
};
|
|
854
855
|
const yAxis = axis.tickPadding(tickPadding).tickValues(customTickValues).tickFormat(tickFormat);
|
|
855
856
|
yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text') : '';
|
|
857
|
+
axisData.yAxisTickText = yAxis.tickValues().map(yAxis.tickFormat());
|
|
856
858
|
return yAxisScale;
|
|
857
859
|
};
|
|
858
|
-
const createStringYAxis = (yAxisParams, dataPoints, isRtl, barWidth, chartType)=>{
|
|
860
|
+
const createStringYAxis = (yAxisParams, dataPoints, isRtl, axisData, barWidth, chartType)=>{
|
|
859
861
|
const { containerHeight, tickPadding = 12, margins, yAxisTickFormat, yAxisElement, yAxisPadding = 0, containerWidth, tickValues, tickText } = yAxisParams;
|
|
860
862
|
const yAxisScale = (0, _d3scale.scaleBand)().domain(dataPoints).range([
|
|
861
863
|
containerHeight - margins.bottom,
|
|
@@ -880,6 +882,7 @@ const createStringYAxis = (yAxisParams, dataPoints, isRtl, barWidth, chartType)=
|
|
|
880
882
|
axis.tickSizeInner(-(containerWidth - margins.left - margins.right));
|
|
881
883
|
}
|
|
882
884
|
yAxisElement ? (0, _d3selection.select)(yAxisElement).call(yAxis).selectAll('text') : '';
|
|
885
|
+
axisData.yAxisTickText = yAxis.tickValues().map(yAxis.tickFormat());
|
|
883
886
|
return yAxisScale;
|
|
884
887
|
};
|
|
885
888
|
function calloutData(values) {
|
|
@@ -1145,12 +1148,12 @@ function computeLongestBars(stackedChartData, X_ORIGIN) {
|
|
|
1145
1148
|
longestNegativeBar
|
|
1146
1149
|
};
|
|
1147
1150
|
}
|
|
1148
|
-
function domainRangeOfNumericForHorizontalBarChartWithAxis(points, margins, containerWidth, isRTL,
|
|
1151
|
+
function domainRangeOfNumericForHorizontalBarChartWithAxis(points, margins, containerWidth, isRTL, X_ORIGIN) {
|
|
1149
1152
|
const longestBars = computeLongestBars(groupChartDataByYValue(points), X_ORIGIN);
|
|
1150
1153
|
const xMax = longestBars.longestPositiveBar;
|
|
1151
1154
|
const xMin = longestBars.longestNegativeBar;
|
|
1152
|
-
const rMin =
|
|
1153
|
-
const rMax =
|
|
1155
|
+
const rMin = margins.left;
|
|
1156
|
+
const rMax = containerWidth - margins.right;
|
|
1154
1157
|
return isRTL ? {
|
|
1155
1158
|
dStartValue: xMax,
|
|
1156
1159
|
dEndValue: Math.min(xMin, X_ORIGIN),
|