@fluentui/react-charting 5.24.2 → 5.24.4
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 +79 -1
- package/CHANGELOG.md +28 -2
- package/dist/react-charting.d.ts +204 -38
- package/dist/react-charting.js +1 -1
- package/dist/react-charting.min.js +1 -1
- package/etc/react-charting.api.md +65 -12
- package/lib/ScatterChart.d.ts +1 -0
- package/lib/ScatterChart.js +2 -0
- package/lib/ScatterChart.js.map +1 -0
- package/lib/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib/components/AreaChart/AreaChart.base.js +4 -1
- package/lib/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js +9 -1
- package/lib/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js +317 -126
- package/lib/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +22 -3
- package/lib/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib/components/HeatMapChart/HeatMapChart.base.js +95 -37
- package/lib/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +24 -3
- package/lib/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.base.js +482 -0
- package/lib/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib/components/ScatterChart/ScatterChart.js +10 -0
- package/lib/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js +19 -0
- package/lib/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib/components/ScatterChart/ScatterChart.types.js +2 -0
- package/lib/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib/components/ScatterChart/index.d.ts +2 -0
- package/lib/components/ScatterChart/index.js +3 -0
- package/lib/components/ScatterChart/index.js.map +1 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js +27 -6
- package/lib/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +48 -31
- package/lib/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/types/IDataPoint.d.ts +91 -11
- package/lib/types/IDataPoint.js.map +1 -1
- package/lib/utilities/SVGTooltipText.d.ts +4 -0
- package/lib/utilities/SVGTooltipText.js +1 -2
- package/lib/utilities/SVGTooltipText.js.map +1 -1
- package/lib/utilities/utilities.d.ts +32 -5
- package/lib/utilities/utilities.js +132 -2
- package/lib/utilities/utilities.js.map +1 -1
- package/lib-amd/ScatterChart.d.ts +1 -0
- package/lib-amd/ScatterChart.js +6 -0
- package/lib-amd/ScatterChart.js.map +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-amd/components/AreaChart/AreaChart.base.js +4 -1
- package/lib-amd/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib-amd/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-amd/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-amd/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib-amd/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js +155 -78
- package/lib-amd/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
- package/lib-amd/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
- package/lib-amd/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
- package/lib-amd/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js +94 -36
- package/lib-amd/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
- package/lib-amd/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-amd/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js +476 -0
- package/lib-amd/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js +12 -0
- package/lib-amd/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js +23 -0
- package/lib-amd/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js +5 -0
- package/lib-amd/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-amd/components/ScatterChart/index.d.ts +2 -0
- package/lib-amd/components/ScatterChart/index.js +7 -0
- package/lib-amd/components/ScatterChart/index.js.map +1 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
- package/lib-amd/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
- package/lib-amd/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-amd/index.d.ts +3 -1
- package/lib-amd/index.js +3 -2
- package/lib-amd/index.js.map +1 -1
- package/lib-amd/types/IDataPoint.d.ts +91 -11
- package/lib-amd/types/IDataPoint.js.map +1 -1
- package/lib-amd/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-amd/utilities/SVGTooltipText.js +1 -2
- package/lib-amd/utilities/SVGTooltipText.js.map +1 -1
- package/lib-amd/utilities/utilities.d.ts +32 -5
- package/lib-amd/utilities/utilities.js +135 -2
- package/lib-amd/utilities/utilities.js.map +1 -1
- package/lib-commonjs/ScatterChart.d.ts +1 -0
- package/lib-commonjs/ScatterChart.js +5 -0
- package/lib-commonjs/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.d.ts +1 -0
- package/lib-commonjs/components/AreaChart/AreaChart.base.js +4 -1
- package/lib-commonjs/components/AreaChart/AreaChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js +47 -11
- package/lib-commonjs/components/CommonComponents/CartesianChart.base.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js +48 -26
- package/lib-commonjs/components/CommonComponents/CartesianChart.styles.js.map +1 -1
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.d.ts +33 -3
- package/lib-commonjs/components/CommonComponents/CartesianChart.types.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js +157 -78
- package/lib-commonjs/components/DeclarativeChart/DeclarativeChart.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.d.ts +2 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js +11 -2
- package/lib-commonjs/components/DeclarativeChart/PlotlyColorAdapter.js.map +1 -1
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.d.ts +28 -13
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js +327 -134
- package/lib-commonjs/components/DeclarativeChart/PlotlySchemaAdapter.js.map +1 -1
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.d.ts +2 -0
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js +21 -2
- package/lib-commonjs/components/GroupedVerticalBarChart/GroupedVerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.d.ts +7 -0
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js +94 -36
- package/lib-commonjs/components/HeatMapChart/HeatMapChart.base.js.map +1 -1
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.d.ts +3 -0
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js +23 -2
- package/lib-commonjs/components/HorizontalBarChartWithAxis/HorizontalBarChartWithAxis.base.js.map +1 -1
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js +485 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.base.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.d.ts +7 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js +13 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js +23 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.styles.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.d.ts +47 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js +3 -0
- package/lib-commonjs/components/ScatterChart/ScatterChart.types.js.map +1 -0
- package/lib-commonjs/components/ScatterChart/index.d.ts +2 -0
- package/lib-commonjs/components/ScatterChart/index.js +6 -0
- package/lib-commonjs/components/ScatterChart/index.js.map +1 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.d.ts +2 -0
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js +26 -5
- package/lib-commonjs/components/VerticalBarChart/VerticalBarChart.base.js.map +1 -1
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.d.ts +3 -0
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js +47 -30
- package/lib-commonjs/components/VerticalStackedBarChart/VerticalStackedBarChart.base.js.map +1 -1
- package/lib-commonjs/index.d.ts +3 -1
- package/lib-commonjs/index.js +3 -1
- package/lib-commonjs/index.js.map +1 -1
- package/lib-commonjs/types/IDataPoint.d.ts +91 -11
- package/lib-commonjs/types/IDataPoint.js.map +1 -1
- package/lib-commonjs/utilities/SVGTooltipText.d.ts +4 -0
- package/lib-commonjs/utilities/SVGTooltipText.js +1 -2
- package/lib-commonjs/utilities/SVGTooltipText.js.map +1 -1
- package/lib-commonjs/utilities/utilities.d.ts +32 -5
- package/lib-commonjs/utilities/utilities.js +135 -2
- package/lib-commonjs/utilities/utilities.js.map +1 -1
- package/package.json +2 -2
- package/src/components/CommonComponents/CartesianChart.types.ts +45 -2
- package/src/components/ScatterChart/ScatterChart.types.ts +67 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "@fluentui/react/lib/Styling"], function (require, exports, tslib_1, Styling_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getStyles = void 0;
|
|
5
|
+
var getStyles = function (props) {
|
|
6
|
+
var _a;
|
|
7
|
+
return {
|
|
8
|
+
tooltip: tslib_1.__assign(tslib_1.__assign({}, props.theme.fonts.medium), { display: 'flex', flexDirection: 'column', padding: '8px', position: 'absolute', textAlign: 'center', top: '0px', background: props.theme.semanticColors.bodyBackground, borderRadius: '2px', pointerEvents: 'none', color: props.theme.semanticColors.bodyText }),
|
|
9
|
+
markerLabel: {
|
|
10
|
+
fontSize: Styling_1.FontSizes.medium,
|
|
11
|
+
fill: props.theme.semanticColors.bodyText,
|
|
12
|
+
textAnchor: 'middle',
|
|
13
|
+
selectors: (_a = {},
|
|
14
|
+
_a[Styling_1.HighContrastSelector] = {
|
|
15
|
+
fill: 'CanvasText',
|
|
16
|
+
},
|
|
17
|
+
_a),
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
exports.getStyles = getStyles;
|
|
22
|
+
});
|
|
23
|
+
//# sourceMappingURL=ScatterChart.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterChart.styles.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.styles.ts"],"names":[],"mappings":";;;;IAGO,IAAM,SAAS,GAAG,UAAC,KAA8B;;QACtD,OAAO;YACL,OAAO,wCACF,KAAK,CAAC,KAAM,CAAC,KAAK,CAAC,MAAM,KAC5B,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,KAAK,EACd,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,QAAQ,EACnB,GAAG,EAAE,KAAK,EACV,UAAU,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,cAAc,EACtD,YAAY,EAAE,KAAK,EACnB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,QAAQ,GAC5C;YACD,WAAW,EAAE;gBACX,QAAQ,EAAE,mBAAS,CAAC,MAAM;gBAC1B,IAAI,EAAE,KAAK,CAAC,KAAM,CAAC,cAAc,CAAC,QAAQ;gBAC1C,UAAU,EAAE,QAAQ;gBACpB,SAAS;oBACP,GAAC,8BAAoB,IAAG;wBACtB,IAAI,EAAE,YAAY;qBACnB;uBACF;aACF;SACF,CAAC;IACJ,CAAC,CAAC;IA1BW,QAAA,SAAS,aA0BpB","sourcesContent":["import { FontSizes, HighContrastSelector } from '@fluentui/react/lib/Styling';\nimport { IScatterChartStyleProps, IScatterChartStyles } from './ScatterChart.types';\n\nexport const getStyles = (props: IScatterChartStyleProps): IScatterChartStyles => {\n return {\n tooltip: {\n ...props.theme!.fonts.medium,\n display: 'flex',\n flexDirection: 'column',\n padding: '8px',\n position: 'absolute',\n textAlign: 'center',\n top: '0px',\n background: props.theme!.semanticColors.bodyBackground,\n borderRadius: '2px',\n pointerEvents: 'none',\n color: props.theme!.semanticColors.bodyText,\n },\n markerLabel: {\n fontSize: FontSizes.medium,\n fill: props.theme!.semanticColors.bodyText,\n textAnchor: 'middle',\n selectors: {\n [HighContrastSelector]: {\n fill: 'CanvasText',\n },\n },\n },\n };\n};\n"]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { IRenderFunction } from '@fluentui/react/lib/Utilities';
|
|
2
|
+
import { IChartProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData, ICustomizedCalloutData } from '../../types/index';
|
|
3
|
+
import { ICartesianChartProps, ICartesianChartStyleProps, ICartesianChartStyles, IChildProps } from '../CommonComponents/index';
|
|
4
|
+
import { IStyle } from '@fluentui/react';
|
|
5
|
+
export type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };
|
|
6
|
+
/**
|
|
7
|
+
* Line Chart properties
|
|
8
|
+
* {@docCategory LineChart}
|
|
9
|
+
*/
|
|
10
|
+
export interface IScatterChartProps extends ICartesianChartProps {
|
|
11
|
+
/**
|
|
12
|
+
* Data to render in the chart.
|
|
13
|
+
*/
|
|
14
|
+
data: IChartProps;
|
|
15
|
+
/**
|
|
16
|
+
* Call to provide customized styling that will layer on top of the variant rules.
|
|
17
|
+
*/
|
|
18
|
+
styles?: IScatterChartStyles;
|
|
19
|
+
/**
|
|
20
|
+
* Define a custom callout renderer for a data point
|
|
21
|
+
*/
|
|
22
|
+
onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;
|
|
23
|
+
/**
|
|
24
|
+
* Callback for getting callout description message
|
|
25
|
+
*/
|
|
26
|
+
getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* The prop used to define the culture to localized the numbers
|
|
29
|
+
*/
|
|
30
|
+
culture?: string;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Scatter Chart styles
|
|
34
|
+
* {@docCategory ScatterChart}
|
|
35
|
+
*/
|
|
36
|
+
export interface IScatterChartStyles extends ICartesianChartStyles {
|
|
37
|
+
/**
|
|
38
|
+
* Style for the marker label
|
|
39
|
+
*/
|
|
40
|
+
markerLabel?: IStyle;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Scatter Chart style properties
|
|
44
|
+
* {@docCategory ScatterChart}
|
|
45
|
+
*/
|
|
46
|
+
export interface IScatterChartStyleProps extends ICartesianChartStyleProps {
|
|
47
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ScatterChart.types.js","sourceRoot":"../src/","sources":["components/ScatterChart/ScatterChart.types.ts"],"names":[],"mappings":"","sourcesContent":["/* eslint-disable @typescript-eslint/naming-convention */\nimport { IRenderFunction } from '@fluentui/react/lib/Utilities';\nimport {\n IChartProps,\n ILineChartPoints,\n IMargins,\n IBasestate,\n IRefArrayData,\n ICustomizedCalloutData,\n} from '../../types/index';\nimport {\n ICartesianChartProps,\n ICartesianChartStyleProps,\n ICartesianChartStyles,\n IChildProps,\n} from '../CommonComponents/index';\nimport { IStyle } from '@fluentui/react';\n\nexport type { IChildProps, ILineChartPoints, IMargins, IBasestate, IRefArrayData };\n\n/**\n * Line Chart properties\n * {@docCategory LineChart}\n */\nexport interface IScatterChartProps extends ICartesianChartProps {\n /**\n * Data to render in the chart.\n */\n data: IChartProps;\n\n /**\n * Call to provide customized styling that will layer on top of the variant rules.\n */\n styles?: IScatterChartStyles;\n\n /**\n * Define a custom callout renderer for a data point\n */\n onRenderCalloutPerDataPoint?: IRenderFunction<ICustomizedCalloutData>;\n\n /**\n * Callback for getting callout description message\n */\n getCalloutDescriptionMessage?: (calloutDataProps: ICustomizedCalloutData) => string | undefined;\n\n /**\n * The prop used to define the culture to localized the numbers\n */\n culture?: string;\n}\n\n/**\n * Scatter Chart styles\n * {@docCategory ScatterChart}\n */\nexport interface IScatterChartStyles extends ICartesianChartStyles {\n /**\n * Style for the marker label\n */\n markerLabel?: IStyle;\n}\n\n/**\n * Scatter Chart style properties\n * {@docCategory ScatterChart}\n */\nexport interface IScatterChartStyleProps extends ICartesianChartStyleProps {}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
define(["require", "exports", "tslib", "./ScatterChart", "./ScatterChart.types"], function (require, exports, tslib_1, ScatterChart_1, ScatterChart_types_1) {
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
tslib_1.__exportStar(ScatterChart_1, exports);
|
|
5
|
+
tslib_1.__exportStar(ScatterChart_types_1, exports);
|
|
6
|
+
});
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"../src/","sources":["components/ScatterChart/index.ts"],"names":[],"mappings":";;;IAAA,8CAA+B;IAC/B,oDAAqC","sourcesContent":["export * from './ScatterChart';\nexport * from './ScatterChart.types';\n"]}
|
|
@@ -479,6 +479,26 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-shape", "d3-sele
|
|
|
479
479
|
(_this._isHavingLine ? ' and 1 line' : '') +
|
|
480
480
|
'. ');
|
|
481
481
|
};
|
|
482
|
+
_this._getOrderedXAxisLabels = function () {
|
|
483
|
+
if (_this._xAxisType !== index_2.XAxisTypes.StringAxis) {
|
|
484
|
+
return [];
|
|
485
|
+
}
|
|
486
|
+
return (0, index_2.sortAxisCategories)(_this._mapCategoryToValues(), _this.props.xAxisCategoryOrder);
|
|
487
|
+
};
|
|
488
|
+
_this._mapCategoryToValues = function () {
|
|
489
|
+
var categoryToValues = {};
|
|
490
|
+
_this._points.forEach(function (point) {
|
|
491
|
+
var xValue = point.x;
|
|
492
|
+
if (!categoryToValues[xValue]) {
|
|
493
|
+
categoryToValues[xValue] = [];
|
|
494
|
+
}
|
|
495
|
+
categoryToValues[xValue].push(point.y);
|
|
496
|
+
if (point.lineData) {
|
|
497
|
+
categoryToValues[xValue].push(point.lineData.y);
|
|
498
|
+
}
|
|
499
|
+
});
|
|
500
|
+
return categoryToValues;
|
|
501
|
+
};
|
|
482
502
|
(0, Utilities_1.initializeComponentRef)(_this);
|
|
483
503
|
_this.state = {
|
|
484
504
|
color: '',
|
|
@@ -498,10 +518,6 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-shape", "d3-sele
|
|
|
498
518
|
_this._calloutId = (0, Utilities_1.getId)('callout');
|
|
499
519
|
_this._tooltipId = (0, Utilities_1.getId)('VCTooltipID_');
|
|
500
520
|
_this._refArray = [];
|
|
501
|
-
_this._xAxisType =
|
|
502
|
-
_this.props.data && _this.props.data.length > 0
|
|
503
|
-
? (0, index_2.getTypeOfAxis)(_this.props.data[0].x, true)
|
|
504
|
-
: index_2.XAxisTypes.StringAxis;
|
|
505
521
|
_this._emptyChartId = (0, Utilities_1.getId)('_VBC_empty');
|
|
506
522
|
_this._domainMargin = MIN_DOMAIN_MARGIN;
|
|
507
523
|
_this._cartesianChartRef = React.createRef();
|
|
@@ -519,7 +535,7 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-shape", "d3-sele
|
|
|
519
535
|
VerticalBarChartBase.prototype.render = function () {
|
|
520
536
|
var _this = this;
|
|
521
537
|
this._adjustProps();
|
|
522
|
-
this._xAxisLabels = this.
|
|
538
|
+
this._xAxisLabels = this._getOrderedXAxisLabels();
|
|
523
539
|
this._yMax = Math.max((0, d3_array_1.max)(this._points, function (point) { return point.y; }), this.props.yMaxValue || 0);
|
|
524
540
|
this._yMin = Math.min((0, d3_array_1.min)(this._points, function (point) { return point.y; }), this.props.yMinValue || 0);
|
|
525
541
|
var legendBars = this._getLegendData(this._points, this.props.theme.palette);
|
|
@@ -557,6 +573,10 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-shape", "d3-sele
|
|
|
557
573
|
configurable: true
|
|
558
574
|
});
|
|
559
575
|
VerticalBarChartBase.prototype._adjustProps = function () {
|
|
576
|
+
this._xAxisType =
|
|
577
|
+
this.props.data && this.props.data.length > 0
|
|
578
|
+
? (0, index_2.getTypeOfAxis)(this.props.data[0].x, true)
|
|
579
|
+
: index_2.XAxisTypes.StringAxis;
|
|
560
580
|
this._points = this.props.data || [];
|
|
561
581
|
this._barWidth = (0, index_2.getBarWidth)(this.props.barWidth, this.props.maxBarWidth, undefined, this.props.mode);
|
|
562
582
|
var palette = this.props.theme.palette;
|
|
@@ -902,6 +922,7 @@ define(["require", "exports", "tslib", "react", "d3-array", "d3-shape", "d3-sele
|
|
|
902
922
|
VerticalBarChartBase.defaultProps = {
|
|
903
923
|
maxBarWidth: 24,
|
|
904
924
|
useUTC: true,
|
|
925
|
+
xAxisCategoryOrder: 'default',
|
|
905
926
|
};
|
|
906
927
|
return VerticalBarChartBase;
|
|
907
928
|
}(React.Component));
|