@fluentui/react-charting 5.21.31 → 5.22.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/CHANGELOG.json +51 -1
- package/CHANGELOG.md +22 -2
- package/dist/react-charting.d.ts +152 -0
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +60 -0
- package/lib/components/DonutChart/Arc/Arc.js +22 -5
- package/lib/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib/components/DonutChart/Arc/Arc.types.d.ts +15 -0
- package/lib/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.base.js +13 -4
- package/lib/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib/components/DonutChart/DonutChart.types.d.ts +10 -0
- package/lib/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.js +8 -2
- package/lib/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib/components/DonutChart/Pie/Pie.types.d.ts +10 -0
- package/lib/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.base.js +30 -6
- package/lib/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib/components/GaugeChart/GaugeChart.types.d.ts +14 -0
- package/lib/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +29 -6
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js +26 -9
- package/lib/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
- package/lib/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +75 -30
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js +29 -10
- package/lib/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
- package/lib/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.base.js +18 -7
- package/lib/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
- package/lib/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +79 -14
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +32 -10
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib/index.d.ts +39 -20
- package/lib/index.js +20 -20
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +25 -0
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/gradients.d.ts +30 -0
- package/lib/utilities/gradients.js +173 -0
- package/lib/utilities/gradients.js.map +1 -0
- package/lib/utilities/index.d.ts +1 -0
- package/lib/utilities/index.js +1 -0
- package/lib/utilities/index.js.map +1 -1
- package/lib/version.js +1 -1
- package/lib/version.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.js +21 -4
- package/lib-amd/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-amd/components/DonutChart/Arc/Arc.types.d.ts +15 -0
- package/lib-amd/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.base.js +12 -3
- package/lib-amd/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-amd/components/DonutChart/DonutChart.types.d.ts +10 -0
- package/lib-amd/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js +7 -1
- package/lib-amd/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-amd/components/DonutChart/Pie/Pie.types.d.ts +10 -0
- package/lib-amd/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.base.js +28 -4
- package/lib-amd/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-amd/components/GaugeChart/GaugeChart.types.d.ts +14 -0
- package/lib-amd/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +28 -5
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js +25 -8
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
- package/lib-amd/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +74 -29
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js +28 -9
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
- package/lib-amd/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js +17 -6
- package/lib-amd/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-amd/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
- package/lib-amd/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +78 -13
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +31 -9
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-amd/index.d.ts +39 -20
- package/lib-amd/index.js +36 -21
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +25 -0
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/gradients.d.ts +30 -0
- package/lib-amd/utilities/gradients.js +180 -0
- package/lib-amd/utilities/gradients.js.map +1 -0
- package/lib-amd/utilities/index.d.ts +1 -0
- package/lib-amd/utilities/index.js +2 -1
- package/lib-amd/utilities/index.js.map +1 -1
- package/lib-amd/version.js +1 -1
- package/lib-amd/version.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.js +21 -4
- package/lib-commonjs/components/DonutChart/Arc/Arc.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.d.ts +15 -0
- package/lib-commonjs/components/DonutChart/Arc/Arc.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.base.js +12 -3
- package/lib-commonjs/components/DonutChart/DonutChart.base.js.map +1 -1
- package/lib-commonjs/components/DonutChart/DonutChart.types.d.ts +10 -0
- package/lib-commonjs/components/DonutChart/DonutChart.types.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js +7 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.js.map +1 -1
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.d.ts +10 -0
- package/lib-commonjs/components/DonutChart/Pie/Pie.types.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js +28 -4
- package/lib-commonjs/components/GaugeChart/GaugeChart.base.js.map +1 -1
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.d.ts +14 -0
- package/lib-commonjs/components/GaugeChart/GaugeChart.types.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +28 -5
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.d.ts +10 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js +25 -8
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.d.ts +10 -0
- package/lib-commonjs/components/HorizontalBarChart/HorizontalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +74 -29
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.d.ts +10 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js +28 -9
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.d.ts +10 -0
- package/lib-commonjs/components/StackedBarChart/MultiStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js +17 -6
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.d.ts +10 -0
- package/lib-commonjs/components/StackedBarChart/StackedBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +78 -13
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.d.ts +10 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.types.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +31 -9
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.d.ts +10 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.types.js.map +1 -1
- package/lib-commonjs/index.d.ts +39 -20
- package/lib-commonjs/index.js +55 -21
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +25 -0
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/gradients.d.ts +30 -0
- package/lib-commonjs/utilities/gradients.js +178 -0
- package/lib-commonjs/utilities/gradients.js.map +1 -0
- package/lib-commonjs/utilities/index.d.ts +1 -0
- package/lib-commonjs/utilities/index.js +1 -0
- package/lib-commonjs/utilities/index.js.map +1 -1
- package/lib-commonjs/version.js +1 -1
- package/lib-commonjs/version.js.map +1 -1
- package/package.json +4 -4
- package/project.json +6 -1
- package/src/components/DonutChart/Arc/Arc.types.ts +18 -0
- package/src/components/DonutChart/DonutChart.types.ts +12 -0
- package/src/components/DonutChart/Pie/Pie.types.ts +12 -0
- package/src/components/GaugeChart/GaugeChart.types.ts +17 -0
- package/src/components/HorizontalBarChart/HorizontalBarChart.types.ts +12 -0
- package/src/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.types.ts +12 -0
- package/src/components/StackedBarChart/MultiStackedBarChart.types.ts +12 -0
- package/src/components/StackedBarChart/StackedBarChart.types.ts +12 -0
- package/src/components/VerticalBarChart/VerticalBarChart.types.ts +12 -0
- package/src/components/VerticalStackedBarChart/VerticalStackedBarChart.types.ts +12 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["index.ts"],"names":[],"mappings":";;;AAMA,2DAAqF;AAA5E,wHAAA,kBAAkB,OAAA;AAAE,+HAAA,yBAAyB,OAAA;AAEtD,2CAA0C;AAAjC,wGAAA,UAAU,OAAA;AAWnB,qCAA2C;AAAlC,kGAAA,OAAO,OAAA;AAAE,gGAAA,KAAK,OAAA;AASvB,yCAAiD;AAAxC,sGAAA,SAAS,OAAA;AAAE,oGAAA,OAAO,OAAA;AAE3B,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAElB,uCAAsC;AAA7B,oGAAA,QAAQ,OAAA;AAUjB,qDAAuG;AAA9F,uHAAA,oBAAoB,OAAA;AAAE,8HAAA,2BAA2B,OAAA;AAAE,kHAAA,eAAe,OAAA;AAE3E,uDAAsD;AAA7C,oHAAA,gBAAgB,OAAA;AAMzB,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAMhC,qEAAoE;AAA3D,kIAAA,uBAAuB,OAAA;AAShC,mDAAkD;AAAzC,gHAAA,cAAc,OAAA;AAwCvB,0DAA2F;AAAlF,uGAAA,cAAc,OAAA;AAAE,gHAAA,uBAAuB,OAAA;AAEhD,+CAA8C;AAArC,4GAAA,YAAY,OAAA;AAQrB,6CAA4C;AAAnC,0GAAA,WAAW,OAAA;AASpB,yCAAwE;AAA/D,6GAAA,gBAAgB,OAAA;AAAE,sGAAA,SAAS,OAAA;AAAE,yGAAA,YAAY,OAAA;AAElD,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAMlB,2EAA0E;AAAjE,wIAAA,0BAA0B,OAAA;AACnC,6CAAqF;AAA5E,wGAAA,cAAc,OAAA;AAAE,2GAAA,iBAAiB,OAAA;AAAE,sGAAA,YAAY,OAAA;AACxD,mDAAsG;AAA7F,mHAAA,sBAAsB,OAAA;AAAE,iHAAA,oBAAoB,OAAA;AAAE,4GAAA,eAAe,OAAA;AAEtE,2CAA+E;AAAtE,wGAAA,UAAU,OAAA;AAAE,+GAAA,iBAAiB,OAAA;AAAE,8GAAA,gBAAgB,OAAA;AAExD,qBAAmB","sourcesContent":["export type {\n ChartDataMode,\n IHorizontalBarChartProps,\n IHorizontalBarChartStyleProps,\n IHorizontalBarChartStyles,\n} from './HorizontalBarChart';\nexport { HorizontalBarChart, HorizontalBarChartVariant } from './HorizontalBarChart';\nexport type { IDonutChart, IDonutChartProps, IDonutChartStyleProps, IDonutChartStyles } from './DonutChart';\nexport { DonutChart } from './DonutChart';\nexport type {\n ILegend,\n ILegendOverflowData,\n ILegendStyleProps,\n ILegendSubComponentStyles,\n ILegendsProps,\n ILegendsStyles,\n IShapeProps,\n LegendShape,\n} from './Legends';\nexport { Legends, Shape } from './Legends';\nexport type {\n IColorFillBarData,\n IColorFillBarsProps,\n IEventsAnnotationProps,\n ILineChartProps,\n ILineChartStyleProps,\n ILineChartStyles,\n} from './LineChart';\nexport { LineChart, Textbox } from './LineChart';\nexport type { IAreaChartProps, IAreaChartStyleProps, IAreaChartStyles } from './AreaChart';\nexport { AreaChart } from './AreaChart';\nexport type { IPieChart, IPieChartProps, IPieChartStyleProps, IPieChartStyles } from './PieChart';\nexport { PieChart } from './PieChart';\nexport type {\n IMultiStackedBarChartProps,\n IMultiStackedBarChartStyleProps,\n IMultiStackedBarChartStyles,\n IStackedBarChart,\n IStackedBarChartProps,\n IStackedBarChartStyleProps,\n IStackedBarChartStyles,\n} from './StackedBarChart';\nexport { MultiStackedBarChart, MultiStackedBarChartVariant, StackedBarChart } from './StackedBarChart';\nexport type { IVerticalBarChartProps, IVerticalBarChartStyleProps, IVerticalBarChartStyles } from './VerticalBarChart';\nexport { VerticalBarChart } from './VerticalBarChart';\nexport type {\n IVerticalStackedBarChartProps,\n IVerticalStackedBarChartStyleProps,\n IVerticalStackedBarChartStyles,\n} from './VerticalStackedBarChart';\nexport { VerticalStackedBarChart } from './VerticalStackedBarChart';\nexport type {\n IGroupedVerticalBarChartProps,\n IGroupedVerticalBarChartStyleProps,\n IGroupedVerticalBarChartStyles,\n} from './GroupedVerticalBarChart';\nexport { GroupedVerticalBarChart } from './GroupedVerticalBarChart';\nexport type {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n IModifiedCartesianChartProps,\n IYValueHover,\n} from './CartesianChart';\nexport { CartesianChart } from './CartesianChart';\nexport type {\n IAccessibilityProps,\n IBasestate,\n IChartDataPoint,\n IChartProps,\n ICustomizedCalloutData,\n ICustomizedCalloutDataPoint,\n IDataPoint,\n IGVBarChartSeriesPoint,\n IGVDataPoint,\n IGVForBarChart,\n IGVSingleDataPoint,\n IGroupedVerticalBarChartData,\n IHeatMapChartData,\n IHeatMapChartDataPoint,\n IHorizontalBarChartWithAxisDataPoint,\n IHorizontalDataPoint,\n ILegendDataItem,\n ILineChartDataPoint,\n ILineChartGap,\n ILineChartLineOptions,\n ILineChartPoints,\n ILineDataInVerticalBarChart,\n ILineDataInVerticalStackedBarChart,\n IMargins,\n IRefArrayData,\n ISankeyChartData,\n IVSChartDataPoint,\n IVerticalBarChartDataPoint,\n IVerticalStackedBarDataPoint,\n IVerticalStackedChartProps,\n SLink,\n SNode,\n} from './types/index';\nexport type {\n IChartHoverCardProps,\n IChartHoverCardStyleProps,\n IChartHoverCardStyles,\n} from './utilities/ChartHoverCard/index';\nexport { ChartHoverCard, getChartHoverCardStyles } from './utilities/ChartHoverCard/index';\nexport type { IHeatMapChartProps, IHeatMapChartStyleProps, IHeatMapChartStyles } from './HeatMapChart';\nexport { HeatMapChart } from './HeatMapChart';\nexport type {\n ISankeyChartAccessibilityProps,\n ISankeyChartProps,\n ISankeyChartStrings,\n ISankeyChartStyleProps,\n ISankeyChartStyles,\n} from './SankeyChart';\nexport { SankeyChart } from './SankeyChart';\nexport type {\n ITreeChartDataPoint,\n ITreeDataStructure,\n ITreeProps,\n ITreeState,\n ITreeStyleProps,\n ITreeStyles,\n} from './TreeChart';\nexport { NodesComposition, TreeChart, TreeTraverse } from './TreeChart';\nexport type { ISparklineProps, ISparklineStyleProps, ISparklineStyles } from './Sparkline';\nexport { Sparkline } from './Sparkline';\nexport type {\n IHorizontalBarChartWithAxisProps,\n IHorizontalBarChartWithAxisStyleProps,\n IHorizontalBarChartWithAxisStyles,\n} from './HorizontalBarChartWithAxis';\nexport { HorizontalBarChartWithAxis } from './HorizontalBarChartWithAxis';\nexport { DataVizPalette, getColorFromToken, getNextColor } from './utilities/colors';\nexport { DataVizGradientPalette, getGradientFromToken, getNextGradient } from './utilities/gradients';\nexport type { IGaugeChartProps, IGaugeChartSegment, IGaugeChartStyleProps, IGaugeChartStyles } from './GaugeChart';\nexport { GaugeChart, GaugeChartVariant, GaugeValueFormat } from './GaugeChart';\n\nimport './version';\n"]}
|
|
@@ -121,6 +121,11 @@ export interface IChartDataPoint {
|
|
|
121
121
|
* Color for the legend in the chart. If not provided, it will fallback on the default color palette.
|
|
122
122
|
*/
|
|
123
123
|
color?: string;
|
|
124
|
+
/**
|
|
125
|
+
* Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
|
|
126
|
+
* If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
|
|
127
|
+
*/
|
|
128
|
+
gradient?: [string, string];
|
|
124
129
|
/**
|
|
125
130
|
* placeholder data point
|
|
126
131
|
*/
|
|
@@ -162,6 +167,11 @@ export interface IVerticalBarChartDataPoint {
|
|
|
162
167
|
* color for the legend in the chart
|
|
163
168
|
*/
|
|
164
169
|
color?: string;
|
|
170
|
+
/**
|
|
171
|
+
* Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
|
|
172
|
+
* If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
|
|
173
|
+
*/
|
|
174
|
+
gradient?: [string, string];
|
|
165
175
|
/**
|
|
166
176
|
* Callout data for x axis
|
|
167
177
|
* This is an optional prop, If haven;t given legend will take
|
|
@@ -207,6 +217,11 @@ export interface IHorizontalBarChartWithAxisDataPoint {
|
|
|
207
217
|
* color for the legend in the chart
|
|
208
218
|
*/
|
|
209
219
|
color?: string;
|
|
220
|
+
/**
|
|
221
|
+
* Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
|
|
222
|
+
* If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
|
|
223
|
+
*/
|
|
224
|
+
gradient?: [string, string];
|
|
210
225
|
/**
|
|
211
226
|
* Callout data for x axis
|
|
212
227
|
* This is an optional prop, If haven;t given legend will take
|
|
@@ -485,6 +500,11 @@ export interface IVSChartDataPoint {
|
|
|
485
500
|
* color for the legend in the chart
|
|
486
501
|
*/
|
|
487
502
|
color?: string;
|
|
503
|
+
/**
|
|
504
|
+
* Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
|
|
505
|
+
* If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
|
|
506
|
+
*/
|
|
507
|
+
gradient?: [string, string];
|
|
488
508
|
/**
|
|
489
509
|
* Callout data for x axis
|
|
490
510
|
* This is an optional prop, If haven;t given legend will take
|
|
@@ -560,6 +580,11 @@ export interface IGVBarChartSeriesPoint {
|
|
|
560
580
|
* Color for the legend in the chart
|
|
561
581
|
*/
|
|
562
582
|
color: string;
|
|
583
|
+
/**
|
|
584
|
+
* Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.
|
|
585
|
+
* If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.
|
|
586
|
+
*/
|
|
587
|
+
gradient?: [string, string];
|
|
563
588
|
/**
|
|
564
589
|
* Legend text in the chart
|
|
565
590
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n"]}
|
|
1
|
+
{"version":3,"file":"IDataPoint.js","sourceRoot":"../src/","sources":["types/IDataPoint.ts"],"names":[],"mappings":"","sourcesContent":["import { SankeyLink, SankeyNode } from 'd3-sankey';\nimport { SVGProps } from 'react';\nimport { LegendShape } from '../components/Legends/Legends.types';\n\nexport interface IBasestate {\n _width?: number;\n _height?: number;\n activeLegend?: string;\n color?: string;\n dataForHoverCard?: number;\n isCalloutVisible: boolean;\n isLegendSelected?: boolean;\n isLegendHovered?: boolean;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n refSelected?: any;\n YValueHover?: { legend?: string; y?: number; color?: string }[];\n hoverYValue?: string | number | null;\n hoverXValue?: string | number | null;\n xCalloutValue?: string;\n yCalloutValue?: string;\n lineColor?: string;\n hoveredLineColor?: string;\n selectedLegend?: string;\n containerWidth?: number;\n containerHeight?: number;\n}\n\nexport interface IRefArrayData {\n index?: string;\n refElement?: SVGGElement;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IMargins {\n /**\n * left margin for the chart.\n */\n left?: number;\n /**\n * Right margin for the chart.\n */\n right?: number;\n /**\n * Top margin for the chart.\n */\n top?: number;\n /**\n * Bottom margin for the chart.\n */\n bottom?: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n // NOTE: VerticalStackedBarChart, PieChart\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalStackedBarDataPoint extends Omit<IDataPoint, 'x'> {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n * If data type on x is Date, then the data is spaced evenly by d3-scale.\n */\n x: number | string | Date;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IChartDataPoint {\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * data the datapoint in the chart\n */\n data?: number;\n\n /**\n * data the datapoint in the chart\n */\n horizontalBarChartdata?: IHorizontalDataPoint;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Color for the legend in the chart. If not provided, it will fallback on the default color palette.\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * placeholder data point\n */\n placeHolder?: boolean;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVerticalBarChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If x is a string, then the data is evenly spaced along the x-axis.\n */\n x: number | string | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * data to render the line along with bars\n */\n lineData?: ILineDataInVerticalBarChart;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHorizontalBarChartWithAxisDataPoint {\n /**\n * Dependent value of the data point, rendered along the x-axis.\n */\n x: number;\n\n /**\n * Independent value of the data point, rendered along the y-axis.\n * If y is a number, then each y-coordinate is plotted at its y-coordinate.\n * If y is a string, then the data is evenly spaced along the y-axis.\n */\n y: number | string;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend?: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalBarChart {\n y: IVerticalBarChartDataPoint['y'];\n yAxisCalloutData?: string | undefined;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartDataPoint {\n /**\n * Independent value of the data point, rendered along the x-axis.\n * If x is a number, then each y-coordinate is plotted at its x-coordinate.\n * If data type on x is Date, then the data is spaced evenly by d3-scale\n */\n x: number | Date;\n\n /**\n * Dependent value of the data point, rendered along the y-axis.\n */\n y: number;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onDataPointClick?: () => void;\n\n /**\n * Callout data for x axis\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n */\n yAxisCalloutData?: string | { [id: string]: number };\n\n /**\n * Whether to hide callout data for the point.\n */\n hideCallout?: boolean;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n\n /**\n * X axis Accessibility data for callout\n */\n xAxisCalloutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartGap {\n /**\n * Starting index of the gap.\n */\n startIndex: number;\n\n /**\n * Ending index of the gap.\n */\n endIndex: number;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface ILineChartLineOptions extends SVGProps<SVGPathElement> {\n /**\n * Width of the line/stroke.\n * Overrides the strokeWidth set on ICartesianChartProps level.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-width\n */\n strokeWidth?: number | string;\n\n /**\n * Pattern of dashes and gaps.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dasharray\n */\n strokeDasharray?: string | number;\n\n /**\n * Offset on rendering of stroke dash array.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-dashoffset\n */\n strokeDashoffset?: string | number;\n\n /**\n * Shape at the end of a subpath.\n * Default round.\n * @see https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/stroke-linecap\n */\n strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';\n\n /**\n * Width of border around the line. Default no border.\n */\n lineBorderWidth?: string | number;\n\n /**\n * Color of border around the line. Default white.\n */\n lineBorderColor?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineChartPoints {\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * The shape for the legend\n * default: show the rect legend\n */\n legendShape?: LegendShape;\n\n /**\n * dataPoints for the line chart\n */\n data: ILineChartDataPoint[];\n\n /**\n * gaps in the line chart where a line is not drawn\n */\n gaps?: ILineChartGap[];\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * opacity for chart fill color\n */\n opacity?: number;\n\n /**\n * options for the line drawn\n */\n lineOptions?: ILineChartLineOptions;\n\n /**\n * hide dots for points that are not active\n */\n hideNonActiveDots?: boolean;\n\n /**\n * Defines the function that is executed on clicking this legend\n */\n onLegendClick?: (selectedLegend: string | null | string[]) => void;\n\n /**\n * Defines the function that is executed on clicking line\n */\n onLineClick?: () => void;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IChartProps {\n /**\n * chart title for the chart\n */\n chartTitle?: string;\n\n /**\n * Accessibility data for chart title\n */\n chartTitleAccessibilityData?: IAccessibilityProps;\n /**\n * data for the points in the chart\n */\n chartData?: IChartDataPoint[];\n\n /**\n * Accessibility data for chart data\n */\n chartDataAccessibilityData?: IAccessibilityProps;\n\n /**\n * data for the points in the line chart\n */\n lineChartData?: ILineChartPoints[];\n\n /**\n * data for the points in the line chart\n */\n SankeyChartData?: ISankeyChartData;\n\n /**\n * data for the points in the line chart\n */\n pointOptions?: SVGProps<SVGCircleElement>;\n\n /**\n * data for the dotted line on hovering the point\n */\n pointLineOptions?: SVGProps<SVGLineElement>;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ISankeyChartData {\n nodes: SNode[];\n links: SLink[];\n}\n\ninterface ISNodeExtra {\n /**\n * A unique identifier for this node.\n */\n nodeId: number | string;\n /**\n * The display name for this node in the UX.\n */\n name: string;\n color?: string;\n borderColor?: string;\n actualValue?: number;\n layer?: number;\n}\n\ninterface ISLinkExtra {\n /**\n * The index within `ISankeyChartData.nodes` of the source node.\n */\n source: number;\n /**\n * The index within `ISankeyChartData.nodes` of the target node.\n */\n target: number;\n /**\n * The weight of this link between the two nodes.\n */\n value: number;\n unnormalizedValue?: number;\n}\n\nexport type SNode = SankeyNode<ISNodeExtra, ISLinkExtra>;\nexport type SLink = SankeyLink<ISNodeExtra, ISLinkExtra>;\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IAccessibilityProps {\n /**\n * Accessibility aria-label\n */\n ariaLabel?: string;\n\n /**\n * Accessibility aria-labelledBy\n */\n ariaLabelledBy?: string;\n\n /**\n * Accessibility aria-describedBy\n */\n ariaDescribedBy?: string;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IVSChartDataPoint {\n /**\n * data the datapoint in the chart\n */\n data: number;\n\n /**\n * Legend text for the datapoint in the chart\n */\n legend: string;\n\n /**\n * color for the legend in the chart\n */\n color?: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartProps}\n */\nexport interface IVerticalStackedChartProps {\n /**\n * data for the points in the chart\n */\n chartData: IVSChartDataPoint[];\n\n /**\n * Data for x axis label for multistacked Vertical bar chart\n */\n xAxisPoint: number | string | Date;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven't given, legend will take\n */\n xAxisCalloutData?: string;\n /**\n * line data to render lines on stacked bar chart\n */\n lineData?: ILineDataInVerticalStackedBarChart[];\n /**\n * Accessibility data for Whole stack callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ILineDataInVerticalStackedBarChart {\n y: number;\n color: string;\n legend: string;\n /**\n * Data to show in callout\n */\n data?: number;\n yAxisCalloutData?: string;\n /**\n * Whether to use the secondary y scale or not\n * False by default.\n */\n useSecondaryYScale?: boolean;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGVBarChartSeriesPoint {\n /**\n * Text for // need to check use of this\n */\n key: string;\n\n /**\n * Data for bar height of Grouped vertical bar chart\n */\n data: number;\n\n /**\n * Color for the legend in the chart\n */\n color: string;\n\n /**\n * Gradient for the legend in the chart. If not provided, it will fallback on the default color palette.\n * If provided, it will override the color prop. granted `enableGradient` is set to true for the chart.\n */\n gradient?: [string, string];\n\n /**\n * Legend text in the chart\n */\n legend: string;\n\n /**\n * Callout data for x axis\n * This is an optional prop, If haven;t given legend will take\n */\n xAxisCalloutData?: string;\n\n /**\n * Callout data for y axis\n * This is an optional prop, If haven't given data will take\n */\n yAxisCalloutData?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IGroupedVerticalBarChartData {\n /**\n * Data for X axis label\n */\n name: string;\n\n /**\n * Data points for Grouped vertical bar chart\n */\n series: IGVBarChartSeriesPoint[];\n\n /**\n * Accessibility data for Group Bars Stack Callout\n */\n stackCallOutAccessibilityData?: IAccessibilityProps;\n}\n\nexport interface IGVDataPoint {\n /**\n * This interface used for - While forming datapoints from given prop \"data\" in code\n * datapoints are used for to draw graph\n */\n [key: string]: number | string;\n}\n\nexport interface IGVSingleDataPoint {\n /**\n * While forming datapoints from given prop \"data\" in code.\n * These datapoints are used for to draw graph easily.\n */\n [key: string]: IGVDataPoint;\n}\n\nexport interface IGVForBarChart {\n /**\n * While forming datapoints from given prop \"data\"\n * These datapoints are used for to draw graph.\n */\n [key: string]: IGVBarChartSeriesPoint;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartDataPoint {\n x: string | Date | number;\n y: string | Date | number;\n value: number;\n /**\n * The value/ text to be rendered in the rectange\n */\n rectText?: string | number;\n /**\n * denomination to show in the callout\n */\n ratio?: [number, number];\n /**\n * description message to the callout\n */\n descriptionMessage?: string;\n\n /**\n * onClick action for each datapoint in the chart\n */\n onClick?: VoidFunction;\n /**\n * Accessibility data for callout\n */\n callOutAccessibilityData?: IAccessibilityProps;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface IHeatMapChartData {\n /**\n * name of the legend\n */\n legend: string;\n data: IHeatMapChartDataPoint[];\n /**\n * This number will be used to get the color for the legend\n */\n value: number;\n}\n\n/**\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutDataPoint {\n legend: string;\n y: number;\n color: string;\n xAxisCalloutData?: string;\n yAxisCalloutData?: string | { [id: string]: number };\n}\n\n/**\n * Used for custom callout data interface. As Area chart callout data will be prepared from given props.data,\n * Those required data passing to onRenderCalloutPerDataPoint and onRenderCalloutPerStack.\n * {@docCategory IChartData}\n */\nexport interface ICustomizedCalloutData {\n x: number | string | Date;\n values: ICustomizedCalloutDataPoint[];\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const DataVizGradientPalette: {
|
|
2
|
+
gradient1: string;
|
|
3
|
+
gradient2: string;
|
|
4
|
+
gradient3: string;
|
|
5
|
+
gradient4: string;
|
|
6
|
+
gradient5: string;
|
|
7
|
+
gradient6: string;
|
|
8
|
+
gradient7: string;
|
|
9
|
+
gradient8: string;
|
|
10
|
+
gradient9: string;
|
|
11
|
+
gradient10: string;
|
|
12
|
+
gradient1Ext: string;
|
|
13
|
+
gradient2Ext: string;
|
|
14
|
+
gradient3Ext: string;
|
|
15
|
+
gradient4Ext: string;
|
|
16
|
+
gradient5Ext: string;
|
|
17
|
+
gradient6Ext: string;
|
|
18
|
+
gradient7Ext: string;
|
|
19
|
+
gradient8Ext: string;
|
|
20
|
+
gradient9Ext: string;
|
|
21
|
+
gradient10Ext: string;
|
|
22
|
+
success: string;
|
|
23
|
+
highSuccess: string;
|
|
24
|
+
warning: string;
|
|
25
|
+
error: string;
|
|
26
|
+
highError: string;
|
|
27
|
+
disabled: string;
|
|
28
|
+
};
|
|
29
|
+
export declare const getNextGradient: (index: number, offset?: number, isDarkTheme?: boolean) => [string, string];
|
|
30
|
+
export declare const getGradientFromToken: (token: string, isDarkTheme?: boolean) => [string, string];
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGradientFromToken = exports.getNextGradient = exports.DataVizGradientPalette = void 0;
|
|
4
|
+
exports.DataVizGradientPalette = {
|
|
5
|
+
gradient1: 'default.1',
|
|
6
|
+
gradient2: 'default.2',
|
|
7
|
+
gradient3: 'default.3',
|
|
8
|
+
gradient4: 'default.4',
|
|
9
|
+
gradient5: 'default.5',
|
|
10
|
+
gradient6: 'default.6',
|
|
11
|
+
gradient7: 'default.7',
|
|
12
|
+
gradient8: 'default.8',
|
|
13
|
+
gradient9: 'default.9',
|
|
14
|
+
gradient10: 'default.10',
|
|
15
|
+
// extended gradients
|
|
16
|
+
gradient1Ext: 'extended.1',
|
|
17
|
+
gradient2Ext: 'extended.2',
|
|
18
|
+
gradient3Ext: 'extended.3',
|
|
19
|
+
gradient4Ext: 'extended.4',
|
|
20
|
+
gradient5Ext: 'extended.5',
|
|
21
|
+
gradient6Ext: 'extended.6',
|
|
22
|
+
gradient7Ext: 'extended.7',
|
|
23
|
+
gradient8Ext: 'extended.8',
|
|
24
|
+
gradient9Ext: 'extended.9',
|
|
25
|
+
gradient10Ext: 'extended.10',
|
|
26
|
+
// status gradients
|
|
27
|
+
success: 'semantic.success',
|
|
28
|
+
highSuccess: 'semantic.highSuccess',
|
|
29
|
+
warning: 'semantic.warning',
|
|
30
|
+
error: 'semantic.error',
|
|
31
|
+
highError: 'semantic.highError',
|
|
32
|
+
disabled: 'semantic.disabled',
|
|
33
|
+
};
|
|
34
|
+
var defaultGradientPalette = {
|
|
35
|
+
'1': [
|
|
36
|
+
['#4760D5', '#637CEF'],
|
|
37
|
+
['#4F6BED', '#637CEF'], // [cornflower.shade10, cornflower.tint10],
|
|
38
|
+
],
|
|
39
|
+
'2': [
|
|
40
|
+
['#795AA6', '#9373C0'],
|
|
41
|
+
['#8764B8', '#A083C9'], // [orchid.primary, orchid.tint20],
|
|
42
|
+
],
|
|
43
|
+
'3': [
|
|
44
|
+
['#159195', '#2AA0A4'],
|
|
45
|
+
['#159195', '#2AA0A4'], // [teal.tint10, teal.tint20],
|
|
46
|
+
],
|
|
47
|
+
'4': [
|
|
48
|
+
['#B146C2', '#C36BD1'],
|
|
49
|
+
['#B146C2', '#C36BD1'], // [lilac.primary, lilac.tint20],
|
|
50
|
+
],
|
|
51
|
+
'5': [
|
|
52
|
+
['#3487C7', '#3A96DD'],
|
|
53
|
+
['#3487C7', '#3A96DD'], // [lightBlue.shade20, lightBlue.primary],
|
|
54
|
+
],
|
|
55
|
+
'6': [
|
|
56
|
+
['#0E7A0B', '#13A10E'],
|
|
57
|
+
['#11910D', '#27AC22'], // [lightGreen.shade10, lightGreen.tint10],
|
|
58
|
+
],
|
|
59
|
+
'7': [
|
|
60
|
+
['#E61C99', '#EE5FB7'],
|
|
61
|
+
['#E61C99', '#EE5FB7'], // [hotPink.tint10, hotPink.tint30],
|
|
62
|
+
],
|
|
63
|
+
'8': [
|
|
64
|
+
['#CA5010', '#D77440'],
|
|
65
|
+
['#CA5010', '#D77440'], // [pumpkin.primary, pumpkin.tint10],
|
|
66
|
+
],
|
|
67
|
+
'9': [
|
|
68
|
+
['#57811B', '#689920'],
|
|
69
|
+
['#57811B', '#689920'], // [lime.shade20, lime.shade10],
|
|
70
|
+
],
|
|
71
|
+
'10': [
|
|
72
|
+
['#937700', '#AE8C00'],
|
|
73
|
+
['#937700', '#AE8C00'], // [gold.shade20, gold.shade10],
|
|
74
|
+
],
|
|
75
|
+
};
|
|
76
|
+
var extendedGradientPalette = {
|
|
77
|
+
'1': [
|
|
78
|
+
['#2C3C85', '#3C51B4'],
|
|
79
|
+
['#93A4F4', '#C8D1FA'], // [cornflower.tint30, cornflower.tint40],
|
|
80
|
+
],
|
|
81
|
+
'2': [
|
|
82
|
+
['#4C3867', '#674C8C'],
|
|
83
|
+
['#A083C9', '#B29AD4'], // [orchid.tint20, orchid.tint30],
|
|
84
|
+
],
|
|
85
|
+
'3': [
|
|
86
|
+
['#02494C', '#038387'],
|
|
87
|
+
['#4CB4B7', '#9BD9DB'], // [teal.tint30, teal.tint40],
|
|
88
|
+
],
|
|
89
|
+
'4': [
|
|
90
|
+
['#63276D', '#863593'],
|
|
91
|
+
['#C36BD1', '#CF87DA'], // [lilac.tint20, lilac.tint30],
|
|
92
|
+
],
|
|
93
|
+
'5': [
|
|
94
|
+
['#20547C', '#2C72A8'],
|
|
95
|
+
['#4FA1E1', '#83BDEB'], // [lightBlue.tint10, lightBlue.tint30],
|
|
96
|
+
],
|
|
97
|
+
'6': [
|
|
98
|
+
['#0B5A08', '#0E7A0B'],
|
|
99
|
+
['#27AC22', '#5EC75A'], // [lightGreen.tint10, lightGreen.tint30],
|
|
100
|
+
],
|
|
101
|
+
'7': [
|
|
102
|
+
['#AD006A', '#E3008C'],
|
|
103
|
+
['#EE5FB7', '#F7ADDA'], // [hotPink.tint30, hotPink.tint40],
|
|
104
|
+
],
|
|
105
|
+
'8': [
|
|
106
|
+
['#9A3D0C', '#CA5010'],
|
|
107
|
+
['#D77440', '#DF8E64'], // [pumpkin.tint20, pumpkin.tint30],
|
|
108
|
+
],
|
|
109
|
+
'9': [
|
|
110
|
+
['#405F14', '#57811B'],
|
|
111
|
+
['#73AA24', '#A4CC6C'], // [lime.primary, lime.tint30],
|
|
112
|
+
],
|
|
113
|
+
'10': [
|
|
114
|
+
['#6D5700', '#937700'],
|
|
115
|
+
['#D0B232', '#DAC157'], // [gold.tint20, gold.tint30],
|
|
116
|
+
],
|
|
117
|
+
};
|
|
118
|
+
var semanticGradientPalette = {
|
|
119
|
+
success: [
|
|
120
|
+
['#0C5E0C', '#107C10'],
|
|
121
|
+
['#218C21', '#359B35'], // [green.tint10, green.tint20],
|
|
122
|
+
],
|
|
123
|
+
highSuccess: [
|
|
124
|
+
['#107C10', '#359B35'],
|
|
125
|
+
['#359B35', '#9FD89F'], // [green.tint20, green.tint40],
|
|
126
|
+
],
|
|
127
|
+
warning: [
|
|
128
|
+
['#DE590B', '#F7630C'],
|
|
129
|
+
['#DE590B', '#F87528'], // [orange.shade10, orange.tint10],
|
|
130
|
+
],
|
|
131
|
+
error: [
|
|
132
|
+
['#B10E1C', '#CC2635'],
|
|
133
|
+
['#D33F4C', '#EEACB2'], // [cranberry.tint20, cranberry.tint40],
|
|
134
|
+
],
|
|
135
|
+
highError: [
|
|
136
|
+
['#6E0811', '#B10E1C'],
|
|
137
|
+
['#D33F4C', '#DC626D'], // [cranberry.tint20, cranberry.tint30],
|
|
138
|
+
],
|
|
139
|
+
disabled: [
|
|
140
|
+
['#E6E6E6', '#F0F0F0'],
|
|
141
|
+
['#E6E6E6', '#F0F0F0'],
|
|
142
|
+
],
|
|
143
|
+
};
|
|
144
|
+
var Gradients = {
|
|
145
|
+
default: defaultGradientPalette,
|
|
146
|
+
semantic: semanticGradientPalette,
|
|
147
|
+
extended: extendedGradientPalette, // extended gradients
|
|
148
|
+
};
|
|
149
|
+
var DEFAULT_COLORS = Object.values(defaultGradientPalette);
|
|
150
|
+
var TOKENS = Object.values(exports.DataVizGradientPalette);
|
|
151
|
+
var getThemeSpecificGradient = function (gradients, isDarkTheme) {
|
|
152
|
+
if (gradients.length === 0) {
|
|
153
|
+
return ['', ''];
|
|
154
|
+
}
|
|
155
|
+
var colorIdx = Number(isDarkTheme);
|
|
156
|
+
if (colorIdx < gradients.length) {
|
|
157
|
+
return gradients[colorIdx];
|
|
158
|
+
}
|
|
159
|
+
return gradients[0];
|
|
160
|
+
};
|
|
161
|
+
var getNextGradient = function (index, offset, isDarkTheme) {
|
|
162
|
+
if (offset === void 0) { offset = 0; }
|
|
163
|
+
if (isDarkTheme === void 0) { isDarkTheme = false; }
|
|
164
|
+
var gradients = DEFAULT_COLORS[(index + offset) % DEFAULT_COLORS.length];
|
|
165
|
+
return getThemeSpecificGradient(gradients, isDarkTheme);
|
|
166
|
+
};
|
|
167
|
+
exports.getNextGradient = getNextGradient;
|
|
168
|
+
var getGradientFromToken = function (token, isDarkTheme) {
|
|
169
|
+
if (isDarkTheme === void 0) { isDarkTheme = false; }
|
|
170
|
+
if (TOKENS.indexOf(token) >= 0) {
|
|
171
|
+
var _a = token.split('.'), paletteName = _a[0], colorCode = _a[1];
|
|
172
|
+
var colors = Gradients[paletteName][colorCode];
|
|
173
|
+
return getThemeSpecificGradient(colors, isDarkTheme);
|
|
174
|
+
}
|
|
175
|
+
return [token, token];
|
|
176
|
+
};
|
|
177
|
+
exports.getGradientFromToken = getGradientFromToken;
|
|
178
|
+
//# sourceMappingURL=gradients.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gradients.js","sourceRoot":"../src/","sources":["utilities/gradients.ts"],"names":[],"mappings":"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","sourcesContent":["export const DataVizGradientPalette = {\n gradient1: 'default.1',\n gradient2: 'default.2',\n gradient3: 'default.3',\n gradient4: 'default.4',\n gradient5: 'default.5',\n gradient6: 'default.6',\n gradient7: 'default.7',\n gradient8: 'default.8',\n gradient9: 'default.9',\n gradient10: 'default.10',\n // extended gradients\n gradient1Ext: 'extended.1',\n gradient2Ext: 'extended.2',\n gradient3Ext: 'extended.3',\n gradient4Ext: 'extended.4',\n gradient5Ext: 'extended.5',\n gradient6Ext: 'extended.6',\n gradient7Ext: 'extended.7',\n gradient8Ext: 'extended.8',\n gradient9Ext: 'extended.9',\n gradient10Ext: 'extended.10',\n // status gradients\n success: 'semantic.success',\n highSuccess: 'semantic.highSuccess',\n warning: 'semantic.warning',\n error: 'semantic.error',\n highError: 'semantic.highError',\n disabled: 'semantic.disabled',\n};\n\n/**\n * Key: Color code.\n * Value:\n *\n * Index 0 - Default gradient for light theme\n * ├── Index 0 - start color of gradient\n * └── Index 1 - end color of gradient\n *\n * Index 1 - gradient for dark theme\n * ├── Index 0 - start color of gradient\n * └── Index 1 - end color of gradient\n */\ntype GradientPalette = { [key: string]: [string, string][] };\n\nconst defaultGradientPalette: GradientPalette = {\n '1': [\n ['#4760D5', '#637CEF'], // [cornflower.shade10, cornflower.tint10],\n ['#4F6BED', '#637CEF'], // [cornflower.shade10, cornflower.tint10],\n ],\n '2': [\n ['#795AA6', '#9373C0'], // [orchid.shade20, orchid.tint10],\n ['#8764B8', '#A083C9'], // [orchid.primary, orchid.tint20],\n ],\n '3': [\n ['#159195', '#2AA0A4'], // [teal.tint10, teal.tint20],\n ['#159195', '#2AA0A4'], // [teal.tint10, teal.tint20],\n ],\n '4': [\n ['#B146C2', '#C36BD1'], // [lilac.primary, lilac.tint20],\n ['#B146C2', '#C36BD1'], // [lilac.primary, lilac.tint20],\n ],\n '5': [\n ['#3487C7', '#3A96DD'], // [lightBlue.shade10, lightBlue.primary],\n ['#3487C7', '#3A96DD'], // [lightBlue.shade20, lightBlue.primary],\n ],\n '6': [\n ['#0E7A0B', '#13A10E'], // [lightGreen.shade20, lightGreen.primary],\n ['#11910D', '#27AC22'], // [lightGreen.shade10, lightGreen.tint10],\n ],\n '7': [\n ['#E61C99', '#EE5FB7'], // [hotPink.tint10, hotPink.tint30],\n ['#E61C99', '#EE5FB7'], // [hotPink.tint10, hotPink.tint30],\n ],\n '8': [\n ['#CA5010', '#D77440'], // [pumpkin.primary, pumpkin.tint20],\n ['#CA5010', '#D77440'], // [pumpkin.primary, pumpkin.tint10],\n ],\n '9': [\n ['#57811B', '#689920'], // [lime.shade20, lime.shade10],\n ['#57811B', '#689920'], // [lime.shade20, lime.shade10],\n ],\n '10': [\n ['#937700', '#AE8C00'], // [gold.shade20, gold.shade10],\n ['#937700', '#AE8C00'], // [gold.shade20, gold.shade10],\n ],\n};\n\nconst extendedGradientPalette: GradientPalette = {\n '1': [\n ['#2C3C85', '#3C51B4'], // [cornflower.shade30, cornflower.shade20],\n ['#93A4F4', '#C8D1FA'], // [cornflower.tint30, cornflower.tint40],\n ],\n '2': [\n ['#4C3867', '#674C8C'], // [orchid.shade30, orchid.shade20],\n ['#A083C9', '#B29AD4'], // [orchid.tint20, orchid.tint30],\n ],\n '3': [\n ['#02494C', '#038387'], // [teal.shade30, teal.primary],\n ['#4CB4B7', '#9BD9DB'], // [teal.tint30, teal.tint40],\n ],\n '4': [\n ['#63276D', '#863593'], // [lilac.shade30, lilac.shade20],\n ['#C36BD1', '#CF87DA'], // [lilac.tint20, lilac.tint30],\n ],\n '5': [\n ['#20547C', '#2C72A8'], // [lightBlue.shade30, lightBlue.shade20],\n ['#4FA1E1', '#83BDEB'], // [lightBlue.tint10, lightBlue.tint30],\n ],\n '6': [\n ['#0B5A08', '#0E7A0B'], // [lightGreen.shade30, lightGreen.shade20],\n ['#27AC22', '#5EC75A'], // [lightGreen.tint10, lightGreen.tint30],\n ],\n '7': [\n ['#AD006A', '#E3008C'], // [hotPink.shade20, hotPink.primary],\n ['#EE5FB7', '#F7ADDA'], // [hotPink.tint30, hotPink.tint40],\n ],\n '8': [\n ['#9A3D0C', '#CA5010'], // [pumpkin.shade20, pumpkin.primary],\n ['#D77440', '#DF8E64'], // [pumpkin.tint20, pumpkin.tint30],\n ],\n '9': [\n ['#405F14', '#57811B'], // [lime.shade30, lime.shade20],\n ['#73AA24', '#A4CC6C'], // [lime.primary, lime.tint30],\n ],\n '10': [\n ['#6D5700', '#937700'], // [gold.shade30, gold.shade20],\n ['#D0B232', '#DAC157'], // [gold.tint20, gold.tint30],\n ],\n};\n\nconst semanticGradientPalette: GradientPalette = {\n success: [\n ['#0C5E0C', '#107C10'], // [green.shade20, green.primary],\n ['#218C21', '#359B35'], // [green.tint10, green.tint20],\n ],\n highSuccess: [\n ['#107C10', '#359B35'], // [green.primary, green.tint20],\n ['#359B35', '#9FD89F'], // [green.tint20, green.tint40],\n ],\n warning: [\n ['#DE590B', '#F7630C'], // [orange.shade10, orange.primary],\n ['#DE590B', '#F87528'], // [orange.shade10, orange.tint10],\n ],\n error: [\n ['#B10E1C', '#CC2635'], // [cranberry.shade10, cranberry.tint10],\n ['#D33F4C', '#EEACB2'], // [cranberry.tint20, cranberry.tint40],\n ],\n highError: [\n ['#6E0811', '#B10E1C'], // [cranberry.shade30, cranberry.shade10],\n ['#D33F4C', '#DC626D'], // [cranberry.tint20, cranberry.tint30],\n ],\n disabled: [\n ['#E6E6E6', '#F0F0F0'],\n ['#E6E6E6', '#F0F0F0'],\n ],\n};\n\nconst Gradients: { [key: string]: GradientPalette } = {\n default: defaultGradientPalette, // base gradients\n semantic: semanticGradientPalette, // status gradients\n extended: extendedGradientPalette, // extended gradients\n};\n\nconst DEFAULT_COLORS = Object.values(defaultGradientPalette);\nconst TOKENS = Object.values(DataVizGradientPalette);\n\nconst getThemeSpecificGradient = (gradients: [string, string][], isDarkTheme: boolean): [string, string] => {\n if (gradients.length === 0) {\n return ['', ''];\n }\n\n const colorIdx = Number(isDarkTheme);\n\n if (colorIdx < gradients.length) {\n return gradients[colorIdx];\n }\n\n return gradients[0];\n};\n\nexport const getNextGradient = (index: number, offset: number = 0, isDarkTheme: boolean = false): [string, string] => {\n const gradients = DEFAULT_COLORS[(index + offset) % DEFAULT_COLORS.length];\n return getThemeSpecificGradient(gradients, isDarkTheme);\n};\n\nexport const getGradientFromToken = (token: string, isDarkTheme: boolean = false): [string, string] => {\n if (TOKENS.indexOf(token) >= 0) {\n const [paletteName, colorCode] = token.split('.');\n const colors = Gradients[paletteName][colorCode];\n\n return getThemeSpecificGradient(colors, isDarkTheme);\n }\n return [token, token];\n};\n"]}
|
|
@@ -4,5 +4,6 @@ var tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./ChartHoverCard/index"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./utilities"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./colors"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./gradients"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./vbc-utils"), exports);
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utilities/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC;AACvC,sDAA4B;AAC5B,mDAAyB;AACzB,sDAA4B","sourcesContent":["export * from './ChartHoverCard/index';\nexport * from './utilities';\nexport * from './colors';\nexport * from './vbc-utils';\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["utilities/index.ts"],"names":[],"mappings":";;;AAAA,iEAAuC;AACvC,sDAA4B;AAC5B,mDAAyB;AACzB,sDAA4B;AAC5B,sDAA4B","sourcesContent":["export * from './ChartHoverCard/index';\nexport * from './utilities';\nexport * from './colors';\nexport * from './gradients';\nexport * from './vbc-utils';\n"]}
|
package/lib-commonjs/version.js
CHANGED
|
@@ -3,5 +3,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
// Do not modify this file; it is generated as part of publish.
|
|
4
4
|
// The checked in version is a placeholder only and will not be updated.
|
|
5
5
|
var set_version_1 = require("@fluentui/set-version");
|
|
6
|
-
(0, set_version_1.setVersion)('@fluentui/react-charting', '5.
|
|
6
|
+
(0, set_version_1.setVersion)('@fluentui/react-charting', '5.22.0');
|
|
7
7
|
//# sourceMappingURL=version.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,qDAAmD;AACnD,IAAA,wBAAU,EAAC,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"../src/","sources":["version.ts"],"names":[],"mappings":";;AAAA,+DAA+D;AAC/D,wEAAwE;AACxE,qDAAmD;AACnD,IAAA,wBAAU,EAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC","sourcesContent":["// Do not modify this file; it is generated as part of publish.\n// The checked in version is a placeholder only and will not be updated.\nimport { setVersion } from '@fluentui/set-version';\nsetVersion('@fluentui/react-charting', '5.22.0');"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-charting",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.0",
|
|
4
4
|
"description": "React web charting controls for Microsoft fluentui system.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
"jest-canvas-mock": "2.4.0"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@fluentui/react-focus": "^8.9.
|
|
43
|
-
"@fluentui/theme-samples": "^8.7.
|
|
42
|
+
"@fluentui/react-focus": "^8.9.13",
|
|
43
|
+
"@fluentui/theme-samples": "^8.7.169",
|
|
44
44
|
"@microsoft/load-themed-styles": "^1.10.26",
|
|
45
45
|
"@types/d3-array": "^2.0.0",
|
|
46
46
|
"@types/d3-axis": "^2.0.0",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"tslib": "^2.1.0"
|
|
67
67
|
},
|
|
68
68
|
"peerDependencies": {
|
|
69
|
-
"@fluentui/react": "^8.120.
|
|
69
|
+
"@fluentui/react": "^8.120.5",
|
|
70
70
|
"@types/react": ">=16.8.0 <19.0.0",
|
|
71
71
|
"@types/react-dom": ">=16.8.0 <19.0.0",
|
|
72
72
|
"react": ">=16.8.0 <19.0.0",
|
package/project.json
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
"name": "react-charting",
|
|
3
3
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
4
4
|
"projectType": "library",
|
|
5
|
+
"tags": ["v8", "ships-bundle"],
|
|
5
6
|
"implicitDependencies": [],
|
|
6
|
-
"
|
|
7
|
+
"targets": {
|
|
8
|
+
"test": {
|
|
9
|
+
"dependsOn": ["^build"]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
7
12
|
}
|
|
@@ -99,6 +99,24 @@ export interface IArcProps {
|
|
|
99
99
|
* Prop to hide the arc labels
|
|
100
100
|
*/
|
|
101
101
|
hideLabels?: boolean;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Prop to enable the gradient in the arc
|
|
105
|
+
* @default false
|
|
106
|
+
*/
|
|
107
|
+
enableGradient?: boolean;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Prop to enable the round corners in the chart
|
|
111
|
+
* @default false
|
|
112
|
+
*/
|
|
113
|
+
roundCorners?: boolean;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* Next color stop for the gradient
|
|
117
|
+
* [Only used when enableGradient is True].
|
|
118
|
+
*/
|
|
119
|
+
nextColor: string;
|
|
102
120
|
}
|
|
103
121
|
|
|
104
122
|
export interface IArcData {
|
|
@@ -57,6 +57,18 @@ export interface IDonutChartProps extends ICartesianChartProps {
|
|
|
57
57
|
* @default true
|
|
58
58
|
*/
|
|
59
59
|
hideLabels?: boolean;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Prop to enable the gradient in the chart
|
|
63
|
+
* @default false
|
|
64
|
+
*/
|
|
65
|
+
enableGradient?: boolean;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Prop to enable the round corners in the chart
|
|
69
|
+
* @default false
|
|
70
|
+
*/
|
|
71
|
+
roundCorners?: boolean;
|
|
60
72
|
}
|
|
61
73
|
|
|
62
74
|
/**
|
|
@@ -85,6 +85,18 @@ export interface IPieProps {
|
|
|
85
85
|
* Prop to hide the arc labels
|
|
86
86
|
*/
|
|
87
87
|
hideLabels?: boolean;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Prop to enable the gradient in the chart
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
enableGradient?: boolean;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Prop to enable the round corners in the chart
|
|
97
|
+
* @default false
|
|
98
|
+
*/
|
|
99
|
+
roundCorners?: boolean;
|
|
88
100
|
}
|
|
89
101
|
|
|
90
102
|
export interface IPieStyles {
|
|
@@ -24,6 +24,11 @@ export interface IGaugeChartSegment {
|
|
|
24
24
|
*/
|
|
25
25
|
color?: string;
|
|
26
26
|
|
|
27
|
+
/**
|
|
28
|
+
* Gradient color of the segment
|
|
29
|
+
*/
|
|
30
|
+
gradient?: [string, string];
|
|
31
|
+
|
|
27
32
|
/**
|
|
28
33
|
* Accessibility data for the segment
|
|
29
34
|
*/
|
|
@@ -151,6 +156,18 @@ export interface IGaugeChartProps {
|
|
|
151
156
|
* @defaultvalue GaugeChartVariant.MultipleSegments
|
|
152
157
|
*/
|
|
153
158
|
variant?: GaugeChartVariant;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Prop to enable the gradient in the chart
|
|
162
|
+
* @default false
|
|
163
|
+
*/
|
|
164
|
+
enableGradient?: boolean;
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Prop to enable the round corners in the chart
|
|
168
|
+
* @default false
|
|
169
|
+
*/
|
|
170
|
+
roundCorners?: boolean;
|
|
154
171
|
}
|
|
155
172
|
|
|
156
173
|
/**
|
|
@@ -92,6 +92,18 @@ export interface IHorizontalBarChartProps {
|
|
|
92
92
|
* @default false
|
|
93
93
|
*/
|
|
94
94
|
hideLabels?: boolean;
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* @default false
|
|
98
|
+
* The prop used to enable gradient fill color for the chart.
|
|
99
|
+
*/
|
|
100
|
+
enableGradient?: boolean;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* @default false
|
|
104
|
+
* The prop used to enable rounded corners for the chart.
|
|
105
|
+
*/
|
|
106
|
+
roundCorners?: boolean;
|
|
95
107
|
}
|
|
96
108
|
|
|
97
109
|
/**
|
|
@@ -70,6 +70,18 @@ export interface IHorizontalBarChartWithAxisProps extends ICartesianChartProps {
|
|
|
70
70
|
*@default false
|
|
71
71
|
*Used for showing complete y axis lables */
|
|
72
72
|
showYAxisLables?: boolean;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* @default false
|
|
76
|
+
* The prop used to enable gradient fill color for the chart.
|
|
77
|
+
*/
|
|
78
|
+
enableGradient?: boolean;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* @default false
|
|
82
|
+
* The prop used to enable rounded corners for the bars.
|
|
83
|
+
*/
|
|
84
|
+
roundCorners?: boolean;
|
|
73
85
|
}
|
|
74
86
|
|
|
75
87
|
/**
|
|
@@ -119,6 +119,18 @@ export interface IMultiStackedBarChartProps {
|
|
|
119
119
|
* @default false
|
|
120
120
|
*/
|
|
121
121
|
hideLabels?: boolean;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* @default false
|
|
125
|
+
* The prop used to enable gradient fill color for the chart.
|
|
126
|
+
*/
|
|
127
|
+
enableGradient?: boolean;
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* @default false
|
|
131
|
+
* The prop used to enable rounded corners for the chart.
|
|
132
|
+
*/
|
|
133
|
+
roundCorners?: boolean;
|
|
122
134
|
}
|
|
123
135
|
|
|
124
136
|
/**
|