@hitachivantara/uikit-react-viz 4.0.3 → 4.0.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/dist/Barchart/Barchart.js +45 -72
- package/dist/Barchart/Barchart.js.map +1 -1
- package/dist/Barchart/barchartPlotlyOverrides.js +1 -13
- package/dist/Barchart/barchartPlotlyOverrides.js.map +1 -1
- package/dist/Barchart/index.js +0 -2
- package/dist/Barchart/index.js.map +1 -1
- package/dist/Barchart/styles.js.map +1 -1
- package/dist/Chart/Chart.js +28 -75
- package/dist/Chart/Chart.js.map +1 -1
- package/dist/Chart/Plot/Plot.js +10 -47
- package/dist/Chart/Plot/Plot.js.map +1 -1
- package/dist/Chart/Plot/index.js +0 -2
- package/dist/Chart/Plot/index.js.map +1 -1
- package/dist/Chart/Plot/styles.js.map +1 -1
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js +1 -36
- package/dist/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
- package/dist/Chart/Tooltip/MultiTooltip/index.js +0 -2
- package/dist/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
- package/dist/Chart/Tooltip/MultiTooltip/styles.js +0 -2
- package/dist/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js +2 -26
- package/dist/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
- package/dist/Chart/Tooltip/SingleTooltip/index.js +0 -2
- package/dist/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
- package/dist/Chart/Tooltip/SingleTooltip/styles.js +0 -2
- package/dist/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
- package/dist/Chart/Tooltip/Tooltip.js +16 -51
- package/dist/Chart/Tooltip/Tooltip.js.map +1 -1
- package/dist/Chart/Tooltip/index.js +0 -2
- package/dist/Chart/Tooltip/index.js.map +1 -1
- package/dist/Chart/Tooltip/styles.js.map +1 -1
- package/dist/Chart/chartPlotlyOverrides.js +9 -33
- package/dist/Chart/chartPlotlyOverrides.js.map +1 -1
- package/dist/Chart/index.js +0 -2
- package/dist/Chart/index.js.map +1 -1
- package/dist/Chart/styles.js +0 -13
- package/dist/Chart/styles.js.map +1 -1
- package/dist/Donutchart/Donutchart.js +10 -47
- package/dist/Donutchart/Donutchart.js.map +1 -1
- package/dist/Donutchart/donutchartPlotlyOverrides.js +1 -13
- package/dist/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
- package/dist/Donutchart/index.js +0 -2
- package/dist/Donutchart/index.js.map +1 -1
- package/dist/Donutchart/styles.js.map +1 -1
- package/dist/Linechart/Linechart.js +12 -50
- package/dist/Linechart/Linechart.js.map +1 -1
- package/dist/Linechart/index.js +0 -2
- package/dist/Linechart/index.js.map +1 -1
- package/dist/Linechart/lineChartPlotlyOverrides.js +1 -17
- package/dist/Linechart/lineChartPlotlyOverrides.js.map +1 -1
- package/dist/Linechart/styles.js.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/legacy/Barchart/Barchart.js +45 -43
- package/dist/legacy/Barchart/Barchart.js.map +1 -1
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js +1 -6
- package/dist/legacy/Barchart/barchartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Barchart/index.js.map +1 -1
- package/dist/legacy/Barchart/styles.js.map +1 -1
- package/dist/legacy/Chart/Chart.js +28 -46
- package/dist/legacy/Chart/Chart.js.map +1 -1
- package/dist/legacy/Chart/Plot/Plot.js +10 -21
- package/dist/legacy/Chart/Plot/Plot.js.map +1 -1
- package/dist/legacy/Chart/Plot/index.js.map +1 -1
- package/dist/legacy/Chart/Plot/styles.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js +1 -17
- package/dist/legacy/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js +0 -1
- package/dist/legacy/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js +2 -9
- package/dist/legacy/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js +0 -1
- package/dist/legacy/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/Tooltip.js +16 -30
- package/dist/legacy/Chart/Tooltip/Tooltip.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/index.js.map +1 -1
- package/dist/legacy/Chart/Tooltip/styles.js.map +1 -1
- package/dist/legacy/Chart/chartPlotlyOverrides.js +9 -20
- package/dist/legacy/Chart/chartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Chart/index.js.map +1 -1
- package/dist/legacy/Chart/styles.js +0 -4
- package/dist/legacy/Chart/styles.js.map +1 -1
- package/dist/legacy/Donutchart/Donutchart.js +11 -22
- package/dist/legacy/Donutchart/Donutchart.js.map +1 -1
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js +1 -6
- package/dist/legacy/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Donutchart/index.js.map +1 -1
- package/dist/legacy/Donutchart/styles.js.map +1 -1
- package/dist/legacy/Linechart/Linechart.js +13 -25
- package/dist/legacy/Linechart/Linechart.js.map +1 -1
- package/dist/legacy/Linechart/index.js.map +1 -1
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js +1 -10
- package/dist/legacy/Linechart/lineChartPlotlyOverrides.js.map +1 -1
- package/dist/legacy/Linechart/styles.js.map +1 -1
- package/dist/legacy/index.js.map +1 -1
- package/dist/modern/Barchart/Barchart.js +38 -31
- package/dist/modern/Barchart/Barchart.js.map +1 -1
- package/dist/modern/Barchart/barchartPlotlyOverrides.js +1 -6
- package/dist/modern/Barchart/barchartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Barchart/index.js.map +1 -1
- package/dist/modern/Barchart/styles.js.map +1 -1
- package/dist/modern/Chart/Chart.js +17 -33
- package/dist/modern/Chart/Chart.js.map +1 -1
- package/dist/modern/Chart/Plot/Plot.js +11 -22
- package/dist/modern/Chart/Plot/Plot.js.map +1 -1
- package/dist/modern/Chart/Plot/index.js.map +1 -1
- package/dist/modern/Chart/Plot/styles.js.map +1 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js +0 -17
- package/dist/modern/Chart/Tooltip/MultiTooltip/MultiTooltip.js.map +1 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/index.js.map +1 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js +0 -1
- package/dist/modern/Chart/Tooltip/MultiTooltip/styles.js.map +1 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js +0 -7
- package/dist/modern/Chart/Tooltip/SingleTooltip/SingleTooltip.js.map +1 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/index.js.map +1 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js +0 -1
- package/dist/modern/Chart/Tooltip/SingleTooltip/styles.js.map +1 -1
- package/dist/modern/Chart/Tooltip/Tooltip.js +2 -13
- package/dist/modern/Chart/Tooltip/Tooltip.js.map +1 -1
- package/dist/modern/Chart/Tooltip/index.js.map +1 -1
- package/dist/modern/Chart/Tooltip/styles.js.map +1 -1
- package/dist/modern/Chart/chartPlotlyOverrides.js +9 -20
- package/dist/modern/Chart/chartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Chart/index.js.map +1 -1
- package/dist/modern/Chart/styles.js +0 -4
- package/dist/modern/Chart/styles.js.map +1 -1
- package/dist/modern/Donutchart/Donutchart.js +11 -22
- package/dist/modern/Donutchart/Donutchart.js.map +1 -1
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js +1 -6
- package/dist/modern/Donutchart/donutchartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Donutchart/index.js.map +1 -1
- package/dist/modern/Donutchart/styles.js.map +1 -1
- package/dist/modern/Linechart/Linechart.js +12 -24
- package/dist/modern/Linechart/Linechart.js.map +1 -1
- package/dist/modern/Linechart/index.js.map +1 -1
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js +1 -10
- package/dist/modern/Linechart/lineChartPlotlyOverrides.js.map +1 -1
- package/dist/modern/Linechart/styles.js.map +1 -1
- package/dist/modern/index.js.map +1 -1
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","defaultColors","hv","viz","palette","categorical","vizText","typography","fontFamily","fontSize","legendText","normalText","lineColor","atmosphere","atmo4","gridColor","plotColor"],"sources":["../../../src/Chart/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: 0,\n },\n defaultColors: {\n ...theme.hv.viz.palette.categorical,\n },\n vizText: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n fontSize: 10,\n },\n legendText: {\n ...theme.hv.typography.normalText,\n },\n lineColor: theme.hv.palette.atmosphere.atmo4,\n gridColor: theme.hv.palette.atmosphere.atmo4,\n plotColor: \"transparent\",\n});\n\nexport default styles;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles","theme","root","padding","defaultColors","hv","viz","palette","categorical","vizText","typography","fontFamily","fontSize","legendText","normalText","lineColor","atmosphere","atmo4","gridColor","plotColor"],"sources":["../../../src/Chart/styles.js"],"sourcesContent":["const styles = (theme) => ({\n root: {\n padding: 0,\n },\n defaultColors: {\n ...theme.hv.viz.palette.categorical,\n },\n vizText: {\n ...theme.hv.typography.vizText,\n fontFamily: theme.hv.typography.fontFamily,\n fontSize: 10,\n },\n legendText: {\n ...theme.hv.typography.normalText,\n },\n lineColor: theme.hv.palette.atmosphere.atmo4,\n gridColor: theme.hv.palette.atmosphere.atmo4,\n plotColor: \"transparent\",\n});\n\nexport default styles;\n"],"mappings":";;;AAAA,MAAMA,MAAM,GAAIC,KAAK,KAAM;EACzBC,IAAI,EAAE;IACJC,OAAO,EAAE;EACX,CAAC;EACDC,aAAa,oBACRH,KAAK,CAACI,EAAE,CAACC,GAAG,CAACC,OAAO,CAACC,WAAW,CACpC;EACDC,OAAO,kCACFR,KAAK,CAACI,EAAE,CAACK,UAAU,CAACD,OAAO;IAC9BE,UAAU,EAAEV,KAAK,CAACI,EAAE,CAACK,UAAU,CAACC,UAAU;IAC1CC,QAAQ,EAAE;EAAE,EACb;EACDC,UAAU,oBACLZ,KAAK,CAACI,EAAE,CAACK,UAAU,CAACI,UAAU,CAClC;EACDC,SAAS,EAAEd,KAAK,CAACI,EAAE,CAACE,OAAO,CAACS,UAAU,CAACC,KAAK;EAC5CC,SAAS,EAAEjB,KAAK,CAACI,EAAE,CAACE,OAAO,CAACS,UAAU,CAACC,KAAK;EAC5CE,SAAS,EAAE;AACb,CAAC,CAAC;AAEF,eAAenB,MAAM"}
|
|
@@ -1,39 +1,35 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
const _excluded = ["id", "classes", "data", "layout", "config", "tooltipType", "type"];
|
|
4
|
-
|
|
5
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
-
|
|
7
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
-
|
|
9
6
|
import React, { useMemo } from "react";
|
|
10
7
|
import PropTypes from "prop-types";
|
|
11
8
|
import { withStyles } from "@mui/styles";
|
|
12
9
|
import Chart from "../Chart";
|
|
13
10
|
import { applyDataDefaults, applyLayoutDefaults } from "./donutchartPlotlyOverrides";
|
|
14
11
|
import styles from "./styles";
|
|
12
|
+
|
|
15
13
|
/**
|
|
16
14
|
* Donut charts nicely convey the part-whole relationship and they have become
|
|
17
15
|
* the most recognizable chart types for representing proportions in business and data statistics.
|
|
18
16
|
* Our implementation leverages the Plotly charting library. If you have a specific case
|
|
19
17
|
* that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
|
|
24
20
|
const Donutchart = _ref => {
|
|
25
21
|
let {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
22
|
+
id,
|
|
23
|
+
classes,
|
|
24
|
+
data,
|
|
25
|
+
layout,
|
|
26
|
+
config,
|
|
27
|
+
tooltipType = "multiple",
|
|
28
|
+
type = "regular"
|
|
29
|
+
} = _ref,
|
|
30
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
36
31
|
/* Values derived from props */
|
|
32
|
+
|
|
37
33
|
const chartData = useMemo(() => applyDataDefaults(data, type), [data, type]);
|
|
38
34
|
const chartLayout = useMemo(() => applyLayoutDefaults(layout), [layout]);
|
|
39
35
|
return /*#__PURE__*/_jsx(Chart, _objectSpread({
|
|
@@ -46,38 +42,31 @@ const Donutchart = _ref => {
|
|
|
46
42
|
type: type
|
|
47
43
|
}, others));
|
|
48
44
|
};
|
|
49
|
-
|
|
50
45
|
process.env.NODE_ENV !== "production" ? Donutchart.propTypes = {
|
|
51
46
|
/**
|
|
52
47
|
* An Id passed on to the component
|
|
53
48
|
*/
|
|
54
49
|
id: PropTypes.string,
|
|
55
|
-
|
|
56
50
|
/**
|
|
57
51
|
* A Jss Object used to override or extend the styles applied.
|
|
58
52
|
*/
|
|
59
53
|
classes: PropTypes.instanceOf(Object),
|
|
60
|
-
|
|
61
54
|
/**
|
|
62
55
|
* Plotly data object (see https://plot.ly/javascript/reference/).
|
|
63
56
|
*/
|
|
64
57
|
data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
|
|
65
|
-
|
|
66
58
|
/**
|
|
67
59
|
* Plotly layout object (see https://plot.ly/javascript/reference/#layout).
|
|
68
60
|
*/
|
|
69
61
|
layout: PropTypes.instanceOf(Object),
|
|
70
|
-
|
|
71
62
|
/**
|
|
72
63
|
* Plotly config object (see https://plot.ly/javascript/configuration-options/).
|
|
73
64
|
*/
|
|
74
65
|
config: PropTypes.instanceOf(Object),
|
|
75
|
-
|
|
76
66
|
/**
|
|
77
67
|
* Defines if should use a single or multiline tooltip.
|
|
78
68
|
*/
|
|
79
69
|
tooltipType: PropTypes.oneOf(["single", "multiple"]),
|
|
80
|
-
|
|
81
70
|
/**
|
|
82
71
|
* Sets the type of graph.
|
|
83
72
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Donutchart.js","names":["React","useMemo","PropTypes","withStyles","Chart","applyDataDefaults","applyLayoutDefaults","styles","Donutchart","id","classes","data","layout","config","tooltipType","type","others","chartData","chartLayout","propTypes","string","instanceOf","Object","arrayOf","isRequired","oneOf","name"],"sources":["../../../src/Donutchart/Donutchart.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport Chart from \"../Chart\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./donutchartPlotlyOverrides\";\nimport styles from \"./styles\";\n\n/**\n * Donut charts nicely convey the part-whole relationship and they have become\n * the most recognizable chart types for representing proportions in business and data statistics.\n * Our implementation leverages the Plotly charting library. If you have a specific case\n * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.\n */\nconst Donutchart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n type = \"regular\",\n ...others\n}) => {\n /* Values derived from props */\n\n const chartData = useMemo(() => applyDataDefaults(data, type), [data, type]);\n const chartLayout = useMemo(() => applyLayoutDefaults(layout), [layout]);\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={chartData}\n layout={chartLayout}\n config={config}\n tooltipType={tooltipType}\n type={type}\n {...others}\n />\n );\n};\n\nDonutchart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.instanceOf(Object),\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object),\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Sets the type of graph.\n */\n type: PropTypes.oneOf([\"regular\", \"thin\"]),\n};\n\nexport default withStyles(styles, { name: \"HvDonutchart\" })(Donutchart);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Donutchart.js","names":["React","useMemo","PropTypes","withStyles","Chart","applyDataDefaults","applyLayoutDefaults","styles","Donutchart","id","classes","data","layout","config","tooltipType","type","others","chartData","chartLayout","propTypes","string","instanceOf","Object","arrayOf","isRequired","oneOf","name"],"sources":["../../../src/Donutchart/Donutchart.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport Chart from \"../Chart\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./donutchartPlotlyOverrides\";\nimport styles from \"./styles\";\n\n/**\n * Donut charts nicely convey the part-whole relationship and they have become\n * the most recognizable chart types for representing proportions in business and data statistics.\n * Our implementation leverages the Plotly charting library. If you have a specific case\n * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.\n */\nconst Donutchart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n type = \"regular\",\n ...others\n}) => {\n /* Values derived from props */\n\n const chartData = useMemo(() => applyDataDefaults(data, type), [data, type]);\n const chartLayout = useMemo(() => applyLayoutDefaults(layout), [layout]);\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={chartData}\n layout={chartLayout}\n config={config}\n tooltipType={tooltipType}\n type={type}\n {...others}\n />\n );\n};\n\nDonutchart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.instanceOf(Object),\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object),\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Sets the type of graph.\n */\n type: PropTypes.oneOf([\"regular\", \"thin\"]),\n};\n\nexport default withStyles(styles, { name: \"HvDonutchart\" })(Donutchart);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,KAAK,MAAM,UAAU;AAC5B,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,6BAA6B;AACpF,OAAOC,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AALA;AAMA,MAAMC,UAAU,GAAG,QASb;EAAA,IATc;MAClBC,EAAE;MACFC,OAAO;MACPC,IAAI;MACJC,MAAM;MACNC,MAAM;MACNC,WAAW,GAAG,UAAU;MACxBC,IAAI,GAAG;IAET,CAAC;IADIC,MAAM;EAET;;EAEA,MAAMC,SAAS,GAAGhB,OAAO,CAAC,MAAMI,iBAAiB,CAACM,IAAI,EAAEI,IAAI,CAAC,EAAE,CAACJ,IAAI,EAAEI,IAAI,CAAC,CAAC;EAC5E,MAAMG,WAAW,GAAGjB,OAAO,CAAC,MAAMK,mBAAmB,CAACM,MAAM,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAExE,oBACE,KAAC,KAAK;IACJ,EAAE,EAAEH,EAAG;IACP,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEO,SAAU;IAChB,MAAM,EAAEC,WAAY;IACpB,MAAM,EAAEL,MAAO;IACf,WAAW,EAAEC,WAAY;IACzB,IAAI,EAAEC;EAAK,GACPC,MAAM,EACV;AAEN,CAAC;AAED,wCAAAR,UAAU,CAACW,SAAS,GAAG;EACrB;AACF;AACA;EACEV,EAAE,EAAEP,SAAS,CAACkB,MAAM;EACpB;AACF;AACA;EACEV,OAAO,EAAER,SAAS,CAACmB,UAAU,CAACC,MAAM,CAAC;EACrC;AACF;AACA;EACEX,IAAI,EAAET,SAAS,CAACqB,OAAO,CAACrB,SAAS,CAACmB,UAAU,CAACC,MAAM,CAAC,CAAC,CAACE,UAAU;EAChE;AACF;AACA;EACEZ,MAAM,EAAEV,SAAS,CAACmB,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACET,MAAM,EAAEX,SAAS,CAACmB,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACER,WAAW,EAAEZ,SAAS,CAACuB,KAAK,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;EACpD;AACF;AACA;EACEV,IAAI,EAAEb,SAAS,CAACuB,KAAK,CAAC,CAAC,SAAS,EAAE,MAAM,CAAC;AAC3C,CAAC;AAED,eAAetB,UAAU,CAACI,MAAM,EAAE;EAAEmB,IAAI,EAAE;AAAe,CAAC,CAAC,CAAClB,UAAU,CAAC"}
|
|
@@ -1,29 +1,24 @@
|
|
|
1
1
|
import clone from "lodash/cloneDeep";
|
|
2
|
-
|
|
3
2
|
const setterIfNil = (object, property, value) => {
|
|
4
3
|
var _object$property;
|
|
5
|
-
|
|
6
4
|
// eslint-disable-next-line no-param-reassign
|
|
7
5
|
object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
|
|
8
6
|
};
|
|
7
|
+
|
|
9
8
|
/**
|
|
10
9
|
* Auxiliary functions to set the data in order to follow the DS guideline.
|
|
11
10
|
*
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
12
|
export const applyDataDefaults = (inputData, type) => {
|
|
16
13
|
const data = inputData;
|
|
17
14
|
data.forEach(trace => {
|
|
18
15
|
setterIfNil(trace, "hoverinfo", "none");
|
|
19
16
|
setterIfNil(trace, "textinfo", "none");
|
|
20
17
|
setterIfNil(trace, "type", "pie");
|
|
21
|
-
|
|
22
18
|
switch (type) {
|
|
23
19
|
case "thin":
|
|
24
20
|
setterIfNil(trace, "hole", "0.94");
|
|
25
21
|
break;
|
|
26
|
-
|
|
27
22
|
case "regular":
|
|
28
23
|
default:
|
|
29
24
|
setterIfNil(trace, "hole", "0.76");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"donutchartPlotlyOverrides.js","names":["clone","setterIfNil","object","property","value","applyDataDefaults","inputData","type","data","forEach","trace","applyLayoutDefaults","inputLayout","defaultLayout"],"sources":["../../../src/Donutchart/donutchartPlotlyOverrides.js"],"sourcesContent":["import clone from \"lodash/cloneDeep\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the data in order to follow the DS guideline.\n *\n */\nexport const applyDataDefaults = (inputData, type) => {\n const data = inputData;\n\n data.forEach((trace) => {\n setterIfNil(trace, \"hoverinfo\", \"none\");\n setterIfNil(trace, \"textinfo\", \"none\");\n setterIfNil(trace, \"type\", \"pie\");\n\n switch (type) {\n case \"thin\":\n setterIfNil(trace, \"hole\", \"0.94\");\n break;\n case \"regular\":\n default:\n setterIfNil(trace, \"hole\", \"0.76\");\n }\n });\n\n return data;\n};\n\nexport const applyLayoutDefaults = (inputLayout) => {\n const defaultLayout = {};\n\n return !inputLayout ? defaultLayout : clone(inputLayout);\n};\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"donutchartPlotlyOverrides.js","names":["clone","setterIfNil","object","property","value","applyDataDefaults","inputData","type","data","forEach","trace","applyLayoutDefaults","inputLayout","defaultLayout"],"sources":["../../../src/Donutchart/donutchartPlotlyOverrides.js"],"sourcesContent":["import clone from \"lodash/cloneDeep\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the data in order to follow the DS guideline.\n *\n */\nexport const applyDataDefaults = (inputData, type) => {\n const data = inputData;\n\n data.forEach((trace) => {\n setterIfNil(trace, \"hoverinfo\", \"none\");\n setterIfNil(trace, \"textinfo\", \"none\");\n setterIfNil(trace, \"type\", \"pie\");\n\n switch (type) {\n case \"thin\":\n setterIfNil(trace, \"hole\", \"0.94\");\n break;\n case \"regular\":\n default:\n setterIfNil(trace, \"hole\", \"0.76\");\n }\n });\n\n return data;\n};\n\nexport const applyLayoutDefaults = (inputLayout) => {\n const defaultLayout = {};\n\n return !inputLayout ? defaultLayout : clone(inputLayout);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,kBAAkB;AAEpC,MAAMC,WAAW,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,KAAK;EAAA;EAC/C;EACAF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAG,CAACC,SAAS,EAAEC,IAAI,KAAK;EACpD,MAAMC,IAAI,GAAGF,SAAS;EAEtBE,IAAI,CAACC,OAAO,CAAEC,KAAK,IAAK;IACtBT,WAAW,CAACS,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC;IACvCT,WAAW,CAACS,KAAK,EAAE,UAAU,EAAE,MAAM,CAAC;IACtCT,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC;IAEjC,QAAQH,IAAI;MACV,KAAK,MAAM;QACTN,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAClC;MACF,KAAK,SAAS;MACd;QACET,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IAAC;EAEzC,CAAC,CAAC;EAEF,OAAOF,IAAI;AACb,CAAC;AAED,OAAO,MAAMG,mBAAmB,GAAIC,WAAW,IAAK;EAClD,MAAMC,aAAa,GAAG,CAAC,CAAC;EAExB,OAAO,CAACD,WAAW,GAAGC,aAAa,GAAGb,KAAK,CAACY,WAAW,CAAC;AAC1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Donutchart/index.js"],"sourcesContent":["export { default } from \"./Donutchart\";\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Donutchart/index.js"],"sourcesContent":["export { default } from \"./Donutchart\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Donutchart/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Donutchart/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,CAAC,CAAC;AAEjB,eAAeA,MAAM"}
|
|
@@ -1,40 +1,36 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
3
|
const _excluded = ["id", "classes", "data", "layout", "config", "tooltipType", "type", "rangeSlider"];
|
|
4
|
-
|
|
5
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
6
|
-
|
|
7
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
8
|
-
|
|
9
6
|
import React, { useMemo } from "react";
|
|
10
7
|
import PropTypes from "prop-types";
|
|
11
8
|
import { withStyles } from "@mui/styles";
|
|
12
9
|
import Chart from "../Chart";
|
|
13
10
|
import { applyDataDefaults, applyLayoutDefaults } from "./lineChartPlotlyOverrides";
|
|
14
11
|
import styles from "./styles";
|
|
12
|
+
|
|
15
13
|
/**
|
|
16
14
|
* A line chart or line plot or line graph is a type of chart which displays information as a series of data points
|
|
17
15
|
* called 'markers' connected by straight line segments. It is a basic type of chart common in many fields.
|
|
18
16
|
* Our implementation leverages the Plotly charting library. If you have a specific case
|
|
19
17
|
* that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.
|
|
20
18
|
*/
|
|
21
|
-
|
|
22
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
23
|
-
|
|
24
20
|
const Linechart = _ref => {
|
|
25
21
|
let {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
id,
|
|
23
|
+
classes,
|
|
24
|
+
data,
|
|
25
|
+
layout,
|
|
26
|
+
config,
|
|
27
|
+
tooltipType = "multiple",
|
|
28
|
+
type = "line",
|
|
29
|
+
rangeSlider = false
|
|
30
|
+
} = _ref,
|
|
31
|
+
others = _objectWithoutProperties(_ref, _excluded);
|
|
37
32
|
/* Values derived from props */
|
|
33
|
+
|
|
38
34
|
const chartData = useMemo(() => applyDataDefaults(data, type), [data, type]);
|
|
39
35
|
const chartLayout = useMemo(() => applyLayoutDefaults(layout, rangeSlider), [layout, rangeSlider]);
|
|
40
36
|
return /*#__PURE__*/_jsx(Chart, _objectSpread({
|
|
@@ -46,43 +42,35 @@ const Linechart = _ref => {
|
|
|
46
42
|
tooltipType: tooltipType
|
|
47
43
|
}, others));
|
|
48
44
|
};
|
|
49
|
-
|
|
50
45
|
process.env.NODE_ENV !== "production" ? Linechart.propTypes = {
|
|
51
46
|
/**
|
|
52
47
|
* An Id passed on to the component
|
|
53
48
|
*/
|
|
54
49
|
id: PropTypes.string,
|
|
55
|
-
|
|
56
50
|
/**
|
|
57
51
|
* A Jss Object used to override or extend the styles applied.
|
|
58
52
|
*/
|
|
59
53
|
classes: PropTypes.instanceOf(Object),
|
|
60
|
-
|
|
61
54
|
/**
|
|
62
55
|
* Plotly data object (see https://plot.ly/javascript/reference/).
|
|
63
56
|
*/
|
|
64
57
|
data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,
|
|
65
|
-
|
|
66
58
|
/**
|
|
67
59
|
* Plotly layout object (see https://plot.ly/javascript/reference/#layout).
|
|
68
60
|
*/
|
|
69
61
|
layout: PropTypes.instanceOf(Object),
|
|
70
|
-
|
|
71
62
|
/**
|
|
72
63
|
* Plotly config object (see https://plot.ly/javascript/configuration-options/).
|
|
73
64
|
*/
|
|
74
65
|
config: PropTypes.instanceOf(Object),
|
|
75
|
-
|
|
76
66
|
/**
|
|
77
67
|
* Defines if should use a single or multiline tooltip.
|
|
78
68
|
*/
|
|
79
69
|
tooltipType: PropTypes.oneOf(["single", "multiple"]),
|
|
80
|
-
|
|
81
70
|
/**
|
|
82
71
|
* Sets the type of graph.
|
|
83
72
|
*/
|
|
84
73
|
type: PropTypes.oneOf(["line", "area", "stack"]),
|
|
85
|
-
|
|
86
74
|
/**
|
|
87
75
|
* Defines it should present a range slider.
|
|
88
76
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Linechart.js","names":["React","useMemo","PropTypes","withStyles","Chart","applyDataDefaults","applyLayoutDefaults","styles","Linechart","id","classes","data","layout","config","tooltipType","type","rangeSlider","others","chartData","chartLayout","propTypes","string","instanceOf","Object","arrayOf","isRequired","oneOf","bool","name"],"sources":["../../../src/Linechart/Linechart.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport Chart from \"../Chart\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./lineChartPlotlyOverrides\";\nimport styles from \"./styles\";\n\n/**\n * A line chart or line plot or line graph is a type of chart which displays information as a series of data points\n * called 'markers' connected by straight line segments. It is a basic type of chart common in many fields.\n * Our implementation leverages the Plotly charting library. If you have a specific case\n * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.\n */\nconst Linechart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n type = \"line\",\n rangeSlider = false,\n ...others\n}) => {\n /* Values derived from props */\n\n const chartData = useMemo(() => applyDataDefaults(data, type), [data, type]);\n const chartLayout = useMemo(\n () => applyLayoutDefaults(layout, rangeSlider),\n [layout, rangeSlider]\n );\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={chartData}\n layout={chartLayout}\n config={config}\n tooltipType={tooltipType}\n {...others}\n />\n );\n};\n\nLinechart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.instanceOf(Object),\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object),\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Sets the type of graph.\n */\n type: PropTypes.oneOf([\"line\", \"area\", \"stack\"]),\n /**\n * Defines it should present a range slider.\n */\n rangeSlider: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvLinechart\" })(Linechart);\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Linechart.js","names":["React","useMemo","PropTypes","withStyles","Chart","applyDataDefaults","applyLayoutDefaults","styles","Linechart","id","classes","data","layout","config","tooltipType","type","rangeSlider","others","chartData","chartLayout","propTypes","string","instanceOf","Object","arrayOf","isRequired","oneOf","bool","name"],"sources":["../../../src/Linechart/Linechart.js"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport PropTypes from \"prop-types\";\nimport { withStyles } from \"@mui/styles\";\nimport Chart from \"../Chart\";\nimport { applyDataDefaults, applyLayoutDefaults } from \"./lineChartPlotlyOverrides\";\nimport styles from \"./styles\";\n\n/**\n * A line chart or line plot or line graph is a type of chart which displays information as a series of data points\n * called 'markers' connected by straight line segments. It is a basic type of chart common in many fields.\n * Our implementation leverages the Plotly charting library. If you have a specific case\n * that we don't cover, the Plotly [documentation](https://plotly.com/javascript/) is a good starting point.\n */\nconst Linechart = ({\n id,\n classes,\n data,\n layout,\n config,\n tooltipType = \"multiple\",\n type = \"line\",\n rangeSlider = false,\n ...others\n}) => {\n /* Values derived from props */\n\n const chartData = useMemo(() => applyDataDefaults(data, type), [data, type]);\n const chartLayout = useMemo(\n () => applyLayoutDefaults(layout, rangeSlider),\n [layout, rangeSlider]\n );\n\n return (\n <Chart\n id={id}\n classes={classes}\n data={chartData}\n layout={chartLayout}\n config={config}\n tooltipType={tooltipType}\n {...others}\n />\n );\n};\n\nLinechart.propTypes = {\n /**\n * An Id passed on to the component\n */\n id: PropTypes.string,\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes: PropTypes.instanceOf(Object),\n /**\n * Plotly data object (see https://plot.ly/javascript/reference/).\n */\n data: PropTypes.arrayOf(PropTypes.instanceOf(Object)).isRequired,\n /**\n * Plotly layout object (see https://plot.ly/javascript/reference/#layout).\n */\n layout: PropTypes.instanceOf(Object),\n /**\n * Plotly config object (see https://plot.ly/javascript/configuration-options/).\n */\n config: PropTypes.instanceOf(Object),\n /**\n * Defines if should use a single or multiline tooltip.\n */\n tooltipType: PropTypes.oneOf([\"single\", \"multiple\"]),\n /**\n * Sets the type of graph.\n */\n type: PropTypes.oneOf([\"line\", \"area\", \"stack\"]),\n /**\n * Defines it should present a range slider.\n */\n rangeSlider: PropTypes.bool,\n};\n\nexport default withStyles(styles, { name: \"HvLinechart\" })(Linechart);\n"],"mappings":";;;;;AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,OAAOC,SAAS,MAAM,YAAY;AAClC,SAASC,UAAU,QAAQ,aAAa;AACxC,OAAOC,KAAK,MAAM,UAAU;AAC5B,SAASC,iBAAiB,EAAEC,mBAAmB,QAAQ,4BAA4B;AACnF,OAAOC,MAAM,MAAM,UAAU;;AAE7B;AACA;AACA;AACA;AACA;AACA;AALA;AAMA,MAAMC,SAAS,GAAG,QAUZ;EAAA,IAVa;MACjBC,EAAE;MACFC,OAAO;MACPC,IAAI;MACJC,MAAM;MACNC,MAAM;MACNC,WAAW,GAAG,UAAU;MACxBC,IAAI,GAAG,MAAM;MACbC,WAAW,GAAG;IAEhB,CAAC;IADIC,MAAM;EAET;;EAEA,MAAMC,SAAS,GAAGjB,OAAO,CAAC,MAAMI,iBAAiB,CAACM,IAAI,EAAEI,IAAI,CAAC,EAAE,CAACJ,IAAI,EAAEI,IAAI,CAAC,CAAC;EAC5E,MAAMI,WAAW,GAAGlB,OAAO,CACzB,MAAMK,mBAAmB,CAACM,MAAM,EAAEI,WAAW,CAAC,EAC9C,CAACJ,MAAM,EAAEI,WAAW,CAAC,CACtB;EAED,oBACE,KAAC,KAAK;IACJ,EAAE,EAAEP,EAAG;IACP,OAAO,EAAEC,OAAQ;IACjB,IAAI,EAAEQ,SAAU;IAChB,MAAM,EAAEC,WAAY;IACpB,MAAM,EAAEN,MAAO;IACf,WAAW,EAAEC;EAAY,GACrBG,MAAM,EACV;AAEN,CAAC;AAED,wCAAAT,SAAS,CAACY,SAAS,GAAG;EACpB;AACF;AACA;EACEX,EAAE,EAAEP,SAAS,CAACmB,MAAM;EACpB;AACF;AACA;EACEX,OAAO,EAAER,SAAS,CAACoB,UAAU,CAACC,MAAM,CAAC;EACrC;AACF;AACA;EACEZ,IAAI,EAAET,SAAS,CAACsB,OAAO,CAACtB,SAAS,CAACoB,UAAU,CAACC,MAAM,CAAC,CAAC,CAACE,UAAU;EAChE;AACF;AACA;EACEb,MAAM,EAAEV,SAAS,CAACoB,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACEV,MAAM,EAAEX,SAAS,CAACoB,UAAU,CAACC,MAAM,CAAC;EACpC;AACF;AACA;EACET,WAAW,EAAEZ,SAAS,CAACwB,KAAK,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;EACpD;AACF;AACA;EACEX,IAAI,EAAEb,SAAS,CAACwB,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;EAChD;AACF;AACA;EACEV,WAAW,EAAEd,SAAS,CAACyB;AACzB,CAAC;AAED,eAAexB,UAAU,CAACI,MAAM,EAAE;EAAEqB,IAAI,EAAE;AAAc,CAAC,CAAC,CAACpB,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Linechart/index.js"],"sourcesContent":["export { default } from \"./Linechart\";\n"],"mappings":"AAAA,SAASA,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default"],"sources":["../../../src/Linechart/index.js"],"sourcesContent":["export { default } from \"./Linechart\";\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,aAAa"}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
1
|
import clone from "lodash/cloneDeep";
|
|
2
|
-
|
|
3
2
|
const setterIfNil = (object, property, value) => {
|
|
4
3
|
var _object$property;
|
|
5
|
-
|
|
6
4
|
// eslint-disable-next-line no-param-reassign
|
|
7
5
|
object[property] = (_object$property = object[property]) !== null && _object$property !== void 0 ? _object$property : value;
|
|
8
6
|
};
|
|
7
|
+
|
|
9
8
|
/**
|
|
10
9
|
* Auxiliary functions to set the data in order to follow the DS guideline.
|
|
11
10
|
*
|
|
12
11
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
15
12
|
export const applyDataDefaults = (inputData, type) => {
|
|
16
13
|
const data = inputData;
|
|
17
14
|
data.forEach(trace => {
|
|
18
15
|
setterIfNil(trace, "hoverinfo", "none");
|
|
19
16
|
setterIfNil(trace, "mode", "lines");
|
|
20
|
-
|
|
21
17
|
switch (type) {
|
|
22
18
|
case "area":
|
|
23
19
|
setterIfNil(trace, "fill", "tonexty");
|
|
24
20
|
setterIfNil(trace, "type", "scatter");
|
|
25
21
|
break;
|
|
26
|
-
|
|
27
22
|
case "line":
|
|
28
23
|
setterIfNil(trace, "type", "line");
|
|
29
24
|
break;
|
|
30
|
-
|
|
31
25
|
case "stack":
|
|
32
26
|
setterIfNil(trace, "fill", "tonexty");
|
|
33
27
|
setterIfNil(trace, "type", "scatter");
|
|
34
28
|
setterIfNil(trace, "stackgroup", "one");
|
|
35
29
|
break;
|
|
36
|
-
|
|
37
30
|
default:
|
|
38
31
|
setterIfNil(trace, "type", "line");
|
|
39
32
|
}
|
|
@@ -47,13 +40,11 @@ export const applyLayoutDefaults = (inputLayout = {}, rangeSlider) => {
|
|
|
47
40
|
setterIfNil(layout.xaxis, "showline", true);
|
|
48
41
|
setterIfNil(layout, "yaxis", {});
|
|
49
42
|
setterIfNil(layout.yaxis, "showline", false);
|
|
50
|
-
|
|
51
43
|
if (rangeSlider) {
|
|
52
44
|
setterIfNil(layout.xaxis, "rangeslider", {
|
|
53
45
|
visible: true
|
|
54
46
|
});
|
|
55
47
|
}
|
|
56
|
-
|
|
57
48
|
return layout;
|
|
58
49
|
};
|
|
59
50
|
//# sourceMappingURL=lineChartPlotlyOverrides.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lineChartPlotlyOverrides.js","names":["clone","setterIfNil","object","property","value","applyDataDefaults","inputData","type","data","forEach","trace","applyLayoutDefaults","inputLayout","rangeSlider","layout","xaxis","yaxis","visible"],"sources":["../../../src/Linechart/lineChartPlotlyOverrides.js"],"sourcesContent":["import clone from \"lodash/cloneDeep\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the data in order to follow the DS guideline.\n *\n */\nexport const applyDataDefaults = (inputData, type) => {\n const data = inputData;\n\n data.forEach((trace) => {\n setterIfNil(trace, \"hoverinfo\", \"none\");\n setterIfNil(trace, \"mode\", \"lines\");\n\n switch (type) {\n case \"area\":\n setterIfNil(trace, \"fill\", \"tonexty\");\n setterIfNil(trace, \"type\", \"scatter\");\n break;\n case \"line\":\n setterIfNil(trace, \"type\", \"line\");\n break;\n case \"stack\":\n setterIfNil(trace, \"fill\", \"tonexty\");\n setterIfNil(trace, \"type\", \"scatter\");\n setterIfNil(trace, \"stackgroup\", \"one\");\n break;\n default:\n setterIfNil(trace, \"type\", \"line\");\n }\n });\n\n return data;\n};\n\nexport const applyLayoutDefaults = (inputLayout = {}, rangeSlider) => {\n const layout = clone(inputLayout);\n\n setterIfNil(layout, \"xaxis\", {});\n setterIfNil(layout.xaxis, \"showgrid\", true);\n setterIfNil(layout.xaxis, \"showline\", true);\n\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout.yaxis, \"showline\", false);\n\n if (rangeSlider) {\n setterIfNil(layout.xaxis, \"rangeslider\", {\n visible: true,\n });\n }\n\n return layout;\n};\n"],"mappings":"AAAA,OAAOA,
|
|
1
|
+
{"version":3,"file":"lineChartPlotlyOverrides.js","names":["clone","setterIfNil","object","property","value","applyDataDefaults","inputData","type","data","forEach","trace","applyLayoutDefaults","inputLayout","rangeSlider","layout","xaxis","yaxis","visible"],"sources":["../../../src/Linechart/lineChartPlotlyOverrides.js"],"sourcesContent":["import clone from \"lodash/cloneDeep\";\n\nconst setterIfNil = (object, property, value) => {\n // eslint-disable-next-line no-param-reassign\n object[property] = object[property] ?? value;\n};\n\n/**\n * Auxiliary functions to set the data in order to follow the DS guideline.\n *\n */\nexport const applyDataDefaults = (inputData, type) => {\n const data = inputData;\n\n data.forEach((trace) => {\n setterIfNil(trace, \"hoverinfo\", \"none\");\n setterIfNil(trace, \"mode\", \"lines\");\n\n switch (type) {\n case \"area\":\n setterIfNil(trace, \"fill\", \"tonexty\");\n setterIfNil(trace, \"type\", \"scatter\");\n break;\n case \"line\":\n setterIfNil(trace, \"type\", \"line\");\n break;\n case \"stack\":\n setterIfNil(trace, \"fill\", \"tonexty\");\n setterIfNil(trace, \"type\", \"scatter\");\n setterIfNil(trace, \"stackgroup\", \"one\");\n break;\n default:\n setterIfNil(trace, \"type\", \"line\");\n }\n });\n\n return data;\n};\n\nexport const applyLayoutDefaults = (inputLayout = {}, rangeSlider) => {\n const layout = clone(inputLayout);\n\n setterIfNil(layout, \"xaxis\", {});\n setterIfNil(layout.xaxis, \"showgrid\", true);\n setterIfNil(layout.xaxis, \"showline\", true);\n\n setterIfNil(layout, \"yaxis\", {});\n setterIfNil(layout.yaxis, \"showline\", false);\n\n if (rangeSlider) {\n setterIfNil(layout.xaxis, \"rangeslider\", {\n visible: true,\n });\n }\n\n return layout;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,kBAAkB;AAEpC,MAAMC,WAAW,GAAG,CAACC,MAAM,EAAEC,QAAQ,EAAEC,KAAK,KAAK;EAAA;EAC/C;EACAF,MAAM,CAACC,QAAQ,CAAC,uBAAGD,MAAM,CAACC,QAAQ,CAAC,+DAAIC,KAAK;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAG,CAACC,SAAS,EAAEC,IAAI,KAAK;EACpD,MAAMC,IAAI,GAAGF,SAAS;EAEtBE,IAAI,CAACC,OAAO,CAAEC,KAAK,IAAK;IACtBT,WAAW,CAACS,KAAK,EAAE,WAAW,EAAE,MAAM,CAAC;IACvCT,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,OAAO,CAAC;IAEnC,QAAQH,IAAI;MACV,KAAK,MAAM;QACTN,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC;QACrCT,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC;QACrC;MACF,KAAK,MAAM;QACTT,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;QAClC;MACF,KAAK,OAAO;QACVT,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC;QACrCT,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,SAAS,CAAC;QACrCT,WAAW,CAACS,KAAK,EAAE,YAAY,EAAE,KAAK,CAAC;QACvC;MACF;QACET,WAAW,CAACS,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC;IAAC;EAEzC,CAAC,CAAC;EAEF,OAAOF,IAAI;AACb,CAAC;AAED,OAAO,MAAMG,mBAAmB,GAAG,CAACC,WAAW,GAAG,CAAC,CAAC,EAAEC,WAAW,KAAK;EACpE,MAAMC,MAAM,GAAGd,KAAK,CAACY,WAAW,CAAC;EAEjCX,WAAW,CAACa,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAChCb,WAAW,CAACa,MAAM,CAACC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC;EAC3Cd,WAAW,CAACa,MAAM,CAACC,KAAK,EAAE,UAAU,EAAE,IAAI,CAAC;EAE3Cd,WAAW,CAACa,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC;EAChCb,WAAW,CAACa,MAAM,CAACE,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC;EAE5C,IAAIH,WAAW,EAAE;IACfZ,WAAW,CAACa,MAAM,CAACC,KAAK,EAAE,aAAa,EAAE;MACvCE,OAAO,EAAE;IACX,CAAC,CAAC;EACJ;EAEA,OAAOH,MAAM;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Linechart/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,
|
|
1
|
+
{"version":3,"file":"styles.js","names":["styles"],"sources":["../../../src/Linechart/styles.js"],"sourcesContent":["const styles = {};\n\nexport default styles;\n"],"mappings":"AAAA,MAAMA,MAAM,GAAG,CAAC,CAAC;AAEjB,eAAeA,MAAM"}
|
package/dist/modern/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["default","HvBarchart","HvDonutchart","HvLinechart"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvLinechart } from \"./Linechart\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,
|
|
1
|
+
{"version":3,"file":"index.js","names":["default","HvBarchart","HvDonutchart","HvLinechart"],"sources":["../../src/index.js"],"sourcesContent":["// components\nexport { default as HvBarchart } from \"./Barchart\";\nexport { default as HvDonutchart } from \"./Donutchart\";\nexport { default as HvLinechart } from \"./Linechart\";\n"],"mappings":"AAAA;AACA,SAASA,OAAO,IAAIC,UAAU,QAAQ,YAAY;AAClD,SAASD,OAAO,IAAIE,YAAY,QAAQ,cAAc;AACtD,SAASF,OAAO,IAAIG,WAAW,QAAQ,aAAa"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hitachivantara/uikit-react-viz",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.4",
|
|
4
4
|
"description": "A collection of React visualizations for the Hitachi Vantara's Design System.",
|
|
5
5
|
"homepage": "https://github.com/lumada-design/hv-uikit-react",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"react-dom": "^16.13.1 || ^17.0.2"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@hitachivantara/uikit-react-core": "^4.0.
|
|
48
|
+
"@hitachivantara/uikit-react-core": "^4.0.4",
|
|
49
49
|
"clsx": "^1.2.1",
|
|
50
50
|
"lodash": "^4.17.21",
|
|
51
51
|
"prop-types": "^15.8.1",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "1861d424d32437aa1a9cbda0c17c706f65d0e853"
|
|
67
67
|
}
|