diff --git a/10802-39f2fd34ec38e77d6689.js b/10802-39f2fd34ec38e77d6689.js new file mode 100644 index 000000000..0c1041994 --- /dev/null +++ b/10802-39f2fd34ec38e77d6689.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[10802],{19566:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a={key:"dynamic_dataset_1",values:[{x:new Date(2016,0,1,3).toISOString(),y:1},{x:new Date(2016,0,1,6).toISOString(),y:5},{x:new Date(2016,0,1,9).toISOString(),y:8},{x:new Date(2016,0,1,12).toISOString(),y:20},{x:new Date(2016,0,1,15).toISOString(),y:6}]};t.default=a},74315:function(e,t,a){var n=a(24994);t.A=void 0;var r=n(a(85715)),i=n(a(96540)),l=n(a(23986)),u=n(a(61770)),o=n(a(45839));a(11719);var p,c=n(a(29683)),s=n(a(84147)),d=n(a(2682)),f=n(a(19566)),m=o.default.deepClone((0,s.default)("#BarPanningDynamicData")),g=o.default.deepClone(d.default),h={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){(p=u.default.api.graph(m)).loadContent(u.default.api.bar(g))}),[]);var e=i.default.useReducer((function(e,t){var a;switch(t.type){case"panLeft":a=e.initial-e.factor;break;case"panRight":a=e.initial+e.factor;break;default:return e}return{initial:a,factor:e.factor}}),h),t=(0,r.default)(e,2),a=t[0],n=t[1];return i.default.useLayoutEffect((function(){if(p){p.config.axis.x.lowerLimit=new Date(2016,0,1,a.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,a.initial).toISOString();var e={panData:[o.default.deepClone(f.default)]};p.reflowMultipleDatasets(e)}}),[a.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return n({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return n({type:"panRight"})}}),i.default.createElement(c.default,{id:"BarPanningDynamicData"}))}},10802:function(e,t,a){a.r(t),a.d(t,{default:function(){return E}});var n=a(96540),r=a(36665),i=a(74315),l=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p={};function c(e){var t=e.components,a=o(e,l);return(0,r.mdx)("wrapper",u({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Bar/BarGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _barPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bar/barPanning"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/datasetTimeseries1"));\nvar _datasetTimeseries1newData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/datasetTimeseries1newData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _barPanning.default)(\'#BarPanningDynamicData\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar BarPanningExample = function BarPanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bar(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newDataset = {\n panData: [_utils.default.deepClone(_datasetTimeseries1newData.default)]\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "BarPanningDynamicData"\n }));\n};\nvar _default = exports.default = BarPanningExample;\n')))}c.isMDXComponent=!0;var s=a(201),d=a(18241),f=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(s.A,{title:t||"Dynamic Data",description:a,example:n.createElement(i.A,null),exampleCssSrc:n.createElement(d.A,null),exampleSrc:n.createElement(c,null),isExpanded:r})},m=a(95156),g=a(96499),h=["components"];function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var y={},_="wrapper";function v(e){var t=e.components,a=b(e,h);return(0,r.mdx)(_,x({},y,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar data = {\n key: \'dynamic_dataset_1\',\n values: [{\n x: new Date(2016, 0, 1, 3).toISOString(),\n y: 1\n }, {\n x: new Date(2016, 0, 1, 6).toISOString(),\n y: 5\n }, {\n x: new Date(2016, 0, 1, 9).toISOString(),\n y: 8\n }, {\n x: new Date(2016, 0, 1, 12).toISOString(),\n y: 20\n }, {\n x: new Date(2016, 0, 1, 15).toISOString(),\n y: 6\n }]\n};\nvar _default = exports.default = data;\n')))}v.isMDXComponent=!0;var O=["components"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var w={},j="wrapper";function E(e){var t=e.components,a=S(e,O);return(0,r.mdx)(j,D({},w,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"bar-graph-panning---dynamic-data"},"Bar graph panning - Dynamic data"),(0,r.mdx)("p",null,"This is a bar graph example that implements panning with dynamic data."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"BarGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"initial-data"},"Initial Data"),(0,r.mdx)(g.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"updated-data"},"Updated Data"),(0,r.mdx)(v,{mdxType:"DataObject2"})))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/11635-647d5f67ce5ea505509a.js b/11635-647d5f67ce5ea505509a.js new file mode 100644 index 000000000..286884753 --- /dev/null +++ b/11635-647d5f67ce5ea505509a.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[11635],{98637:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),o=t(86006),l={key:"value_region_dataset",label:{high:{display:"High"},mid:{display:"Median"},low:{display:"Low"}},shape:{high:r.default.helpers.SHAPES.DARK.TEAR_ALT,mid:r.default.helpers.SHAPES.DARK.RHOMBUS,low:r.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:r.default.helpers.COLORS.BLACK,mid:r.default.helpers.COLORS.PURPLE,low:r.default.helpers.COLORS.BLACK},onClick:o.loadPopup,values:[{high:{x:20,y:150,region:{start:90,end:150,color:r.default.helpers.COLORS.GREY}},mid:{x:20,y:40},low:{x:20,y:10,region:{start:5,end:30}}},{high:{x:80,y:100,region:{start:90,end:150,color:r.default.helpers.COLORS.GREY}},mid:{x:80,y:75},low:{x:80,y:50,region:{start:5,end:30}}},{high:{x:150,y:110,region:{start:120,end:190,color:r.default.helpers.COLORS.GREY}},mid:{x:150,y:70},low:{x:150,y:30,region:{start:5,end:30}}},{high:{x:175,y:160,region:{start:120,end:190,color:r.default.helpers.COLORS.GREY}},mid:{x:175,y:120},low:{x:175,y:100,region:{start:10,end:40}}},{high:{x:300,y:190,region:{start:120,end:190,color:r.default.helpers.COLORS.GREY}},mid:{x:300,y:90},low:{x:300,y:60,region:{start:10,end:40}}},{high:{x:560,y:150},mid:{x:560,y:40},low:{x:560,y:10,region:{start:10,end:40}}},{high:{x:800,y:180,region:{start:120,end:190,color:r.default.helpers.COLORS.GREY}},mid:{x:800,y:100},low:{x:800,y:100,region:{start:10,end:40}}}]};n.default=l},57893:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,axis:{x:{label:"Data",lowerLimit:0,upperLimit:1e3},y:{label:"Paired",lowerLimit:0,upperLimit:200}},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,n,t){"use strict";var a=t(24994),r=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var o=a(t(85715)),l=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var t=s(n);if(t&&t.has(e))return t.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,t&&t.set(e,a),a}(t(37332)),i=a(t(22639)),p=a(t(45839));function s(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(s=function(e){return e?t:n})(e)}var u=function(e){return new Date(e).toLocaleString()},d=function(e){return e?c(e)?u(e):e:null},c=function(e){return e instanceof Date},f=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n),a.append("g").classed("popup-text",!0).text(t)},m=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n);for(var r=a.append("g").classed("section",!0),l=function(){var e=p[i],n=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],l=n.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(t);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",s)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",u)}if(i&&i.length>0){var d=[];i.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",d)}},n.loadTaskPopup=function(e,n,t,a){g();var r=h(e).append("g"),o=a.label,l=a.display,i=a.y,p=a.startDate,s=a.endDate,d=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),d&&f(r,"Percentage",d)},n.loadDatelinePopup=function(e,n){g();var t=h(e).append("g"),a=n.label,r=n.value;a&&f(t,"Milestone",a.display),f(t,"Date",u(r))},n.loadTimelinePopup=function(e,n,t,a){g();var r=h(e).append("g"),o=a.x,l=(a.y,a.label),i=a.content;f(r,"X axis","".concat(c(o)?u(o):o)),f(r,"".concat(l.display),i)},n.loadPiePopup=function(e,n,t,a){g();var r=h(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(96540)),o=a(t(5556));t(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;n.default=i},61688:function(e,n,t){"use strict";var a=t(24994);n.A=void 0;var r=a(t(96540)),o=a(t(61770)),l=a(t(45839));t(63841);var i=a(t(29683)),p=a(t(57893)),s=a(t(98637)),u=l.default.deepClone((0,p.default)("#pairedResultGraphValueRegion")),d=[l.default.deepClone(s.default)];n.A=function(){return r.default.useEffect((function(){var e=o.default.api.graph(u);d.forEach((function(n){e.loadContent(o.default.api.pairedResult(n))}))}),[]),r.default.createElement(i.default,{id:"pairedResultGraphValueRegion"})}},11635:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return O}});var a=t(96540),r=t(36665),o=t(61688),l=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s={};function u(e){var n=e.components,t=p(e,l);return(0,r.mdx)("wrapper",i({},s,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultDefault"));\nvar _pairedResultValueRegionData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultValueRegionData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultDefault.default)(\'#pairedResultGraphValueRegion\'));\nvar dataset = [_utils.default.deepClone(_pairedResultValueRegionData.default)];\nvar ValueRegionPiaredResultExample = function ValueRegionPiaredResultExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "pairedResultGraphValueRegion"\n });\n};\nvar _default = exports.default = ValueRegionPiaredResultExample;\n')))}u.isMDXComponent=!0;var d=t(201),c=t(88703),f=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(d.A,{title:n||"Value Region",description:t,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},m=t(89510),h=t(92545),g=["components"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var b={},x="wrapper";function O(e){var n=e.components,t=v(e,g);return(0,r.mdx)(x,y({},b,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"value-region-paired-result-graph"},"Value region Paired Result Graph"),(0,r.mdx)("p",null,"This is simple paired result graph associated with valure regions(for high and low datapoints)."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"PairedResultGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(h.A,{mdxType:"DataObject"})))}O.isMDXComponent=!0},92545:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,r);return(0,a.mdx)(p,o({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'simple_paired_result_data\',\n label: {\n high: {\n display: \'High\'\n },\n mid: {\n display: \'Median\'\n },\n low: {\n display: \'Low\'\n }\n },\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.PURPLE,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n values: [{\n high: {\n x: 20,\n y: 150\n },\n mid: {\n x: 20,\n y: 40\n },\n low: {\n x: 20,\n y: 10\n }\n }, {\n high: {\n x: 80,\n y: 100\n },\n mid: {\n x: 80,\n y: 75\n },\n low: {\n x: 80,\n y: 50\n }\n }, {\n high: {\n x: 150,\n y: 110\n },\n mid: {\n x: 150,\n y: 70\n },\n low: {\n x: 150,\n y: 30\n }\n }, {\n high: {\n x: 175,\n y: 160\n },\n mid: {\n x: 175,\n y: 120\n },\n low: {\n x: 175,\n y: 100\n }\n }, {\n high: {\n x: 300,\n y: 190\n },\n mid: {\n x: 300,\n y: 90\n },\n low: {\n x: 300,\n y: 60\n }\n }, {\n high: {\n x: 560,\n y: 150\n },\n mid: {\n x: 560,\n y: 40\n },\n low: {\n x: 560,\n y: 10\n }\n }, {\n high: {\n x: 800,\n y: 180\n },\n mid: {\n x: 800,\n y: 100\n },\n low: {\n x: 800,\n y: 100\n }\n }]\n};\nvar _default = exports.default = data;\n')))}s.isMDXComponent=!0},89510:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,r);return(0,a.mdx)(p,o({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getPairedResultConfig = function getPairedResultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 1000\n },\n y: {\n label: 'Paired',\n lowerLimit: 0,\n upperLimit: 200\n }\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultConfig;\n")))}s.isMDXComponent=!0},88703:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,r);return(0,a.mdx)(p,o({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n@import '../colors.module';\n\n/*\nWe are forcing display of the hidden item for data points,\nthis is only applicable when legend toggle is applied\nand one of the data point is selected.\n*/\n.carbon-data-pair--selected {\n @include terra-graph-opacity-show(); //!important;\n}\n\n.carbon-paired-point {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-paired-line {\n fill: none;\n stroke: var(--terra-graphs-dark);\n stroke-width: 1px;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,n,t){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function a(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var a=t.offsetHeight;t.open=!0;var r=a!=t.offsetHeight;return document.body.removeChild(t),r}function r(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?a.call(n,t,n,e):a)||(e.exports=r)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},63841:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/12851-a7d5ed50f9b0ac57188f.js b/12851-a7d5ed50f9b0ac57188f.js new file mode 100644 index 000000000..672a10b67 --- /dev/null +++ b/12851-a7d5ed50f9b0ac57188f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[12851],{59127:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),o={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}]};t.default=o},28129:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),o={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:28},{x:new Date(2016,0,1,2,15).toISOString(),y:5},{x:new Date(2016,0,1,3,15).toISOString(),y:25},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:15},{x:new Date(2016,0,1,7,0).toISOString(),y:6},{x:new Date(2016,0,1,8,15).toISOString(),y:8},{x:new Date(2016,0,1,9,45).toISOString(),y:9},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:18},{x:new Date(2016,0,1,14,15).toISOString(),y:22},{x:new Date(2016,0,1,19,45).toISOString(),y:7},{x:new Date(2016,0,1,21,15).toISOString(),y:21}]};t.default=o},32603:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},89944:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),o=a(n(23986)),l=a(n(61770)),u=a(n(45839));n(63841);var p,s=a(n(29683)),c=a(n(32603)),d=a(n(59127)),f=a(n(28129)),m=u.default.deepClone((0,c.default)("#dynamicLineData")),g=u.default.deepClone(d.default),S={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){(p=l.default.api.graph(m)).loadContent(l.default.api.scatter(g))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),S),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){if(p){p.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={panData:[u.default.deepClone(u.default.deepClone(f.default))]};p.reflowMultipleDatasets(e)}}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(o.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(s.default,{id:"dynamicLineData"}))}},12851:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});n(96540);var a=n(36665),r=n(44147),i=n(59420),o=n(12712),l=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={},c="wrapper";function d(e){var t=e.components,n=p(e,l);return(0,a.mdx)(c,u({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n onClick: _popup.loadPopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 28\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 5\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 25\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 15\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 6\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 8\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 9\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 18\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 22\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 7\n }, {\n x: new Date(2016, 0, 1, 21, 15).toISOString(),\n y: 21\n }]\n};\nvar _default = exports.default = data;\n')))}d.isMDXComponent=!0;var f=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var S={},x="wrapper";function y(e){var t=e.components,n=g(e,f);return(0,a.mdx)(x,m({},S,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"scatter-graph---dynamic-data"},"Scatter Graph - Dynamic Data"),(0,a.mdx)("p",null,"This is a scatter graph example that implements panning with dynamic data."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(r.A,{mdxType:"ScatterGraphPanning"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Example Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(i.A,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)("h4",{id:"dataset-1"},"dataset 1"),(0,a.mdx)(o.A,{mdxType:"DataObject1"}),(0,a.mdx)("h4",{id:"dataset-2"},"dataset 2"),(0,a.mdx)(d,{mdxType:"DataObject2"})))}y.isMDXComponent=!0},59420:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function p(e){var t=e.components,n=o(e,r);return(0,a.mdx)(u,i({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getScatterTimeseriesConfig = function getScatterTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 0, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getScatterTimeseriesConfig;\n')))}p.isMDXComponent=!0},44147:function(e,t,n){n.d(t,{A:function(){return f}});var a=n(96540),r=n(89944),i=n(36665),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function s(e){var t=e.components,n=u(e,o);return(0,i.mdx)("wrapper",l({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _scatterTimeseriesPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Scatter/scatterTimeseriesPanning"));\nvar _dataset1timeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1timeseries"));\nvar _dataset1timeseriesNewData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1timeseriesNewData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _scatterTimeseriesPanning.default)(\'#dynamicLineData\'));\nvar dataset = _utils.default.deepClone(_dataset1timeseries.default);\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar DynamicLinePanningExample = function DynamicLinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.scatter(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newDataset = {\n panData: [_utils.default.deepClone(_utils.default.deepClone(_dataset1timeseriesNewData.default))]\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "dynamicLineData"\n }));\n};\nvar _default = exports.default = DynamicLinePanningExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(88703),f=function(e){var t=e.title,n=e.description,i=e.isExpanded;return a.createElement(c.A,{title:t||"Dynamic Data",description:n,example:a.createElement(r.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:i})}}}]); \ No newline at end of file diff --git a/13314-95dff94e1e7fc8ba362e.js b/13314-95dff94e1e7fc8ba362e.js new file mode 100644 index 000000000..41234a6f2 --- /dev/null +++ b/13314-95dff94e1e7fc8ba362e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[13314],{75722:function(e,r,t){var n=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t(61770));r.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:"2016-03-02T12:00:00Z",upperLimit:"2018-12-10T12:00:00Z",ticks:{format:"%b %Y"}},y:{label:"Paired Set A",lowerLimit:0,upperLimit:200},y2:{show:!1,label:"Paired Set B",lowerLimit:100,upperLimit:350}},eventline:[{color:a.default.helpers.COLORS.GREY,style:{strokeDashArray:"4,4"},value:new Date(2016,8,1,8).toISOString()},{color:a.default.helpers.COLORS.BLACK,style:{strokeDashArray:"2,2"},value:new Date(2017,5,1,12).toISOString()}],clickPassThrough:{dateline:!1},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},73941:function(e,r,t){var n=t(24994);r.A=void 0;var a=n(t(96540)),i=n(t(61770)),l=n(t(45839));t(63841);var s=n(t(29683)),o=n(t(75722)),u=n(t(70646)),p=l.default.deepClone((0,o.default)("#pairedResultWithEventline")),d=[l.default.deepClone(u.default)];r.A=function(){return a.default.useEffect((function(){var e=i.default.api.graph(p);d.forEach((function(r){e.loadContent(i.default.api.pairedResult(r))}))}),[]),a.default.createElement(s.default,{id:"pairedResultWithEventline"})}},13314:function(e,r,t){t.r(r),t.d(r,{default:function(){return j}});var n=t(96540),a=t(36665),i=t(73941),l=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u={};function p(e){var r=e.components,t=o(e,l);return(0,a.mdx)("wrapper",s({},u,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultTimeseriesWithEventline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultTimeseriesWithEventline"));\nvar _pairedResultTimeseriesData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultTimeseriesData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultTimeseriesWithEventline.default)(\'#pairedResultWithEventline\'));\nvar dataset = [_utils.default.deepClone(_pairedResultTimeseriesData.default)];\nvar PiaredResultWithEventlineExample = function PiaredResultWithEventlineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "pairedResultWithEventline"\n });\n};\nvar _default = exports.default = PiaredResultWithEventlineExample;\n')))}p.isMDXComponent=!0;var d=t(201),c=t(88703),m=function(e){var r=e.title,t=e.description,a=e.isExpanded;return n.createElement(d.A,{title:r||"Timeseries With Eventline",description:t,example:n.createElement(i.A,null),exampleCssSrc:n.createElement(c.A,null),exampleSrc:n.createElement(p,null),isExpanded:a})},f=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var v={},g="wrapper";function x(e){var r=e.components,t=b(e,f);return(0,a.mdx)(g,h({},v,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getPairedResultEventlineTimeseriesConfig = function getPairedResultEventlineTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: '2016-03-02T12:00:00Z',\n upperLimit: '2018-12-10T12:00:00Z',\n ticks: {\n format: '%b %Y'\n }\n },\n y: {\n label: 'Paired Set A',\n lowerLimit: 0,\n upperLimit: 200\n },\n y2: {\n show: false,\n label: 'Paired Set B',\n lowerLimit: 100,\n upperLimit: 350\n }\n },\n eventline: [{\n color: _carbonGraphs.default.helpers.COLORS.GREY,\n style: {\n strokeDashArray: '4,4'\n },\n value: new Date(2016, 8, 1, 8).toISOString()\n }, {\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n style: {\n strokeDashArray: '2,2'\n },\n value: new Date(2017, 5, 1, 12).toISOString()\n }],\n clickPassThrough: {\n dateline: false\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultEventlineTimeseriesConfig;\n")))}x.isMDXComponent=!0;var y=t(47391),O=["components"];function E(){return E=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(27647);var R={},w="wrapper";function j(e){var r=e.components,t=_(e,O);return(0,a.mdx)(w,E({},R,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"timeseries-with-eventline"},"Timeseries with eventline"),(0,a.mdx)("p",null,"This is a timeseries paired result graph with eventlines in it."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(m,{mdxType:"PairedResultGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(x,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(y.A,{mdxType:"DataObject"})))}j.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/13708-12ae97ac60ae10985a0e.js b/13708-12ae97ac60ae10985a0e.js new file mode 100644 index 000000000..7f14262ac --- /dev/null +++ b/13708-12ae97ac60ae10985a0e.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[13708],{36688:function(e,n,a){var t=a(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=t(a(61770)),l=a(86006),i={key:"simple_paired_result_data",label:{high:{display:"High"},mid:{display:"Median"},low:{display:"Low"}},shape:{high:r.default.helpers.SHAPES.DARK.TEAR_ALT,mid:r.default.helpers.SHAPES.DARK.RHOMBUS,low:r.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:r.default.helpers.COLORS.BLACK,mid:r.default.helpers.COLORS.PURPLE,low:r.default.helpers.COLORS.BLACK},onClick:l.loadPopup,values:[{high:{x:20,y:150},mid:{x:20,y:40},low:{x:20,y:10}},{high:{x:80,y:100},mid:{x:80,y:75},low:{x:80,y:50}},{high:{x:150,y:110},mid:{x:150,y:70},low:{x:150,y:30}},{high:{x:175,y:160},mid:{x:175,y:120},low:{x:175,y:100}},{high:{x:300,y:190},mid:{x:300,y:90},low:{x:300,y:60}},{high:{x:560,y:150},mid:{x:560,y:40},low:{x:560,y:10}},{high:{x:800,y:180},mid:{x:800,y:100},low:{x:800,y:100}}]};n.default=i},57893:function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,axis:{x:{label:"Data",lowerLimit:0,upperLimit:1e3},y:{label:"Paired",lowerLimit:0,upperLimit:200}},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},21334:function(e,n,a){var t=a(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=t(a(61770));n.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:"2016-03-02T12:00:00Z",upperLimit:"2018-12-10T12:00:00Z",ticks:{format:"%b %Y"}},y:{label:"Paired Set A",lowerLimit:0,upperLimit:200},y2:{show:!1,label:"Paired Set B",lowerLimit:100,upperLimit:350}},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},67625:function(e,n,a){var t=a(24994);n.A=void 0;var r=t(a(96540)),l=t(a(61770)),i=t(a(45839));a(63841);var d=t(a(29683)),m=t(a(57893)),p=t(a(36688)),o=i.default.deepClone((0,m.default)("#simplePairedResultGraph")),u=[i.default.deepClone(p.default)];n.A=function(){return r.default.useEffect((function(){var e=l.default.api.graph(o);u.forEach((function(n){e.loadContent(l.default.api.pairedResult(n))}))}),[]),r.default.createElement(d.default,{id:"simplePairedResultGraph"})}},47551:function(e,n,a){var t=a(24994);n.A=void 0;var r=t(a(96540)),l=t(a(61770)),i=t(a(45839));a(63841);var d=t(a(29683)),m=t(a(21334)),p=t(a(70646)),o=i.default.deepClone((0,m.default)("#timeseriesPairedResultGraph")),u=[i.default.deepClone(p.default)];n.A=function(){return r.default.useEffect((function(){var e=l.default.api.graph(o);u.forEach((function(n){e.loadContent(l.default.api.pairedResult(n))}))}),[]),r.default.createElement(d.default,{id:"timeseriesPairedResultGraph"})}},13708:function(e,n,a){a.r(n),a.d(n,{default:function(){return S}});var t=a(96540),r=a(36665),l=a(67625),i=["components"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p={};function o(e){var n=e.components,a=m(e,i);return(0,r.mdx)("wrapper",d({},p,a,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultDefault"));\nvar _pairedResultSimpleData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultSimpleData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultDefault.default)(\'#simplePairedResultGraph\'));\nvar dataset = [_utils.default.deepClone(_pairedResultSimpleData.default)];\nvar SimplePiaredResultExample = function SimplePiaredResultExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simplePairedResultGraph"\n });\n};\nvar _default = exports.default = SimplePiaredResultExample;\n')))}o.isMDXComponent=!0;var u=a(201),s=a(88703),x=function(e){var n=e.title,a=e.description,r=e.isExpanded;return t.createElement(u.A,{title:n||"Simple Paired Result",description:a,example:t.createElement(l.A,null),exampleCssSrc:t.createElement(s.A,null),exampleSrc:t.createElement(o,null),isExpanded:r})},g=a(89510),h=a(92545),c=a(47551),f=["components"];function N(){return N=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var y={};function v(e){var n=e.components,a=b(e,f);return(0,r.mdx)("wrapper",N({},y,a,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultTimeseries"));\nvar _pairedResultTimeseriesData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultTimeseriesData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultTimeseries.default)(\'#timeseriesPairedResultGraph\'));\nvar dataset = [_utils.default.deepClone(_pairedResultTimeseriesData.default)];\nvar TimeseriesPiaredResultExample = function TimeseriesPiaredResultExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "timeseriesPairedResultGraph"\n });\n};\nvar _default = exports.default = TimeseriesPiaredResultExample;\n')))}v.isMDXComponent=!0;var C=function(e){var n=e.title,a=e.description,r=e.isExpanded;return t.createElement(u.A,{title:n||"Timeseries",description:a,example:t.createElement(c.A,null),exampleCssSrc:t.createElement(s.A,null),exampleSrc:t.createElement(v,null),isExpanded:r})},w=a(70063),R=a(47391),O=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var j={},D="wrapper";function S(e){var n=e.components,a=P(e,O);return(0,r.mdx)(D,_({},j,a,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"paired-result"},"Paired Result"),(0,r.mdx)("p",null,"A native paired result graph, representing a pair of result with an optional median value. A ",(0,r.mdx)("inlineCode",{parentName:"p"},"pair")," can be represented in any co-ordinate on a graph. Most common pattern used is charting a Blood Pressure graph where the ",(0,r.mdx)("inlineCode",{parentName:"p"},"pair")," - high, low, mid are vertical data points connected by a vertical line."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#paired-result"},"Paired Result"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#usage"},"Usage")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-structure"},"Configuration structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-properties"},"Configuration Properties")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-structure"},"Dataset structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-properties"},"Dataset properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#legendoptions"},"Legend options")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#style"},"Style")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#values"},"Values")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#regions"},"Regions")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#constraints"},"Constraints")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#examples"},"Examples"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("p",null,"An instance of Paired result graph is obtained as follows:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"Carbon.api.pairedResult(/* dataset */)\n")),(0,r.mdx)("p",null,"A Paired result graph can be plotted as follows:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\nconst graph = Carbon.api.graph(/* graph config JSON */);\ngraph.loadContent(Carbon.api.pairedResult(/* dataset 1 */));\n\n// Multiple datasets can be added:\ngraph.loadContent(Carbon.api.pairedResult(/* dataset 2 */));\ngraph.loadContent(Carbon.api.pairedResult(/* dataset 3 */));\n")),(0,r.mdx)("h2",{id:"configuration-structure"},"Configuration Structure"),(0,r.mdx)("p",null,"You will ",(0,r.mdx)("strong",{parentName:"p"},"not")," need all the properties in the example below.\nCheck ",(0,r.mdx)("a",{parentName:"p",href:"../core-configuration/Documentation/Graph"},"Graph")," for graph configuration properties."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-javascript"},"var root = {\n bindTo: ,\n axis: {\n x: {\n label: ,\n lowerLimit: or ,\n upperLimit: or ,\n },\n y: {\n label: ,\n lowerLimit: ,\n upperLimit: ,\n }\n },\n showLabel: ,\n showLegend: ,\n showVGrid: ,\n showHGrid: \n};\n")),(0,r.mdx)("h2",{id:"configuration-properties"},"Configuration Properties"),(0,r.mdx)("p",null,"See ",(0,r.mdx)("a",{parentName:"p",href:"../core-configuration/Documentation/Graph"},"Graph")," for graph configuration properties."),(0,r.mdx)("h2",{id:"dataset-structure"},"Dataset Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'var data = {\n key: ,\n regions: {\n high: [\n {\n axis: <"y" or "y2">,\n start: ,\n end: ,\n color: ,\n }\n ],\n low: [\n {\n axis: <"y" or "y2">,\n start: ,\n end: ,\n }\n ]\n },\n onClick: ,\n values: [\n {\n high: {\n x: ,\n y: ,\n isCritical: ,\n region: {\n start: ,\n end: ,\n color: ,\n }\n },\n low: {\n x: ,\n y: ,\n },\n mid: {\n x: ,\n y: ,\n }\n }\n ]\n};\n')),(0,r.mdx)("h2",{id:"dataset-properties"},"Dataset properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"A unique ",(0,r.mdx)("inlineCode",{parentName:"td"},"id")," to identify the dataset. Adding two datasets with the same ",(0,r.mdx)("inlineCode",{parentName:"td"},"key")," will result in an error.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"values"),(0,r.mdx)("td",{parentName:"tr",align:null},"Array"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See Values](#values).")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"COLORS.BLACK"),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the data points. Can be a hex value (",(0,r.mdx)("inlineCode",{parentName:"td"},"#ffffff"),") or a constant from ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/colors"},"colors"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"{}"),(0,r.mdx)("td",{parentName:"tr",align:null},"Label for the dataset in the Legend. If it is not provided then it will not be shown in the legend.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"legendOptions"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"undefined"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to show shape, line and legend. See ",(0,r.mdx)("a",{parentName:"td",href:"#legendoptions"},"LegendOptions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"Function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"undefined"),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking a datapoint, such as, to display a popup.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"regions"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"{}"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#regions"},"Regions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"shape"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"SHAPES.DARK.CIRCLE"),(0,r.mdx)("td",{parentName:"tr",align:null},"Shape for representing the data points.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"yAxis"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},'"y"'),(0,r.mdx)("td",{parentName:"tr",align:null},"Prop to select either the Y or Y2 axis for the dataset. Valid values are ",(0,r.mdx)("inlineCode",{parentName:"td"},"y")," or ",(0,r.mdx)("inlineCode",{parentName:"td"},"y2"),".")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"legendoptions"},(0,r.mdx)("inlineCode",{parentName:"h3"},"legendOptions")),(0,r.mdx)("p",{parentName:"li"}," Each paired result can have a legendOptions object in ",(0,r.mdx)("a",{parentName:"p",href:"#values"},"Values")," level."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre"},"```js\nlegendOptions: {\n showLine: ,\n showShape: ,\n style: ,\n}\n```\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showLine"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"false"),(0,r.mdx)("td",{parentName:"tr",align:null},"Display Line in the legend.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showShape"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"true"),(0,r.mdx)("td",{parentName:"tr",align:null},"Display Shape in the legend.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"style"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"{}"),(0,r.mdx)("td",{parentName:"tr",align:null},"Any style that can be applied. See ",(0,r.mdx)("a",{parentName:"td",href:"#style"},"Styles"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showElement"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"true"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to hide legend when legend item has no data."))))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"style"},(0,r.mdx)("inlineCode",{parentName:"h3"},"style")),(0,r.mdx)("p",{parentName:"li"}," Each paired result can have a style object in ",(0,r.mdx)("a",{parentName:"p",href:"#values"},"Values")," level."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"style: { strokeDashArray: '2,2' }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"strokeDashArray"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},'"0"'),(0,r.mdx)("td",{parentName:"tr",align:null},"Applies stroke-dasharray CSS property to the SVG line."))))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"values"},(0,r.mdx)("inlineCode",{parentName:"h3"},"values")),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"values: [\n {\n high: {\n x: ,\n y: ,\n },\n mid: {\n x: ,\n y: ,\n },\n low: {\n x: ,\n y: ,\n },\n }\n ]\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Value"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"high"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("em",{parentName:"td"},'{x: "", y: "", isCritical: ',(0,r.mdx)("inlineCode",{parentName:"em"},"true"),", region: {}}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Data point co-ordinate x and y, See ",(0,r.mdx)("a",{parentName:"td",href:"#regions"},"Regions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"low"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("em",{parentName:"td"},'{x: "", y: "", isCritical: ',(0,r.mdx)("inlineCode",{parentName:"em"},"true"),", region: {}}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Data point co-ordinate x and y, See ",(0,r.mdx)("a",{parentName:"td",href:"#regions"},"Regions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"mid"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("em",{parentName:"td"},'{x: "", y: "", isCritical: ',(0,r.mdx)("inlineCode",{parentName:"em"},"true"),", region: {}}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Data point co-ordinate x and y, See ",(0,r.mdx)("a",{parentName:"td",href:"#regions"},"Regions"),".")))),(0,r.mdx)("p",{parentName:"li"}," ",(0,r.mdx)("inlineCode",{parentName:"p"},"Note:")),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"At least one of the high/low/medium should be provided with valid data."),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"isCritical")," toggle is disabled by default."),(0,r.mdx)("li",{parentName:"ul"},"When ",(0,r.mdx)("inlineCode",{parentName:"li"},"isCritical")," toggle is enabled, an indicator will be shown surrounding the data point."),(0,r.mdx)("li",{parentName:"ul"},"Providing invalid data to x or y will lead to an error.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"regions"},(0,r.mdx)("inlineCode",{parentName:"h3"},"regions")),(0,r.mdx)("p",{parentName:"li"}," Draws a Horizontal area along the X-Axis."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-js"},' regions: {\n high: [\n {\n axis: <"y or y2">,\n start: ,\n end: ,\n color: ,\n },\n ],\n mid: [\n {\n axis: <"y or y2">,\n start: ,\n end: ,\n color: ,\n },\n ],\n low: [\n {\n axis: <"y or y2">,\n start: ,\n end: ,\n },\n ],\n }\n')),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("p",{parentName:"li"},"Each dataset can have 1 or more regions for ",(0,r.mdx)("inlineCode",{parentName:"p"},"high"),", ",(0,r.mdx)("inlineCode",{parentName:"p"},"low")," and/or ",(0,r.mdx)("inlineCode",{parentName:"p"},"mid"),",")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("p",{parentName:"li"},"Each value can have a region object for ",(0,r.mdx)("inlineCode",{parentName:"p"},"high"),", ",(0,r.mdx)("inlineCode",{parentName:"p"},"low")," and/or ",(0,r.mdx)("inlineCode",{parentName:"p"},"mid"),",")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("p",{parentName:"li"},"Each pair type mentioned above needs to have a ",(0,r.mdx)("inlineCode",{parentName:"p"},"start")," and ",(0,r.mdx)("inlineCode",{parentName:"p"},"end"),",")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("p",{parentName:"li"},"If at least one region is defined for a value in the element, it will take precedence over the element's region and the element's region will not be displayed."),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Value"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"high"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("em",{parentName:"td"},"{start: ",(0,r.mdx)("inlineCode",{parentName:"em"},"number"),", end: ",(0,r.mdx)("inlineCode",{parentName:"em"},"number"),"}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Start and end ",(0,r.mdx)("inlineCode",{parentName:"td"},"@type: number"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"low"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("em",{parentName:"td"},"{start: ",(0,r.mdx)("inlineCode",{parentName:"em"},"number"),", end: ",(0,r.mdx)("inlineCode",{parentName:"em"},"number"),"}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Start and end ",(0,r.mdx)("inlineCode",{parentName:"td"},"@type: number"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"mid"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("em",{parentName:"td"},"{start: ",(0,r.mdx)("inlineCode",{parentName:"em"},"number"),", end: ",(0,r.mdx)("inlineCode",{parentName:"em"},"number"),"}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Start and end ",(0,r.mdx)("inlineCode",{parentName:"td"},"@type: number"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"axis"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},'"y"'),(0,r.mdx)("td",{parentName:"tr",align:null},"Defines which axis if represents from.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/f4f4f4/000000?text=+"})," ",(0,r.mdx)("inlineCode",{parentName:"td"},"#f4f4f4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Default color of the region area."))))))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"constraints"},"Constraints"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"If dataset ",(0,r.mdx)("inlineCode",{parentName:"li"},"label")," display is not provided for ",(0,r.mdx)("inlineCode",{parentName:"li"},"high"),", ",(0,r.mdx)("inlineCode",{parentName:"li"},"low")," and ",(0,r.mdx)("inlineCode",{parentName:"li"},"mid"),", the legend item will not be shown as well.")))),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(x,{mdxType:"SimplePairedResultGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data used for simple graph")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(g.A,{mdxType:"SimplePairedResultGraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(h.A,{mdxType:"SimplePairedResultDataObject"})),(0,r.mdx)("br",null),(0,r.mdx)("br",null),(0,r.mdx)("br",null),(0,r.mdx)(C,{mdxType:"TimeseriesPairedResultGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data used for timeseries graph")),(0,r.mdx)("h3",{id:"graph-config-object-1"},"Graph Config object"),(0,r.mdx)(w.A,{mdxType:"TimeseriesPairedResultGraphConfig"}),(0,r.mdx)("h3",{id:"data-object-1"},"Data object"),(0,r.mdx)(R.A,{mdxType:"TimeseriesPairedResultDataObject"})))}S.isMDXComponent=!0},92545:function(e,n,a){a.d(n,{A:function(){return p}});a(96540);var t=a(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d={},m="wrapper";function p(e){var n=e.components,a=i(e,r);return(0,t.mdx)(m,l({},d,a,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'simple_paired_result_data\',\n label: {\n high: {\n display: \'High\'\n },\n mid: {\n display: \'Median\'\n },\n low: {\n display: \'Low\'\n }\n },\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.PURPLE,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n values: [{\n high: {\n x: 20,\n y: 150\n },\n mid: {\n x: 20,\n y: 40\n },\n low: {\n x: 20,\n y: 10\n }\n }, {\n high: {\n x: 80,\n y: 100\n },\n mid: {\n x: 80,\n y: 75\n },\n low: {\n x: 80,\n y: 50\n }\n }, {\n high: {\n x: 150,\n y: 110\n },\n mid: {\n x: 150,\n y: 70\n },\n low: {\n x: 150,\n y: 30\n }\n }, {\n high: {\n x: 175,\n y: 160\n },\n mid: {\n x: 175,\n y: 120\n },\n low: {\n x: 175,\n y: 100\n }\n }, {\n high: {\n x: 300,\n y: 190\n },\n mid: {\n x: 300,\n y: 90\n },\n low: {\n x: 300,\n y: 60\n }\n }, {\n high: {\n x: 560,\n y: 150\n },\n mid: {\n x: 560,\n y: 40\n },\n low: {\n x: 560,\n y: 10\n }\n }, {\n high: {\n x: 800,\n y: 180\n },\n mid: {\n x: 800,\n y: 100\n },\n low: {\n x: 800,\n y: 100\n }\n }]\n};\nvar _default = exports.default = data;\n')))}p.isMDXComponent=!0},89510:function(e,n,a){a.d(n,{A:function(){return p}});a(96540);var t=a(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d={},m="wrapper";function p(e){var n=e.components,a=i(e,r);return(0,t.mdx)(m,l({},d,a,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getPairedResultConfig = function getPairedResultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 1000\n },\n y: {\n label: 'Paired',\n lowerLimit: 0,\n upperLimit: 200\n }\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultConfig;\n")))}p.isMDXComponent=!0},70063:function(e,n,a){a.d(n,{A:function(){return p}});a(96540);var t=a(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[a]=e[a]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d={},m="wrapper";function p(e){var n=e.components,a=i(e,r);return(0,t.mdx)(m,l({},d,a,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getPairedResultTimeseriesConfig = function getPairedResultTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: '2016-03-02T12:00:00Z',\n upperLimit: '2018-12-10T12:00:00Z',\n ticks: {\n format: '%b %Y'\n }\n },\n y: {\n label: 'Paired Set A',\n lowerLimit: 0,\n upperLimit: 200\n },\n y2: {\n show: false,\n label: 'Paired Set B',\n lowerLimit: 100,\n upperLimit: 350\n }\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultTimeseriesConfig;\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/13763-0dd4609f9e23b8c685cd.css b/13763-0dd4609f9e23b8c685cd.css new file mode 100644 index 000000000..a7a51e5c7 --- /dev/null +++ b/13763-0dd4609f9e23b8c685cd.css @@ -0,0 +1,4 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +:root{--terra-graphs-white: #fff;--terra-graphs-dark: #1c1f21;--terra-graphs-grey5: #f4f4f4;--terra-graphs-grey10: #e8e9ea;--terra-graphs-grey15: #dedfe0;--terra-graphs-grey25: #c8cacb;--terra-graphs-grey30: #bcbfc0;--terra-graphs-grey45: #9b9fa1;--terra-graphs-grey65: #6f7477;--terra-graphs-blue100: #004c76;--terra-graphs-blue30: #a6d9f4;--terra-graphs-blue10: #ebf6fd;--terra-graphs-red85: #c00;--terra-graphs-yellow60: #ffc20a;--terra-graphs-grey55: #868a8c}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{-ms-flex-align:center;align-items:center;display:-ms-flexbox;display:flex;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd;background-color:var(--terra-graphs-blue10)}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/13763-0dd4609f9e23b8c685cd.js b/13763-0dd4609f9e23b8c685cd.js new file mode 100644 index 000000000..3972aeef3 --- /dev/null +++ b/13763-0dd4609f9e23b8c685cd.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[13763,47397,5170,82789],{95877:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"simple_pie_data_1",label:{display:"Dataset 1",format:function(e,t){return"".concat(e,": ").concat(t.toFixed(),"%")}},color:r.default.helpers.COLORS.BLUE,onClick:o.loadPiePopup,value:60};t.default=l},15100:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"simple_pie_data_2",label:{display:"Dataset 2"},color:r.default.helpers.COLORS.GREEN,onClick:o.loadPiePopup,value:10};t.default=l},36387:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"simple_pie_data_3",label:{display:"Dataset 3"},color:r.default.helpers.COLORS.LIGHT_PURPLE,onClick:o.loadPiePopup,value:30};t.default=l},86006:function(e,t,n){var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var p=o?Object.getOwnPropertyDescriptor(e,l):null;p&&(p.get||p.set)?Object.defineProperty(a,l,p):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),p=a(n(22639)),i=a(n(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var c=function(e){return new Date(e).toLocaleString()},s=function(e){return e?d(e)?c(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},v=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=i[p],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},p=0,i=Object.values(n);p0){var i=[];i.forEach((function(e){i.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),v(a,"Tasks",i)}if(o&&o.length>0){var u=[];o.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),v(a,"Activities",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),v(a,"Events",c)}if(p&&p.length>0){var s=[];p.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),v(a,"Actions",s)}},t.loadTaskPopup=function(e,t,n,a){b();var r=y(e).append("g"),o=a.label,l=a.display,p=a.y,i=a.startDate,u=a.endDate,s=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",p),f(r,"Start Date",c(i)),f(r,"End Date",c(u)),s&&f(r,"Percentage",s)},t.loadDatelinePopup=function(e,t){b();var n=y(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",c(r))},t.loadTimelinePopup=function(e,t,n,a){b();var r=y(e).append("g"),o=a.x,l=(a.y,a.label),p=a.content;f(r,"X axis","".concat(d(o)?c(o):o)),f(r,"".concat(l.display),p)},t.loadPiePopup=function(e,t,n,a){b();var r=y(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var l={id:o.default.string.isRequired},p=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};p.propTypes=l;t.default=p},1254:function(e,t,n){n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar dataset1 = {\n key: \'simple_pie_data_1\',\n label: {\n display: \'Dataset 1\',\n format: function format(display, val) {\n return "".concat(display, ": ").concat(val.toFixed(), "%");\n }\n },\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPiePopup,\n value: 60\n};\nvar _default = exports.default = dataset1;\n')))}u.isMDXComponent=!0},60685:function(e,t,n){n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar dataset2 = {\n key: \'simple_pie_data_2\',\n label: {\n display: \'Dataset 2\'\n },\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadPiePopup,\n value: 10\n};\nvar _default = exports.default = dataset2;\n')))}u.isMDXComponent=!0},50580:function(e,t,n){n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar dataset3 = {\n key: \'simple_pie_data_3\',\n label: {\n display: \'Dataset 3\'\n },\n color: _carbonGraphs.default.helpers.COLORS.LIGHT_PURPLE,\n onClick: _popup.loadPiePopup,\n value: 30\n};\nvar _default = exports.default = dataset3;\n')))}u.isMDXComponent=!0},10083:function(e,t,n){n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../colors.module';\n\n.carbon-pie-chart-canvas {\n display: block;\n margin: 0 auto;\n}\n\n.carbon-data-pie-group {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n}\n\n.carbon-legend {\n .carbon-pie-legend-item {\n align-items: center;\n display: flex;\n margin: 0.5rem;\n outline: 0;\n user-select: none;\n\n &.carbon-pie-legend-item-slice-hover {\n background-color: var(--terra-graphs-blue10);\n }\n\n .carbon-pie-legend-item-icon {\n margin-right: 0.5rem;\n }\n }\n}\n\n")))}u.isMDXComponent=!0},16939:function(e,t,n){n.r(t),t.default={}},63031:function(e,t,n){n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/13855-3f8c7bbdf38d5518e8f0.js b/13855-3f8c7bbdf38d5518e8f0.js new file mode 100644 index 000000000..2744313b5 --- /dev/null +++ b/13855-3f8c7bbdf38d5518e8f0.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[13855],{63989:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r=n(86006),i=[{key:"task1",onClick:a.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2016,0,1,8).toISOString(),endDate:new Date(2016,0,1,12).toISOString()},{key:"task2",onClick:a.loadTaskPopup,label:{display:"Story Broccoli"},startDate:new Date(2016,0,1,15).toISOString(),endDate:new Date(2016,0,1,23).toISOString()}],o=[{key:"uid_action_1",onClick:r.loadPopup,values:[new Date(2016,0,1,6,15).toISOString()]},{key:"uid_action_2",onClick:r.loadPopup,values:[new Date(2016,0,1,7,15).toISOString()]}],l={key:"track 0",trackLabel:{display:"Default",onClick:a.loadXAndYAxisLabelPopup},tasks:i,actions:o};t.default=l},95957:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{show:!0,lowerLimit:new Date(2016,0,1,0).toISOString(),upperLimit:new Date(2016,0,2,0).toISOString(),rangeRounding:!0}},clickPassThrough:{task:!1,activity:!1,event:!1,action:!1,dateline:!1},pan:{enabled:!0},showActionLegend:!0,eventline:[{color:r.default.helpers.COLORS.GREY,style:{strokeDashArray:"4,4"},value:new Date(2016,0,1,4).toISOString()}],tracks:[{key:"track 1",dimension:{trackHeight:80},trackLabel:{display:"Project A",onClick:function(){}},actions:[{key:"uid_action_1",onClick:function(){},values:[new Date(2018,2,1,6,15).toISOString(),new Date(2018,3,1,6,15).toISOString(),new Date(2018,4,1,6,15).toISOString()]},{key:"uid_action_2",onClick:function(){},values:[new Date(2018,6,1,6,15).toISOString()]}]}],actionLegend:[{key:"uid_action_1",label:{display:"Action A"}},{key:"uid_action_2",label:{display:"Action B"},shape:r.default.helpers.SHAPES.DARK.TRIANGLE,color:r.default.helpers.COLORS.GREEN}]}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var i=a(n(85715)),o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var l=i?Object.getOwnPropertyDescriptor(e,o):null;l&&(l.get||l.set)?Object.defineProperty(a,o,l):a[o]=e[o]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},s=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),o=function(){var e=p[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,i.default)(e,2),a=n[0],r=n[1],o=t.append("g").classed("popup-item",!0);o.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),o.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(i&&i.length>0){var c=[];i.forEach((function(e){c.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",c)}if(o&&o.length>0){var u=[];o.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",u)}if(l&&l.length>0){var s=[];l.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",s)}},t.loadTaskPopup=function(e,t,n,a){v();var r=g(e).append("g"),i=a.label,o=a.display,l=a.y,p=a.startDate,c=a.endDate,s=a.percentage;i&&f(r,"Task Name",o),f(r,"Track",l),f(r,"Start Date",u(p)),f(r,"End Date",u(c)),s&&f(r,"Percentage",s)},t.loadDatelinePopup=function(e,t){v();var n=g(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){v();var r=g(e).append("g"),i=a.x,o=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(i)?u(i):i)),f(r,"".concat(o.display),l)},t.loadPiePopup=function(e,t,n,a){v();var r=g(e).append("g"),i=a.label,o=a.value;f(r,i.display,o)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),i=a(n(5556));n(16939);var o={id:i.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=o;t.default=l},78318:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),o=a(n(61770)),l=a(n(23986)),p=a(n(45839));n(40415);var c,u=a(n(29683)),s=a(n(95957)),d=a(n(63989)),f=p.default.deepClone((0,s.default)("#GanttPanningWithDynamicEventline")),m=[p.default.deepClone(d.default)],g={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){c=o.default.api.gantt(f),m.forEach((function(e){c.loadContent(e)}))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),g),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){if(c){c.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),c.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={eventline:[{color:o.default.helpers.COLORS.BLACK,style:{strokeDashArray:"2,2"},value:new Date(2016,0,1,6,30).toISOString()}]};c.reflowMultipleDatasets(e)}}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(u.default,{id:"GanttPanningWithDynamicEventline"}))}},13855:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var a=n(96540),r=n(36665),i=n(78318),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c={};function u(e){var t=e.components,n=p(e,o);return(0,r.mdx)("wrapper",l({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttPanningWithEventline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttPanningWithEventline"));\nvar _simplePanningData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/simplePanningData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _ganttPanningWithEventline.default)(\'#GanttPanningWithDynamicEventline\'));\nvar dataset = [_utils.default.deepClone(_simplePanningData.default)];\nvar graph;\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar GanttPanningWithDynamicEventlineExample = function GanttPanningWithDynamicEventlineExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newEventline = [{\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n style: {\n strokeDashArray: \'2,2\'\n },\n value: new Date(2016, 0, 1, 6, 30).toISOString()\n }];\n var newDataset = {\n eventline: newEventline\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "GanttPanningWithDynamicEventline"\n }));\n};\nvar _default = exports.default = GanttPanningWithDynamicEventlineExample;\n')))}u.isMDXComponent=!0;var s=n(201),d=n(42929),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(s.A,{title:t||"Dynamic Eventline",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var y={},h="wrapper";function b(e){var t=e.components,n=v(e,m);return(0,r.mdx)(h,g({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getGanttPanningWithEventlineConfig = function getGanttPanningWithEventlineConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2016, 0, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 2, 0).toISOString(),\n rangeRounding: true // If set to false, we don't extend the domain\n }\n },\n clickPassThrough: {\n task: false,\n activity: false,\n event: false,\n action: false,\n dateline: false\n },\n pan: {\n enabled: true\n },\n showActionLegend: true,\n eventline: [{\n color: _carbonGraphs.default.helpers.COLORS.GREY,\n style: {\n strokeDashArray: '4,4'\n },\n value: new Date(2016, 0, 1, 4).toISOString()\n }],\n tracks: [{\n key: 'track 1',\n dimension: {\n trackHeight: 80\n },\n trackLabel: {\n display: 'Project A',\n onClick: function onClick() {\n // Call consumer implementation here or NOP\n }\n },\n actions: [{\n key: 'uid_action_1',\n onClick: function onClick() {},\n values: [new Date(2018, 2, 1, 6, 15).toISOString(), new Date(2018, 3, 1, 6, 15).toISOString(), new Date(2018, 4, 1, 6, 15).toISOString()]\n }, {\n key: 'uid_action_2',\n onClick: function onClick() {},\n values: [new Date(2018, 6, 1, 6, 15).toISOString()]\n }]\n }],\n actionLegend: [{\n key: 'uid_action_1',\n label: {\n display: 'Action A'\n }\n }, {\n key: 'uid_action_2',\n label: {\n display: 'Action B'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.TRIANGLE,\n color: _carbonGraphs.default.helpers.COLORS.GREEN\n }]\n };\n};\nvar _default = exports.default = getGanttPanningWithEventlineConfig;\n")))}b.isMDXComponent=!0;var x=n(55398),O=["components"];function k(){return k=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var D={},S="wrapper";function w(e){var t=e.components,n=_(e,O);return(0,r.mdx)(S,k({},D,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"gantt-chart-panning---dynamic-eventline"},"Gantt chart panning - dynamic eventline"),(0,r.mdx)("p",null,"This is a simple Gantt chart example that implements panning with a dynamic eventline."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(b,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x.A,{mdxType:"DataObject"})))}w.isMDXComponent=!0},55398:function(e,t,n){"use strict";n.d(t,{A:function(){return c}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function c(e){var t=e.components,n=o(e,r);return(0,a.mdx)(p,i({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar _popup2 = require(\"../../popup\");\nvar tasksData = [{\n key: 'task1',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2016, 0, 1, 8).toISOString(),\n endDate: new Date(2016, 0, 1, 12).toISOString()\n}, {\n key: 'task2',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Broccoli'\n },\n startDate: new Date(2016, 0, 1, 15).toISOString(),\n endDate: new Date(2016, 0, 1, 23).toISOString()\n}];\nvar actionsData = [{\n key: 'uid_action_1',\n onClick: _popup2.loadPopup,\n values: [new Date(2016, 0, 1, 6, 15).toISOString()]\n}, {\n key: 'uid_action_2',\n onClick: _popup2.loadPopup,\n values: [new Date(2016, 0, 1, 7, 15).toISOString()]\n}];\nvar simplePanningData = {\n key: 'track 0',\n trackLabel: {\n display: 'Default',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: tasksData,\n actions: actionsData\n};\nvar _default = exports.default = simplePanningData;\n")))}c.isMDXComponent=!0},42929:function(e,t,n){"use strict";n.d(t,{A:function(){return c}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function c(e){var t=e.components,n=o(e,r);return(0,a.mdx)(p,i({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../colors.module';\n@import '../Variables.module';\n\n.carbon-y-axis-track-label {\n .tick > text {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n }\n}\n\n.carbon-data-task {\n cursor: pointer;\n\n &[aria-disabled='true'] {\n cursor: default;\n }\n}\n\n.carbon-data-track-group {\n .carbon-selected-data-point {\n @include terra-graph-selected-indicator-styles();\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n }\n}\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-track-selected-bar {\n display: block;\n fill-opacity: 0;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-selected='true'] {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n }\n}\n\n")))}c.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},40415:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/14406-672d0c318c3b9ee901fd.js b/14406-672d0c318c3b9ee901fd.js new file mode 100644 index 000000000..cee942153 --- /dev/null +++ b/14406-672d0c318c3b9ee901fd.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[14406],{45128:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),i={key:"uid_4",label:{display:"Data Label 4"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,type:r.default.helpers.LINE_TYPE.SPLINE,onClick:o.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};t.default=i},93414:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",s)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){g();var r=y(e).append("g"),o=a.label,i=a.display,l=a.y,p=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){g();var n=y(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){g();var r=y(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){g();var r=y(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var i={id:o.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},25520:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),i=a(n(45839));n(45633);var l=a(n(29683)),p=a(n(93414)),s=a(n(45128)),u=i.default.deepClone((0,p.default)("#simpleSpline")),c=i.default.deepClone(s.default);t.A=function(){return r.default.useEffect((function(){o.default.api.graph(u).loadContent(o.default.api.line(c))}),[]),r.default.createElement(l.default,{id:"simpleSpline"})}},14406:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var a=n(96540),r=n(36665),o=n(25520),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={};function u(e){var t=e.components,n=p(e,i);return(0,r.mdx)("wrapper",l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseries"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries4"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseries.default)(\'#simpleSpline\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar SimpleSlineExample = function SimpleSlineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleSpline"\n });\n};\nvar _default = exports.default = SimpleSlineExample;\n')))}u.isMDXComponent=!0;var c=n(201),d=n(79679),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(c.A,{title:t||"Simple Spline",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},m=n(15423),y=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b={},h="wrapper";function x(e){var t=e.components,n=v(e,y);return(0,r.mdx)(h,g({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_4\',\n label: {\n display: \'Data Label 4\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CIRCLE,\n type: _carbonGraphs.default.helpers.LINE_TYPE.SPLINE,\n onClick: _popup.loadPopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 5\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 11\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 9\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 11\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 28\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 13\n }, {\n x: new Date(2016, 0, 1, 21, 15).toISOString(),\n y: 14\n }],\n yAxis: \'y\'\n};\nvar _default = exports.default = data;\n')))}x.isMDXComponent=!0;var O=["components"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var D={},_="wrapper";function E(e){var t=e.components,n=w(e,O);return(0,r.mdx)(_,S({},D,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-spline"},"Simple spline"),(0,r.mdx)("p",null,"This is a Simple spline graph with timeseries x-axis ticks."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x,{mdxType:"DataObject"})))}E.isMDXComponent=!0},15423:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesConfig = function getLineTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesConfig;\n')))}s.isMDXComponent=!0},79679:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},45633:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/15250-1559bd9b2f18ac0ec099.js b/15250-1559bd9b2f18ac0ec099.js new file mode 100644 index 000000000..a562313b0 --- /dev/null +++ b/15250-1559bd9b2f18ac0ec099.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[15250],{44940:function(e,n,a){var t=a(24994);n.A=void 0;var l=t(a(96540)),r=t(a(61770)),d={bindTo:"#allow-calibration-disabled-example",axis:{x:{label:"x-axis",lowerLimit:80,upperLimit:280},y:{label:"y-axis",lowerLimit:-5,upperLimit:20}},allowCalibration:!1},i={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,values:[{x:87,y:-2},{x:95,y:1},{x:103,y:-4},{x:109,y:-2},{x:128,y:3},{x:145,y:28},{x:151,y:7},{x:164,y:10},{x:177,y:1},{x:192,y:6},{x:203,y:-21},{x:209,y:-3},{x:246,y:3}]};n.A=function(){return l.default.useEffect((function(){r.default.api.graph(d).loadContent(r.default.api.line(i))}),[]),l.default.createElement("div",{id:"allow-calibration-disabled-example"})}},35995:function(e,n,a){var t=a(24994);n.A=void 0;var l=t(a(96540)),r=t(a(61770)),d={bindTo:"#allow-calibration-enabled-example",axis:{x:{show:!0,label:"x-axis",lowerLimit:80,upperLimit:280},y:{show:!0,label:"y-axis",lowerLimit:-5,upperLimit:20}}},i={bindTo:"#allow-calibration-enabled-example2",axis:{x:{label:"x-axis",lowerLimit:80,upperLimit:130},y:{label:"y-axis",lowerLimit:-5,upperLimit:20}}},m={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,values:[{x:87,y:-2},{x:95,y:1},{x:103,y:-4},{x:109,y:-2},{x:128,y:3},{x:145,y:28},{x:151,y:7},{x:164,y:10},{x:177,y:1},{x:192,y:6},{x:203,y:-21},{x:209,y:-3},{x:246,y:3}]};n.A=function(){return l.default.useEffect((function(){r.default.api.graph(d).loadContent(r.default.api.line(m)),r.default.api.graph(i).loadContent(r.default.api.line(m))}),[]),l.default.createElement(l.default.Fragment,null,l.default.createElement("div",{id:"allow-calibration-enabled-example"}),l.default.createElement("div",{id:"allow-calibration-enabled-example2"}))}},9145:function(e,n,a){var t=a(24994);n.A=void 0;var l=t(a(96540)),r=t(a(61770)),d={bindTo:"#custom-legend-graph",bindLegendTo:"#custom-legend-node",axis:{x:{label:"x axis",lowerLimit:80,upperLimit:280},y:{label:"y axis",lowerLimit:-18,upperLimit:18}}},i={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,values:[{x:87,y:-2},{x:95,y:1},{x:103,y:-4},{x:109,y:-2},{x:128,y:3},{x:145,y:28},{x:151,y:7},{x:164,y:10},{x:177,y:1},{x:192,y:6},{x:203,y:-21},{x:209,y:-3},{x:246,y:3}]};n.A=function(){return l.default.useEffect((function(){r.default.api.graph(d).loadContent(r.default.api.line(i))}),[]),l.default.createElement("div",{id:"custom-legend-example",style:{display:"flex",width:"100%"}},l.default.createElement("div",{id:"custom-legend-node",style:{width:"20%"}}),l.default.createElement("div",{style:{width:"80%"}},l.default.createElement("div",{id:"custom-legend-graph"})))}},5948:function(e,n,a){var t=a(24994);n.A=void 0;var l=t(a(96540)),r=t(a(61770)),d={bindTo:"#no-data-example",bindLegendTo:null,axis:{x:{label:"x axis",lowerLimit:80,upperLimit:280},y:{label:"y axis",lowerLimit:-18,upperLimit:18}}};n.A=function(){return l.default.useEffect((function(){r.default.api.graph(d)}),[]),l.default.createElement("div",{id:"no-data-example"})}},15250:function(e,n,a){a.r(n),a.d(n,{default:function(){return X}});var t=a(96540),l=a(36665),r=a(5948),d=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(l[a]=e[a]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var o={};function p(e){var n=e.components,a=m(e,d);return(0,l.mdx)("wrapper",i({},o,a,{components:n,mdxType:"MDXLayout"}),(0,l.mdx)("pre",null,(0,l.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\n// graph configuration object\n\nvar graphConfig = {\n bindTo: \'#no-data-example\',\n bindLegendTo: null,\n axis: {\n x: {\n label: \'x axis\',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n label: \'y axis\',\n lowerLimit: -18,\n upperLimit: 18\n }\n }\n};\n\n// graph rendering\n\nvar NoDataGeneralExample = function NoDataGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement("div", {\n id: "no-data-example"\n });\n};\nvar _default = exports.default = NoDataGeneralExample;\n')))}p.isMDXComponent=!0;var u=a(201),x=function(e){var n=e.title,a=e.description,l=e.isExpanded;return t.createElement(u.A,{title:n||"Graph With No Data",description:a,example:t.createElement(r.A,null),exampleSrc:t.createElement(p,null),isExpanded:l})},s=a(9145),g=["components"];function c(){return c=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(l[a]=e[a]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var N={};function h(e){var n=e.components,a=b(e,g);return(0,l.mdx)("wrapper",c({},N,a,{components:n,mdxType:"MDXLayout"}),(0,l.mdx)("pre",null,(0,l.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\n/* eslint-disable react/forbid-dom-props */\n\n// graph configuration object\n\nvar graphConfig = {\n bindTo: \'#custom-legend-graph\',\n bindLegendTo: \'#custom-legend-node\',\n axis: {\n x: {\n label: \'x axis\',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n label: \'y axis\',\n lowerLimit: -18,\n upperLimit: 18\n }\n }\n};\n\n// graph dataset\n\nvar dataset1 = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n values: [{\n x: 87,\n y: -2\n }, {\n x: 95,\n y: 1\n }, {\n x: 103,\n y: -4\n }, {\n x: 109,\n y: -2\n }, {\n x: 128,\n y: 3\n }, {\n x: 145,\n y: 28\n }, {\n x: 151,\n y: 7\n }, {\n x: 164,\n y: 10\n }, {\n x: 177,\n y: 1\n }, {\n x: 192,\n y: 6\n }, {\n x: 203,\n y: -21\n }, {\n x: 209,\n y: -3\n }, {\n x: 246,\n y: 3\n }]\n};\n\n// graph rendering\n\nvar CustomLegendDomExample = function CustomLegendDomExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset1));\n }, []);\n return /*#__PURE__*/_react.default.createElement("div", {\n id: "custom-legend-example",\n style: {\n display: \'flex\',\n width: \'100%\'\n }\n }, /*#__PURE__*/_react.default.createElement("div", {\n id: "custom-legend-node",\n style: {\n width: \'20%\'\n }\n }), /*#__PURE__*/_react.default.createElement("div", {\n style: {\n width: \'80%\'\n }\n }, /*#__PURE__*/_react.default.createElement("div", {\n id: "custom-legend-graph"\n })));\n};\nvar _default = exports.default = CustomLegendDomExample;\n')))}h.isMDXComponent=!0;var f=function(e){var n=e.title,a=e.description,l=e.isExpanded;return t.createElement(u.A,{title:n||"Graph With Custom Legend Dom",description:a,example:t.createElement(s.A,null),exampleSrc:t.createElement(h,null),isExpanded:l})},y=a(44940),v=["components"];function C(){return C=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(l[a]=e[a]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var _={};function L(e){var n=e.components,a=w(e,v);return(0,l.mdx)("wrapper",C({},_,a,{components:n,mdxType:"MDXLayout"}),(0,l.mdx)("pre",null,(0,l.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\n// graph configuration object\n\nvar graphConfig = {\n bindTo: \'#allow-calibration-disabled-example\',\n axis: {\n x: {\n label: \'x-axis\',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n label: \'y-axis\',\n lowerLimit: -5,\n upperLimit: 20\n }\n },\n allowCalibration: false\n};\n\n// graph dataset\n\nvar dataset1 = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n values: [{\n x: 87,\n y: -2\n }, {\n x: 95,\n y: 1\n }, {\n x: 103,\n y: -4\n }, {\n x: 109,\n y: -2\n }, {\n x: 128,\n y: 3\n }, {\n x: 145,\n y: 28\n }, {\n x: 151,\n y: 7\n }, {\n x: 164,\n y: 10\n }, {\n x: 177,\n y: 1\n }, {\n x: 192,\n y: 6\n }, {\n x: 203,\n y: -21\n }, {\n x: 209,\n y: -3\n }, {\n x: 246,\n y: 3\n }]\n};\n\n// graph rendering\n\nvar AllowCalibrationDisabledExample = function AllowCalibrationDisabledExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset1));\n }, []);\n return /*#__PURE__*/_react.default.createElement("div", {\n id: "allow-calibration-disabled-example"\n });\n};\nvar _default = exports.default = AllowCalibrationDisabledExample;\n')))}L.isMDXComponent=!0;var E=function(e){var n=e.title,a=e.description,l=e.isExpanded;return t.createElement(u.A,{title:n||"Allow Calibration Disabled",description:a,example:t.createElement(y.A,null),exampleSrc:t.createElement(L,null),isExpanded:l})},O=a(35995),j=["components"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(l[a]=e[a]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var P={};function k(e){var n=e.components,a=T(e,j);return(0,l.mdx)("wrapper",D({},P,a,{components:n,mdxType:"MDXLayout"}),(0,l.mdx)("pre",null,(0,l.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\n// graph configuration objects\n\nvar graphConfig1 = {\n bindTo: \'#allow-calibration-enabled-example\',\n axis: {\n x: {\n show: true,\n label: \'x-axis\',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: \'y-axis\',\n lowerLimit: -5,\n upperLimit: 20\n }\n }\n // allowCalibration is true by default\n // allowCalibration: true,\n};\nvar graphConfig2 = {\n bindTo: \'#allow-calibration-enabled-example2\',\n axis: {\n x: {\n label: \'x-axis\',\n lowerLimit: 80,\n upperLimit: 130\n },\n y: {\n label: \'y-axis\',\n lowerLimit: -5,\n upperLimit: 20\n }\n }\n // allowCalibration is true by default\n // allowCalibration: true,\n};\n\n// graph dataset\n\nvar dataset1 = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n values: [{\n x: 87,\n y: -2\n }, {\n x: 95,\n y: 1\n }, {\n x: 103,\n y: -4\n }, {\n x: 109,\n y: -2\n }, {\n x: 128,\n y: 3\n }, {\n x: 145,\n y: 28\n }, {\n x: 151,\n y: 7\n }, {\n x: 164,\n y: 10\n }, {\n x: 177,\n y: 1\n }, {\n x: 192,\n y: 6\n }, {\n x: 203,\n y: -21\n }, {\n x: 209,\n y: -3\n }, {\n x: 246,\n y: 3\n }]\n};\n\n// graph rendering\n\nvar AllowCalibrationEnabledExample = function AllowCalibrationEnabledExample() {\n _react.default.useEffect(function () {\n var graph1 = _carbonGraphs.default.api.graph(graphConfig1);\n graph1.loadContent(_carbonGraphs.default.api.line(dataset1));\n var graph2 = _carbonGraphs.default.api.graph(graphConfig2);\n graph2.loadContent(_carbonGraphs.default.api.line(dataset1));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {\n id: "allow-calibration-enabled-example"\n }), /*#__PURE__*/_react.default.createElement("div", {\n id: "allow-calibration-enabled-example2"\n }));\n};\nvar _default = exports.default = AllowCalibrationEnabledExample;\n')))}k.isMDXComponent=!0;var S=function(e){var n=e.title,a=e.description,l=e.isExpanded;return t.createElement(u.A,{title:n||"Allow Calibration Enabled",description:a,example:t.createElement(O.A,null),exampleSrc:t.createElement(k,null),isExpanded:l})},A=["components"];function R(){return R=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(l[a]=e[a]);return l}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var G={},M="wrapper";function X(e){var n=e.components,a=q(e,A);return(0,l.mdx)(M,R({},G,a,{components:n,mdxType:"MDXLayout"}),(0,l.mdx)("h1",{id:"graph-configuration-object"},"Graph Configuration Object"),(0,l.mdx)("p",null,"The graph configuration object has a set of properties for the underlying grid of a graph.\nIt hold various properties to configure a grid."),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#valid-graphs"},"Valid Graphs")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#configuration-structure"},"Configuration Structure")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#configuration-properties-summary"},"Configuration Properties Summary")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#configuration-properties-details"},"Configuration Properties Details"),(0,l.mdx)("ul",{parentName:"li"},(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#allowcalibration"},"allowCalibration")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#bindlegendto"},"bindLegendTo")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#clickpassthrough"},"clickPassThrough")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#dimension"},"dimension")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#legendpadding"},"legendPadding")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"#tickscount"},"ticksCount"))))),(0,l.mdx)("h2",{id:"valid-graphs"},"Valid Graphs"),(0,l.mdx)("p",null,"It is required for the following graphs:"),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"../bar-graph/about"},"Bar")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"../bubble-graph/about"},"Bubble")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"../combination/about"},"Combination")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"../line-graph/about"},"Line")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"../paired-result-graph/about"},"Paired Result")),(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("a",{parentName:"li",href:"../scatter-graph/about"},"Scatter"))),(0,l.mdx)("p",null,"Without a dataset, the above graphs will render as:"),(0,l.mdx)(x,{mdxType:"NoDataGeneralExample"}),(0,l.mdx)("h2",{id:"configuration-structure"},"Configuration Structure"),(0,l.mdx)("pre",null,(0,l.mdx)("code",{parentName:"pre",className:"language-js"},"const graphConfig = {\n axis: ,\n bindTo: ,\n allowCalibration: ,\n bindLegendTo: ,\n clickPassThrough: {\n datelines: ,\n eventlines: ,\n }\n dateline: ,\n eventline: ,\n legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n locale: ,\n padding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n pan: {\n enabled: \n },\n removeContainerPadding: ,\n showHGrid: ,\n showLabel: ,\n showLegend: ,\n showNoDataText: ,\n showShapes: ,\n showVGrid: ,\n showXLabel: ,\n ticksCount: \n}\n")),(0,l.mdx)("h2",{id:"configuration-properties-summary"},"Configuration Properties Summary"),(0,l.mdx)("table",null,(0,l.mdx)("thead",{parentName:"table"},(0,l.mdx)("tr",{parentName:"thead"},(0,l.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,l.mdx)("th",{parentName:"tr",align:null},"Expected"),(0,l.mdx)("th",{parentName:"tr",align:null},"Default"),(0,l.mdx)("th",{parentName:"tr",align:null},"Required"),(0,l.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,l.mdx)("tbody",{parentName:"table"},(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"axis"),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},"-"),(0,l.mdx)("td",{parentName:"tr",align:null},"yes"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"./Axes"},"Axis"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"bindTo"),(0,l.mdx)("td",{parentName:"tr",align:null},"string"),(0,l.mdx)("td",{parentName:"tr",align:null},"-"),(0,l.mdx)("td",{parentName:"tr",align:null},"yes"),(0,l.mdx)("td",{parentName:"tr",align:null},"DOM ID to bind the graph container to.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("a",{parentName:"td",href:"#allowcalibration"},"allowCalibration")),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to automatically adjust the y axis based on the dataset.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("a",{parentName:"td",href:"#bindlegendto"},"bindLegendTo")),(0,l.mdx)("td",{parentName:"tr",align:null},"string"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"null")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Container id for custom legend placement. See ",(0,l.mdx)("a",{parentName:"td",href:"#bindLegendTo"},"bindLegendTo"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("a",{parentName:"td",href:"#clickpassthrough"},"clickPassThrough")),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"{}")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"#clickpassthrough"},"clickPassThrough"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"dateline"),(0,l.mdx)("td",{parentName:"tr",align:null},"array"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"[]")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"./Dateline"},"Dateline"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"eventline"),(0,l.mdx)("td",{parentName:"tr",align:null},"array"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"[]")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"./Eventline"},"Eventline"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("a",{parentName:"td",href:"#dimension"},"dimension")),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"{}")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"#dimension"},"dimension"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("a",{parentName:"td",href:"#legendpadding"},"legendPadding")),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"{ top: 4, bottom: 4, left: 8, right: 8 }")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Sets the legend padding and removes the carbon default margin of ",(0,l.mdx)("inlineCode",{parentName:"td"},"8px")," around legend.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"locale"),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"LOCALE.en_US")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Locale object for x-Axis tick values.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"opaqueBackground"),(0,l.mdx)("td",{parentName:"tr",align:null},"false"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"false")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle between a ",(0,l.mdx)("inlineCode",{parentName:"td"},"transparent")," or ",(0,l.mdx)("inlineCode",{parentName:"td"},"white")," background for the container.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"padding"),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"{ top: 10, bottom: 10, left: 30, right: 50 }")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"./Padding"},"Padding"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"pan"),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"{}")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"./Panning"},"Panning"),".")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"removeContainerPadding"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"false")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to remove the top and bottom padding of the carbon container.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showHGrid"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show horizontal grid.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showLabel"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show axes labels.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showLegend"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show graph legend.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showNoDataText"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show no data text.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showShapes"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show shapes in the line graph.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showVGrid"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show vertical grid.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"showXLabel"),(0,l.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle to show the x-axis label. An x-axis label will be required by default in 3.0.0. Set this property to ",(0,l.mdx)("inlineCode",{parentName:"td"},"false")," for specific use cases where the x-axis label needs to be hidden.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("a",{parentName:"td",href:"#tickscount"},"ticksCount")),(0,l.mdx)("td",{parentName:"tr",align:null},"number"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"3"),"-",(0,l.mdx)("inlineCode",{parentName:"td"},"7")," depending on the input range"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"See ",(0,l.mdx)("a",{parentName:"td",href:"#tickscount"},"ticksCount"),".")))),(0,l.mdx)("h2",{id:"configuration-properties-details"},"Configuration Properties Details"),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("h3",{parentName:"li",id:"allowcalibration"},(0,l.mdx)("inlineCode",{parentName:"h3"},"allowCalibration")),(0,l.mdx)("strong",{parentName:"li"},"type:")," boolean")),(0,l.mdx)("p",null,"The ",(0,l.mdx)("inlineCode",{parentName:"p"},"allowCalibration")," prop allows the y-axes to be automatically updated based on the dataset. For calibrating the x-axis, see ",(0,l.mdx)("a",{parentName:"p",href:"./axes#allowcalibration"},(0,l.mdx)("inlineCode",{parentName:"a"},"axis.x.allowCalibration")),"."),(0,l.mdx)(E,{mdxType:"AllowCalibrationDisabledExample"}),(0,l.mdx)("p",null,"When enabled, the maximum and minimum points of the dataset are used to determine the new limits, regardless of if the datapoints are visible in the viewport."),(0,l.mdx)(S,{mdxType:"AllowCalibrationEnabledExample"}),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("h3",{parentName:"li",id:"bindlegendto"},(0,l.mdx)("inlineCode",{parentName:"h3"},"bindLegendTo")),(0,l.mdx)("strong",{parentName:"li"},"type:")," string")),(0,l.mdx)("p",null,"Container ID for custom legend placement."),(0,l.mdx)(f,{mdxType:"CustomLegendDomExample"}),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("h3",{parentName:"li",id:"clickpassthrough"},(0,l.mdx)("inlineCode",{parentName:"h3"},"clickPassThrough")),(0,l.mdx)("p",{parentName:"li"},(0,l.mdx)("strong",{parentName:"p"},"type:")," object"),(0,l.mdx)("pre",{parentName:"li"},(0,l.mdx)("code",{parentName:"pre",className:"language-js"}," clickPassThrough: {\n datelines: ,\n eventlines: ,\n }\n")),(0,l.mdx)("table",{parentName:"li"},(0,l.mdx)("thead",{parentName:"table"},(0,l.mdx)("tr",{parentName:"thead"},(0,l.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,l.mdx)("th",{parentName:"tr",align:null},"Expected"),(0,l.mdx)("th",{parentName:"tr",align:null},"Default"),(0,l.mdx)("th",{parentName:"tr",align:null},"Required"),(0,l.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,l.mdx)("tbody",{parentName:"table"},(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"datelines"),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},"null"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle for allowing click events to items below datelines.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"eventlines"),(0,l.mdx)("td",{parentName:"tr",align:null},"object"),(0,l.mdx)("td",{parentName:"tr",align:null},"null"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Toggle for allowing click events to items below eventlines.")))),(0,l.mdx)("p",{parentName:"li"},"The following is a table of how ",(0,l.mdx)("inlineCode",{parentName:"p"},"clickPassThrough")," works:"),(0,l.mdx)("h5",{parentName:"li",id:"dateline"},(0,l.mdx)("inlineCode",{parentName:"h5"},"dateline")),(0,l.mdx)("table",{parentName:"li"},(0,l.mdx)("thead",{parentName:"table"},(0,l.mdx)("tr",{parentName:"thead"},(0,l.mdx)("th",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"th"},"clickPassThrough.dateline")," Value"),(0,l.mdx)("th",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"th"},"onClick")," function"),(0,l.mdx)("th",{parentName:"tr",align:null},"Result"))),(0,l.mdx)("tbody",{parentName:"table"},(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"defined"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"onClick")," function is executed and cursor pointer is visible top of the element.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,l.mdx)("td",{parentName:"tr",align:null},"The element beneath it is clickable. If the bottom element is selectable, then the cursor pointer is also visible.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"false")),(0,l.mdx)("td",{parentName:"tr",align:null},"defined"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"onClick")," function is executed and cursor pointer is visible top of the element.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"false")),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,l.mdx)("td",{parentName:"tr",align:null},"All mouse events are disabled.")))),(0,l.mdx)("h5",{parentName:"li",id:"eventline"},(0,l.mdx)("inlineCode",{parentName:"h5"},"eventline")),(0,l.mdx)("table",{parentName:"li"},(0,l.mdx)("thead",{parentName:"table"},(0,l.mdx)("tr",{parentName:"thead"},(0,l.mdx)("th",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"th"},"clickPassThrough.eventline")," Value"),(0,l.mdx)("th",{parentName:"tr",align:null},"Result"))),(0,l.mdx)("tbody",{parentName:"table"},(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"true")),(0,l.mdx)("td",{parentName:"tr",align:null},"Clicking underneath the element is allowed and if bottom element is selectable, then the pointer is visible.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"false")),(0,l.mdx)("td",{parentName:"tr",align:null},"All mouse events are disabled.")))))),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("h3",{parentName:"li",id:"dimension"},(0,l.mdx)("inlineCode",{parentName:"h3"},"dimension")),(0,l.mdx)("p",{parentName:"li"},(0,l.mdx)("strong",{parentName:"p"},"type:")," object"),(0,l.mdx)("table",{parentName:"li"},(0,l.mdx)("thead",{parentName:"table"},(0,l.mdx)("tr",{parentName:"thead"},(0,l.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,l.mdx)("th",{parentName:"tr",align:null},"Type"),(0,l.mdx)("th",{parentName:"tr",align:null},"Required"),(0,l.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,l.mdx)("tbody",{parentName:"table"},(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"height"),(0,l.mdx)("td",{parentName:"tr",align:null},"number"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},"Sets the height of the graph.")))))),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("h3",{parentName:"li",id:"legendpadding"},(0,l.mdx)("inlineCode",{parentName:"h3"},"legendPadding")),(0,l.mdx)("p",{parentName:"li"},(0,l.mdx)("strong",{parentName:"p"},"type:")," object"),(0,l.mdx)("p",{parentName:"li"},"Sets the legend padding and removes the carbon default margin of ",(0,l.mdx)("inlineCode",{parentName:"p"},"8px")," around legend."),(0,l.mdx)("pre",{parentName:"li"},(0,l.mdx)("code",{parentName:"pre",className:"language-json"}," legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n }\n")),(0,l.mdx)("table",{parentName:"li"},(0,l.mdx)("thead",{parentName:"table"},(0,l.mdx)("tr",{parentName:"thead"},(0,l.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,l.mdx)("th",{parentName:"tr",align:null},"Type"),(0,l.mdx)("th",{parentName:"tr",align:null},"Required"),(0,l.mdx)("th",{parentName:"tr",align:null},"Default"),(0,l.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,l.mdx)("tbody",{parentName:"table"},(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"top"),(0,l.mdx)("td",{parentName:"tr",align:null},"number"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"4")),(0,l.mdx)("td",{parentName:"tr",align:null},"Top padding of legend container.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"bottom"),(0,l.mdx)("td",{parentName:"tr",align:null},"number"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"4")),(0,l.mdx)("td",{parentName:"tr",align:null},"Bottom padding of legend container.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"left"),(0,l.mdx)("td",{parentName:"tr",align:null},"number"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"8")),(0,l.mdx)("td",{parentName:"tr",align:null},"Left padding of legend container.")),(0,l.mdx)("tr",{parentName:"tbody"},(0,l.mdx)("td",{parentName:"tr",align:null},"right"),(0,l.mdx)("td",{parentName:"tr",align:null},"number"),(0,l.mdx)("td",{parentName:"tr",align:null},"no"),(0,l.mdx)("td",{parentName:"tr",align:null},(0,l.mdx)("inlineCode",{parentName:"td"},"8")),(0,l.mdx)("td",{parentName:"tr",align:null},"Right padding of legend container.")))))),(0,l.mdx)("ul",null,(0,l.mdx)("li",{parentName:"ul"},(0,l.mdx)("h3",{parentName:"li",id:"tickscount"},(0,l.mdx)("inlineCode",{parentName:"h3"},"ticksCount")),(0,l.mdx)("p",{parentName:"li"},(0,l.mdx)("strong",{parentName:"p"},"type:")," number"),(0,l.mdx)("p",{parentName:"li"},"Number of ticks (0-19) to show on the vertical axes, excluding the upper and lower limits, if not provided, the number of ticks will be set to a value from 3-7, based on the ",(0,l.mdx)("inlineCode",{parentName:"p"},"Y")," & ",(0,l.mdx)("inlineCode",{parentName:"p"},"Y2")," range.\nSee ",(0,l.mdx)("a",{parentName:"p",href:"./Ticks"},"Ticks")," for more information on how this is used with the Ticks object."))))}X.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/15772-b3d130260b6a5868bfd8.css b/15772-b3d130260b6a5868bfd8.css new file mode 100644 index 000000000..d68f3e3c4 --- /dev/null +++ b/15772-b3d130260b6a5868bfd8.css @@ -0,0 +1,4 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +:root{--terra-graphs-white: #fff;--terra-graphs-dark: #1c1f21;--terra-graphs-grey5: #f4f4f4;--terra-graphs-grey10: #e8e9ea;--terra-graphs-grey15: #dedfe0;--terra-graphs-grey25: #c8cacb;--terra-graphs-grey30: #bcbfc0;--terra-graphs-grey45: #9b9fa1;--terra-graphs-grey65: #6f7477;--terra-graphs-blue100: #004c76;--terra-graphs-blue30: #a6d9f4;--terra-graphs-blue10: #ebf6fd;--terra-graphs-red85: #c00;--terra-graphs-yellow60: #ffc20a;--terra-graphs-grey55: #868a8c}:root{--default-transition-timing: cubic-bezier(0.07, 0.95, 0, 1);--default-transition-duration: 1s}[dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{fill:#ebf6fd;fill:var(--terra-graphs-blue10);fill-opacity:.25;stroke:#a6d9f4;stroke:var(--terra-graphs-blue30);stroke-width:1px}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}.carbon-data-selected-bar{fill:#ebf6fd;fill:var(--terra-graphs-blue10);fill-opacity:.25;stroke:#a6d9f4;stroke:var(--terra-graphs-blue30);stroke-width:1px;shape-rendering:auto;display:block}.carbon-data-selected-bar[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-data-selected-bar[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{fill:#ebf6fd;fill:var(--terra-graphs-blue10);fill-opacity:.25;stroke:#a6d9f4;stroke:var(--terra-graphs-blue30);stroke-width:1px;shape-rendering:auto} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/16576-f57066f888b8ddbeff0c.js b/16576-f57066f888b8ddbeff0c.js new file mode 100644 index 000000000..40ef746f3 --- /dev/null +++ b/16576-f57066f888b8ddbeff0c.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[16576],{13720:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(61770)),r={key:"uid_1",label:{high:{display:"High"},mid:{display:"Median"},low:{display:"Low"}},onClick:n(86006).loadPopup,shape:{high:o.default.helpers.SHAPES.DARK.TEAR_ALT,mid:o.default.helpers.SHAPES.DARK.RHOMBUS,low:o.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:o.default.helpers.COLORS.BLACK,mid:o.default.helpers.COLORS.BLUE,low:o.default.helpers.COLORS.BLACK},values:[{high:{x:"2016-01-02T00:30:00.000Z",y:150},mid:{x:"2016-01-02T00:30:00.000Z",y:40},low:{x:"2016-01-02T00:30:00.000Z",y:10}},{high:{x:"2016-01-02T05:30:00.000Z",y:110},mid:{x:"2016-01-02T05:30:00.000Z",y:70},low:{x:"2016-01-02T05:30:00.000Z",y:30}}]};t.default=r},86006:function(e,t,n){"use strict";var a=n(24994),o=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var r=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=o(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var p=r?Object.getOwnPropertyDescriptor(e,l):null;p&&(p.get||p.set)?Object.defineProperty(a,l,p):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),p=a(n(22639)),i=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var c=function(e){return new Date(e).toLocaleString()},d=function(e){return e?u(e)?c(e):e:null},u=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},y=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var o=a.append("g").classed("section",!0),l=function(){var e=i[p],t=o.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,r.default)(e,2),a=n[0],o=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(o)}))},p=0,i=Object.values(n);p0){var i=[];i.forEach((function(e){i.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",i)}if(r&&r.length>0){var s=[];r.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",s)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",c)}if(p&&p.length>0){var d=[];p.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",d)}},t.loadTaskPopup=function(e,t,n,a){h();var o=v(e).append("g"),r=a.label,l=a.display,p=a.y,i=a.startDate,s=a.endDate,d=a.percentage;r&&f(o,"Task Name",l),f(o,"Track",p),f(o,"Start Date",c(i)),f(o,"End Date",c(s)),d&&f(o,"Percentage",d)},t.loadDatelinePopup=function(e,t){h();var n=v(e).append("g"),a=t.label,o=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",c(o))},t.loadTimelinePopup=function(e,t,n,a){h();var o=v(e).append("g"),r=a.x,l=(a.y,a.label),p=a.content;f(o,"X axis","".concat(u(r)?c(r):r)),f(o,"".concat(l.display),p)},t.loadPiePopup=function(e,t,n,a){h();var o=v(e).append("g"),r=a.label,l=a.value;f(o,r.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(96540)),r=a(n(5556));n(16939);var l={id:r.default.string.isRequired},p=function(e){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),o.default.createElement("div",{id:e.id,className:"example-graph-container"}))};p.propTypes=l;t.default=p},76188:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),o=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p={},i="wrapper";function s(e){var t=e.components,n=l(e,o);return(0,a.mdx)(i,r({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'uid_1',\n label: {\n high: {\n display: 'High'\n },\n mid: {\n display: 'Median'\n },\n low: {\n display: 'Low'\n }\n },\n onClick: _popup.loadPopup,\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.BLUE,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n values: [{\n high: {\n x: '2016-01-02T00:30:00.000Z',\n y: 150\n },\n mid: {\n x: '2016-01-02T00:30:00.000Z',\n y: 40\n },\n low: {\n x: '2016-01-02T00:30:00.000Z',\n y: 10\n }\n }, {\n high: {\n x: '2016-01-02T05:30:00.000Z',\n y: 110\n },\n mid: {\n x: '2016-01-02T05:30:00.000Z',\n y: 70\n },\n low: {\n x: '2016-01-02T05:30:00.000Z',\n y: 30\n }\n }]\n};\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0},88703:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),o=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var p={},i="wrapper";function s(e){var t=e.components,n=l(e,o);return(0,a.mdx)(i,r({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n@import '../colors.module';\n\n/*\nWe are forcing display of the hidden item for data points,\nthis is only applicable when legend toggle is applied\nand one of the data point is selected.\n*/\n.carbon-data-pair--selected {\n @include terra-graph-opacity-show(); //!important;\n}\n\n.carbon-paired-point {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-paired-line {\n fill: none;\n stroke: var(--terra-graphs-dark);\n stroke-width: 1px;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,o;void 0===(o="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var o=a!=n.offsetHeight;return document.body.removeChild(n),o}function o(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),o("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=o)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},63841:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/16850-35d13b58e4caf7a79eda.js b/16850-35d13b58e4caf7a79eda.js new file mode 100644 index 000000000..1a1ea594b --- /dev/null +++ b/16850-35d13b58e4caf7a79eda.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[16850],{18469:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"stacked_bar_4",label:{display:"Dataset 4"},color:r.default.helpers.COLORS.GREEN,onClick:o.loadBarPopup,values:[{x:1,y:30},{x:2,y:10},{x:3,y:13},{x:4,y:15},{x:5,y:18}],regions:[{axis:"y",x:1,start:10,end:10},{axis:"y",x:2,start:40,end:40},{axis:"y",x:3,start:55,end:55},{axis:"y",x:4,start:30,end:30}]};t.default=l},88732:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"stacked_bar_5",label:{display:"Dataset 5"},group:"stacked_bar_4",color:r.default.helpers.COLORS.LIGHT_PURPLE,onClick:o.loadBarPopup,values:[{x:1,y:30},{x:2,y:5},{x:3,y:8},{x:4,y:10},{x:5,y:10},{x:6,y:10}],regions:[{axis:"y",x:1,start:10,end:10},{axis:"y",x:2,start:40,end:40},{axis:"y",x:3,start:55,end:55},{axis:"y",x:4,start:30,end:30}]};t.default=l},70371:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"stacked_bar_6",label:{display:"Dataset 6"},group:"stacked_bar_4",color:r.default.helpers.COLORS.BLUE,onClick:o.loadBarPopup,values:[{x:1,y:30},{x:2,y:8},{x:3,y:9},{x:4,y:10},{x:5,y:7}],regions:[{axis:"y",x:1,start:10,end:10},{axis:"y",x:2,start:40,end:40},{axis:"y",x:3,start:55,end:55},{axis:"y",x:4,start:30,end:30}]};t.default=l},87539:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:0,upperLimit:8,ticks:{values:[1,2,3,4,5,6,7],format:".0f"}},y:{show:!0,label:"Bar Set A",lowerLimit:0,upperLimit:35},y2:{show:!1,label:"Bar Set B",lowerLimit:0,upperLimit:30}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!1,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),i=a(n(22639)),s=a(n(45839));function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},d=function(e){return e?c(e)?u(e):e:null},c=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},y=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=s[i],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,s=Object.values(n);i0){var s=[];s.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",s)}if(o&&o.length>0){var p=[];o.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",p)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",u)}if(i&&i.length>0){var d=[];i.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",d)}},t.loadTaskPopup=function(e,t,n,a){b();var r=m(e).append("g"),o=a.label,l=a.display,i=a.y,s=a.startDate,p=a.endDate,d=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",u(s)),f(r,"End Date",u(p)),d&&f(r,"Percentage",d)},t.loadDatelinePopup=function(e,t){b();var n=m(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){b();var r=m(e).append("g"),o=a.x,l=(a.y,a.label),i=a.content;f(r,"X axis","".concat(c(o)?u(o):o)),f(r,"".concat(l.display),i)},t.loadPiePopup=function(e,t,n,a){b();var r=m(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;t.default=i},77601:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),l=a(n(45839));n(11719);var i=a(n(29683)),s=a(n(87539)),p=a(n(18469)),u=a(n(88732)),d=a(n(70371)),c=l.default.deepClone((0,s.default)("#stackedGoalLineBarGraph")),f=[l.default.deepClone(p.default),l.default.deepClone(u.default),l.default.deepClone(d.default)];t.A=function(){return r.default.useEffect((function(){var e=o.default.api.graph(c);f.forEach((function(t){e.loadContent(o.default.api.bar(t))}))}),[]),r.default.createElement(i.default,{id:"stackedGoalLineBarGraph"})}},16850:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return N}});var a=n(96540),r=n(36665),o=n(77601),l=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function u(e){var t=e.components,n=s(e,l);return(0,r.mdx)("wrapper",i({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Bar/BarGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _barDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bar/barDefault"));\nvar _stackedGoalLinesData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/stackedGoalLinesData1"));\nvar _stackedGoalLinesData2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/stackedGoalLinesData2"));\nvar _stackedGoalLinesData3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/stackedGoalLinesData3"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _barDefault.default)(\'#stackedGoalLineBarGraph\'));\nvar dataset = [_utils.default.deepClone(_stackedGoalLinesData.default), _utils.default.deepClone(_stackedGoalLinesData2.default), _utils.default.deepClone(_stackedGoalLinesData3.default)];\nvar _default = exports.default = function _default() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.bar(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "stackedGoalLineBarGraph"\n });\n};\n')))}u.isMDXComponent=!0;var d=n(201),c=n(18241),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(d.A,{title:t||"Stacked Goal Lines",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},y=n(54308),m=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var v={},g="wrapper";function h(e){var t=e.components,n=x(e,m);return(0,r.mdx)(g,b({},v,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'stacked_bar_4',\n label: {\n display: 'Dataset 4'\n },\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 10\n }, {\n x: 3,\n y: 13\n }, {\n x: 4,\n y: 15\n }, {\n x: 5,\n y: 18\n }],\n regions: [{\n axis: 'y',\n x: 1,\n start: 10,\n end: 10\n }, {\n axis: 'y',\n x: 2,\n start: 40,\n end: 40\n }, {\n axis: 'y',\n x: 3,\n start: 55,\n end: 55\n }, {\n axis: 'y',\n x: 4,\n start: 30,\n end: 30\n }]\n};\nvar _default = exports.default = data;\n")))}h.isMDXComponent=!0;var O=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var D={},w="wrapper";function k(e){var t=e.components,n=j(e,O);return(0,r.mdx)(w,_({},D,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'stacked_bar_5',\n label: {\n display: 'Dataset 5'\n },\n group: 'stacked_bar_4',\n color: _carbonGraphs.default.helpers.COLORS.LIGHT_PURPLE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 5\n }, {\n x: 3,\n y: 8\n }, {\n x: 4,\n y: 10\n }, {\n x: 5,\n y: 10\n }, {\n x: 6,\n y: 10\n }],\n regions: [{\n axis: 'y',\n x: 1,\n start: 10,\n end: 10\n }, {\n axis: 'y',\n x: 2,\n start: 40,\n end: 40\n }, {\n axis: 'y',\n x: 3,\n start: 55,\n end: 55\n }, {\n axis: 'y',\n x: 4,\n start: 30,\n end: 30\n }]\n};\nvar _default = exports.default = data;\n")))}k.isMDXComponent=!0;var P=["components"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var C={},G="wrapper";function q(e){var t=e.components,n=E(e,P);return(0,r.mdx)(G,L({},C,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'stacked_bar_6',\n label: {\n display: 'Dataset 6'\n },\n group: 'stacked_bar_4',\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 8\n }, {\n x: 3,\n y: 9\n }, {\n x: 4,\n y: 10\n }, {\n x: 5,\n y: 7\n }],\n regions: [{\n axis: 'y',\n x: 1,\n start: 10,\n end: 10\n }, {\n axis: 'y',\n x: 2,\n start: 40,\n end: 40\n }, {\n axis: 'y',\n x: 3,\n start: 55,\n end: 55\n }, {\n axis: 'y',\n x: 4,\n start: 30,\n end: 30\n }]\n};\nvar _default = exports.default = data;\n")))}q.isMDXComponent=!0;var S=["components"];function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var M={},R="wrapper";function N(e){var t=e.components,n=B(e,S);return(0,r.mdx)(R,T({},M,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"stacked-bar-graph-with-goal-lines"},"Stacked Bar Graph With Goal Lines"),(0,r.mdx)("p",null,"This is a stacked bar graph with goal lines ."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"BarGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(y.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"dataset-4"},"Dataset 4"),(0,r.mdx)(h,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"dataset-5"},"Dataset 5"),(0,r.mdx)(k,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"dataset-6"},"Dataset 6"),(0,r.mdx)(q,{mdxType:"DataObject3"})))}N.isMDXComponent=!0},54308:function(e,t,n){"use strict";n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},s="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(s,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getbarConfig = function getbarConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 8,\n ticks: {\n values: [1, 2, 3, 4, 5, 6, 7],\n format: '.0f'\n }\n },\n y: {\n show: true,\n label: 'Bar Set A',\n lowerLimit: 0,\n upperLimit: 35\n },\n y2: {\n show: false,\n label: 'Bar Set B',\n lowerLimit: 0,\n upperLimit: 30\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: false,\n showHGrid: true\n };\n};\nvar _default = exports.default = getbarConfig;\n")))}p.isMDXComponent=!0},18241:function(e,t,n){"use strict";n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},s="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(s,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}p.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},11719:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/17629-da0828dadd70edc64be3.js b/17629-da0828dadd70edc64be3.js new file mode 100644 index 000000000..60f6f62cf --- /dev/null +++ b/17629-da0828dadd70edc64be3.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[17629],{51522:function(e,t,a){var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),l=a(86006),i={key:"bubble_dataset_1",label:{display:"Bubble Data Label 1"},graphType:"BubbleMultipleDataset",color:r.default.helpers.COLORS.GREEN,onClick:l.loadPopup,values:[{x:1,y:30},{x:2,y:10},{x:3,y:13},{x:4,y:15},{x:5,y:18}]};t.default=i},25711:function(e,t,a){var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),l=a(86006),i={key:"bubble_dataset_2",label:{display:"Bubble Data Label 2"},graphType:"BubbleMultipleDataset",color:r.default.helpers.COLORS.BLUE,onClick:l.loadPopup,weight:{min:40,max:450},values:[{x:1,y:25,weight:150},{x:2,y:15,weight:300},{x:3,y:2,weight:200},{x:4,y:28,weight:400},{x:5,y:23,weight:450}]};t.default=i},76181:function(e,t,a){var n=a(24994);t.A=void 0;var r=n(a(96540)),l=n(a(61770)),i=n(a(45839));a(45633);var u=n(a(29683)),o=n(a(1787)),p=n(a(9686)),s=n(a(51522)),d=n(a(25711)),b=i.default.deepClone((0,o.default)("#lineWithMultipleBubbleData")),c=[i.default.deepClone(s.default),i.default.deepClone(d.default),i.default.deepClone(p.default)];t.A=function(){return r.default.useEffect((function(){var e=l.default.api.graph(b);e.loadContent(l.default.api.bubbleMultipleDataset(c[0])),e.loadContent(l.default.api.bubbleMultipleDataset(c[1])),e.loadContent(l.default.api.line(c[2]))}),[]),r.default.createElement(u.default,{id:"lineWithMultipleBubbleData"})}},17629:function(e,t,a){a.r(t),a.d(t,{default:function(){return M}});var n=a(96540),r=a(36665),l=a(76181),i=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p={};function s(e){var t=e.components,a=o(e,i);return(0,r.mdx)("wrapper",u({},p,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _combinationDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Combination/combinationDefault"));\nvar _lineDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/lineDataset1"));\nvar _bubbleDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/bubbleDataset1"));\nvar _bubbleDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/bubbleDataset2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _combinationDefault.default)(\'#lineWithMultipleBubbleData\'));\nvar dataset = [_utils.default.deepClone(_bubbleDataset.default), _utils.default.deepClone(_bubbleDataset2.default), _utils.default.deepClone(_lineDataset.default)];\nvar LineWithMultipleBubbleDataCombinationExample = function LineWithMultipleBubbleDataCombinationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bubbleMultipleDataset(dataset[0]));\n graph.loadContent(_carbonGraphs.default.api.bubbleMultipleDataset(dataset[1]));\n graph.loadContent(_carbonGraphs.default.api.line(dataset[2]));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "lineWithMultipleBubbleData"\n });\n};\nvar _default = exports.default = LineWithMultipleBubbleDataCombinationExample;\n')))}s.isMDXComponent=!0;var d=a(201),b=a(79679),c=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(d.A,{title:t||"Line With Multiple Bubble Data",description:a,example:n.createElement(l.A,null),exampleCssSrc:n.createElement(b.A,null),exampleSrc:n.createElement(s,null),isExpanded:r})},f=a(56284),m=a(33119),h=a(52763),x=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var v={},_="wrapper";function O(e){var t=e.components,a=y(e,x);return(0,r.mdx)(_,g({},v,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'bubble_dataset_2\',\n label: {\n display: \'Bubble Data Label 2\'\n },\n graphType: \'BubbleMultipleDataset\',\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n weight: {\n min: 40,\n max: 450\n },\n values: [{\n x: 1,\n y: 25,\n weight: 150\n }, {\n x: 2,\n y: 15,\n weight: 300\n }, {\n x: 3,\n y: 2,\n weight: 200\n }, {\n x: 4,\n y: 28,\n weight: 400\n }, {\n x: 5,\n y: 23,\n weight: 450\n }]\n};\nvar _default = exports.default = data;\n')))}O.isMDXComponent=!0;var D=["components"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var w={},q="wrapper";function M(e){var t=e.components,a=C(e,D);return(0,r.mdx)(q,j({},w,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"line-with-multiple-bubble-dataset"},"Line With Multiple Bubble dataset"),(0,r.mdx)("p",null,"This is a simple Line Graph combined with multiple Bubble dataset."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(c,{mdxType:"CombinationGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(f.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"line-dataset"},"Line Dataset"),(0,r.mdx)(m.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"bubble-dataset-1"},"Bubble Dataset 1"),(0,r.mdx)(h.A,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"bubble-dataset-2"},"Bubble Dataset 2"),(0,r.mdx)(O,{mdxType:"DataObject3"})))}M.isMDXComponent=!0},52763:function(e,t,a){a.d(t,{A:function(){return p}});a(96540);var n=a(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var u={},o="wrapper";function p(e){var t=e.components,a=i(e,r);return(0,n.mdx)(o,l({},u,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'bubble_dataset_1\',\n label: {\n display: \'Bubble Data Label 1\'\n },\n graphType: \'BubbleMultipleDataset\',\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 10\n }, {\n x: 3,\n y: 13\n }, {\n x: 4,\n y: 15\n }, {\n x: 5,\n y: 18\n }]\n};\nvar _default = exports.default = data;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/18007-54ee025898799c2d75c4.css b/18007-54ee025898799c2d75c4.css new file mode 100644 index 000000000..7a9d9a86c --- /dev/null +++ b/18007-54ee025898799c2d75c4.css @@ -0,0 +1,3 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/18007-54ee025898799c2d75c4.js b/18007-54ee025898799c2d75c4.js new file mode 100644 index 000000000..c40021268 --- /dev/null +++ b/18007-54ee025898799c2d75c4.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[18007,47397,5170,82789],{59054:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!1,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},6777:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!1,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},29683:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(96540)),i=r(t(5556));t(16939);var l={id:i.default.string.isRequired},o=function(e){return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),a.default.createElement("div",{id:e.id,className:"example-graph-container"}))};o.propTypes=l;n.default=o},98984:function(e,n,t){"use strict";var r=t(24994);n.A=void 0;var a=r(t(96540)),i=r(t(61770)),l=r(t(45839)),o=r(t(29683)),u=r(t(59054)),d=l.default.deepClone((0,u.default)("#xAxisHidden"));n.A=function(){return a.default.useEffect((function(){i.default.api.graph(d)}),[]),a.default.createElement(o.default,{id:"xAxisHidden"})}},7867:function(e,n,t){"use strict";var r=t(24994);n.A=void 0;var a=r(t(96540)),i=r(t(61770)),l=r(t(45839)),o=r(t(29683)),u=r(t(6777)),d=l.default.deepClone((0,u.default)("#yAxisHidden"));n.A=function(){return a.default.useEffect((function(){i.default.api.graph(d)}),[]),a.default.createElement(o.default,{id:"yAxisHidden"})}},94920:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return A}});var r=t(96540),a=t(36665),i=t(98984),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var d={};function s(e){var n=e.components,t=u(e,l);return(0,a.mdx)("wrapper",o({},d,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultXAxisHidden = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultXAxisHidden"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultXAxisHidden.default)(\'#xAxisHidden\'));\nvar XAxisHiddenGeneralExample = function XAxisHiddenGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "xAxisHidden"\n });\n};\nvar _default = exports.default = XAxisHiddenGeneralExample;\n')))}s.isMDXComponent=!0;var p=t(201),c=function(e){var n=e.title,t=e.description,a=e.isExpanded;return r.createElement(p.A,{title:n||"X Axis Hidden",description:t,example:r.createElement(i.A,null),exampleSrc:r.createElement(s,null),isExpanded:a})},f=t(7867),m=["components"];function x(){return x=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var b={};function g(e){var n=e.components,t=h(e,m);return(0,a.mdx)("wrapper",x({},b,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultYAxisHidden = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultYAxisHidden"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultYAxisHidden.default)(\'#yAxisHidden\'));\nvar YAxisHiddenGeneralExample = function YAxisHiddenGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "yAxisHidden"\n });\n};\nvar _default = exports.default = YAxisHiddenGeneralExample;\n')))}g.isMDXComponent=!0;var v=function(e){var n=e.title,t=e.description,a=e.isExpanded;return r.createElement(p.A,{title:n||"Y Axis Hidden",description:t,example:r.createElement(f.A,null),exampleSrc:r.createElement(g,null),isExpanded:a})},y=t(49462),w=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(27647);var j={},E="wrapper";function A(e){var n=e.components,t=O(e,w);return(0,a.mdx)(E,_({},j,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"axis-hidden"},"Axis hidden"),(0,a.mdx)("p",null,"Axis hidden contains simple graph examples with hidden x and y axes."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"examples"},"Examples"),(0,a.mdx)(c,{mdxType:"XAxisHiddenGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for X-Axis hidden")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(y.A,{mdxType:"XAxisHiddenGraphConfig"})),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)(v,{mdxType:"YAxisHiddenGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for Y-Axis hidden")),(0,a.mdx)("h3",{id:"graph-config-object-1"},"Graph Config object"),(0,a.mdx)(y.A,{mdxType:"YAxisHiddenGraphConfig"})))}A.isMDXComponent=!0},49462:function(e,n,t){"use strict";t.d(n,{A:function(){return d}});t(96540);var r=t(36665),a=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={},u="wrapper";function d(e){var n=e.components,t=l(e,a);return(0,r.mdx)(u,i({},o,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}d.isMDXComponent=!0},27647:function(e,n,t){var r,a;void 0===(a="function"==typeof(r=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function r(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var r=t.offsetHeight;t.open=!0;var a=r!=t.offsetHeight;return document.body.removeChild(t),a}function a(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}r()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),a("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?r.call(n,t,n,e):r)||(e.exports=a)},16939:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/18564-02d245a51c31e03db1b6.js b/18564-02d245a51c31e03db1b6.js new file mode 100644 index 000000000..42f62b242 --- /dev/null +++ b/18564-02d245a51c31e03db1b6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[18564],{59127:function(e,t,r){var n=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(61770)),i=r(86006),l={key:"uid_1",label:{display:"Data Label 1"},color:a.default.helpers.COLORS.BLACK,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}]};t.default=l},75502:function(e,t,r){var n=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(61770)),i=r(86006);t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},dateline:[{showDatelineIndicator:!0,label:{display:"Current Date"},color:"#C97318",shape:a.default.helpers.SHAPES.DARK.SQUARE,onClick:i.loadDatelinePopup,value:new Date(2016,0,1,6).toISOString()}],clickPassThrough:{dateline:!1},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},2475:function(e,t,r){var n=r(24994);t.A=void 0;var a=n(r(96540)),i=n(r(61770)),l=n(r(45839));r(63841);var o=n(r(29683)),s=n(r(75502)),p=n(r(59127)),u=l.default.deepClone((0,s.default)("#timeseriesDateLine")),c=l.default.deepClone(p.default);t.A=function(){return a.default.useEffect((function(){i.default.api.graph(u).loadContent(i.default.api.scatter(c))}),[]),a.default.createElement(o.default,{id:"timeseriesDateLine"})}},18564:function(e,t,r){r.r(t),r.d(t,{default:function(){return j}});var n=r(96540),a=r(36665),i=r(2475),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p={};function u(e){var t=e.components,r=s(e,l);return(0,a.mdx)("wrapper",o({},p,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _scatterTimeseriesDateline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Scatter/scatterTimeseriesDateline"));\nvar _dataset1timeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1timeseries"));\n/*\nPlease refer documentation below to see graphConfig and data objects.\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _scatterTimeseriesDateline.default)(\'#timeseriesDateLine\'));\nvar dataset = _utils.default.deepClone(_dataset1timeseries.default);\nvar TimelineWithDatelineScatterExample = function TimelineWithDatelineScatterExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.scatter(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "timeseriesDateLine"\n });\n};\nvar _default = exports.default = TimelineWithDatelineScatterExample;\n')))}u.isMDXComponent=!0;var c=r(201),d=r(88703),m=function(e){var t=e.title,r=e.description,a=e.isExpanded;return n.createElement(c.A,{title:t||"Timeseries With Dateline",description:r,example:n.createElement(i.A,null),exampleCssSrc:n.createElement(d.A,null),exampleSrc:n.createElement(u,null),isExpanded:a})},f=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b={},x="wrapper";function S(e){var t=e.components,r=g(e,f);return(0,a.mdx)(x,h({},b,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar getScatterTimeseriesConfig = function getScatterTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: new Date(2016, 0, 1, 0, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: 'Line Set A',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n dateline: [{\n showDatelineIndicator: true,\n label: {\n display: 'Current Date'\n },\n color: '#C97318',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2016, 0, 1, 6).toISOString()\n }],\n clickPassThrough: {\n dateline: false\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getScatterTimeseriesConfig;\n")))}S.isMDXComponent=!0;var y=r(12712),v=["components"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r(27647);var w={},_="wrapper";function j(e){var t=e.components,r=D(e,v);return(0,a.mdx)(_,O({},w,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"timeseries-with-dateline-scatter-graph"},"Timeseries With Dateline Scatter Graph"),(0,a.mdx)("p",null,"This is a timeseries scatter graph with dateline for the graph"),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(m,{mdxType:"ScatterGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Example Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(S,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(y.A,{mdxType:"DataObject"})))}j.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/18675-50e6ab7869dac6477564.js b/18675-50e6ab7869dac6477564.js new file mode 100644 index 000000000..ca1fd2727 --- /dev/null +++ b/18675-50e6ab7869dac6477564.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[18675],{84219:function(e,t,n){var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770)),i=n(86006),o={key:"uid_1",label:{display:"Data Label 1"},shape:a.default.helpers.SHAPES.DARK.CIRCLE,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};t.default=o},80734:function(e,t,n){var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770)),i=n(86006),o={key:"uid_2",label:{display:"Data Label 2"},shape:a.default.helpers.SHAPES.DARK.RHOMBUS,color:a.default.helpers.COLORS.BLUE,onClick:i.loadPopup,yAxis:"y2",values:[{x:new Date(2016,0,1,1,5).toISOString(),y:0},{x:new Date(2016,0,1,2,15).toISOString(),y:50},{x:new Date(2016,0,1,3,15).toISOString(),y:60},{x:new Date(2016,0,1,4,15).toISOString(),y:80},{x:new Date(2016,0,1,5,15).toISOString(),y:120},{x:new Date(2016,0,1,6,15).toISOString(),y:130},{x:new Date(2016,0,1,7,0).toISOString(),y:180},{x:new Date(2016,0,1,8,15).toISOString(),y:185},{x:new Date(2016,0,1,9,45).toISOString(),y:200},{x:new Date(2016,0,1,12,15).toISOString(),y:220}]};t.default=o},35301:function(e,t,n){var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!0,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},10969:function(e,t,n){var r=n(24994);t.A=void 0;var a=r(n(96540)),i=r(n(61770)),o=r(n(45839));n(45633);var l=r(n(29683)),s=r(n(35301)),u=r(n(84219)),p=r(n(80734)),d=o.default.deepClone((0,s.default)("#lineY2Axis")),c=[o.default.deepClone(u.default),o.default.deepClone(p.default)];t.A=function(){return a.default.useEffect((function(){var e=i.default.api.graph(d);c.forEach((function(t){e.loadContent(i.default.api.line(t))}))}),[]),a.default.createElement(l.default,{id:"lineY2Axis"})}},18675:function(e,t,n){n.r(t),n.d(t,{default:function(){return A}});var r=n(96540),a=n(36665),i=n(10969),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u={};function p(e){var t=e.components,n=s(e,o);return(0,a.mdx)("wrapper",l({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseriesY = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseriesY2"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\nvar _datasetTimeseries2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseriesY.default)(\'#lineY2Axis\'));\nvar dataset = [_utils.default.deepClone(_datasetTimeseries.default), _utils.default.deepClone(_datasetTimeseries2.default)];\nvar Y2AxisLineExample = function Y2AxisLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.line(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "lineY2Axis"\n });\n};\nvar _default = exports.default = Y2AxisLineExample;\n')))}p.isMDXComponent=!0;var d=n(201),c=n(79679),f=function(e){var t=e.title,n=e.description,a=e.isExpanded;return r.createElement(d.A,{title:t||"Y 2 Axis",description:n,example:r.createElement(i.A,null),exampleCssSrc:r.createElement(c.A,null),exampleSrc:r.createElement(p,null),isExpanded:a})},m=["components"];function x(){return x=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var y={},b="wrapper";function h(e){var t=e.components,n=g(e,m);return(0,a.mdx)(b,x({},y,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesY2Config = function getLineTimeseriesY2Config(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: true,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesY2Config;\n')))}h.isMDXComponent=!0;var S=n(55020),O=["components"];function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var D={},_="wrapper";function j(e){var t=e.components,n=w(e,O);return(0,a.mdx)(_,v({},D,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_2\',\n label: {\n display: \'Data Label 2\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n yAxis: \'y2\',\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 0\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 50\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 60\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 80\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 120\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 130\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 180\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 185\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 200\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 220\n }]\n};\nvar _default = exports.default = data;\n')))}j.isMDXComponent=!0;var I=["components"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n(27647);var C={},q="wrapper";function A(e){var t=e.components,n=E(e,I);return(0,a.mdx)(q,L({},C,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"y2-axis"},"Y2 Axis"),(0,a.mdx)("p",null,"This is a timeseries graph with both Y and Y2 axes."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(f,{mdxType:"LineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(h,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)("h4",{id:"dataset-1"},"Dataset 1"),(0,a.mdx)(S.A,{mdxType:"DataObject1"}),(0,a.mdx)("h4",{id:"dataset-2"},"Dataset 2"),(0,a.mdx)(j,{mdxType:"DataObject2"})))}A.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/18679-aebc60bc8fa431ca65cf.js b/18679-aebc60bc8fa431ca65cf.js new file mode 100644 index 000000000..b506a5091 --- /dev/null +++ b/18679-aebc60bc8fa431ca65cf.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[18679],{65261:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(86006),r={key:"track 0",trackLabel:{display:"Default",onClick:n.loadXAndYAxisLabelPopup},tasks:[{key:"default",onClick:n.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString()}]};t.default=r},40676:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(86006),r={key:"track 1",trackLabel:{display:"Hollow only",onClick:n.loadXAndYAxisLabelPopup},tasks:[{key:"default",onClick:n.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString(),style:{isHollow:!0}}]};t.default=r},5771:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={key:"track 2",trackLabel:{display:"Dotted, Hollow"},tasks:[{key:"default",onClick:a(86006).loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString(),style:{isDotted:!0,isHollow:!0}}]};t.default=n},19810:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(86006),r={key:"track 3",trackLabel:{display:"Percentage",onClick:n.loadXAndYAxisLabelPopup},tasks:[{key:"percentage",onClick:n.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString(),percentage:30}]};t.default=r},87697:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(86006),r={key:"track 4",trackLabel:{display:"Task Hashed",onClick:n.loadXAndYAxisLabelPopup},tasks:[{key:"task_hash",onClick:n.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString(),style:{isHashed:!0}}]};t.default=r},24408:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={key:"track 5",trackLabel:{display:"Activity",onClick:a(86006).loadXAndYAxisLabelPopup},activities:[{key:"Activity",label:{display:"Story Apex Activity"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString()}]};t.default=n},58767:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a={key:"track 6",trackLabel:{display:"Activity Hashed"},activities:[{key:"Hash",label:{display:"Story Apex Activity hash"},color:"#000",startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString(),style:{isHashed:!0}}]};t.default=a},52102:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a(86006),r={key:"track 7",trackLabel:{display:"Activity and Task",onClick:n.loadXAndYAxisLabelPopup},tasks:[{key:"Task",onClick:n.loadTaskPopup,label:{display:"Story Apex Task"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString()}],activities:[{key:"Activity and Task",label:{display:"Combination"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,11,1).toISOString()}]};t.default=r},60345:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,axis:{x:{show:!0,lowerLimit:new Date(2018,1,1,12).toISOString(),upperLimit:new Date(2019,1,1,12).toISOString(),rangeRounding:!0}}}}},86006:function(e,t,a){"use strict";var n=a(24994),r=a(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=n(a(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var a=i(t);if(a&&a.has(e))return a.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var p=o?Object.getOwnPropertyDescriptor(e,l):null;p&&(p.get||p.set)?Object.defineProperty(n,l,p):n[l]=e[l]}return n.default=e,a&&a.set(e,n),n}(a(37332)),p=n(a(22639)),s=n(a(45839));function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(i=function(e){return e?a:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,a){var n=e.append("g").classed("popup-item",!0);n.append("label").classed("popup-label",!0).text(t),n.append("g").classed("popup-text",!0).text(a)},y=function(e,t,a){var n=e.append("g").classed("popup-item",!0);n.append("label").classed("popup-label",!0).text(t);for(var r=n.append("g").classed("section",!0),l=function(){var e=s[p],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var a=(0,o.default)(e,2),n=a[0],r=a[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(n.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},p=0,s=Object.values(a);p0){var s=[];s.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(n,"Tasks",s)}if(o&&o.length>0){var i=[];o.forEach((function(e){i.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(n,"Activities",i)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),y(n,"Events",u)}if(p&&p.length>0){var c=[];p.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),y(n,"Actions",c)}},t.loadTaskPopup=function(e,t,a,n){m();var r=b(e).append("g"),o=n.label,l=n.display,p=n.y,s=n.startDate,i=n.endDate,c=n.percentage;o&&f(r,"Task Name",l),f(r,"Track",p),f(r,"Start Date",u(s)),f(r,"End Date",u(i)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){m();var a=b(e).append("g"),n=t.label,r=t.value;n&&f(a,"Milestone",n.display),f(a,"Date",u(r))},t.loadTimelinePopup=function(e,t,a,n){m();var r=b(e).append("g"),o=n.x,l=(n.y,n.label),p=n.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(l.display),p)},t.loadPiePopup=function(e,t,a,n){m();var r=b(e).append("g"),o=n.label,l=n.value;f(r,o.display,l)}},29683:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(96540)),o=n(a(5556));a(16939);var l={id:o.default.string.isRequired},p=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};p.propTypes=l;t.default=p},78377:function(e,t,a){"use strict";var n=a(24994);t.A=void 0;var r=n(a(96540)),o=n(a(61770)),l=n(a(45839));a(40415);var p=n(a(29683)),s=n(a(60345)),i=n(a(65261)),u=n(a(40676)),c=n(a(5771)),d=n(a(19810)),f=n(a(87697)),y=n(a(24408)),b=n(a(58767)),m=n(a(52102)),v=l.default.deepClone((0,s.default)("#ganttBarType"));v.showActionLegend=!1,v.dateline=[];var g=[i.default,u.default,c.default,d.default,f.default,y.default,b.default,m.default],x=l.default.deepClone(g);t.A=function(){return r.default.useEffect((function(){var e=o.default.api.gantt(v);x.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(p.default,{id:"ganttBarType"})}},18679:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return ye}});var n=a(96540),r=a(36665),o=a(78377),l=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i={};function u(e){var t=e.components,a=s(e,l);return(0,r.mdx)("wrapper",p({},i,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttDefaultConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttDefaultConfig"));\nvar _barTypesDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset1"));\nvar _barTypesDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset2"));\nvar _barTypesDataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset3"));\nvar _barTypesDataset4 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset4"));\nvar _barTypesDataset5 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset5"));\nvar _barTypesDataset6 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset6"));\nvar _barTypesDataset7 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset7"));\nvar _barTypesDataset8 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/barTypesDataset8"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttDefaultConfig.default)(\'#ganttBarType\'));\ngraphConfig.showActionLegend = false;\ngraphConfig.dateline = [];\nvar contentArray = [_barTypesDataset.default, _barTypesDataset2.default, _barTypesDataset3.default, _barTypesDataset4.default, _barTypesDataset5.default, _barTypesDataset6.default, _barTypesDataset7.default, _barTypesDataset8.default];\nvar dataset = _utils.default.deepClone(contentArray);\nvar GanttBarTypeExample = function GanttBarTypeExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "ganttBarType"\n });\n};\nvar _default = exports.default = GanttBarTypeExample;\n')))}u.isMDXComponent=!0;var c=a(201),d=a(42929),f=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(c.A,{title:t||"Bar Types",description:a,example:n.createElement(o.A,null),exampleCssSrc:n.createElement(d.A,null),exampleSrc:n.createElement(u,null),isExpanded:r})},y=a(86010),b=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var g={},x="wrapper";function O(e){var t=e.components,a=v(e,b);return(0,r.mdx)(x,m({},g,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset1 = {\n key: 'track 0',\n trackLabel: {\n display: 'Default',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: [{\n key: 'default',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString()\n }]\n};\nvar _default = exports.default = barTypesDataset1;\n")))}O.isMDXComponent=!0;var h=["components"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var j={},w="wrapper";function S(e){var t=e.components,a=k(e,h);return(0,r.mdx)(w,D({},j,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset2 = {\n key: 'track 1',\n trackLabel: {\n display: 'Hollow only',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: [{\n key: 'default',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString(),\n style: {\n isHollow: true\n }\n }]\n};\nvar _default = exports.default = barTypesDataset2;\n")))}S.isMDXComponent=!0;var _=["components"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var A={},C="wrapper";function L(e){var t=e.components,a=T(e,_);return(0,r.mdx)(C,P({},A,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset3 = {\n key: 'track 2',\n trackLabel: {\n display: 'Dotted, Hollow'\n },\n tasks: [{\n key: 'default',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString(),\n style: {\n isDotted: true,\n isHollow: true\n }\n }]\n};\nvar _default = exports.default = barTypesDataset3;\n")))}L.isMDXComponent=!0;var E=["components"];function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var X={},q="wrapper";function N(e){var t=e.components,a=M(e,E);return(0,r.mdx)(q,I({},X,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset4 = {\n key: 'track 3',\n trackLabel: {\n display: 'Percentage',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: [{\n key: 'percentage',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString(),\n percentage: 30\n }]\n};\nvar _default = exports.default = barTypesDataset4;\n")))}N.isMDXComponent=!0;var G=["components"];function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var Y={},B="wrapper";function z(e){var t=e.components,a=R(e,G);return(0,r.mdx)(B,H({},Y,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset5 = {\n key: 'track 4',\n trackLabel: {\n display: 'Task Hashed',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: [{\n key: 'task_hash',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString(),\n style: {\n isHashed: true\n }\n }]\n};\nvar _default = exports.default = barTypesDataset5;\n")))}z.isMDXComponent=!0;var F=["components"];function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var $={},V="wrapper";function Z(e){var t=e.components,a=W(e,F);return(0,r.mdx)(V,U({},$,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset6 = {\n key: 'track 5',\n trackLabel: {\n display: 'Activity',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n activities: [{\n key: 'Activity',\n label: {\n display: 'Story Apex Activity'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString()\n }]\n};\nvar _default = exports.default = barTypesDataset6;\n")))}Z.isMDXComponent=!0;var J=["components"];function K(){return K=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var ee={},te="wrapper";function ae(e){var t=e.components,a=Q(e,J);return(0,r.mdx)(te,K({},ee,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar barTypesDataset7 = {\n key: 'track 6',\n trackLabel: {\n display: 'Activity Hashed'\n },\n activities: [{\n key: 'Hash',\n label: {\n display: 'Story Apex Activity hash'\n },\n color: '#000',\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString(),\n style: {\n isHashed: true\n }\n }]\n};\nvar _default = exports.default = barTypesDataset7;\n")))}ae.isMDXComponent=!0;var ne=["components"];function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var le={},pe="wrapper";function se(e){var t=e.components,a=oe(e,ne);return(0,r.mdx)(pe,re({},le,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar barTypesDataset8 = {\n key: 'track 7',\n trackLabel: {\n display: 'Activity and Task',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: [{\n key: 'Task',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex Task'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString()\n }],\n activities: [{\n key: 'Activity and Task',\n label: {\n display: 'Combination'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 11, 1).toISOString()\n }]\n};\nvar _default = exports.default = barTypesDataset8;\n")))}se.isMDXComponent=!0;var ie=["components"];function ue(){return ue=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var de={},fe="wrapper";function ye(e){var t=e.components,a=ce(e,ie);return(0,r.mdx)(fe,ue({},de,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-gantt"},"Simple Gantt"),(0,r.mdx)("p",null,"This is a Gantt chart with different bar types."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(y.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"default-task-dataset"},"Default Task Dataset"),(0,r.mdx)(O,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"hollow-only-dataset"},"Hollow Only Dataset"),(0,r.mdx)(S,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"dotted-hollow-dataset"},"Dotted, Hollow Dataset"),(0,r.mdx)(L,{mdxType:"DataObject3"}),(0,r.mdx)("h4",{id:"percentage-dataset"},"Percentage Dataset"),(0,r.mdx)(N,{mdxType:"DataObject4"}),(0,r.mdx)("h4",{id:"task-hashed-dataset"},"Task Hashed Dataset"),(0,r.mdx)(z,{mdxType:"DataObject5"}),(0,r.mdx)("h4",{id:"activity-dataset"},"Activity Dataset"),(0,r.mdx)(Z,{mdxType:"DataObject6"}),(0,r.mdx)("h4",{id:"activity-hashed-dataset"},"Activity Hashed Dataset"),(0,r.mdx)(ae,{mdxType:"DataObject7"}),(0,r.mdx)("h4",{id:"activity-and-task-dataset"},"Activity and Task Dataset"),(0,r.mdx)(se,{mdxType:"DataObject8"})))}ye.isMDXComponent=!0},86010:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});a(96540);var n=a(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p={},s="wrapper";function i(e){var t=e.components,a=l(e,r);return(0,n.mdx)(s,o({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar getGanttDefaultConfig = function getGanttDefaultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2018, 1, 1, 12).toISOString(),\n upperLimit: new Date(2019, 1, 1, 12).toISOString(),\n rangeRounding: true // If set to false, we don\'t extend the domain\n }\n }\n };\n};\nvar _default = exports.default = getGanttDefaultConfig;\n')))}i.isMDXComponent=!0},42929:function(e,t,a){"use strict";a.d(t,{A:function(){return i}});a(96540);var n=a(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var p={},s="wrapper";function i(e){var t=e.components,a=l(e,r);return(0,n.mdx)(s,o({},p,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../colors.module';\n@import '../Variables.module';\n\n.carbon-y-axis-track-label {\n .tick > text {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n }\n}\n\n.carbon-data-task {\n cursor: pointer;\n\n &[aria-disabled='true'] {\n cursor: default;\n }\n}\n\n.carbon-data-track-group {\n .carbon-selected-data-point {\n @include terra-graph-selected-indicator-styles();\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n }\n}\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-track-selected-bar {\n display: block;\n fill-opacity: 0;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-selected='true'] {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n }\n}\n\n")))}i.isMDXComponent=!0},27647:function(e,t,a){var n,r;void 0===(r="function"==typeof(n=function(){var e="details",t="summary";function a(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function n(){var a=document.createElement(e);if(!("open"in a))return!1;a.innerHTML="<"+t+">ab",document.body.appendChild(a);var n=a.offsetHeight;a.open=!0;var r=n!=a.offsetHeight;return document.body.removeChild(a),r}function r(e,t){if(!document.getElementById(e)){var a=document.createElement("style");a.id=e,a.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(a)}}n()||(document.documentElement.className+=" no-details",window.addEventListener("click",a),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?n.call(t,a,t,e):n)||(e.exports=r)},16939:function(e,t,a){"use strict";a.r(t),t.default={}},40415:function(e,t,a){"use strict";a.r(t),t.default={}}}]); \ No newline at end of file diff --git a/20337-1e9daae9cfc6fd790355.js b/20337-1e9daae9cfc6fd790355.js new file mode 100644 index 000000000..db8ad9825 --- /dev/null +++ b/20337-1e9daae9cfc6fd790355.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[20337],{94865:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"grouped_bar_4",label:{display:"Dataset 4"},color:r.default.helpers.COLORS.LIGHT_PURPLE,onClick:o.loadBarPopup,values:[{x:1,y:10},{x:2,y:15},{x:3,y:18},{x:4,y:6},{x:6,y:10}],regions:[{axis:"y",x:1,start:7,end:7},{axis:"y",x:2,start:13,end:13},{axis:"y",x:3,start:17,end:17},{axis:"y",x:4,start:4,end:4}]};t.default=l},87539:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:0,upperLimit:8,ticks:{values:[1,2,3,4,5,6,7],format:".0f"}},y:{show:!0,label:"Bar Set A",lowerLimit:0,upperLimit:35},y2:{show:!1,label:"Bar Set B",lowerLimit:0,upperLimit:30}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!1,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),i=a(n(22639)),p=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},y=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=p[i],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(n);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",s)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",u)}if(i&&i.length>0){var c=[];i.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.label,l=a.display,i=a.y,p=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){m();var n=v(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.x,l=(a.y,a.label),i=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(l.display),i)},t.loadPiePopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;t.default=i},95666:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'grouped_bar_4',\n label: {\n display: 'Dataset 4'\n },\n color: _carbonGraphs.default.helpers.COLORS.LIGHT_PURPLE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 10\n }, {\n x: 2,\n y: 15\n }, {\n x: 3,\n y: 18\n }, {\n x: 4,\n y: 6\n }, {\n x: 6,\n y: 10\n }],\n regions: [{\n axis: 'y',\n x: 1,\n start: 7,\n end: 7\n }, {\n axis: 'y',\n x: 2,\n start: 13,\n end: 13\n }, {\n axis: 'y',\n x: 3,\n start: 17,\n end: 17\n }, {\n axis: 'y',\n x: 4,\n start: 4,\n end: 4\n }]\n};\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0},54308:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getbarConfig = function getbarConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 8,\n ticks: {\n values: [1, 2, 3, 4, 5, 6, 7],\n format: '.0f'\n }\n },\n y: {\n show: true,\n label: 'Bar Set A',\n lowerLimit: 0,\n upperLimit: 35\n },\n y2: {\n show: false,\n label: 'Bar Set B',\n lowerLimit: 0,\n upperLimit: 30\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: false,\n showHGrid: true\n };\n};\nvar _default = exports.default = getbarConfig;\n")))}s.isMDXComponent=!0},18241:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},11719:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/20538-0db321d118656d45b102.js b/20538-0db321d118656d45b102.js new file mode 100644 index 000000000..aa7fc7664 --- /dev/null +++ b/20538-0db321d118656d45b102.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[20538],{78784:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(61770)),o=t(86006),i={key:"uid_7",label:{display:"Data Label 7"},shape:a.default.helpers.SHAPES.DARK.CIRCLE,onClick:o.loadPopup,yAxis:"y",values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5,isCritical:!1,region:{start:3,end:8,color:a.default.helpers.COLORS.GREY}},{x:new Date(2016,0,1,2,15).toISOString(),y:11,region:{start:4,end:14,color:a.default.helpers.COLORS.GREY}},{x:new Date(2016,0,1,3,15).toISOString(),y:12,region:{start:5,end:15,color:a.default.helpers.COLORS.GREY}},{x:new Date(2016,0,1,4,15).toISOString(),y:16,region:{start:10,end:20,color:a.default.helpers.COLORS.GREY}},{x:new Date(2016,0,1,5,15).toISOString(),y:17,region:{start:10,end:20,color:a.default.helpers.COLORS.GREY}},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11,region:{start:8,end:15}},{x:new Date(2016,0,1,8,15).toISOString(),y:12,region:{start:8,end:15}},{x:new Date(2016,0,1,9,45).toISOString(),y:16,region:{start:10,end:20}},{x:new Date(2016,0,1,12,15).toISOString(),y:17,region:{start:10,end:20}},{x:new Date(2016,0,1,13,15).toISOString(),y:28,region:{start:10,end:20},isCritical:!0},{x:new Date(2016,0,1,14,15).toISOString(),y:12,region:{start:8,end:15}},{x:new Date(2016,0,1,19,45).toISOString(),y:13,region:{start:9,end:16}},{x:new Date(2016,0,1,21,15).toISOString(),y:14,region:{start:9,end:16,color:a.default.helpers.COLORS.GREY}}]};n.default=i},93414:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(61770));n.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,n,t){"use strict";var r=t(24994),a=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var o=r(t(85715)),i=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=a(e)&&"function"!=typeof e)return{default:e};var t=s(n);if(t&&t.has(e))return t.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(t(37332)),l=r(t(22639)),p=r(t(45839));function s(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(s=function(e){return e?t:n})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,n,t){var r=e.append("g").classed("popup-item",!0);r.append("label").classed("popup-label",!0).text(n),r.append("g").classed("popup-text",!0).text(t)},g=function(e,n,t){var r=e.append("g").classed("popup-item",!0);r.append("label").classed("popup-label",!0).text(n);for(var a=r.append("g").classed("section",!0),i=function(){var e=p[l],n=a.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,o.default)(e,2),r=t[0],a=t[1],i=n.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(r.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(a)}))},l=0,p=Object.values(t);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),g(r,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),g(r,"Activities",s)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),g(r,"Events",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),g(r,"Actions",c)}},n.loadTaskPopup=function(e,n,t,r){y();var a=m(e).append("g"),o=r.label,i=r.display,l=r.y,p=r.startDate,s=r.endDate,c=r.percentage;o&&f(a,"Task Name",i),f(a,"Track",l),f(a,"Start Date",u(p)),f(a,"End Date",u(s)),c&&f(a,"Percentage",c)},n.loadDatelinePopup=function(e,n){y();var t=m(e).append("g"),r=n.label,a=n.value;r&&f(t,"Milestone",r.display),f(t,"Date",u(a))},n.loadTimelinePopup=function(e,n,t,r){y();var a=m(e).append("g"),o=r.x,i=(r.y,r.label),l=r.content;f(a,"X axis","".concat(d(o)?u(o):o)),f(a,"".concat(i.display),l)},n.loadPiePopup=function(e,n,t,r){y();var a=m(e).append("g"),o=r.label,i=r.value;f(a,o.display,i)}},29683:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(96540)),o=r(t(5556));t(16939);var i={id:o.default.string.isRequired},l=function(e){return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),a.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;n.default=l},86515:function(e,n,t){"use strict";var r=t(24994);n.A=void 0;var a=r(t(96540)),o=r(t(61770)),i=r(t(45839));t(45633);var l=r(t(29683)),p=r(t(93414)),s=r(t(78784)),u=i.default.deepClone((0,p.default)("#valueRegion")),c=i.default.deepClone(s.default);n.A=function(){return a.default.useEffect((function(){o.default.api.graph(u).loadContent(o.default.api.line(c))}),[]),a.default.createElement(l.default,{id:"valueRegion"})}},20538:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return E}});var r=t(96540),a=t(36665),o=t(86515),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var s={};function u(e){var n=e.components,t=p(e,i);return(0,a.mdx)("wrapper",l({},s,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseries"));\nvar _datasetRegions = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions7"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseries.default)(\'#valueRegion\'));\nvar dataset = _utils.default.deepClone(_datasetRegions.default);\nvar ValueRegionLineExample = function ValueRegionLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "valueRegion"\n });\n};\nvar _default = exports.default = ValueRegionLineExample;\n')))}u.isMDXComponent=!0;var c=t(201),d=t(79679),f=function(e){var n=e.title,t=e.description,a=e.isExpanded;return r.createElement(c.A,{title:n||"Value Region",description:t,example:r.createElement(o.A,null),exampleCssSrc:r.createElement(d.A,null),exampleSrc:r.createElement(u,null),isExpanded:a})},g=t(15423),m=["components"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var h={},b="wrapper";function x(e){var n=e.components,t=v(e,m);return(0,a.mdx)(b,y({},h,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_7\',\n label: {\n display: \'Data Label 7\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CIRCLE,\n onClick: _popup.loadPopup,\n yAxis: \'y\',\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 5,\n isCritical: false,\n region: {\n start: 3,\n end: 8,\n color: _carbonGraphs.default.helpers.COLORS.GREY\n }\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 11,\n region: {\n start: 4,\n end: 14,\n color: _carbonGraphs.default.helpers.COLORS.GREY\n }\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 12,\n region: {\n start: 5,\n end: 15,\n color: _carbonGraphs.default.helpers.COLORS.GREY\n }\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16,\n region: {\n start: 10,\n end: 20,\n color: _carbonGraphs.default.helpers.COLORS.GREY\n }\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17,\n region: {\n start: 10,\n end: 20,\n color: _carbonGraphs.default.helpers.COLORS.GREY\n }\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 9\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 11,\n region: {\n start: 8,\n end: 15\n }\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 12,\n region: {\n start: 8,\n end: 15\n }\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 16,\n region: {\n start: 10,\n end: 20\n }\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17,\n region: {\n start: 10,\n end: 20\n }\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 28,\n region: {\n start: 10,\n end: 20\n },\n isCritical: true\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 12,\n region: {\n start: 8,\n end: 15\n }\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 13,\n region: {\n start: 9,\n end: 16\n }\n }, {\n x: new Date(2016, 0, 1, 21, 15).toISOString(),\n y: 14,\n region: {\n start: 9,\n end: 16,\n color: _carbonGraphs.default.helpers.COLORS.GREY\n }\n }]\n};\nvar _default = exports.default = data;\n')))}x.isMDXComponent=!0;var O=["components"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(27647);var D={},_="wrapper";function E(e){var n=e.components,t=w(e,O);return(0,a.mdx)(_,S({},D,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"value-region"},"Value region"),(0,a.mdx)("p",null,"This is timeseries line graph with value based region."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(f,{mdxType:"LineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(g.A,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(x,{mdxType:"DataObject"})))}E.isMDXComponent=!0},15423:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var r=t(36665),a=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l={},p="wrapper";function s(e){var n=e.components,t=i(e,a);return(0,r.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesConfig = function getLineTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesConfig;\n')))}s.isMDXComponent=!0},79679:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var r=t(36665),a=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l={},p="wrapper";function s(e){var n=e.components,t=i(e,a);return(0,r.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,n,t){var r,a;void 0===(a="function"==typeof(r=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function r(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var r=t.offsetHeight;t.open=!0;var a=r!=t.offsetHeight;return document.body.removeChild(t),a}function a(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}r()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),a("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?r.call(n,t,n,e):r)||(e.exports=a)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},45633:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/20874-e4ea3f24a1bd9d78ae17.js b/20874-e4ea3f24a1bd9d78ae17.js new file mode 100644 index 000000000..528ee0c9d --- /dev/null +++ b/20874-e4ea3f24a1bd9d78ae17.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[20874],{20874:function(e,a,t){t.r(a),t.d(a,{default:function(){return o}});t(96540);var n=t(36665),i=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(i[t]=e[t]);return i}(e,a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(i[t]=e[t])}return i}var d={},m="wrapper";function o(e){var a=e.components,t=l(e,i);return(0,n.mdx)(m,r({},d,t,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"ticks"},"Ticks"),(0,n.mdx)("p",null,"Ticks and Grid lines representing Axes values."),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#overview"},"Overview")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#properties"},"Properties")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#tick-values"},"Tick Values")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#examples"},"Examples"),(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#values"},"Values")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#datetime-buckets"},"Datetime Buckets"))))),(0,n.mdx)("h2",{id:"overview"},"Overview"),(0,n.mdx)("p",null,"Ticks are labels on the Axes to represent axis values. These values are determined by the upper and lower limits of its axis. If any datapoints on the graph exceed the upper or lower limits, the axis range will adjust accordingly and the tick labels will be updated."),(0,n.mdx)("p",null,"If there is only 1 axis in the graph, the tick intervals are calculated automatically using the d3.js ",(0,n.mdx)("inlineCode",{parentName:"p"},"nice")," function. If the Y2 axis is visible, the tick intervals are set based on the range of the Y & Y2 axes. This can be overridden to be custom using the ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount")," property in the graph configuration object. Acceptable values for ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount")," are ",(0,n.mdx)("inlineCode",{parentName:"p"},"0 - 19"),". Invalid values will result in ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount")," being ignored and going back to the default behavior."),(0,n.mdx)("p",null,(0,n.mdx)("strong",{parentName:"p"},"Note:")," If tick values are in between ",(0,n.mdx)("inlineCode",{parentName:"p"},"[-0.5 < x < 0.5 and x != 0] or [-0.05 < x < 0.05 and x != 0]")," and so on till ",(0,n.mdx)("inlineCode",{parentName:"p"},"[-0.00005 < x < 0.00005 and x != 0]")," which may lead to displaying multiple zeros on Y or Y2 axes, we set the formatting to be ",(0,n.mdx)("inlineCode",{parentName:"p"},"-Math.floor(Math.log10(x))")," decimal place.\nIf consumers override the formatting in above situation which leads to multiple Zeros on Y or Y2 axes ticks, we honor that but add to our documentation a warning or fyi on what can happen and possible ways to fix it."),(0,n.mdx)("h2",{id:"properties"},"Properties"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("strong",{parentName:"li"},"Note")," while the ",(0,n.mdx)("inlineCode",{parentName:"li"},"ticks")," object itself is optional, if it is proved then the required props must also be provided.")),(0,n.mdx)("table",null,(0,n.mdx)("thead",{parentName:"table"},(0,n.mdx)("tr",{parentName:"thead"},(0,n.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,n.mdx)("th",{parentName:"tr",align:null},"Type"),(0,n.mdx)("th",{parentName:"tr",align:null},"Default"),(0,n.mdx)("th",{parentName:"tr",align:null},"Required"),(0,n.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,n.mdx)("tbody",{parentName:"table"},(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"values"),(0,n.mdx)("td",{parentName:"tr",align:null},"array"),(0,n.mdx)("td",{parentName:"tr",align:null},"-"),(0,n.mdx)("td",{parentName:"tr",align:null},"yes*"),(0,n.mdx)("td",{parentName:"tr",align:null},"Ticks values in the axis. Each tick will have an associated grid line.")),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"format"),(0,n.mdx)("td",{parentName:"tr",align:null},"string"),(0,n.mdx)("td",{parentName:"tr",align:null},"-"),(0,n.mdx)("td",{parentName:"tr",align:null},"yes"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("a",{parentName:"td",href:"https://github.com/d3/d3-time-format/blob/master/README.md#locales"},"Formatter")," for tick values. ",(0,n.mdx)("inlineCode",{parentName:"td"},"Note:")," This is mandatory if values are provided. To suppress tick values's trailing zeros, specify '~' just before the format type. ",(0,n.mdx)("inlineCode",{parentName:"td"},'Eg: format: "~r"'),". Specifying ~ in the format takes precedence over the axis object ",(0,n.mdx)("inlineCode",{parentName:"td"},"suppressTrailingZeros")," prop.")),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"lowerStepTickValues"),(0,n.mdx)("td",{parentName:"tr",align:null},"array"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("inlineCode",{parentName:"td"},"[]")),(0,n.mdx)("td",{parentName:"tr",align:null},"no*"),(0,n.mdx)("td",{parentName:"tr",align:null},"lower-Tick-Values in the axis. Each tick will have an associated grid line. When lowerTickValues are present, values are disregarded. Lighter when compared to upperTickValues but darker than midpointTickValues.")),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"midpointTickValues"),(0,n.mdx)("td",{parentName:"tr",align:null},"array"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("inlineCode",{parentName:"td"},"[]")),(0,n.mdx)("td",{parentName:"tr",align:null},"no*"),(0,n.mdx)("td",{parentName:"tr",align:null},"Mid-Tick-Values in the axis. Each tick will have an associated grid line. Lightest gray shade when compared to others. Uses the default coloring of values, if none of the ",(0,n.mdx)("inlineCode",{parentName:"td"},"lowerTickValues"),", ",(0,n.mdx)("inlineCode",{parentName:"td"},"midTickValues")," and ",(0,n.mdx)("inlineCode",{parentName:"td"},"upperTickValues")," are provided.")),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"upperStepTickValues"),(0,n.mdx)("td",{parentName:"tr",align:null},"array"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("inlineCode",{parentName:"td"},"[]")),(0,n.mdx)("td",{parentName:"tr",align:null},"no*"),(0,n.mdx)("td",{parentName:"tr",align:null},"Upper-Tick-Values in the axis. Each tick will have an associated grid line. Much thicker and darker when compared with lowerTickValues, midTickValues and values axis.")))),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("strong",{parentName:"li"},"*note"),": If ",(0,n.mdx)("inlineCode",{parentName:"li"},"values")," is not provided then at least one of ",(0,n.mdx)("inlineCode",{parentName:"li"},"lowerStepTickValues"),", ",(0,n.mdx)("inlineCode",{parentName:"li"},"midpointTickValues"),", ",(0,n.mdx)("inlineCode",{parentName:"li"},"upperStepTickValues")," needs to be provided instead."),(0,n.mdx)("li",{parentName:"ul"},"When using ",(0,n.mdx)("inlineCode",{parentName:"li"},"values"),"/",(0,n.mdx)("inlineCode",{parentName:"li"},"lowerStepTickValues")," and/or",(0,n.mdx)("inlineCode",{parentName:"li"},"midpointTickValues"),", ",(0,n.mdx)("inlineCode",{parentName:"li"},"upperStepTickValues")," it is the consumers' responsibility to ensure that there is no overlap among these values."),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"midpointTickValues")," do not have an associated tick label on the X Axis. They are supposed to denote a separation between Lower Step and Upper Step or consecutive Lower Steps/Upper Steps.")),(0,n.mdx)("h2",{id:"tick-values"},"Tick Values"),(0,n.mdx)("p",null,"The tick values are set using one of 3 methods in the following priority:"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("p",{parentName:"li"},(0,n.mdx)("strong",{parentName:"p"},"Consumer provided values"),":"),(0,n.mdx)("p",{parentName:"li"},"Consumer-provided-values in ",(0,n.mdx)("inlineCode",{parentName:"p"},"axis.y.ticks.values")," and ",(0,n.mdx)("inlineCode",{parentName:"p"},"axis.y2.ticks.values")," will take highest priority if it is set."),(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},"When both ",(0,n.mdx)("inlineCode",{parentName:"li"},"lowerStepTickValues")," and ",(0,n.mdx)("inlineCode",{parentName:"li"},"values")," properties are provided, then ",(0,n.mdx)("inlineCode",{parentName:"li"},"values")," is ignored."))),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("p",{parentName:"li"},(0,n.mdx)("strong",{parentName:"p"},"ticksCount property")),(0,n.mdx)("p",{parentName:"li"},"If no values are provided and the ticksCount property is set, then it will be used to calculate tick values by dividing ",(0,n.mdx)("inlineCode",{parentName:"p"},"upperLimit - lowerLimit")," into ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount + 1")," equal divisions."),(0,n.mdx)("p",{parentName:"li"},"If ticksCount is an invalid value, such as greater than ",(0,n.mdx)("inlineCode",{parentName:"p"},"TICKSCOUNT_MAXLIMIT"),", then this property will be ignored and the default behavior will be used."),(0,n.mdx)("p",{parentName:"li"},"If ",(0,n.mdx)("inlineCode",{parentName:"p"},"axis.y.ticks.values")," AND ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount")," are both provided, then ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount")," will be ignored in favor of the custom values.")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("p",{parentName:"li"},(0,n.mdx)("strong",{parentName:"p"},"Default")),(0,n.mdx)("p",{parentName:"li"}," If neither ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount")," nor custom tick values are provided, then the default behavior is as follows:"),(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("p",{parentName:"li"},"If the Y2 Axis is visible, then Carbon will calculate and use a ticksCount value, based on the ranges of Y and Y2.")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("p",{parentName:"li"},"Else if there is no Y2 axis and ",(0,n.mdx)("inlineCode",{parentName:"p"},"ticksCount = undefined"),", Carbon will use D3.js to automatically find the tick values."))))),(0,n.mdx)("h2",{id:"examples"},"Examples"),(0,n.mdx)("h3",{id:"values"},"Values"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-javascript"},'var axis = {\n lowerLimit: new Date(2018, 1, 1, 23).toISOString(),\n upperLimit: new Date(2018, 1, 3, 1).toISOString(),\n x: {\n ticks: {\n format: "%H",\n values: [\n new Date(2018, 1, 2, 6).toISOString(),\n new Date(2018, 1, 2, 12).toISOString(),\n new Date(2018, 1, 2, 18).toISOString()\n ]\n },\n show: true\n },\n y: {\n show: true\n }\n};\n')),(0,n.mdx)("h3",{id:"datetime-buckets"},"Datetime Buckets"),(0,n.mdx)("p",null,(0,n.mdx)("strong",{parentName:"p"},"Note:")," Usage of datetime buckets are very use case specific. One such use case is described below:"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"lowerStepTickValues")," represent the time frame for every 6 hours -> ",'["6:00", "12:00", "18:00"]'),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"upperStepTickValues")," represent the time frame for each day -> ",'["Aug 5th, 00:00", "Aug 6th, 00:00"]'),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"midpointTickValues")," represent the time frame which are in between -> ",'["3:00", "9:00", "15:00", "21:00"]')),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-javascript"},'var axis = {\n lowerLimit: new Date(2018, 1, 1, 23).toISOString(),\n upperLimit: new Date(2018, 1, 3, 1).toISOString(),\n x: {\n ticks: {\n format: "%H",\n lowerStepTickValues: [\n new Date(2018, 1, 2, 6).toISOString(),\n new Date(2018, 1, 2, 12).toISOString(),\n new Date(2018, 1, 2, 18).toISOString()\n ],\n midpointTickValues: [\n new Date(2018, 1, 2, 3).toISOString(),\n new Date(2018, 1, 2, 9).toISOString(),\n new Date(2018, 1, 2, 15).toISOString(),\n new Date(2018, 1, 2, 21).toISOString()\n ],\n upperStepTickValues: [\n new Date(2018, 1, 2, 0).toISOString(),\n new Date(2018, 1, 2, 24).toISOString()\n ]\n },\n show: true\n },\n y: {\n show: true\n }\n};\n')))}o.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/21161-713afbd686113ab50430.js b/21161-713afbd686113ab50430.js new file mode 100644 index 000000000..db26bec7c --- /dev/null +++ b/21161-713afbd686113ab50430.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[21161],{26870:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),i=n(74013),l={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLUE,shape:r.default.helpers.SHAPES.DARK.SQUARE,onClick:o.loadPopup,legendOptions:{showLine:!0,showShape:!0},regions:[{axis:"y",start:2,end:10,color:"#f4f4f4"}],values:(0,i.createGraphValuesWithSin)({length:20,initialX:85,xModifier:10,yModifier:Math.PI})};t.default=l},74013:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGraphValuesWithSin=t.createGraphValuesWithCos=void 0;t.createGraphValuesWithSin=function(e){var t=e.length,n=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.sin(t)*r,x:n+t*a}}))},t.createGraphValuesWithCos=function(e){var t=e.length,n=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.cos(t)*r,x:n+t*a}}))}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},v=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),v(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),v(a,"Activities",s)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),v(a,"Events",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),v(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){m();var r=y(e).append("g"),o=a.label,i=a.display,l=a.y,p=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){m();var n=y(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){m();var r=y(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){m();var r=y(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var i={id:o.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},17727:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n onClick: _popup.loadPopup,\n legendOptions: {\n showLine: true,\n showShape: true\n },\n regions: [{\n axis: \'y\',\n start: 2,\n end: 10,\n color: \'#f4f4f4\'\n }],\n values: (0, _createGraphValues.createGraphValuesWithSin)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI\n })\n};\nvar _default = exports.default = data;\n')))}s.isMDXComponent=!0},49462:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}s.isMDXComponent=!0},79679:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},45633:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/21389-a4726e23c37639eadbcc.js b/21389-a4726e23c37639eadbcc.js new file mode 100644 index 000000000..4a24f3d14 --- /dev/null +++ b/21389-a4726e23c37639eadbcc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[21389],{74277:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),l=a(n(23986)),u=a(n(61770)),o=a(n(45839));n(11719);var p,c=a(n(29683)),s=a(n(84147)),d=a(n(2682)),f=o.default.deepClone((0,s.default)("#simpleBarPanning")),m=o.default.deepClone(d.default),g={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){(p=u.default.api.graph(f)).loadContent(u.default.api.bar(m))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),g),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){p&&(p.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString(),p.reflowMultipleDatasets())}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(c.default,{id:"simpleBarPanning"}))}},21389:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var a=n(96540),r=n(36665),i=n(74277),l=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function c(e){var t=e.components,n=o(e,l);return(0,r.mdx)("wrapper",u({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Bar/BarGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _barPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bar/barPanning"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _barPanning.default)(\'#simpleBarPanning\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar BarPanningExample = function BarPanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bar(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets();\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleBarPanning"\n }));\n};\nvar _default = exports.default = BarPanningExample;\n')))}c.isMDXComponent=!0;var s=n(201),d=n(18241),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(s.A,{title:t||"Simple Panning",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(c,null),isExpanded:r})},m=n(95156),g=n(96499),h=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var _={},v="wrapper";function y(e){var t=e.components,n=x(e,h);return(0,r.mdx)(v,b({},_,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-bar-graph-panning"},"Simple Bar graph panning"),(0,r.mdx)("p",null,"This is a bar graph example with panning."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"BarGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(g.A,{mdxType:"DataObject"})))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/21589-8d8f3b6300bf11dae4ba.js b/21589-8d8f3b6300bf11dae4ba.js new file mode 100644 index 000000000..b3725d697 --- /dev/null +++ b/21589-8d8f3b6300bf11dae4ba.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[21589],{68959:function(e,a,r){var t=r(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=t(r(61770)),l=r(86006),i=r(74013),o={key:"uid_1",label:{display:"Data Label 1"},color:n.default.helpers.COLORS.BLACK,onClick:l.loadPopup,values:(0,i.createGraphValuesWithSin)({length:20,initialX:85,xModifier:10,yModifier:Math.PI})};a.default=o},84219:function(e,a,r){var t=r(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=t(r(61770)),l=r(86006),i={key:"uid_1",label:{display:"Data Label 1"},shape:n.default.helpers.SHAPES.DARK.CIRCLE,onClick:l.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};a.default=i},87783:function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;a.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},3539:function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;a.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:100,upperLimit:150,allowCalibration:!1},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},17622:function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;a.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:100,upperLimit:150,allowCalibration:!0},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},40662:function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;a.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0,allowCalibration:!1}}},28548:function(e,a,r){var t=r(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=t(r(61770));a.default=function(e){return{bindTo:e,axis:{x:{type:n.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,9,0).toISOString(),upperLimit:new Date(2016,0,1,15,59).toISOString(),allowCalibration:!1},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},17411:function(e,a,r){var t=r(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=t(r(61770));a.default=function(e){return{bindTo:e,axis:{x:{type:n.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,9,0).toISOString(),upperLimit:new Date(2016,0,1,15,59).toISOString(),allowCalibration:!0},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},66357:function(e,a,r){var t=r(24994);a.A=void 0;var n=t(r(96540)),l=t(r(61770)),i=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(28548)),s=t(r(84219)),p=i.default.deepClone((0,u.default)("#allowCalibrationXDisabledTimeseries")),d=i.default.deepClone(s.default);a.A=function(){return n.default.useEffect((function(){l.default.api.graph(p).loadContent(l.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"allowCalibrationXDisabledTimeseries"})}},84809:function(e,a,r){var t=r(24994);a.A=void 0;var n=t(r(96540)),l=t(r(61770)),i=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(3539)),s=t(r(68959)),p=i.default.deepClone((0,u.default)("#allowCalibrationXDisabled")),d=i.default.deepClone(s.default);a.A=function(){return n.default.useEffect((function(){l.default.api.graph(p).loadContent(l.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"allowCalibrationXDisabled"})}},93242:function(e,a,r){var t=r(24994);a.A=void 0;var n=t(r(96540)),l=t(r(61770)),i=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(40662)),s=t(r(81342)),p=i.default.deepClone((0,u.default)("#disableCalibration")),d=i.default.deepClone(s.default);a.A=function(){return n.default.useEffect((function(){l.default.api.graph(p).loadContent(l.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"disableCalibration"})}},93688:function(e,a,r){var t=r(24994);a.A=void 0;var n=t(r(96540)),l=t(r(61770)),i=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(17411)),s=t(r(84219)),p=i.default.deepClone((0,u.default)("#allowCalibrationXTimeseries")),d=i.default.deepClone(s.default);a.A=function(){return n.default.useEffect((function(){l.default.api.graph(p).loadContent(l.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"allowCalibrationXTimeseries"})}},61592:function(e,a,r){var t=r(24994);a.A=void 0;var n=t(r(96540)),l=t(r(61770)),i=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(17622)),s=t(r(68959)),p=i.default.deepClone((0,u.default)("#allowCalibrationX")),d=i.default.deepClone(s.default);a.A=function(){return n.default.useEffect((function(){l.default.api.graph(p).loadContent(l.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"allowCalibrationX"})}},66911:function(e,a,r){var t=r(24994);a.A=void 0;var n=t(r(96540)),l=t(r(61770)),i=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(87783)),s=t(r(81342)),p=i.default.deepClone((0,u.default)("#allowYCalibrationExample")),d=i.default.deepClone(s.default);a.A=function(){return n.default.useEffect((function(){l.default.api.graph(p).loadContent(l.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"allowYCalibrationExample"})}},21589:function(e,a,r){r.r(a),r.d(a,{default:function(){return re}});var t=r(96540),n=r(36665),l=r(66911),i=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var s={};function p(e){var a=e.components,r=u(e,i);return(0,n.mdx)("wrapper",o({},s,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefault"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset6"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefault.default)(\'#allowYCalibrationExample\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar AllowCalibrationExample = function AllowCalibrationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "allowYCalibrationExample"\n });\n};\nvar _default = exports.default = AllowCalibrationExample;\n')))}p.isMDXComponent=!0;var d=r(201),c=r(79679),f=function(e){var a=e.title,r=e.description,n=e.isExpanded;return t.createElement(d.A,{title:a||"Allow Calibration Enabled Y Axis",description:r,example:t.createElement(l.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(p,null),isExpanded:n})},b=r(93242),m=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var x={};function v(e){var a=e.components,r=g(e,m);return(0,n.mdx)("wrapper",h({},x,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultYCalibrationDisabled = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultYCalibrationDisabled"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset6"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultYCalibrationDisabled.default)(\'#disableCalibration\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar AllowCalibrationExample = function AllowCalibrationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "disableCalibration"\n });\n};\nvar _default = exports.default = AllowCalibrationExample;\n')))}v.isMDXComponent=!0;var _=function(e){var a=e.title,r=e.description,n=e.isExpanded;return t.createElement(d.A,{title:a||"Allow Calibration Disabled Y Axis",description:r,example:t.createElement(b.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(v,null),isExpanded:n})},C=r(61592),w=["components"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var O={};function D(e){var a=e.components,r=E(e,w);return(0,n.mdx)("wrapper",y({},O,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultXCalibrationEnabled = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultXCalibrationEnabled"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultXCalibrationEnabled.default)(\'#allowCalibrationX\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar AllowCalibrationExample = function AllowCalibrationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "allowCalibrationX"\n });\n};\nvar _default = exports.default = AllowCalibrationExample;\n')))}D.isMDXComponent=!0;var j=function(e){var a=e.title,r=e.description,n=e.isExpanded;return t.createElement(d.A,{title:a||"Allow Calibration Enabled X Axis",description:r,example:t.createElement(C.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(D,null),isExpanded:n})},q=r(84809),L=["components"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var G={};function R(e){var a=e.components,r=A(e,L);return(0,n.mdx)("wrapper",S({},G,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultXCalibrationDisabled = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultXCalibrationDisabled"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultXCalibrationDisabled.default)(\'#allowCalibrationXDisabled\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar AllowCalibrationExample = function AllowCalibrationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "allowCalibrationXDisabled"\n });\n};\nvar _default = exports.default = AllowCalibrationExample;\n')))}R.isMDXComponent=!0;var P=function(e){var a=e.title,r=e.description,n=e.isExpanded;return t.createElement(d.A,{title:a||"Allow Calibration Disabled X Axis",description:r,example:t.createElement(q.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(R,null),isExpanded:n})},X=r(93688),T=["components"];function I(){return I=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var N={};function k(e){var a=e.components,r=M(e,T);return(0,n.mdx)("wrapper",I({},N,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timeseriesConfigXCalibrationEnabled = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/timeseriesConfigXCalibrationEnabled"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timeseriesConfigXCalibrationEnabled.default)(\'#allowCalibrationXTimeseries\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar AllowCalibrationExample = function AllowCalibrationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "allowCalibrationXTimeseries"\n });\n};\nvar _default = exports.default = AllowCalibrationExample;\n')))}k.isMDXComponent=!0;var Y=function(e){var a=e.title,r=e.description,n=e.isExpanded;return t.createElement(d.A,{title:a||"Allow Calibration Enabled Timeseries X Axis",description:r,example:t.createElement(X.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(k,null),isExpanded:n})},B=r(66357),H=["components"];function U(){return U=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}var K={};function z(e){var a=e.components,r=V(e,H);return(0,n.mdx)("wrapper",U({},K,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timeseriesConfigXCalibrationDisabled = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/timeseriesConfigXCalibrationDisabled"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timeseriesConfigXCalibrationDisabled.default)(\'#allowCalibrationXDisabledTimeseries\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar AllowCalibrationExample = function AllowCalibrationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "allowCalibrationXDisabledTimeseries"\n });\n};\nvar _default = exports.default = AllowCalibrationExample;\n')))}z.isMDXComponent=!0;var W=function(e){var a=e.title,r=e.description,n=e.isExpanded;return t.createElement(d.A,{title:a||"Allow Calibration Disabled Timeseries X Axis",description:r,example:t.createElement(B.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(z,null),isExpanded:n})},F=r(21913),J=r(17143),Q=["components"];function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[r]=e[r]);return n}(e,a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}r(27647);var ee={},ae="wrapper";function re(e){var a=e.components,r=$(e,Q);return(0,n.mdx)(ae,Z({},ee,r,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"calibration"},"Calibration"),(0,n.mdx)("p",null,"Calibration is updating the axis limits to accommodate the graph.\nBy default, it is ",(0,n.mdx)("strong",{parentName:"p"},"enabled for the y-axes")," and ",(0,n.mdx)("strong",{parentName:"p"},"disabled for the x-axis"),".\nIt can by toggled on/off by using the appropriate ",(0,n.mdx)("inlineCode",{parentName:"p"},"allowCalibration")," label."),(0,n.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"Install with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,n.mdx)("h2",{id:"usage"},"Usage"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,n.mdx)("h2",{id:"examples"},"Examples"),(0,n.mdx)(f,{mdxType:"AllowCalibrationEnabledY"}),(0,n.mdx)(_,{mdxType:"AllowCalibrationDisabledY"}),(0,n.mdx)(P,{mdxType:"AllowCalibrationDisabledX"}),(0,n.mdx)(j,{mdxType:"AllowCalibrationEnabledX"}),(0,n.mdx)(W,{mdxType:"AllowCalibrationDisabledXTimeseries"}),(0,n.mdx)(Y,{mdxType:"AllowCalibrationEnabledXTimeseries"}),(0,n.mdx)("details",null,(0,n.mdx)("summary",{style:{fontSize:24}},(0,n.mdx)("b",null,"Data")),(0,n.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,n.mdx)(F.A,{mdxType:"GraphConfig"}),(0,n.mdx)("h3",{id:"data-object"},"Data object"),(0,n.mdx)(J.A,{mdxType:"DataObject"})))}re.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/21784-92a1e97d8221a14dc666.js b/21784-92a1e97d8221a14dc666.js new file mode 100644 index 000000000..37c1d7e8b --- /dev/null +++ b/21784-92a1e97d8221a14dc666.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[21784],{70031:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),l=t(86006),o={key:"simple_paired_result_legend_disable_data",label:{high:{display:"High",isDisabled:!0},mid:{display:"Median"},low:{display:"Low",isDisabled:!0}},shape:{high:r.default.helpers.SHAPES.DARK.TEAR_ALT,mid:r.default.helpers.SHAPES.DARK.RHOMBUS,low:r.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:r.default.helpers.COLORS.BLACK,mid:r.default.helpers.COLORS.PURPLE,low:r.default.helpers.COLORS.BLACK},onClick:l.loadPopup,values:[{high:{x:20,y:150},mid:{x:20,y:40},low:{x:20,y:10}},{high:{x:80,y:100},mid:{x:80,y:75},low:{x:80,y:50}},{high:{x:150,y:110},mid:{x:150,y:70},low:{x:150,y:30}},{high:{x:175,y:160},mid:{x:175,y:120},low:{x:175,y:100}},{high:{x:300,y:190},mid:{x:300,y:90},low:{x:300,y:60}},{high:{x:560,y:150},mid:{x:560,y:40},low:{x:560,y:10}},{high:{x:800,y:180},mid:{x:800,y:100},low:{x:800,y:100}}]};n.default=o},57893:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,axis:{x:{label:"Data",lowerLimit:0,upperLimit:1e3},y:{label:"Paired",lowerLimit:0,upperLimit:200}},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,n,t){"use strict";var a=t(24994),r=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var l=a(t(85715)),o=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var t=s(n);if(t&&t.has(e))return t.get(e);var a={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&{}.hasOwnProperty.call(e,o)){var i=l?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(a,o,i):a[o]=e[o]}return a.default=e,t&&t.set(e,a),a}(t(37332)),i=a(t(22639)),p=a(t(45839));function s(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(s=function(e){return e?t:n})(e)}var d=function(e){return new Date(e).toLocaleString()},u=function(e){return e?c(e)?d(e):e:null},c=function(e){return e instanceof Date},f=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n),a.append("g").classed("popup-text",!0).text(t)},m=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n);for(var r=a.append("g").classed("section",!0),o=function(){var e=p[i],n=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,l.default)(e,2),a=t[0],r=t[1],o=n.append("g").classed("popup-item",!0);o.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),o.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(t);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(l&&l.length>0){var s=[];l.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",s)}if(o&&o.length>0){var d=[];o.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",d)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",u)}},n.loadTaskPopup=function(e,n,t,a){y();var r=h(e).append("g"),l=a.label,o=a.display,i=a.y,p=a.startDate,s=a.endDate,u=a.percentage;l&&f(r,"Task Name",o),f(r,"Track",i),f(r,"Start Date",d(p)),f(r,"End Date",d(s)),u&&f(r,"Percentage",u)},n.loadDatelinePopup=function(e,n){y();var t=h(e).append("g"),a=n.label,r=n.value;a&&f(t,"Milestone",a.display),f(t,"Date",d(r))},n.loadTimelinePopup=function(e,n,t,a){y();var r=h(e).append("g"),l=a.x,o=(a.y,a.label),i=a.content;f(r,"X axis","".concat(c(l)?d(l):l)),f(r,"".concat(o.display),i)},n.loadPiePopup=function(e,n,t,a){y();var r=h(e).append("g"),l=a.label,o=a.value;f(r,l.display,o)}},29683:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(96540)),l=a(t(5556));t(16939);var o={id:l.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=o;n.default=i},52361:function(e,n,t){"use strict";var a=t(24994);n.A=void 0;var r=a(t(96540)),l=a(t(61770)),o=a(t(45839));t(63841);var i=a(t(29683)),p=a(t(57893)),s=a(t(70031)),d=o.default.deepClone((0,p.default)("#legendItemDisable")),u=[o.default.deepClone(s.default)];n.A=function(){return r.default.useEffect((function(){var e=l.default.api.graph(d);u.forEach((function(n){e.loadContent(l.default.api.pairedResult(n))}))}),[]),r.default.createElement(i.default,{id:"legendItemDisable"})}},21784:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return j}});var a=t(96540),r=t(36665),l=t(52361),o=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s={};function d(e){var n=e.components,t=p(e,o);return(0,r.mdx)("wrapper",i({},s,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultDefault"));\nvar _pairedResultLegendDisabledDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultLegendDisabledDataset"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultDefault.default)(\'#legendItemDisable\'));\nvar dataset = [_utils.default.deepClone(_pairedResultLegendDisabledDataset.default)];\nvar LegendItemDisablePiaredResultExample = function LegendItemDisablePiaredResultExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "legendItemDisable"\n });\n};\nvar _default = exports.default = LegendItemDisablePiaredResultExample;\n')))}d.isMDXComponent=!0;var u=t(201),c=t(88703),f=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(u.A,{title:n||"Legend Item Disable",description:t,example:a.createElement(l.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(d,null),isExpanded:r})},m=t(89510),h=["components"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var b={},v="wrapper";function x(e){var n=e.components,t=g(e,h);return(0,r.mdx)(v,y({},b,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'simple_paired_result_legend_disable_data\',\n label: {\n high: {\n display: \'High\',\n isDisabled: true\n },\n mid: {\n display: \'Median\'\n },\n low: {\n display: \'Low\',\n isDisabled: true\n }\n },\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.PURPLE,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n values: [{\n high: {\n x: 20,\n y: 150\n },\n mid: {\n x: 20,\n y: 40\n },\n low: {\n x: 20,\n y: 10\n }\n }, {\n high: {\n x: 80,\n y: 100\n },\n mid: {\n x: 80,\n y: 75\n },\n low: {\n x: 80,\n y: 50\n }\n }, {\n high: {\n x: 150,\n y: 110\n },\n mid: {\n x: 150,\n y: 70\n },\n low: {\n x: 150,\n y: 30\n }\n }, {\n high: {\n x: 175,\n y: 160\n },\n mid: {\n x: 175,\n y: 120\n },\n low: {\n x: 175,\n y: 100\n }\n }, {\n high: {\n x: 300,\n y: 190\n },\n mid: {\n x: 300,\n y: 90\n },\n low: {\n x: 300,\n y: 60\n }\n }, {\n high: {\n x: 560,\n y: 150\n },\n mid: {\n x: 560,\n y: 40\n },\n low: {\n x: 560,\n y: 10\n }\n }, {\n high: {\n x: 800,\n y: 180\n },\n mid: {\n x: 800,\n y: 100\n },\n low: {\n x: 800,\n y: 100\n }\n }]\n};\nvar _default = exports.default = data;\n')))}x.isMDXComponent=!0;var O=["components"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var D={},_="wrapper";function j(e){var n=e.components,t=P(e,O);return(0,r.mdx)(_,w({},D,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"legend-item-disable"},"Legend item disable"),(0,r.mdx)("p",null,"This is a simple paired result graph with disabled high and low legends."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"PairedResultGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x,{mdxType:"DataObject"})))}j.isMDXComponent=!0},89510:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=o(e,r);return(0,a.mdx)(p,l({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getPairedResultConfig = function getPairedResultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 1000\n },\n y: {\n label: 'Paired',\n lowerLimit: 0,\n upperLimit: 200\n }\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultConfig;\n")))}s.isMDXComponent=!0},88703:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=o(e,r);return(0,a.mdx)(p,l({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n@import '../colors.module';\n\n/*\nWe are forcing display of the hidden item for data points,\nthis is only applicable when legend toggle is applied\nand one of the data point is selected.\n*/\n.carbon-data-pair--selected {\n @include terra-graph-opacity-show(); //!important;\n}\n\n.carbon-paired-point {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-paired-line {\n fill: none;\n stroke: var(--terra-graphs-dark);\n stroke-width: 1px;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,n,t){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function a(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var a=t.offsetHeight;t.open=!0;var r=a!=t.offsetHeight;return document.body.removeChild(t),r}function r(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?a.call(n,t,n,e):a)||(e.exports=r)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},63841:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/21963-f9990884116f7fad9cf4.js b/21963-f9990884116f7fad9cf4.js new file mode 100644 index 000000000..556ab663e --- /dev/null +++ b/21963-f9990884116f7fad9cf4.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[21963],{13565:function(e,a,t){var r=t(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=r(t(61770)),i=t(86006),l=t(74013),o={key:"uid_8",label:{display:"Data Label 8"},color:n.default.helpers.COLORS.GREEN,shape:n.default.helpers.SHAPES.DARK.X,onClick:i.loadPopup,legendOptions:{showLine:!0,showShape:!0},regions:[{axis:"y",start:2,end:10,color:"#f4f4f4"}],values:(0,l.createGraphValuesWithCos)({length:12,initialX:85,xModifier:17,yModifier:4*Math.PI})};a.default=o},3646:function(e,a,t){var r=t(24994);Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;var n=r(t(61770)),i=t(86006),l=t(74013),o={key:"uid_9",label:{display:"Data Label 9"},color:n.default.helpers.COLORS.ORANGE,shape:n.default.helpers.SHAPES.DARK.SQUARE,onClick:i.loadPopup,yAxis:"y",legendOptions:{showLine:!0,showShape:!0},regions:[{axis:"y",start:2,end:10,color:"#f4f4f4"}],values:(0,l.createGraphValuesWithCos)({length:20,initialX:85,xModifier:10,yModifier:5*Math.PI})};a.default=o},97698:function(e,a){Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0;a.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!0,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},34312:function(e,a,t){var r=t(24994);a.A=void 0;var n=r(t(96540)),i=r(t(61770)),l=r(t(45839));t(45633);var o=r(t(29683)),d=r(t(97698)),s=r(t(26870)),u=r(t(13565)),p=r(t(3646)),c=l.default.deepClone((0,d.default)("#datasetRegionIdentical")),f=[l.default.deepClone(s.default),l.default.deepClone(u.default),l.default.deepClone(p.default)];a.A=function(){return n.default.useEffect((function(){var e=i.default.api.graph(c);f.forEach((function(a){e.loadContent(i.default.api.line(a))}))}),[]),n.default.createElement(o.default,{id:"datasetRegionIdentical"})}},21963:function(e,a,t){t.r(a),t.d(a,{default:function(){return j}});var r=t(96540),n=t(36665),i=t(34312),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var s={};function u(e){var a=e.components,t=d(e,l);return(0,n.mdx)("wrapper",o({},s,t,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefaultY = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefaultY2"));\nvar _datasetRegions = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions1"));\nvar _datasetRegions2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions8"));\nvar _datasetRegions3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions9"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefaultY.default)(\'#datasetRegionIdentical\'));\nvar dataset = [_utils.default.deepClone(_datasetRegions.default), _utils.default.deepClone(_datasetRegions2.default), _utils.default.deepClone(_datasetRegions3.default)];\nvar DatasetRegionIdenticalLineExample = function DatasetRegionIdenticalLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.line(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "datasetRegionIdentical"\n });\n};\nvar _default = exports.default = DatasetRegionIdenticalLineExample;\n')))}u.isMDXComponent=!0;var p=t(201),c=t(79679),f=function(e){var a=e.title,t=e.description,n=e.isExpanded;return r.createElement(p.A,{title:a||"Dataset Region Identical",description:t,example:r.createElement(i.A,null),exampleCssSrc:r.createElement(c.A,null),exampleSrc:r.createElement(u,null),isExpanded:n})},m=t(49462),h=t(17727);var g=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var a=1;a=0||(n[t]=e[t]);return n}(e,a);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}t(27647);var v=function(e){return function(a){return console.warn("Component "+e+" was not imported, exported, or provided by MDXProvider as global scope"),(0,n.mdx)("div",a)}},y=v("DataObject2"),_=v("DataObject3"),O={},D="wrapper";function j(e){var a=e.components,t=x(e,g);return(0,n.mdx)(D,b({},O,t,{components:a,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"dataset-region-identical"},"Dataset region identical"),(0,n.mdx)("p",null,"This is multiline graph with an identical region associated with each line."),(0,n.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"Install with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,n.mdx)("h2",{id:"usage"},"Usage"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,n.mdx)("h2",{id:"example"},"Example"),(0,n.mdx)(f,{mdxType:"LineGraph"}),(0,n.mdx)("details",null,(0,n.mdx)("summary",{style:{fontSize:24}},(0,n.mdx)("b",null,"Data")),(0,n.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,n.mdx)(m.A,{mdxType:"GraphConfig"}),(0,n.mdx)("h3",{id:"data-object"},"Data object"),(0,n.mdx)("h4",{id:"dataset-1"},"Dataset 1"),(0,n.mdx)(h.A,{mdxType:"DataObject1"}),(0,n.mdx)("h4",{id:"dataset-8"},"Dataset 8"),(0,n.mdx)(y,{mdxType:"DataObject2"}),(0,n.mdx)("h4",{id:"dataset-9"},"Dataset 9"),(0,n.mdx)(_,{mdxType:"DataObject3"})))}j.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/23507-bcb5a2e1180de6d4ed84.js b/23507-bcb5a2e1180de6d4ed84.js new file mode 100644 index 000000000..f14c65060 --- /dev/null +++ b/23507-bcb5a2e1180de6d4ed84.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[23507],{63989:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r=n(86006),i=[{key:"task1",onClick:a.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2016,0,1,8).toISOString(),endDate:new Date(2016,0,1,12).toISOString()},{key:"task2",onClick:a.loadTaskPopup,label:{display:"Story Broccoli"},startDate:new Date(2016,0,1,15).toISOString(),endDate:new Date(2016,0,1,23).toISOString()}],l=[{key:"uid_action_1",onClick:r.loadPopup,values:[new Date(2016,0,1,6,15).toISOString()]},{key:"uid_action_2",onClick:r.loadPopup,values:[new Date(2016,0,1,7,15).toISOString()]}],o={key:"track 0",trackLabel:{display:"Default",onClick:a.loadXAndYAxisLabelPopup},tasks:i,actions:l};t.default=o},88980:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),l=a(n(61770)),o=a(n(23986)),p=a(n(45839));n(40415);var u,c=a(n(29683)),s=a(n(10764)),d=a(n(63989)),f=p.default.deepClone((0,s.default)("#simpleGanttPanning")),m=[p.default.deepClone(d.default)],g={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){u=l.default.api.gantt(f),m.forEach((function(e){u.loadContent(e)}))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),g),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){u&&(u.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),u.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString(),u.reflowMultipleDatasets())}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(o.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(c.default,{id:"simpleGanttPanning"}))}},23507:function(e,t,n){n.r(t),n.d(t,{default:function(){return v}});var a=n(96540),r=n(36665),i=n(88980),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u={};function c(e){var t=e.components,n=p(e,l);return(0,r.mdx)("wrapper",o({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttPanning"));\nvar _simplePanningData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/simplePanningData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttPanning.default)(\'#simpleGanttPanning\'));\nvar dataset = [_utils.default.deepClone(_simplePanningData.default)];\nvar graph;\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar SimpleGanttPanningExample = function SimpleGanttPanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets();\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleGanttPanning"\n }));\n};\nvar _default = exports.default = SimpleGanttPanningExample;\n')))}c.isMDXComponent=!0;var s=n(201),d=n(42929),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(s.A,{title:t||"Simple Panning",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(c,null),isExpanded:r})},m=n(87648),g=n(55398),h=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var _={},y="wrapper";function v(e){var t=e.components,n=x(e,h);return(0,r.mdx)(y,b({},_,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-gantt-chart-panning"},"Simple Gantt chart panning"),(0,r.mdx)("p",null,"This is a simple Gantt chart example that implements panning."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(g.A,{mdxType:"DataObject"})))}v.isMDXComponent=!0},55398:function(e,t,n){n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},p="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,i({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar _popup2 = require(\"../../popup\");\nvar tasksData = [{\n key: 'task1',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2016, 0, 1, 8).toISOString(),\n endDate: new Date(2016, 0, 1, 12).toISOString()\n}, {\n key: 'task2',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Broccoli'\n },\n startDate: new Date(2016, 0, 1, 15).toISOString(),\n endDate: new Date(2016, 0, 1, 23).toISOString()\n}];\nvar actionsData = [{\n key: 'uid_action_1',\n onClick: _popup2.loadPopup,\n values: [new Date(2016, 0, 1, 6, 15).toISOString()]\n}, {\n key: 'uid_action_2',\n onClick: _popup2.loadPopup,\n values: [new Date(2016, 0, 1, 7, 15).toISOString()]\n}];\nvar simplePanningData = {\n key: 'track 0',\n trackLabel: {\n display: 'Default',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: tasksData,\n actions: actionsData\n};\nvar _default = exports.default = simplePanningData;\n")))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/24982-68438cfd62fb35a02f74.css b/24982-68438cfd62fb35a02f74.css new file mode 100644 index 000000000..7a9d9a86c --- /dev/null +++ b/24982-68438cfd62fb35a02f74.css @@ -0,0 +1,3 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/24982-68438cfd62fb35a02f74.js b/24982-68438cfd62fb35a02f74.js new file mode 100644 index 000000000..c8bde1a80 --- /dev/null +++ b/24982-68438cfd62fb35a02f74.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[24982,47397,5170,82789],{35273:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,axis:{x:{label:"Data",lowerLimit:20.7,upperLimit:22.7,suppressTrailingZeros:!0},y:{label:"Line Set A",lowerLimit:.2,upperLimit:3.8,suppressTrailingZeros:!0},y2:{show:!0,label:"Line Set B",lowerLimit:10.2,upperLimit:13.8,suppressTrailingZeros:!0}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0,ticksCount:7}}},12748:function(e,t,r){"use strict";var n=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},52206:function(e,t,r){"use strict";var n=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString(),ticks:{values:[new Date(2016,0,1,1,0).toISOString(),new Date(2016,0,1,5,0).toISOString(),new Date(2016,0,1,10,0).toISOString(),new Date(2016,0,1,15,0).toISOString(),new Date(2016,0,1,20,0).toISOString()],format:"%a %b %e %X %Y"}},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},29683:function(e,t,r){"use strict";var n=r(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(r(96540)),i=n(r(5556));r(16939);var o={id:i.default.string.isRequired},l=function(e){return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),a.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=o;t.default=l},28914:function(e,t,r){"use strict";var n=r(24994);t.A=void 0;var a=n(r(96540)),i=n(r(61770)),o=n(r(45839)),l=n(r(29683)),s=n(r(12748)),u=o.default.deepClone((0,s.default)("#staticXAxisTicks"));t.A=function(){return a.default.useEffect((function(){i.default.api.graph(u)}),[]),a.default.createElement(l.default,{id:"staticXAxisTicks"})}},52248:function(e,t,r){"use strict";var n=r(24994);t.A=void 0;var a=n(r(96540)),i=n(r(61770)),o=n(r(45839)),l=n(r(29683)),s=n(r(35273)),u=o.default.deepClone((0,s.default)("#supressTickValue"));t.A=function(){return a.default.useEffect((function(){i.default.api.graph(u)}),[]),a.default.createElement(l.default,{id:"supressTickValue"})}},48730:function(e,t,r){"use strict";var n=r(24994);t.A=void 0;var a=n(r(96540)),i=n(r(61770)),o=n(r(45839)),l=n(r(29683)),s=n(r(52206)),u=o.default.deepClone((0,s.default)("#xAxisTicksFormatted"));t.A=function(){return a.default.useEffect((function(){i.default.api.graph(u)}),[]),a.default.createElement(l.default,{id:"xAxisTicksFormatted"})}},27501:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return M}});var n=r(96540),a=r(36665),i=r(28914),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var u={};function p(e){var t=e.components,r=s(e,o);return(0,a.mdx)("wrapper",l({},u,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timeseriesConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/timeseriesConfig"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timeseriesConfig.default)(\'#staticXAxisTicks\'));\nvar StaticXAxisTicksGeneralExample = function StaticXAxisTicksGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "staticXAxisTicks"\n });\n};\nvar _default = exports.default = StaticXAxisTicksGeneralExample;\n')))}p.isMDXComponent=!0;var c=r(201),d=function(e){var t=e.title,r=e.description,a=e.isExpanded;return n.createElement(c.A,{title:t||"Static X Axis Ticks",description:r,example:n.createElement(i.A,null),exampleSrc:n.createElement(p,null),isExpanded:a})},f=r(15423),m=r(48730),x=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var b={};function v(e){var t=e.components,r=h(e,x);return(0,a.mdx)("wrapper",g({},b,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timeseriesConfigTicksFormatted = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/timeseriesConfigTicksFormatted"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timeseriesConfigTicksFormatted.default)(\'#xAxisTicksFormatted\'));\nvar XAxisTicksFormattedGeneralExample = function XAxisTicksFormattedGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "xAxisTicksFormatted"\n });\n};\nvar _default = exports.default = XAxisTicksFormattedGeneralExample;\n')))}v.isMDXComponent=!0;var y=function(e){var t=e.title,r=e.description,a=e.isExpanded;return n.createElement(c.A,{title:t||"X Axis Ticks Formatted",description:r,example:n.createElement(m.A,null),exampleSrc:n.createElement(v,null),isExpanded:a})},_=r(52248),O=["components"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var S={};function j(e){var t=e.components,r=E(e,O);return(0,a.mdx)("wrapper",w({},S,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultDecimalAxes = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultDecimalAxes"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultDecimalAxes.default)(\'#supressTickValue\'));\nvar SupressTickValueGeneralExample = function SupressTickValueGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "supressTickValue"\n });\n};\nvar _default = exports.default = SupressTickValueGeneralExample;\n')))}j.isMDXComponent=!0;var T=function(e){var t=e.title,r=e.description,a=e.isExpanded;return n.createElement(c.A,{title:t||"Suppress Tick Value Trailing Zero",description:r,example:n.createElement(_.A,null),exampleSrc:n.createElement(j,null),isExpanded:a})},C=["components"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var k={},G="wrapper";function A(e){var t=e.components,r=L(e,C);return(0,a.mdx)(G,D({},k,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getDefaultConfig = function getDefaultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n label: 'Data',\n lowerLimit: 20.7,\n upperLimit: 22.7,\n suppressTrailingZeros: true\n },\n y: {\n label: 'Line Set A',\n lowerLimit: 0.2,\n upperLimit: 3.8,\n suppressTrailingZeros: true\n },\n y2: {\n show: true,\n label: 'Line Set B',\n lowerLimit: 10.2,\n upperLimit: 13.8,\n suppressTrailingZeros: true\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true,\n ticksCount: 7\n };\n};\nvar _default = exports.default = getDefaultConfig;\n")))}A.isMDXComponent=!0;var q=["components"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r(27647);var R={},I="wrapper";function M(e){var t=e.components,r=X(e,q);return(0,a.mdx)(I,P({},R,r,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"axis-ticks"},"Axis Ticks"),(0,a.mdx)("p",null,"Axis ticks contains simple graph examples with static x-axis ticks, formatted ticks and suppress tick values trailing zeros."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"examples"},"Examples"),(0,a.mdx)(d,{mdxType:"StaticXAxisTicksGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for static x-axis ticks")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(f.A,{mdxType:"StaticXAxisTicksGraphConfig"})),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)(y,{mdxType:"XAxisTicksFormattedGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for x-axis ticks formatted ")),(0,a.mdx)("h3",{id:"graph-config-object-1"},"Graph Config object"),(0,a.mdx)(f.A,{mdxType:"XAxisTicksFormattedGraphConfig"})),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)(T,{mdxType:"SuppressTickValueTrailingZeroGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for suppress tick value trailing zero's")),(0,a.mdx)("h3",{id:"graph-config-object-2"},"Graph Config object"),(0,a.mdx)(A,{mdxType:"SuppressTickValueTrailingZeroGraphConfig"})))}M.isMDXComponent=!0},15423:function(e,t,r){"use strict";r.d(t,{A:function(){return u}});r(96540);var n=r(36665),a=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[r]=e[r]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var l={},s="wrapper";function u(e){var t=e.components,r=o(e,a);return(0,n.mdx)(s,i({},l,r,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesConfig = function getLineTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesConfig;\n')))}u.isMDXComponent=!0},27647:function(e,t,r){var n,a;void 0===(a="function"==typeof(n=function(){var e="details",t="summary";function r(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function n(){var r=document.createElement(e);if(!("open"in r))return!1;r.innerHTML="<"+t+">ab",document.body.appendChild(r);var n=r.offsetHeight;r.open=!0;var a=n!=r.offsetHeight;return document.body.removeChild(r),a}function a(e,t){if(!document.getElementById(e)){var r=document.createElement("style");r.id=e,r.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(r)}}n()||(document.documentElement.className+=" no-details",window.addEventListener("click",r),a("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?n.call(t,r,t,e):n)||(e.exports=a)},16939:function(e,t,r){"use strict";r.r(t),t.default={}}}]); \ No newline at end of file diff --git a/25052-1bcc6ee7016ddf4e98b3.js b/25052-1bcc6ee7016ddf4e98b3.js new file mode 100644 index 000000000..986acfe66 --- /dev/null +++ b/25052-1bcc6ee7016ddf4e98b3.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[25052],{78373:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l=n(74013),i={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:o.loadPopup,values:(0,l.createGraphValuesWithSin)({length:20,initialX:85,xModifier:10,yModifier:Math.PI})};t.default=i},74013:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGraphValuesWithSin=t.createGraphValuesWithCos=void 0;t.createGraphValuesWithSin=function(e){var t=e.length,n=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.sin(t)*r,x:n+t*a}}))},t.createGraphValuesWithCos=function(e){var t=e.length,n=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.cos(t)*r,x:n+t*a}}))}},87783:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),i=a(n(22639)),p=a(n(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var s=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?s(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=p[i],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(n);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var u=[];o.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",u)}if(l&&l.length>0){var s=[];l.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",s)}if(i&&i.length>0){var c=[];i.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){g();var r=v(e).append("g"),o=a.label,l=a.display,i=a.y,p=a.startDate,u=a.endDate,c=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",s(p)),f(r,"End Date",s(u)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){g();var n=v(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",s(r))},t.loadTimelinePopup=function(e,t,n,a){g();var r=v(e).append("g"),o=a.x,l=(a.y,a.label),i=a.content;f(r,"X axis","".concat(d(o)?s(o):o)),f(r,"".concat(l.display),i)},t.loadPiePopup=function(e,t,n,a){g();var r=v(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;t.default=i},10809:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),l=a(n(45839));n(45633);var i=a(n(29683)),p=a(n(87783)),u=a(n(78373)),s=l.default.deepClone((0,p.default)("#backgroundColor")),c=l.default.deepClone(u.default);t.A=function(){return r.default.useEffect((function(){o.default.api.graph(s).loadContent(o.default.api.line(c))}),[]),r.default.createElement("div",{className:"background-color-class"},r.default.createElement(i.default,{id:"backgroundColor"}))}},25052:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return O}});var a=n(96540),r=n(36665),o=n(10809),l=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u={};function s(e){var t=e.components,n=p(e,l);return(0,r.mdx)("wrapper",i({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefault"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/General/dataset1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefault.default)(\'#backgroundColor\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar BackgroundColorGeneralExample = function BackgroundColorGeneralExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement("div", {\n className: "background-color-class"\n }, /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "backgroundColor"\n }));\n};\nvar _default = exports.default = BackgroundColorGeneralExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(79679),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(c.A,{title:t||"Background Color",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=n(49462),v=n(75345),g=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var y={},x="wrapper";function O(e){var t=e.components,n=b(e,g);return(0,r.mdx)(x,h({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"background-color"},"Background color"),(0,r.mdx)("p",null,"This is Simple line graph with '#176ba0' as background color."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(v.A,{mdxType:"DataObject"})))}O.isMDXComponent=!0},75345:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = [{\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithSin)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI\n })\n}];\nvar _default = exports.default = data;\n')))}u.isMDXComponent=!0},49462:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}u.isMDXComponent=!0},79679:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}u.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},45633:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/25202-220e4a28ca2b58ca3f8d.js b/25202-220e4a28ca2b58ca3f8d.js new file mode 100644 index 000000000..99a926e71 --- /dev/null +++ b/25202-220e4a28ca2b58ca3f8d.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[25202],{80568:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,15,59).toISOString(),ticks:{format:""}}},showLabel:!0,showLegend:!0}}},75527:function(e,t,n){var r=n(24994);t.A=void 0;var a=r(n(96540)),i=r(n(61770)),l=r(n(45839));n(3929);var o=r(n(29683)),s=r(n(80568)),u=r(n(28369)),p=r(n(53688)),d=l.default.deepClone((0,s.default)("#axisWithNoTickValuesTimelineGraph")),c=[l.default.deepClone(u.default),l.default.deepClone(p.default)];t.A=function(){return a.default.useEffect((function(){var e=i.default.api.timeline(d);c.forEach((function(t){e.loadContent(t)}))}),[]),a.default.createElement(o.default,{id:"axisWithNoTickValuesTimelineGraph"})}},25202:function(e,t,n){n.r(t),n.d(t,{default:function(){return C}});var r=n(96540),a=n(36665),i=n(75527),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u={};function p(e){var t=e.components,n=s(e,l);return(0,a.mdx)("wrapper",o({},u,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Timeline/Timeline.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timelineWithNoAxisTicksConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Timeline/timelineWithNoAxisTicksConfig"));\nvar _defaultDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/defaultDataset1.js"));\nvar _defaultDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/defaultDataset2.js"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timelineWithNoAxisTicksConfig.default)(\'#axisWithNoTickValuesTimelineGraph\'));\nvar dataset = [_utils.default.deepClone(_defaultDataset.default), _utils.default.deepClone(_defaultDataset2.default)];\nvar AxisWithNoTickValuesTimelineExample = function AxisWithNoTickValuesTimelineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.timeline(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "axisWithNoTickValuesTimelineGraph"\n });\n};\nvar _default = exports.default = AxisWithNoTickValuesTimelineExample;\n')))}p.isMDXComponent=!0;var d=n(201),c=n(94597),m=function(e){var t=e.title,n=e.description,a=e.isExpanded;return r.createElement(d.A,{title:t||"Axis With No Tick Values",description:n,example:r.createElement(i.A,null),exampleCssSrc:r.createElement(c.A,null),exampleSrc:r.createElement(p,null),isExpanded:a})},f=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b={},g="wrapper";function v(e){var t=e.components,n=x(e,f);return(0,a.mdx)(g,h({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getTimelineConfig = function getTimelineConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n label: 'Datetime',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 15, 59).toISOString(),\n ticks: {\n format: ''\n }\n }\n },\n showLabel: true,\n showLegend: true\n };\n};\nvar _default = exports.default = getTimelineConfig;\n")))}v.isMDXComponent=!0;var O=n(3685),y=n(33721),j=["components"];function T(){return T=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n(27647);var D={},w="wrapper";function C(e){var t=e.components,n=_(e,j);return(0,a.mdx)(w,T({},D,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"timeline-axis-with-no-ticks"},"Timeline axis with no ticks"),(0,a.mdx)("p",null,"This is a basic timeline graph with no axis ticks."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(m,{mdxType:"Timeline"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(v,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)("h4",{id:"timeline-a-dataset"},"Timeline A Dataset"),(0,a.mdx)(O.A,{mdxType:"DataObject1"}),(0,a.mdx)("h4",{id:"timeline-b-dataset"},"Timeline B Dataset"),(0,a.mdx)(y.A,{mdxType:"DataObject2"})))}C.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/25595-a365c8ad390dfd9ee923.js b/25595-a365c8ad390dfd9ee923.js new file mode 100644 index 000000000..80e8debc5 --- /dev/null +++ b/25595-a365c8ad390dfd9ee923.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[25595],{2682:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"dynamic_dataset_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLUE,onClick:o.loadBarPopup,values:[{x:new Date(2016,0,1,3).toISOString(),y:15},{x:new Date(2016,0,1,6).toISOString(),y:19},{x:new Date(2016,0,1,9).toISOString(),y:10},{x:new Date(2016,0,1,12).toISOString(),y:13},{x:new Date(2016,0,1,15).toISOString(),y:15}]};t.default=l},84147:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Data",lowerLimit:new Date(2016,0,1,0).toISOString(),upperLimit:new Date(2016,0,2,0).toISOString(),ticks:{values:[new Date(2016,0,1,3).toISOString(),new Date(2016,0,1,6).toISOString(),new Date(2016,0,1,9).toISOString(),new Date(2016,0,1,12).toISOString(),new Date(2016,0,1,15).toISOString()],format:"%H"}},y:{show:!0,label:"Bar Set A",lowerLimit:0,upperLimit:20}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!1,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),i=a(n(22639)),p=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},v=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=p[i],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(n);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),v(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),v(a,"Activities",s)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),v(a,"Events",u)}if(i&&i.length>0){var c=[];i.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),v(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){g();var r=y(e).append("g"),o=a.label,l=a.display,i=a.y,p=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){g();var n=y(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){g();var r=y(e).append("g"),o=a.x,l=(a.y,a.label),i=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(l.display),i)},t.loadPiePopup=function(e,t,n,a){g();var r=y(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;t.default=i},96499:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'dynamic_dataset_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: new Date(2016, 0, 1, 3).toISOString(),\n y: 15\n }, {\n x: new Date(2016, 0, 1, 6).toISOString(),\n y: 19\n }, {\n x: new Date(2016, 0, 1, 9).toISOString(),\n y: 10\n }, {\n x: new Date(2016, 0, 1, 12).toISOString(),\n y: 13\n }, {\n x: new Date(2016, 0, 1, 15).toISOString(),\n y: 15\n }]\n};\nvar _default = exports.default = data;\n')))}s.isMDXComponent=!0},95156:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getbarConfig = function getbarConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Data\',\n lowerLimit: new Date(2016, 0, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 2, 0).toISOString(),\n ticks: {\n values: [new Date(2016, 0, 1, 3).toISOString(), new Date(2016, 0, 1, 6).toISOString(), new Date(2016, 0, 1, 9).toISOString(), new Date(2016, 0, 1, 12).toISOString(), new Date(2016, 0, 1, 15).toISOString()],\n format: \'%H\'\n }\n },\n y: {\n show: true,\n label: \'Bar Set A\',\n lowerLimit: 0,\n upperLimit: 20\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: false,\n showHGrid: true\n };\n};\nvar _default = exports.default = getbarConfig;\n')))}s.isMDXComponent=!0},18241:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},p="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,o({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},11719:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/25839-bfa3f7394f7dc104f8d1.css b/25839-bfa3f7394f7dc104f8d1.css new file mode 100644 index 000000000..7a9d9a86c --- /dev/null +++ b/25839-bfa3f7394f7dc104f8d1.css @@ -0,0 +1,3 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/25839-bfa3f7394f7dc104f8d1.js b/25839-bfa3f7394f7dc104f8d1.js new file mode 100644 index 000000000..3d985758a --- /dev/null +++ b/25839-bfa3f7394f7dc104f8d1.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[25839,47397,5170,82789],{21534:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(86006),l=a(n(61770)),i={key:"bubble_basic_data",label:{display:"Bubble set A"},onClick:r.loadBubblePopup,color:l.default.helpers.COLORS.PINK,values:[{x:new Date(2016,0,1,12,0).toISOString(),y:70},{x:new Date(2016,0,1,15,45).toISOString(),y:120},{x:new Date(2016,0,1,10,30).toISOString(),y:160},{x:new Date(2016,0,1,18,0).toISOString(),y:180}],yAxis:"y",showShapes:!1};t.default=i},72516:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Bubble",lowerLimit:10,upperLimit:250}},pan:{enabled:!0}}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var l=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var o=l?Object.getOwnPropertyDescriptor(e,i):null;o&&(o.get||o.set)?Object.defineProperty(a,i,o):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),o=a(n(22639)),p=a(n(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var c=function(e){return new Date(e).toLocaleString()},s=function(e){return e?d(e)?c(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},b=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[o],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,l.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},o=0,p=Object.values(n);o0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),b(a,"Tasks",p)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),b(a,"Activities",u)}if(i&&i.length>0){var c=[];i.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),b(a,"Events",c)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),b(a,"Actions",s)}},t.loadTaskPopup=function(e,t,n,a){g();var r=m(e).append("g"),l=a.label,i=a.display,o=a.y,p=a.startDate,u=a.endDate,s=a.percentage;l&&f(r,"Task Name",i),f(r,"Track",o),f(r,"Start Date",c(p)),f(r,"End Date",c(u)),s&&f(r,"Percentage",s)},t.loadDatelinePopup=function(e,t){g();var n=m(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",c(r))},t.loadTimelinePopup=function(e,t,n,a){g();var r=m(e).append("g"),l=a.x,i=(a.y,a.label),o=a.content;f(r,"X axis","".concat(d(l)?c(l):l)),f(r,"".concat(i.display),o)},t.loadPiePopup=function(e,t,n,a){g();var r=m(e).append("g"),l=a.label,i=a.value;f(r,l.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),l=a(n(5556));n(16939);var i={id:l.default.string.isRequired},o=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};o.propTypes=i;t.default=o},41440:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r,l=a(n(85715)),i=a(n(96540)),o=a(n(23986)),p=a(n(61770)),u=a(n(45839)),c=a(n(29683)),s=a(n(72516)),d=a(n(21534)),f=u.default.deepClone((0,s.default)("#simpleBubblePanning")),b=u.default.deepClone(d.default),m={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){(r=p.default.api.graph(f)).loadContent(p.default.api.bubbleMultipleDataset(b))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),m),t=(0,l.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){r&&(r.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),r.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString(),r.reflowMultipleDatasets())}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(o.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(c.default,{id:"simpleBubblePanning"}))}},50064:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return x}});var a=n(96540),r=n(36665),l=n(41440),i=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u={};function c(e){var t=e.components,n=p(e,i);return(0,r.mdx)("wrapper",o({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _simplePanningAxisData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bubble/simplePanningAxisData"));\nvar _bubbleDataBasic = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bubble/bubbleDataBasic.js"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _simplePanningAxisData.default)(\'#simpleBubblePanning\'));\nvar dataset = _utils.default.deepClone(_bubbleDataBasic.default);\nvar state = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar BubblePanningExample = function BubblePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bubbleMultipleDataset(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets();\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleBubblePanning"\n }));\n};\nvar _default = exports.default = BubblePanningExample;\n')))}c.isMDXComponent=!0;var s=n(201),d=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(s.A,{title:t||"Simple Panning",description:n,example:a.createElement(l.A,null),exampleSrc:a.createElement(c,null),isExpanded:r})},f=n(58594),b=n(1831),m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var y={},h="wrapper";function x(e){var t=e.components,n=v(e,m);return(0,r.mdx)(h,g({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-bubble-graph-panning"},"Simple Bubble Graph panning"),(0,r.mdx)("p",null,"This is a bubble graph example that implements panning."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(d,{mdxType:"BubbleSingleDatasetExample"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(f.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(b.A,{mdxType:"DataObject"})))}x.isMDXComponent=!0},1831:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},p="wrapper";function u(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,l({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup.js");\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar bubbleDataBasic = {\n key: \'bubble_basic_data\',\n label: {\n display: \'Bubble set A\'\n },\n onClick: _popup.loadBubblePopup,\n color: _carbonGraphs.default.helpers.COLORS.PINK,\n values: [{\n x: new Date(2016, 0, 1, 12, 0).toISOString(),\n y: 70\n }, {\n x: new Date(2016, 0, 1, 15, 45).toISOString(),\n y: 120\n }, {\n x: new Date(2016, 0, 1, 10, 30).toISOString(),\n y: 160\n }, {\n x: new Date(2016, 0, 1, 18, 0).toISOString(),\n y: 180\n }],\n yAxis: \'y\',\n showShapes: false\n};\nvar _default = exports.default = bubbleDataBasic;\n')))}u.isMDXComponent=!0},58594:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},p="wrapper";function u(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,l({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getSimpleAxisData = function getSimpleAxisData(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Bubble\',\n lowerLimit: 10,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n }\n };\n};\nvar _default = exports.default = getSimpleAxisData;\n')))}u.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/25971-f9e36bfa82c0589635de.js b/25971-f9e36bfa82c0589635de.js new file mode 100644 index 000000000..4974e32b3 --- /dev/null +++ b/25971-f9e36bfa82c0589635de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[25971],{84219:function(e,n,t){var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),i=t(86006),l={key:"uid_1",label:{display:"Data Label 1"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};n.default=l},74883:function(e,n,t){var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770));n.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0,eventline:[{color:r.default.helpers.COLORS.BLUE,style:{strokeDashArray:"2,2"},value:new Date(2016,0,1,4,15).toISOString()}]}}},10010:function(e,n,t){var a=t(24994);n.A=void 0;var r=a(t(85715)),i=a(t(96540)),l=a(t(23986)),o=a(t(61770)),u=a(t(45839));t(45633);var p,s=a(t(29683)),c=a(t(74883)),d=a(t(84219)),f=u.default.deepClone((0,c.default)("#dynamicEventlineExample")),m=u.default.deepClone(d.default),g={initial:0,factor:3};n.A=function(){i.default.useEffect((function(){(p=o.default.api.graph(f)).loadContent(o.default.api.line(m))}),[]);var e=i.default.useReducer((function(e,n){var t;switch(n.type){case"panLeft":t=e.initial-e.factor;break;case"panRight":t=e.initial+e.factor;break;default:return e}return{initial:t,factor:e.factor}}),g),n=(0,r.default)(e,2),t=n[0],a=n[1];return i.default.useLayoutEffect((function(){if(p){p.config.axis.x.lowerLimit=new Date(2016,0,1,t.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,t.initial).toISOString();var e={eventline:[{color:o.default.helpers.COLORS.GREEN,style:{strokeDashArray:"4,4"},value:new Date(2016,0,1,9,45).toISOString()}]};p.reflowMultipleDatasets(e)}}),[t.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(s.default,{id:"dynamicEventlineExample"}))}},25971:function(e,n,t){t.r(n),t.d(n,{default:function(){return E}});var a=t(96540),r=t(36665),i=t(10010),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p={};function s(e){var n=e.components,t=u(e,l);return(0,r.mdx)("wrapper",o({},p,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseriesPanningEventline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseriesPanningEventline"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseriesPanningEventline.default)(\'#dynamicEventlineExample\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar DynamicEventlinePanningExample = function DynamicEventlinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newEventline = [{\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n style: {\n strokeDashArray: \'4,4\'\n },\n value: new Date(2016, 0, 1, 9, 45).toISOString()\n }];\n var newDataset = {\n // panData: [utils.deepClone(exampleData[1])],\n eventline: newEventline\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "dynamicEventlineExample"\n }));\n};\nvar _default = exports.default = DynamicEventlinePanningExample;\n')))}s.isMDXComponent=!0;var c=t(201),d=t(79679),f=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(c.A,{title:n||"Dynamic Eventline",description:t,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var b={},x="wrapper";function v(e){var n=e.components,t=h(e,m);return(0,r.mdx)(x,g({},b,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getConfigLineTimeseriesPanning = function getConfigLineTimeseriesPanning(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: 'Line Set A',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true,\n eventline: [{\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n style: {\n strokeDashArray: '2,2'\n },\n value: new Date(2016, 0, 1, 4, 15).toISOString()\n }]\n };\n};\nvar _default = exports.default = getConfigLineTimeseriesPanning;\n")))}v.isMDXComponent=!0;var y=t(55020),S=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var w={},D="wrapper";function E(e){var n=e.components,t=O(e,S);return(0,r.mdx)(D,_({},w,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"line-graph---panning"},"Line Graph - panning"),(0,r.mdx)("p",null,"This is a line graph example with a dynamically updating eventline. Click on the panning buttons to see the updated eventline."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(v,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(y.A,{mdxType:"DataObject"})))}E.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/26018-dd7c5f80e2d19cad5764.css b/26018-dd7c5f80e2d19cad5764.css new file mode 100644 index 000000000..1bf8121a2 --- /dev/null +++ b/26018-dd7c5f80e2d19cad5764.css @@ -0,0 +1,4 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +:root{--default-transition-timing: cubic-bezier(0.07, 0.95, 0, 1);--default-transition-duration: 1s}:root{--line-transition-duration: 0.3s}.carbon-line path{transition:opacity 0.3s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--line-transition-duration) var(--default-transition-timing);fill:none;stroke-width:1px}[dir] .carbon-line path{-webkit-transition:opacity 0.3s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--line-transition-duration) var(--default-transition-timing)}.carbon-line path.carbon-highlight{transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:stroke var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);stroke-width:2px}[dir] .carbon-line path.carbon-highlight{-webkit-transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:stroke var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}.carbon-line path[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-line path[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/2702-ebe87b0a784428b4dfb4.js b/2702-ebe87b0a784428b4dfb4.js new file mode 100644 index 000000000..b1107edb0 --- /dev/null +++ b/2702-ebe87b0a784428b4dfb4.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[2702],{2152:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,dimension:{height:300},showLegend:!0}}},31915:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(96540)),l=a(n(61770)),d=a(n(45839));n(63031);var i=a(n(29683)),m=a(n(2152)),p=a(n(95877)),o=a(n(15100)),u=a(n(36387)),s=d.default.deepClone((0,m.default)("#simplePie")),x=[d.default.deepClone(p.default),d.default.deepClone(o.default),d.default.deepClone(u.default)];t.A=function(){return r.default.useEffect((function(){var e=l.default.api.pie(s);x.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(i.default,{id:"simplePie"})}},2702:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var a=n(96540),r=n(36665),l=n(31915),d=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function o(e){var t=e.components,n=m(e,d);return(0,r.mdx)("wrapper",i({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Pie/PieChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _simplePieConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Pie/simplePieConfig"));\nvar _simplePieDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Pie/simplePieDataset1"));\nvar _simplePieDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Pie/simplePieDataset2"));\nvar _simplePieDataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Pie/simplePieDataset3"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _simplePieConfig.default)(\'#simplePie\'));\nvar dataset = [_utils.default.deepClone(_simplePieDataset.default), _utils.default.deepClone(_simplePieDataset2.default), _utils.default.deepClone(_simplePieDataset3.default)];\nvar SimplePieExample = function SimplePieExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.pie(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simplePie"\n });\n};\nvar _default = exports.default = SimplePieExample;\n')))}o.isMDXComponent=!0;var u=n(201),s=n(10083),x=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(u.A,{title:t||"Simple Pie",description:n,example:a.createElement(l.A,null),exampleCssSrc:a.createElement(s.A,null),exampleSrc:a.createElement(o,null),isExpanded:r})},g=["components"];function N(){return N=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var f={},h="wrapper";function b(e){var t=e.components,n=c(e,g);return(0,r.mdx)(h,N({},f,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar getPieConfig = function getPieConfig(id) {\n return {\n bindTo: id,\n dimension: {\n height: 300\n },\n showLegend: true\n };\n};\nvar _default = exports.default = getPieConfig;\n')))}b.isMDXComponent=!0;var y=n(1254),C=n(60685),v=n(50580),P=["components"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var O={},_="wrapper";function w(e){var t=e.components,n=D(e,P);return(0,r.mdx)(_,j({},O,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-pie"},"Simple Pie"),(0,r.mdx)("p",null,"This is a simple Pie chart."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#getting-started"},"Getting Started")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#usage"},"Usage")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-structure"},"Config Structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-properties"},"Config properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dimension"},"dimension")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#legendpadding"},"legendPadding")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-structure"},"Dataset Structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-properties"},"Dataset Properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#label"},"label")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#examples"},"Example"))),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("p",null,"An instance of a pie graph can be accessed though the ",(0,r.mdx)("inlineCode",{parentName:"p"},"Carbon.api.pie()")," function.\nUnlike most of the other graphs, the pie api does not need an instance of ",(0,r.mdx)("inlineCode",{parentName:"p"},"Carbon.api.graph"),".\nInstead, the graph configuration is directly passed as a parameter to the timeline instance,\nwith the dataset object also directly passed to the ",(0,r.mdx)("inlineCode",{parentName:"p"},"loadContent")," function.\nTherefore, the pie graph can not be combined with other graphs."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n\nvar pieGraph = Carbon.api.pie(/* config object */);\npieGraph.loadContent(/* dataset */);\n\n// Multiple datasets can be added:\npieGraph.loadContent(/* dataset1 */);\npieGraph.loadContent(/* dataset2 */);\n")),(0,r.mdx)("h2",{id:"configuration-structure"},"Configuration Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"const pieConfig = {\n axis: {\n x: {\n label: ,\n lowerLimit: or ,\n upperLimit: \n }\n },\n bindTo: ,\n bindLegendTo: ,\n dimension: {\n height: \n },\n legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n removeContainerPadding: ,\n showLegend: ,\n}\n")),(0,r.mdx)("h2",{id:"configuration-properties"},"Configuration Properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bindTo"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"DOM ID to bind the graph container to.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"data"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#dataset-structure"},"Dataset-structure"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bindLegendTo"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"null"),(0,r.mdx)("td",{parentName:"tr",align:null},"ID of custom container to bind legend to (Example: ",(0,r.mdx)("inlineCode",{parentName:"td"},'"#legendContainer"'),").")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"dimension"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#dimension"},"dimension"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"legendPadding"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ top: 4, bottom: 4, left: 8, right: 8 }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#legendpadding"},"legendPadding"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"removeContainerPadding"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"false")),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to remove top and bottom padding of the container for the graph.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showLegend"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"true")),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to show graph legend.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"dimension"},(0,r.mdx)("inlineCode",{parentName:"h3"},"dimension")),(0,r.mdx)("strong",{parentName:"li"},"type:")," object")),(0,r.mdx)("p",null,"Timeline is marked only on ",(0,r.mdx)("inlineCode",{parentName:"p"},"X Axis"),", there is no other axis supplied. Axis is set to ",(0,r.mdx)("inlineCode",{parentName:"p"},"show")," by default."),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"height"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"Sets the size of pie chart.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"upperLimit"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Upper bound for X axis. This is inclusive.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Axis label value.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"legendpadding"},(0,r.mdx)("inlineCode",{parentName:"h3"},"legendPadding")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"}," Sets the legend padding and removes the carbon default margin of ",(0,r.mdx)("inlineCode",{parentName:"p"},"8px")," around legend."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"top"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Top padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bottom"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Bottom padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"left"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"8")),(0,r.mdx)("td",{parentName:"tr",align:null},"Left padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"right"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"8")),(0,r.mdx)("td",{parentName:"tr",align:null},"Right padding of legend container.")))))),(0,r.mdx)("h2",{id:"dataset-structure"},"Dataset Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"const dataset = {\n key: ,\n value: ,\n color: ,\n label: {\n display: ,\n },\n onClick: \n}\n")),(0,r.mdx)("h3",{id:"dataset-properties"},"Dataset Properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"A unique ",(0,r.mdx)("inlineCode",{parentName:"td"},"id")," to identify the dataset. Adding two datasets with the same ",(0,r.mdx)("inlineCode",{parentName:"td"},"key")," will result in an error.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"value"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Value for the slice.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLUE")),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the data points. Can be a hex value (",(0,r.mdx)("inlineCode",{parentName:"td"},"#ffffff"),") or a constant from ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Colors"},"Colors"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"{}"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#label"},"label"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking a datapoint, such as to display a popup.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"label"},(0,r.mdx)("inlineCode",{parentName:"h3"},"label")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object\n",(0,r.mdx)("strong",{parentName:"p"},"default value:")," ",(0,r.mdx)("inlineCode",{parentName:"p"},"{}")),(0,r.mdx)("p",{parentName:"li"}," Label for the dataset in the legend. If it is not provided then it will not be shown in the legend."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre"},"```json\n label: {\n display: \n }\n```\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"display"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Text to display as the label for the dataset.")))))),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(x,{mdxType:"PieChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(b,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"dataset-1"},"Dataset 1"),(0,r.mdx)(y.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"dataset-2"},"Dataset 2"),(0,r.mdx)(C.A,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"dataset-3"},"Dataset 3"),(0,r.mdx)(v.A,{mdxType:"DataObject3"})))}w.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)}}]); \ No newline at end of file diff --git a/27886-82e02c7af6d1fc9a4700.js b/27886-82e02c7af6d1fc9a4700.js new file mode 100644 index 000000000..786d25ef2 --- /dev/null +++ b/27886-82e02c7af6d1fc9a4700.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[27886],{9861:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e,t){return{bindTo:e,bindLegendTo:t,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},legendPadding:!0,removeContainerPadding:{left:2.5,right:2.5,top:2.5,bottom:2.5},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},96440:function(e,t,a){var n=a(24994);t.A=void 0;var r=n(a(96540)),l=n(a(61770)),d=n(a(45839));a(45633),a(16939);var i=n(a(9861)),o=n(a(78373)),s=n(a(97596)),u=n(a(18883)),p=d.default.deepClone((0,i.default)("#graphContainer","#legendContainer")),c=[d.default.deepClone(o.default),d.default.deepClone(s.default),d.default.deepClone(u.default)];t.A=function(){return r.default.useEffect((function(){var e=l.default.api.graph(p);c.forEach((function(t){e.loadContent(l.default.api.line(t))}))}),[]),r.default.createElement("div",{id:"graphAndLegendPaddingReduced",className:"custom-container-legend-style"},r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{className:"bindto-container"},r.default.createElement("div",{id:"legendContainer",className:"legend-bindto-container"}),r.default.createElement("div",{id:"graphContainer",className:"legend-bindto-graph-container"})),r.default.createElement("div",{id:"graphContainer"}))}},27886:function(e,t,a){a.r(t),a.d(t,{default:function(){return C}});var n=a(96540),r=a(36665),l=a(96440),d=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var s={};function u(e){var t=e.components,a=o(e,d);return(0,r.mdx)("wrapper",i({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nrequire("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer.module.scss");\nvar _generalDefaultCustomLegend = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultCustomLegend"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/General/dataset1"));\nvar _dataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/General/dataset2"));\nvar _dataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/General/dataset3"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultCustomLegend.default)(\'#graphContainer\', \'#legendContainer\'));\nvar dataset = [_utils.default.deepClone(_dataset.default), _utils.default.deepClone(_dataset2.default), _utils.default.deepClone(_dataset3.default)];\nvar GraphAndLegendPaddingReducedGeneralExample = function GraphAndLegendPaddingReducedGeneralExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.line(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement("div", {\n id: "graphAndLegendPaddingReduced",\n className: "custom-container-legend-style"\n }, /*#__PURE__*/_react.default.createElement("div", {\n id: "tooltip",\n className: "initial-tooltip"\n }), /*#__PURE__*/_react.default.createElement("div", {\n className: "bindto-container"\n }, /*#__PURE__*/_react.default.createElement("div", {\n id: "legendContainer",\n className: "legend-bindto-container"\n }), /*#__PURE__*/_react.default.createElement("div", {\n id: "graphContainer",\n className: "legend-bindto-graph-container"\n })), /*#__PURE__*/_react.default.createElement("div", {\n id: "graphContainer"\n }));\n};\nvar _default = exports.default = GraphAndLegendPaddingReducedGeneralExample;\n')))}u.isMDXComponent=!0;var p=a(201),c=a(79679),m=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(p.A,{title:t||"Graph And Legend Padding Reduced",description:a,example:n.createElement(l.A,null),exampleCssSrc:n.createElement(c.A,null),exampleSrc:n.createElement(u,null),isExpanded:r})},f=a(15423),g=a(21312),h=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var v={},x="wrapper";function C(e){var t=e.components,a=_(e,h);return(0,r.mdx)(x,b({},v,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"custom-legend-placement"},"Custom legend placement"),(0,r.mdx)("p",null,"This is timeseries line graph with reduced padding."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(m,{mdxType:"LineGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(f.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(g.A,{mdxType:"DataObject"})))}C.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/27999-54f8bc33842045a68391.js b/27999-54f8bc33842045a68391.js new file mode 100644 index 000000000..c887dafce --- /dev/null +++ b/27999-54f8bc33842045a68391.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[27999],{2043:function(e,t,a){var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),l=a(86006),i={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:l.loadPopup,values:[{x:85,y:5},{x:90,y:11},{x:92,y:12},{x:101,y:16},{x:107,y:17},{x:107,y:9},{x:135,y:11},{x:139,y:12},{x:143,y:16},{x:155,y:17},{x:161,y:28},{x:164,y:12},{x:168,y:13},{x:170,y:14}]};t.default=i},59127:function(e,t,a){var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),l=a(86006),i={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:l.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}]};t.default=i},71571:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:180},y:{show:!0,label:"Line Set A",lowerLimit:0,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},31376:function(e,t,a){var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},2453:function(e,t,a){var n=a(24994);t.A=void 0;var r=n(a(96540)),l=n(a(61770)),i=n(a(45839));a(63841);var d=n(a(29683)),p=n(a(71571)),m=n(a(2043)),o=i.default.deepClone((0,p.default)("#simpleScattergraph")),u=i.default.deepClone(m.default);t.A=function(){return r.default.useEffect((function(){l.default.api.graph(o).loadContent(l.default.api.scatter(u))}),[]),r.default.createElement(d.default,{id:"simpleScattergraph"})}},13849:function(e,t,a){var n=a(24994);t.A=void 0;var r=n(a(96540)),l=n(a(61770)),i=n(a(45839));a(63841);var d=n(a(29683)),p=n(a(31376)),m=n(a(59127)),o=i.default.deepClone((0,p.default)("#timeseriesScatterGraph")),u=i.default.deepClone(m.default);t.A=function(){return r.default.useEffect((function(){l.default.api.graph(o).loadContent(l.default.api.scatter(u))}),[]),r.default.createElement(d.default,{id:"timeseriesScatterGraph"})}},27999:function(e,t,a){a.r(t),a.d(t,{default:function(){return X}});var n=a(96540),r=a(36665),l=a(2453),i=["components"];function d(){return d=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var m={};function o(e){var t=e.components,a=p(e,i);return(0,r.mdx)("wrapper",d({},m,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _scatterDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Scatter/scatterDefault"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _scatterDefault.default)(\'#simpleScattergraph\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar SimpleScatterExample = function SimpleScatterExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.scatter(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleScattergraph"\n });\n};\nvar _default = exports.default = SimpleScatterExample;\n')))}o.isMDXComponent=!0;var u=a(201),s=a(88703),x=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(u.A,{title:t||"Simple Scatter",description:a,example:n.createElement(l.A,null),exampleCssSrc:n.createElement(s.A,null),exampleSrc:n.createElement(o,null),isExpanded:r})},c=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var h={},N="wrapper";function b(e){var t=e.components,a=f(e,c);return(0,r.mdx)(N,g({},h,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getScatterDefaultConfig = function getScatterDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 180\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: 0,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getScatterDefaultConfig;\n")))}b.isMDXComponent=!0;var y=a(87196),v=a(13849),O=["components"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var w={};function _(e){var t=e.components,a=C(e,O);return(0,r.mdx)("wrapper",S({},w,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _scatterTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Scatter/scatterTimeseries"));\nvar _dataset1timeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1timeseries"));\n/*\nPlease refer documentation below to see graphConfig and data objects.\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _scatterTimeseries.default)(\'#timeseriesScatterGraph\'));\nvar dataset = _utils.default.deepClone(_dataset1timeseries.default);\nvar TimelineScatterExample = function TimelineScatterExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.scatter(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "timeseriesScatterGraph"\n });\n};\nvar _default = exports.default = TimelineScatterExample;\n')))}_.isMDXComponent=!0;var D=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(u.A,{title:t||"Timeseries",description:a,example:n.createElement(v.A,null),exampleCssSrc:n.createElement(s.A,null),exampleSrc:n.createElement(_,null),isExpanded:r})},j=["components"];function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var q={},P="wrapper";function T(e){var t=e.components,a=L(e,j);return(0,r.mdx)(P,E({},q,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getScatterTimeseriesConfig = function getScatterTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 0, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getScatterTimeseriesConfig;\n')))}T.isMDXComponent=!0;var G=a(12712),R=["components"];function I(){return I=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var M={},k="wrapper";function X(e){var t=e.components,a=A(e,R);return(0,r.mdx)(k,I({},M,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"scatter-graph"},"Scatter Graph"),(0,r.mdx)("p",null,"A scatter plot can be used to plot datapoints of fixed size with independent x and y coordinates."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#getting-started"},"Getting Started")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#usage"},"Usage")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-structure"},"structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-properties"},"properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#values"},"values")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#label"},"label")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#legendoptions"},"legendOptions")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#regions"},"regions")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#examples"},"Examples"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#default-x-axis"},"Default")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#timeseries-x-axis"},"Timeseries"))))),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("p",null,"An instance of a scatter graph can be obtained by:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"Carbon.api.scatter(/* dataset */)\n")),(0,r.mdx)("p",null,"A scatter graph can be plotted as follows:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n\nconst graph = Carbon.api.graph(/* graph config JSON */);\ngraph.loadContent(Carbon.api.scatter(/* dataset */));\n")),(0,r.mdx)("h4",{id:"multi-scatter"},"Multi scatter"),(0,r.mdx)("p",null,"Additional instances of ",(0,r.mdx)("inlineCode",{parentName:"p"},"Carbon.api.scatter")," can be used to plot multiple datasets on the same graph:"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-javascript"},"const graph = Carbon.api.graph(/* Input JSON */);\nscatterDefault.loadContent(Carbon.api.scatter(/* dataset 1 */));\nscatterDefault.loadContent(Carbon.api.scatter(/* dataset 2 */));\nscatterDefault.loadContent(Carbon.api.scatter(/* dataset 3 */));\nscatterDefault.loadContent(Carbon.api.scatter(/* dataset 4 */));\n")),(0,r.mdx)("h2",{id:"dataset-structure"},"Dataset Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'const dataset = {\n key: ,\n values: [\n {\n x: or ,\n y: ,\n isCritical: \n },\n ],\n color: ,\n label: {\n display: ,\n },\n legendOptions:{\n showElement: \n }\n onClick: ,\n regions: [\n start: \n end: \n axis: <"y"> or <"y2">\n color: \n ],\n shape: < shape SVG >,\n yAxis: <"y"> or <"y2">,\n\n}\n')),(0,r.mdx)("h2",{id:"dataset-properties"},"Dataset Properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"A unique ",(0,r.mdx)("inlineCode",{parentName:"td"},"id")," to identify the dataset. Adding two datasets with the same ",(0,r.mdx)("inlineCode",{parentName:"td"},"key")," will result in an error.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"values"),(0,r.mdx)("td",{parentName:"tr",align:null},"array of objects"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#values"},"values"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLACK")),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the data points. Can be a hex value (",(0,r.mdx)("inlineCode",{parentName:"td"},"#ffffff"),") or a constant from ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Colors"},"Colors"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"{}"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#label"},"label"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"legendOptions"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#legendoptions"},"legendOptions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking a datapoint, such as to display a popup.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"regions"),(0,r.mdx)("td",{parentName:"tr",align:null},"array of objects"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"[]")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#regions"},"regions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"shape"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"SHAPES.DARK.CIRCLE")),(0,r.mdx)("td",{parentName:"tr",align:null},"Shape for representing the data points. Can be a constant from ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Shapes"},"shapes")," or a custom SVG.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"yAxis"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},'"y"')),(0,r.mdx)("td",{parentName:"tr",align:null},"Prop to select either the Y or Y2 axis for the dataset. Valid values are ",(0,r.mdx)("inlineCode",{parentName:"td"},"y")," or ",(0,r.mdx)("inlineCode",{parentName:"td"},"y2"),".")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"values"},(0,r.mdx)("inlineCode",{parentName:"h3"},"values")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," array of objects | ",(0,r.mdx)("inlineCode",{parentName:"p"},"required prop")),(0,r.mdx)("p",{parentName:"li"}," This is an array of objects representing the dataset.\nIt is a required prop; passing ",(0,r.mdx)("inlineCode",{parentName:"p"},"undefined")," will result in an error.\nHowever passing an empty array (",(0,r.mdx)("inlineCode",{parentName:"p"},"[]"),") will result in the graph successfully rendering without a dataset.\nEach object in the array takes the following shape:"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," {\n x: ,\n y: ,\n isCritical: \n legendOptions: \n }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"x"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Value for the x coordinate.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"y"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Value for the y coordinate.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"isCritical"),(0,r.mdx)("td",{parentName:"tr",align:null},"bool"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"false")),(0,r.mdx)("td",{parentName:"tr",align:null},"Highlights a datapoint if ",(0,r.mdx)("inlineCode",{parentName:"td"},"true"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"legendOptions"),(0,r.mdx)("td",{parentName:"tr",align:null},"bool"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"false")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#legendoptions"},"legendOptions"),".")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"label"},(0,r.mdx)("inlineCode",{parentName:"h3"},"label")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object\n",(0,r.mdx)("strong",{parentName:"p"},"default value:")," ",(0,r.mdx)("inlineCode",{parentName:"p"},"{}")),(0,r.mdx)("p",{parentName:"li"}," Label for the dataset in the legend. If it is not provided then it will not be shown in the legend."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre"},"```json\n label: {\n display: \n }\n```\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"display"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Text to display as the label for the dataset."))))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"legendoptions"},(0,r.mdx)("inlineCode",{parentName:"h3"},"legendOptions")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object\n",(0,r.mdx)("strong",{parentName:"p"},"default value:")," ",(0,r.mdx)("inlineCode",{parentName:"p"},"undefined")),(0,r.mdx)("p",{parentName:"li"}," Options for showing dataset in the legend. This prop has the following shape:"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre"},"```json\n legendOptions: {\n showElement: \n }\n```\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showElement"),(0,r.mdx)("td",{parentName:"tr",align:null},"bool"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"true")),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to hide the legend when it has no data.")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"regions"},(0,r.mdx)("inlineCode",{parentName:"h3"},"regions")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," array of objects\n",(0,r.mdx)("strong",{parentName:"p"},"default value:")," ",(0,r.mdx)("inlineCode",{parentName:"p"},"[]")),(0,r.mdx)("p",{parentName:"li"},"Each dataset can have one or more regions. ",(0,r.mdx)("inlineCode",{parentName:"p"},"start")," and ",(0,r.mdx)("inlineCode",{parentName:"p"},"end")," is necessary for rendering a horizontal area."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"},"legendOptions: {\n showElement: \n}\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Expected"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"start"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"Start of the region.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"end"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"End of the region.")))))),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)("h3",{id:"default-x-axis"},"Default X-axis"),(0,r.mdx)(x,{mdxType:"ScatterGraphDefault"}),(0,r.mdx)("h3",{id:"timeseries-x-axis"},"Timeseries X-axis"),(0,r.mdx)(D,{mdxType:"ScatterGraphTimeseries"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Example Data")),(0,r.mdx)("h3",{id:"graph-config-default-axis"},"Graph Config Default Axis"),(0,r.mdx)(b,{mdxType:"GraphConfigDefault"}),(0,r.mdx)("h3",{id:"graph-config-timeseries"},"Graph Config Timeseries"),(0,r.mdx)(T,{mdxType:"GraphTimeseriesConfig"}),(0,r.mdx)("h3",{id:"dataset1"},(0,r.mdx)("inlineCode",{parentName:"h3"},"dataset1")),(0,r.mdx)(y.A,{mdxType:"DataObject1"}),(0,r.mdx)("h3",{id:"dataset1timeseries"},(0,r.mdx)("inlineCode",{parentName:"h3"},"dataset1timeseries")),(0,r.mdx)(G.A,{mdxType:"DataObjectTimeseries1"})))}X.isMDXComponent=!0},87196:function(e,t,a){a.d(t,{A:function(){return m}});a(96540);var n=a(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var d={},p="wrapper";function m(e){var t=e.components,a=i(e,r);return(0,n.mdx)(p,l({},d,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n onClick: _popup.loadPopup,\n values: [{\n x: 85,\n y: 5\n }, {\n x: 90,\n y: 11\n }, {\n x: 92,\n y: 12\n }, {\n x: 101,\n y: 16\n }, {\n x: 107,\n y: 17\n }, {\n x: 107,\n y: 9\n }, {\n x: 135,\n y: 11\n }, {\n x: 139,\n y: 12\n }, {\n x: 143,\n y: 16\n }, {\n x: 155,\n y: 17\n }, {\n x: 161,\n y: 28\n }, {\n x: 164,\n y: 12\n }, {\n x: 168,\n y: 13\n }, {\n x: 170,\n y: 14\n }]\n};\nvar _default = exports.default = data;\n')))}m.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/28654-1b68b787675074f0f0de.css b/28654-1b68b787675074f0f0de.css new file mode 100644 index 000000000..dd070632f --- /dev/null +++ b/28654-1b68b787675074f0f0de.css @@ -0,0 +1 @@ +:root{--default-transition-timing: cubic-bezier(0.07, 0.95, 0, 1);--default-transition-duration: 1s}:root{--terra-graphs-white: #fff;--terra-graphs-dark: #1c1f21;--terra-graphs-grey5: #f4f4f4;--terra-graphs-grey10: #e8e9ea;--terra-graphs-grey15: #dedfe0;--terra-graphs-grey25: #c8cacb;--terra-graphs-grey30: #bcbfc0;--terra-graphs-grey45: #9b9fa1;--terra-graphs-grey65: #6f7477;--terra-graphs-blue100: #004c76;--terra-graphs-blue30: #a6d9f4;--terra-graphs-blue10: #ebf6fd;--terra-graphs-red85: #c00;--terra-graphs-yellow60: #ffc20a;--terra-graphs-grey55: #868a8c}.carbon-data-pair--selected{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:1;visibility:visible}[dir] .carbon-data-pair--selected{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-paired-point[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}.carbon-paired-line{fill:none;stroke:#1c1f21;stroke:var(--terra-graphs-dark);stroke-width:1px}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-paired-line[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)} diff --git a/28654-1b68b787675074f0f0de.js b/28654-1b68b787675074f0f0de.js new file mode 100644 index 000000000..04e5b5182 --- /dev/null +++ b/28654-1b68b787675074f0f0de.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[28654],{92663:function(e,r,t){var a=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(t(61770)),l=t(86006),i={key:"paired_result_dataset",graphType:"Paired Result",label:{high:{display:"Paired Result High"},mid:{display:"Paired Result Median"},low:{display:"Paired Result Low"}},yAxis:"y2",shape:{high:n.default.helpers.SHAPES.DARK.TEAR_ALT,mid:n.default.helpers.SHAPES.DARK.RHOMBUS,low:n.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:n.default.helpers.COLORS.BLACK,mid:n.default.helpers.COLORS.BLACK,low:n.default.helpers.COLORS.BLACK},onClick:l.loadPopup,values:[{high:{x:45,y:200},mid:{x:45,y:146},low:{x:45,y:75}},{high:{x:160,y:110},mid:{x:160,y:70},low:{x:160,y:30}},{high:{x:220,y:110},mid:{x:220,y:70},low:{x:220,y:30}}]};r.default=i},73309:function(e,r,t){var a=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(t(61770)),l=t(86006),i={key:"scatter_dataset",graphType:"Scatter",label:{display:"Scatter Data Label"},shape:n.default.helpers.SHAPES.DARK.RHOMBUS,color:n.default.helpers.COLORS.BLUE,onClick:l.loadPopup,values:new Array(50).fill("").map((function(e,r){return{y:5*Math.sin(r)+10,x:10+5*r}}))};r.default=i},59835:function(e,r,t){var a=t(24994);r.A=void 0;var n=a(t(96540)),l=a(t(61770)),i=a(t(45839));t(45633),t(63841);var o=a(t(29683)),p=a(t(65321)),s=a(t(73309)),u=a(t(92663)),d=i.default.deepClone((0,p.default)("#pairedResultWithScatter")),c=[i.default.deepClone(s.default),i.default.deepClone(u.default)];r.A=function(){return n.default.useEffect((function(){var e=l.default.api.graph(d);e.loadContent(l.default.api.scatter(c[0])),e.loadContent(l.default.api.pairedResult(c[1]))}),[]),n.default.createElement(o.default,{id:"pairedResultWithScatter"})}},5889:function(e,r,t){t.r(r),t.d(r,{default:function(){return j}});var a=t(96540),n=t(36665),l=t(59835),i=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var s={};function u(e){var r=e.components,t=p(e,i);return(0,n.mdx)("wrapper",o({},s,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineAndPairedResultConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Combination/lineAndPairedResultConfig"));\nvar _scatterDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/scatterDataset"));\nvar _pairedResultDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/pairedResultDataset"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _lineAndPairedResultConfig.default)(\'#pairedResultWithScatter\'));\nvar dataset = [_utils.default.deepClone(_scatterDataset.default), _utils.default.deepClone(_pairedResultDataset.default)];\nvar PairedResultWithScatterCombinationExample = function PairedResultWithScatterCombinationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.scatter(dataset[0]));\n graph.loadContent(_carbonGraphs.default.api.pairedResult(dataset[1]));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "pairedResultWithScatter"\n });\n};\nvar _default = exports.default = PairedResultWithScatterCombinationExample;\n')))}u.isMDXComponent=!0;var d=t(201),c=t(79679),f=function(e){var r=e.title,t=e.description,n=e.isExpanded;return a.createElement(d.A,{title:r||"Paired Result With Scatter",description:t,example:a.createElement(l.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:n})},h=t(41567),m=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var x={},g="wrapper";function v(e){var r=e.components,t=y(e,m);return(0,n.mdx)(g,b({},x,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'scatter_dataset\',\n graphType: \'Scatter\',\n label: {\n display: \'Scatter Data Label\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n values: new Array(50).fill(\'\').map(function (_, i) {\n return {\n y: Math.sin(i) * 5 + 10,\n x: 10 + i * 5\n };\n })\n};\nvar _default = exports.default = data;\n')))}v.isMDXComponent=!0;var O=t(59224),_=["components"];function R(){return R=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}t(27647);var S={},P="wrapper";function j(e){var r=e.components,t=C(e,_);return(0,n.mdx)(P,R({},S,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"paired-result-with-scatter"},"Paired result With Scatter"),(0,n.mdx)("p",null,"This is a simple Paired result Graph combined with Scatter."),(0,n.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"Install with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,n.mdx)("h2",{id:"usage"},"Usage"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,n.mdx)("h2",{id:"example"},"Example"),(0,n.mdx)(f,{mdxType:"CombinationGraph"}),(0,n.mdx)("details",null,(0,n.mdx)("summary",{style:{fontSize:24}},(0,n.mdx)("b",null,"Data")),(0,n.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,n.mdx)(h.A,{mdxType:"GraphConfig"}),(0,n.mdx)("h3",{id:"data-object"},"Data object"),(0,n.mdx)("h4",{id:"scatter-dataset"},"Scatter Dataset"),(0,n.mdx)(v,{mdxType:"DataObject1"}),(0,n.mdx)("h4",{id:"paired-result-dataset"},"Paired Result Dataset"),(0,n.mdx)(O.A,{mdxType:"DataObject2"})))}j.isMDXComponent=!0},59224:function(e,r,t){t.d(r,{A:function(){return s}});t(96540);var a=t(36665),n=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var o={},p="wrapper";function s(e){var r=e.components,t=i(e,n);return(0,a.mdx)(p,l({},o,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'paired_result_dataset',\n graphType: 'Paired Result',\n label: {\n high: {\n display: 'Paired Result High'\n },\n mid: {\n display: 'Paired Result Median'\n },\n low: {\n display: 'Paired Result Low'\n }\n },\n yAxis: 'y2',\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.BLACK,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n values: [{\n high: {\n x: 45,\n y: 200\n },\n mid: {\n x: 45,\n y: 146\n },\n low: {\n x: 45,\n y: 75\n }\n }, {\n high: {\n x: 160,\n y: 110\n },\n mid: {\n x: 160,\n y: 70\n },\n low: {\n x: 160,\n y: 30\n }\n }, {\n high: {\n x: 220,\n y: 110\n },\n mid: {\n x: 220,\n y: 70\n },\n low: {\n x: 220,\n y: 30\n }\n }]\n};\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/28909-a493e6ce8e3a3cc43ce6.js b/28909-a493e6ce8e3a3cc43ce6.js new file mode 100644 index 000000000..c6658fff8 --- /dev/null +++ b/28909-a493e6ce8e3a3cc43ce6.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[28909],{54357:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:"#legendContainer",dimension:{height:300},showLegend:!0}}},79882:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(96540)),i=a(n(61770)),l=a(n(45839));n(63031);var o=a(n(29683)),d=a(n(54357)),s=a(n(95877)),u=a(n(15100)),p=a(n(36387)),c=l.default.deepClone((0,d.default)("#graphContainer")),m=[l.default.deepClone(s.default),l.default.deepClone(u.default),l.default.deepClone(p.default)];t.A=function(){return r.default.useEffect((function(){var e=i.default.api.pie(c);m.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{className:"bindto-container"},r.default.createElement("div",{id:"legendContainer",className:"legend-bindto-container"}),r.default.createElement("div",{id:"graphContainer",className:"legend-bindto-graph-container"})),r.default.createElement(o.default,{id:"pieGraphContainer"}))}},28909:function(e,t,n){n.r(t),n.d(t,{default:function(){return w}});var a=n(96540),r=n(36665),i=n(79882),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={};function u(e){var t=e.components,n=d(e,l);return(0,r.mdx)("wrapper",o({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Pie/PieChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _customLegendPlacementConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Pie/customLegendPlacementConfig"));\nvar _simplePieDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Pie/simplePieDataset1"));\nvar _simplePieDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Pie/simplePieDataset2"));\nvar _simplePieDataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Pie/simplePieDataset3"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _customLegendPlacementConfig.default)(\'#graphContainer\'));\nvar dataset = [_utils.default.deepClone(_simplePieDataset.default), _utils.default.deepClone(_simplePieDataset2.default), _utils.default.deepClone(_simplePieDataset3.default)];\nvar CustomLegendPlacementPieExample = function CustomLegendPlacementPieExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.pie(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {\n className: "bindto-container"\n }, /*#__PURE__*/_react.default.createElement("div", {\n id: "legendContainer",\n className: "legend-bindto-container"\n }), /*#__PURE__*/_react.default.createElement("div", {\n id: "graphContainer",\n className: "legend-bindto-graph-container"\n })), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "pieGraphContainer"\n }));\n};\nvar _default = exports.default = CustomLegendPlacementPieExample;\n')))}u.isMDXComponent=!0;var p=n(201),c=n(10083),m=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(p.A,{title:t||"Custom Legend Placement",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},f=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b={},x="wrapper";function v(e){var t=e.components,n=h(e,f);return(0,r.mdx)(x,g({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar getPieConfig = function getPieConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: \'#legendContainer\',\n dimension: {\n height: 300\n },\n showLegend: true\n };\n};\nvar _default = exports.default = getPieConfig;\n')))}v.isMDXComponent=!0;var _=n(1254),C=n(60685),P=n(50580),y=["components"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var E={},D="wrapper";function w(e){var t=e.components,n=j(e,y);return(0,r.mdx)(D,O({},E,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("p",null,"require('details-polyfill')"),(0,r.mdx)("h1",{id:"simple-pie"},"Simple Pie"),(0,r.mdx)("p",null,"This is a simple Pie chart with custom legend placement."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(m,{mdxType:"PieChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(v,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-objects"},"Data objects"),(0,r.mdx)("h4",{id:"dataset-1"},"Dataset 1"),(0,r.mdx)(_.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"dataset-2"},"Dataset 2"),(0,r.mdx)(C.A,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"dataset-3"},"Dataset 3"),(0,r.mdx)(P.A,{mdxType:"DataObject3"})))}w.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/28925-6d4047020e539cad078c.css b/28925-6d4047020e539cad078c.css new file mode 100644 index 000000000..dd070632f --- /dev/null +++ b/28925-6d4047020e539cad078c.css @@ -0,0 +1 @@ +:root{--default-transition-timing: cubic-bezier(0.07, 0.95, 0, 1);--default-transition-duration: 1s}:root{--terra-graphs-white: #fff;--terra-graphs-dark: #1c1f21;--terra-graphs-grey5: #f4f4f4;--terra-graphs-grey10: #e8e9ea;--terra-graphs-grey15: #dedfe0;--terra-graphs-grey25: #c8cacb;--terra-graphs-grey30: #bcbfc0;--terra-graphs-grey45: #9b9fa1;--terra-graphs-grey65: #6f7477;--terra-graphs-blue100: #004c76;--terra-graphs-blue30: #a6d9f4;--terra-graphs-blue10: #ebf6fd;--terra-graphs-red85: #c00;--terra-graphs-yellow60: #ffc20a;--terra-graphs-grey55: #868a8c}.carbon-data-pair--selected{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:1;visibility:visible}[dir] .carbon-data-pair--selected{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-paired-point[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)}.carbon-paired-line{fill:none;stroke:#1c1f21;stroke:var(--terra-graphs-dark);stroke-width:1px}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-paired-line[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)} diff --git a/28925-6d4047020e539cad078c.js b/28925-6d4047020e539cad078c.js new file mode 100644 index 000000000..8b8a07bb1 --- /dev/null +++ b/28925-6d4047020e539cad078c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[28925],{21016:function(e,n,r){var a=r(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=a(r(61770)),i=r(86006),l={key:"identical_region_line_dataset",graphType:"Line",label:{display:"Line Data Label"},shape:t.default.helpers.SHAPES.DARK.RHOMBUS,color:t.default.helpers.COLORS.BLUE,onClick:i.loadPopup,values:new Array(50).fill("").map((function(e,n){return{y:5*Math.sin(n)+10,x:10+5*n}})),regions:[{axis:"y",start:120,end:180,color:"#c8cacb"}]};n.default=l},4482:function(e,n,r){var a=r(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var t=a(r(61770)),i=r(86006),l={key:"identical_region_paired_result_dataset",graphType:"Paired Result",label:{high:{display:"Paired Result High"},mid:{display:"Paired Result Median"},low:{display:"Paired Result Low"}},yAxis:"y",shape:{high:t.default.helpers.SHAPES.DARK.TEAR_ALT,mid:t.default.helpers.SHAPES.DARK.RHOMBUS,low:t.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:t.default.helpers.COLORS.BLACK,mid:t.default.helpers.COLORS.BLACK,low:t.default.helpers.COLORS.BLACK},onClick:i.loadPopup,values:[{high:{x:45,y:200},mid:{x:45,y:146},low:{x:45,y:75}},{high:{x:160,y:110},mid:{x:160,y:70},low:{x:160,y:30}},{high:{x:220,y:110},mid:{x:220,y:70},low:{x:220,y:30}}],regions:{high:[{axis:"y",start:120,end:180,color:"#c8cacb"}],mid:[{axis:"y",start:120,end:180,color:"#c8cacb"}],low:[{axis:"y",start:120,end:180,color:"#c8cacb"}]}};n.default=l},73763:function(e,n,r){var a=r(24994);n.A=void 0;var t=a(r(96540)),i=a(r(61770)),l=a(r(45839));r(45633),r(63841);var o=a(r(29683)),s=a(r(65321)),p=a(r(21016)),u=a(r(4482)),d=l.default.deepClone((0,s.default)("#lineWithPairedResultRegion")),c=[l.default.deepClone(p.default),l.default.deepClone(u.default)];n.A=function(){return t.default.useEffect((function(){var e=i.default.api.graph(d);e.loadContent(i.default.api.line(c[0])),e.loadContent(i.default.api.pairedResult(c[1]))}),[]),t.default.createElement(o.default,{id:"lineWithPairedResultRegion"})}},72636:function(e,n,r){r.r(n),r.d(n,{default:function(){return L}});var a=r(96540),t=r(36665),i=r(73763),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(t[r]=e[r]);return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}var p={};function u(e){var n=e.components,r=s(e,l);return(0,t.mdx)("wrapper",o({},p,r,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineAndPairedResultConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Combination/lineAndPairedResultConfig"));\nvar _lineIdenticalRegionDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/lineIdenticalRegionDataset"));\nvar _pairedResultIdenticalRegionDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Combination/pairedResultIdenticalRegionDataset"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _lineAndPairedResultConfig.default)(\'#lineWithPairedResultRegion\'));\nvar dataset = [_utils.default.deepClone(_lineIdenticalRegionDataset.default), _utils.default.deepClone(_pairedResultIdenticalRegionDataset.default)];\nvar LineWithPairedResultRegionCombinationExample = function LineWithPairedResultRegionCombinationExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset[0]));\n graph.loadContent(_carbonGraphs.default.api.pairedResult(dataset[1]));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "lineWithPairedResultRegion"\n });\n};\nvar _default = exports.default = LineWithPairedResultRegionCombinationExample;\n')))}u.isMDXComponent=!0;var d=r(201),c=r(79679),f=function(e){var n=e.title,r=e.description,t=e.isExpanded;return a.createElement(d.A,{title:n||"Dataset Region Identical",description:r,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:t})},h=r(41567),m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(t[r]=e[r]);return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}var y={},x="wrapper";function v(e){var n=e.components,r=b(e,m);return(0,t.mdx)(x,g({},y,r,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'identical_region_line_dataset',\n graphType: 'Line',\n label: {\n display: 'Line Data Label'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n values: new Array(50).fill('').map(function (_, i) {\n return {\n y: Math.sin(i) * 5 + 10,\n x: 10 + i * 5\n };\n }),\n regions: [{\n axis: 'y',\n start: 120,\n end: 180,\n color: '#c8cacb'\n }]\n};\nvar _default = exports.default = data;\n")))}v.isMDXComponent=!0;var R=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(t[r]=e[r]);return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}var C={},P="wrapper";function j(e){var n=e.components,r=O(e,R);return(0,t.mdx)(P,_({},C,r,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'identical_region_paired_result_dataset',\n graphType: 'Paired Result',\n label: {\n high: {\n display: 'Paired Result High'\n },\n mid: {\n display: 'Paired Result Median'\n },\n low: {\n display: 'Paired Result Low'\n }\n },\n yAxis: 'y',\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.BLACK,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n values: [{\n high: {\n x: 45,\n y: 200\n },\n mid: {\n x: 45,\n y: 146\n },\n low: {\n x: 45,\n y: 75\n }\n }, {\n high: {\n x: 160,\n y: 110\n },\n mid: {\n x: 160,\n y: 70\n },\n low: {\n x: 160,\n y: 30\n }\n }, {\n high: {\n x: 220,\n y: 110\n },\n mid: {\n x: 220,\n y: 70\n },\n low: {\n x: 220,\n y: 30\n }\n }],\n regions: {\n high: [{\n axis: 'y',\n start: 120,\n end: 180,\n color: '#c8cacb'\n }],\n mid: [{\n axis: 'y',\n start: 120,\n end: 180,\n color: '#c8cacb'\n }],\n low: [{\n axis: 'y',\n start: 120,\n end: 180,\n color: '#c8cacb'\n }]\n }\n};\nvar _default = exports.default = data;\n")))}j.isMDXComponent=!0;var D=["components"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(t[r]=e[r]);return t}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}r(27647);var S={},E="wrapper";function L(e){var n=e.components,r=A(e,D);return(0,t.mdx)(E,w({},S,r,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("h1",{id:"dataset-region-identical"},"Dataset Region Identical"),(0,t.mdx)("p",null,"This is a combination graph associated with identical regions."),(0,t.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,t.mdx)("ul",null,(0,t.mdx)("li",{parentName:"ul"},"Install with ",(0,t.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,t.mdx)("ul",{parentName:"li"},(0,t.mdx)("li",{parentName:"ul"},(0,t.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,t.mdx)("h2",{id:"usage"},"Usage"),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,t.mdx)("h2",{id:"example"},"Example"),(0,t.mdx)(f,{mdxType:"CombinationGraph"}),(0,t.mdx)("details",null,(0,t.mdx)("summary",{style:{fontSize:24}},(0,t.mdx)("b",null,"Data")),(0,t.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,t.mdx)(h.A,{mdxType:"GraphConfig"}),(0,t.mdx)("h3",{id:"data-object"},"Data object"),(0,t.mdx)("h4",{id:"line-dataset"},"Line Dataset"),(0,t.mdx)(v,{mdxType:"DataObject1"}),(0,t.mdx)("h4",{id:"paired-result-dataset"},"Paired Result Dataset"),(0,t.mdx)(j,{mdxType:"DataObject2"})))}L.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/30163-1438969d20253bb2baa9.js b/30163-1438969d20253bb2baa9.js new file mode 100644 index 000000000..e3cacbd73 --- /dev/null +++ b/30163-1438969d20253bb2baa9.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[30163],{26045:function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,15,59).toISOString()}},showLabel:!0,showLegend:!0}}},1640:function(e,n,t){var a=t(24994);n.A=void 0;var r=a(t(96540)),l=a(t(61770)),d=a(t(45839));t(3929);var m=a(t(29683)),i=a(t(26045)),p=a(t(28369)),o=a(t(53688)),u=d.default.deepClone((0,i.default)("#simpleTimelineGraph")),x=[d.default.deepClone(p.default),d.default.deepClone(o.default)];n.A=function(){return r.default.useEffect((function(){var e=l.default.api.timeline(u);x.forEach((function(n){e.loadContent(n)}))}),[]),r.default.createElement(m.default,{id:"simpleTimelineGraph"})}},30163:function(e,n,t){t.r(n),t.d(n,{default:function(){return v}});var a=t(96540),r=t(36665),l=t(1640),d=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p={};function o(e){var n=e.components,t=i(e,d);return(0,r.mdx)("wrapper",m({},p,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Timeline/Timeline.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timelineDefaultConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Timeline/timelineDefaultConfig"));\nvar _defaultDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/defaultDataset1.js"));\nvar _defaultDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/defaultDataset2.js"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timelineDefaultConfig.default)(\'#simpleTimelineGraph\'));\nvar dataset = [_utils.default.deepClone(_defaultDataset.default), _utils.default.deepClone(_defaultDataset2.default)];\nvar SimpleTimelineExample = function SimpleTimelineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.timeline(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleTimelineGraph"\n });\n};\nvar _default = exports.default = SimpleTimelineExample;\n')))}o.isMDXComponent=!0;var u=t(201),x=t(94597),s=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(u.A,{title:n||"Simple Timeline",description:t,example:a.createElement(l.A,null),exampleCssSrc:a.createElement(x.A,null),exampleSrc:a.createElement(o,null),isExpanded:r})},g=t(70750),N=t(3685),c=t(33721),h=["components"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var y={},C="wrapper";function v(e){var n=e.components,t=b(e,h);return(0,r.mdx)(C,f({},y,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"timeline-graph"},"Timeline Graph"),(0,r.mdx)("p",null,"A single-axis horizontal graph with plottable datapoints."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#getting-started"},"Getting Started")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#usage"},"Usage")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-structure"},"Config Structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-properties"},"Config properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#axis"},"axis")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#legendpadding"},"legendPadding")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-structure"},"Dataset Structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-properties"},"Dataset Properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#values"},"values")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#label"},"label")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#example"},"Example"))),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("p",null,"An instance of a timeline graph can be accessed though the ",(0,r.mdx)("inlineCode",{parentName:"p"},"Carbon.api.timeline()")," function.\nUnlike most of the other graphs, the timeline api does not need an instance of ",(0,r.mdx)("inlineCode",{parentName:"p"},"Carbon.api.graph"),".\nInstead, the graph configuration is directly passed as a parameter to the timeline instance,\nwith the dataset object also directly passed to the ",(0,r.mdx)("inlineCode",{parentName:"p"},"loadContent")," function.\nTherefore, the timeline graph can not be combined with other graphs."),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n\nvar timelineGraph = Carbon.api.timeline(/* config object */);\ntimelineGraph.loadContent(/* dataset */);\n\n// Multiple datasets can be added:\ntimelineGraph.loadContent(/* dataset1 */);\ntimelineGraph.loadContent(/* dataset2 */);\n")),(0,r.mdx)("h2",{id:"configuration-structure"},"Configuration Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"const timelineConfig = {\n axis: {\n x: {\n label: ,\n lowerLimit: or ,\n upperLimit: \n }\n },\n bindTo: ,\n bindLegendTo: ,\n legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n locale: ,\n padding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n pan: {\n enabled: \n },\n removeContainerPadding: ,\n showLabel: ,\n showLegend: ,\n throttle: \n}\n")),(0,r.mdx)("h2",{id:"configurationproperties"},"ConfigurationProperties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"axis"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#axis"},"axis"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bindTo"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"DOM ID to bind the graph container to.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bindLegendTo"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"null"),(0,r.mdx)("td",{parentName:"tr",align:null},"ID of custom container to bind legend to (Example: ",(0,r.mdx)("inlineCode",{parentName:"td"},'"#legendContainer"'),").")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"legendPadding"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ top: 4, bottom: 4, left: 8, right: 8 }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#legendpadding"},"legendPadding"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"locale"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"LOCALE.en_US"),(0,r.mdx)("td",{parentName:"tr",align:null},"Locale object for X-Axis tick values. See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Locale"},"Locale"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"padding"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ top: 10, bottom: 10, left: 30, right: 50 }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Padding"},"Padding"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"pan"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{enabled: false}")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Panning"},"Panning"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"removeContainerPadding"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"false"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to remove top and bottom padding of the container for the graph.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showLabel"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"true"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to show X axis label.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showLegend"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"true"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to show graph legend.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"throttle"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"(1000/60) => time in ms"),(0,r.mdx)("td",{parentName:"tr",align:null},"Re-render delay afer resizing of a browser window.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"axis"},(0,r.mdx)("inlineCode",{parentName:"h3"},"axis")),(0,r.mdx)("strong",{parentName:"li"},"type:")," object")),(0,r.mdx)("p",null,"Timeline is marked only on ",(0,r.mdx)("inlineCode",{parentName:"p"},"X Axis"),", there is no other axis supplied. Axis is set to ",(0,r.mdx)("inlineCode",{parentName:"p"},"show")," by default."),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"lowerLimit"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Lower bound for X axis. This is inclusive.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"upperLimit"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Upper bound for X axis. This is inclusive.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Axis label value.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"legendpadding"},(0,r.mdx)("inlineCode",{parentName:"h3"},"legendPadding")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"}," Sets the legend padding and removes the carbon default margin of ",(0,r.mdx)("inlineCode",{parentName:"p"},"8px")," around legend."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n }\n")))),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"top"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Top padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bottom"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Bottom padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"left"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"8")),(0,r.mdx)("td",{parentName:"tr",align:null},"Left padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"right"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"8")),(0,r.mdx)("td",{parentName:"tr",align:null},"Right padding of legend container.")))),(0,r.mdx)("h2",{id:"dataset-structure"},"Dataset Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'const dataset = {\n key: ,\n values: [\n {\n x: ,\n y: ,\n isCritical: \n },\n ],\n color: ,\n label: {\n display: ,\n },\n legendOptions:{\n showElement: \n }\n onClick: ,\n regions: [\n start: \n end: \n axis: <"y" or "y2">\n color: \n ],\n shape: < shape SVG >,\n yAxis: <"y" or "y2">,\n\n}\n')),(0,r.mdx)("h3",{id:"dataset-properties"},"Dataset Properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"A unique ",(0,r.mdx)("inlineCode",{parentName:"td"},"id")," to identify the dataset. Adding two datasets with the same ",(0,r.mdx)("inlineCode",{parentName:"td"},"key")," will result in an error.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"values"),(0,r.mdx)("td",{parentName:"tr",align:null},"array of objects"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#values"},"Values"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLACK")),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the data points. Can be a hex value (",(0,r.mdx)("inlineCode",{parentName:"td"},"#ffffff"),") or a constant from ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/colors"},"Colors"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"{}"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#label"},"label"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking a datapoint, such as to display a popup.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"shape"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"SHAPES.DARK.CIRCLE")),(0,r.mdx)("td",{parentName:"tr",align:null},"Shape for representing the data points. Can be a constant from ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Shapes"},"shapes")," or a custom SVG.")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"values"},(0,r.mdx)("inlineCode",{parentName:"h3"},"values")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," array of objects | ",(0,r.mdx)("inlineCode",{parentName:"p"},"required prop")),(0,r.mdx)("p",{parentName:"li"}," This is an array of objects representing the dataset.\nIt is a required prop; passing ",(0,r.mdx)("inlineCode",{parentName:"p"},"undefined")," will result in an error.\nHowever passing an empty array (",(0,r.mdx)("inlineCode",{parentName:"p"},"[]"),") will result in the graph successfully rendering without a dataset.\nEach object in the array takes the following shape:"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," {\n x: ,\n isCritical: \n }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"x"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Value for the x coordinate.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"isCritical"),(0,r.mdx)("td",{parentName:"tr",align:null},"bool"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"false")),(0,r.mdx)("td",{parentName:"tr",align:null},"Highlights a datapoint if ",(0,r.mdx)("inlineCode",{parentName:"td"},"true"),".")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"label"},(0,r.mdx)("inlineCode",{parentName:"h3"},"label")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object\n",(0,r.mdx)("strong",{parentName:"p"},"default value:")," ",(0,r.mdx)("inlineCode",{parentName:"p"},"{}")),(0,r.mdx)("p",{parentName:"li"}," Label for the dataset in the legend. If it is not provided then it will not be shown in the legend."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre"},"```json\n label: {\n display: \n }\n```\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"display"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Text to display as the label for the dataset.")))))),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(s,{mdxType:"Timeline"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(g.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"timeline-a-dataset"},"Timeline A Dataset"),(0,r.mdx)(N.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"timeline-b-dataset"},"Timeline B Dataset"),(0,r.mdx)(c.A,{mdxType:"DataObject2"})))}v.isMDXComponent=!0},70750:function(e,n,t){t.d(n,{A:function(){return p}});t(96540);var a=t(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var m={},i="wrapper";function p(e){var n=e.components,t=d(e,r);return(0,a.mdx)(i,l({},m,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar getTimelineConfig = function getTimelineConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 15, 59).toISOString()\n }\n },\n showLabel: true,\n showLegend: true\n };\n};\nvar _default = exports.default = getTimelineConfig;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/31061-ee637aaf8bb8135b8973.js b/31061-ee637aaf8bb8135b8973.js new file mode 100644 index 000000000..d2e5c867f --- /dev/null +++ b/31061-ee637aaf8bb8135b8973.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[31061],{20448:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(86006),o={key:"bubble_color_dataset",label:{display:"Amount"},palette:n(a(61770)).default.helpers.BUBBLE.PALETTE.GREEN,onClick:r.loadBubblePopup,values:[{x:new Date(2016,0,1,11,0).toISOString(),y:60},{x:new Date(2016,0,1,9,0).toISOString(),y:75},{x:new Date(2016,0,1,19,30).toISOString(),y:165},{x:new Date(2016,0,1,15,0).toISOString(),y:120}],yAxis:"y"};t.default=o},63440:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(86006),o={key:"bubble_color_weight_dataset",label:{display:"Amount"},palette:n(a(61770)).default.helpers.BUBBLE.PALETTE.ORANGE,onClick:r.loadBubblePopup,weight:{min:40,max:450},values:[{x:new Date(2016,0,1,11,0).toISOString(),y:60,weight:70},{x:new Date(2016,0,1,9,0).toISOString(),y:75,weight:180},{x:new Date(2016,0,1,19,30).toISOString(),y:165,weight:220},{x:new Date(2016,0,1,15,0).toISOString(),y:120,weight:340}],yAxis:"y"};t.default=o},29855:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(86006),o={key:"bubble_weight_based_dataset",label:{display:"Amount"},color:n(a(61770)).default.helpers.COLORS.BLUE,onClick:r.loadBubblePopup,weight:{min:40,max:450},values:[{x:new Date(2016,0,1,11,0).toISOString(),y:60,weight:70},{x:new Date(2016,0,1,9,0).toISOString(),y:75,weight:180},{x:new Date(2016,0,1,19,30).toISOString(),y:165,weight:220},{x:new Date(2016,0,1,15,0).toISOString(),y:120,weight:340}],yAxis:"y"};t.default=o},85179:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Bubble",lowerLimit:10,upperLimit:250}}}}},86006:function(e,t,a){"use strict";var n=a(24994),r=a(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=n(a(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var a=u(t);if(a&&a.has(e))return a.get(e);var n={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(n,l,i):n[l]=e[l]}return n.default=e,a&&a.set(e,n),n}(a(37332)),i=n(a(22639)),p=n(a(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(u=function(e){return e?a:t})(e)}var s=function(e){return new Date(e).toLocaleString()},d=function(e){return e?c(e)?s(e):e:null},c=function(e){return e instanceof Date},f=function(e,t,a){var n=e.append("g").classed("popup-item",!0);n.append("label").classed("popup-label",!0).text(t),n.append("g").classed("popup-text",!0).text(a)},b=function(e,t,a){var n=e.append("g").classed("popup-item",!0);n.append("label").classed("popup-label",!0).text(t);for(var r=n.append("g").classed("section",!0),l=function(){var e=p[i],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var a=(0,o.default)(e,2),n=a[0],r=a[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(n.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(a);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),b(n,"Tasks",p)}if(o&&o.length>0){var u=[];o.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),b(n,"Activities",u)}if(l&&l.length>0){var s=[];l.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),b(n,"Events",s)}if(i&&i.length>0){var d=[];i.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),b(n,"Actions",d)}},t.loadTaskPopup=function(e,t,a,n){g();var r=m(e).append("g"),o=n.label,l=n.display,i=n.y,p=n.startDate,u=n.endDate,d=n.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",s(p)),f(r,"End Date",s(u)),d&&f(r,"Percentage",d)},t.loadDatelinePopup=function(e,t){g();var a=m(e).append("g"),n=t.label,r=t.value;n&&f(a,"Milestone",n.display),f(a,"Date",s(r))},t.loadTimelinePopup=function(e,t,a,n){g();var r=m(e).append("g"),o=n.x,l=(n.y,n.label),i=n.content;f(r,"X axis","".concat(c(o)?s(o):o)),f(r,"".concat(l.display),i)},t.loadPiePopup=function(e,t,a,n){g();var r=m(e).append("g"),o=n.label,l=n.value;f(r,o.display,l)}},29683:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(96540)),o=n(a(5556));a(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;t.default=i},43632:function(e,t,a){"use strict";var n=a(24994);t.A=void 0;var r=n(a(96540)),o=n(a(61770)),l=n(a(45839)),i=n(a(29683)),p=n(a(85179)),u=n(a(20448)),s=l.default.deepClone((0,p.default)("#colorBasedBubbleGraph")),d=l.default.deepClone(u.default);t.A=function(){return r.default.useEffect((function(){o.default.api.graph(s).loadContent(o.default.api.bubbleSingleDataset(d))}),[]),r.default.createElement(i.default,{id:"colorBasedBubbleGraph"})}},84213:function(e,t,a){"use strict";var n=a(24994);t.A=void 0;var r=n(a(96540)),o=n(a(61770)),l=n(a(45839)),i=n(a(29683)),p=n(a(85179)),u=n(a(29855)),s=l.default.deepClone((0,p.default)("#weightBasedBubbleGraph")),d=l.default.deepClone(u.default);t.A=function(){return r.default.useEffect((function(){o.default.api.graph(s).loadContent(o.default.api.bubbleSingleDataset(d))}),[]),r.default.createElement(i.default,{id:"weightBasedBubbleGraph"})}},96655:function(e,t,a){"use strict";var n=a(24994);t.A=void 0;var r=n(a(96540)),o=n(a(61770)),l=n(a(45839)),i=n(a(29683)),p=n(a(85179)),u=n(a(63440)),s=l.default.deepClone((0,p.default)("#weightColorBasedBubbleGraph")),d=l.default.deepClone(u.default);t.A=function(){return r.default.useEffect((function(){o.default.api.graph(s).loadContent(o.default.api.bubbleSingleDataset(d))}),[]),r.default.createElement(i.default,{id:"weightColorBasedBubbleGraph"})}},31061:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return K}});var n=a(96540),r=a(36665),o=a(43632),l=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var u={};function s(e){var t=e.components,a=p(e,l);return(0,r.mdx)("wrapper",i({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _simpleAxisData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bubble/simpleAxisData"));\nvar _bubbleDataColorBased = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bubble/bubbleDataColorBased.js"));\n/*\nPlease refer to the documentation below to see graphConfig and data objects.\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _simpleAxisData.default)(\'#colorBasedBubbleGraph\'));\nvar dataset = _utils.default.deepClone(_bubbleDataColorBased.default);\nvar _default = exports.default = function _default() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bubbleSingleDataset(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "colorBasedBubbleGraph"\n });\n};\n')))}s.isMDXComponent=!0;var d=a(201),c=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(d.A,{title:t||"Color Based Graph",description:a,example:n.createElement(o.A,null),exampleSrc:n.createElement(s,null),isExpanded:r})},f=a(84213),b=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var h={};function v(e){var t=e.components,a=g(e,b);return(0,r.mdx)("wrapper",m({},h,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _simpleAxisData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bubble/simpleAxisData"));\nvar _bubbleDataWeightBased = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bubble/bubbleDataWeightBased.js"));\n/*\nPlease refer to the documentation below to see graphConfig and data objects.\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _simpleAxisData.default)(\'#weightBasedBubbleGraph\'));\nvar dataset = _utils.default.deepClone(_bubbleDataWeightBased.default);\nvar _default = exports.default = function _default() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bubbleSingleDataset(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "weightBasedBubbleGraph"\n });\n};\n')))}v.isMDXComponent=!0;var y=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(d.A,{title:t||"Weight Based Graph",description:a,example:n.createElement(f.A,null),exampleSrc:n.createElement(v,null),isExpanded:r})},x=a(96655),O=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var w={};function j(e){var t=e.components,a=D(e,O);return(0,r.mdx)("wrapper",_({},w,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _simpleAxisData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bubble/simpleAxisData"));\nvar _bubbleDataColorWeightBased = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bubble/bubbleDataColorWeightBased.js"));\n/*\nPlease refer to the documentation below to see graphConfig and data objects.\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _simpleAxisData.default)(\'#weightColorBasedBubbleGraph\'));\nvar dataset = _utils.default.deepClone(_bubbleDataColorWeightBased.default);\nvar _default = exports.default = function _default() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bubbleSingleDataset(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "weightColorBasedBubbleGraph"\n });\n};\n')))}j.isMDXComponent=!0;var E=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(d.A,{title:t||"Weight Color Based Graph",description:a,example:n.createElement(x.A,null),exampleSrc:n.createElement(j,null),isExpanded:r})},S=a(10652),C=["components"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var q={},A="wrapper";function G(e){var t=e.components,a=B(e,C);return(0,r.mdx)(A,P({},q,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup.js");\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar bubbleDataColorWeightBased = {\n key: \'bubble_color_dataset\',\n label: {\n display: \'Amount\'\n },\n palette: _carbonGraphs.default.helpers.BUBBLE.PALETTE.GREEN,\n onClick: _popup.loadBubblePopup,\n values: [{\n x: new Date(2016, 0, 1, 11, 0).toISOString(),\n y: 60\n }, {\n x: new Date(2016, 0, 1, 9, 0).toISOString(),\n y: 75\n }, {\n x: new Date(2016, 0, 1, 19, 30).toISOString(),\n y: 165\n }, {\n x: new Date(2016, 0, 1, 15, 0).toISOString(),\n y: 120\n }],\n yAxis: \'y\'\n};\nvar _default = exports.default = bubbleDataColorWeightBased;\n')))}G.isMDXComponent=!0;var R=["components"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var T={},I="wrapper";function M(e){var t=e.components,a=k(e,R);return(0,r.mdx)(I,L({},T,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup.js");\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar bubbleDataWeightBased = {\n key: \'bubble_weight_based_dataset\',\n label: {\n display: \'Amount\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadBubblePopup,\n weight: {\n min: 40,\n max: 450\n },\n values: [{\n x: new Date(2016, 0, 1, 11, 0).toISOString(),\n y: 60,\n weight: 70\n }, {\n x: new Date(2016, 0, 1, 9, 0).toISOString(),\n y: 75,\n weight: 180\n }, {\n x: new Date(2016, 0, 1, 19, 30).toISOString(),\n y: 165,\n weight: 220\n }, {\n x: new Date(2016, 0, 1, 15, 0).toISOString(),\n y: 120,\n weight: 340\n }],\n yAxis: \'y\'\n};\nvar _default = exports.default = bubbleDataWeightBased;\n')))}M.isMDXComponent=!0;var N=["components"];function X(){return X=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var U={},Y="wrapper";function z(e){var t=e.components,a=W(e,N);return(0,r.mdx)(Y,X({},U,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup.js");\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar bubbleDataColorWeightBased = {\n key: \'bubble_color_weight_dataset\',\n label: {\n display: \'Amount\'\n },\n palette: _carbonGraphs.default.helpers.BUBBLE.PALETTE.ORANGE,\n onClick: _popup.loadBubblePopup,\n weight: {\n min: 40,\n max: 450\n },\n values: [{\n x: new Date(2016, 0, 1, 11, 0).toISOString(),\n y: 60,\n weight: 70\n }, {\n x: new Date(2016, 0, 1, 9, 0).toISOString(),\n y: 75,\n weight: 180\n }, {\n x: new Date(2016, 0, 1, 19, 30).toISOString(),\n y: 165,\n weight: 220\n }, {\n x: new Date(2016, 0, 1, 15, 0).toISOString(),\n y: 120,\n weight: 340\n }],\n yAxis: \'y\'\n};\nvar _default = exports.default = bubbleDataColorWeightBased;\n')))}z.isMDXComponent=!0;var F=["components"];function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var Z={},J="wrapper";function K(e){var t=e.components,a=$(e,F);return(0,r.mdx)(J,H({},Z,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"weight-and-color-based-graphs"},"Weight And Color based graphs"),(0,r.mdx)("p",null,"Single dataset bubble graphs that show datasets based on color and or weight."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(c,{mdxType:"ColorBasedGraphExample"}),(0,r.mdx)(y,{mdxType:"WeightBasedGraphExample"}),(0,r.mdx)(E,{mdxType:"WeightColorBasedGraphExample"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config Object"),(0,r.mdx)(S.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data Object"),(0,r.mdx)("h4",{id:"color-based-data"},"Color Based Data"),(0,r.mdx)(G,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"weight-based-data"},"Weight Based Data"),(0,r.mdx)(M,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"weight-and-color-based-data"},"Weight and Color Based Data"),(0,r.mdx)(z,{mdxType:"DataObject3"})))}K.isMDXComponent=!0},10652:function(e,t,a){"use strict";a.d(t,{A:function(){return u}});a(96540);var n=a(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var i={},p="wrapper";function u(e){var t=e.components,a=l(e,r);return(0,n.mdx)(p,o({},i,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getSimpleAxisData = function getSimpleAxisData(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Bubble\',\n lowerLimit: 10,\n upperLimit: 250\n }\n }\n };\n};\nvar _default = exports.default = getSimpleAxisData;\n')))}u.isMDXComponent=!0},27647:function(e,t,a){var n,r;void 0===(r="function"==typeof(n=function(){var e="details",t="summary";function a(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function n(){var a=document.createElement(e);if(!("open"in a))return!1;a.innerHTML="<"+t+">ab",document.body.appendChild(a);var n=a.offsetHeight;a.open=!0;var r=n!=a.offsetHeight;return document.body.removeChild(a),r}function r(e,t){if(!document.getElementById(e)){var a=document.createElement("style");a.id=e,a.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(a)}}n()||(document.documentElement.className+=" no-details",window.addEventListener("click",a),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?n.call(t,a,t,e):n)||(e.exports=r)},16939:function(e,t,a){"use strict";a.r(t),t.default={}}}]); \ No newline at end of file diff --git a/31362-19613f2393548607e2ff.css b/31362-19613f2393548607e2ff.css new file mode 100644 index 000000000..7a9d9a86c --- /dev/null +++ b/31362-19613f2393548607e2ff.css @@ -0,0 +1,3 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/31362-19613f2393548607e2ff.js b/31362-19613f2393548607e2ff.js new file mode 100644 index 000000000..90f299a55 --- /dev/null +++ b/31362-19613f2393548607e2ff.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[31362,47397,5170,82789],{24779:function(e,t,n){"use strict";var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1).toISOString(),upperLimit:new Date(2016,0,12).toISOString(),ticks:{values:[new Date(2016,0,1).toISOString(),new Date(2016,0,2).toISOString(),new Date(2016,0,3).toISOString(),new Date(2016,0,4).toISOString(),new Date(2016,0,5).toISOString(),new Date(2016,0,6).toISOString(),new Date(2016,0,7).toISOString(),new Date(2016,0,8).toISOString(),new Date(2016,0,9).toISOString(),new Date(2016,0,10).toISOString(),new Date(2016,0,11).toISOString()],tickLabelsRotation:-45,format:"%Y, %X"}},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0,locale:a.default.helpers.LOCALE.en_US}}},29683:function(e,t,n){"use strict";var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(96540)),i=r(n(5556));n(16939);var o={id:i.default.string.isRequired},l=function(e){return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),a.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=o;t.default=l},96341:function(e,t,n){"use strict";var r=n(24994);t.A=void 0;var a=r(n(96540)),i=r(n(61770)),o=r(n(45839)),l=r(n(29683)),u=r(n(24779)),s=o.default.deepClone((0,u.default)("#XAxisTickLabelOrientation"));t.A=function(){return a.default.useEffect((function(){i.default.api.graph(s)}),[]),a.default.createElement(l.default,{id:"XAxisTickLabelOrientation"})}},24497:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return D}});var r=n(96540),a=n(36665),i=n(96341),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var s={};function p(e){var t=e.components,n=u(e,o);return(0,a.mdx)("wrapper",l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _generalDefaultXAxisOverlapping = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/generalDefaultXAxisOverlapping"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _generalDefaultXAxisOverlapping.default)(\'#XAxisTickLabelOrientation\'));\nvar XAxisTickLabelOrientationGeneralExample = function XAxisTickLabelOrientationGeneralExample() {\n _react.default.useEffect(function () {\n _carbonGraphs.default.api.graph(graphConfig);\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "XAxisTickLabelOrientation"\n });\n};\nvar _default = exports.default = XAxisTickLabelOrientationGeneralExample;\n')))}p.isMDXComponent=!0;var c=n(201),d=function(e){var t=e.title,n=e.description,a=e.isExpanded;return r.createElement(c.A,{title:t||"X Axis Tick Label Orientation",description:n,example:r.createElement(i.A,null),exampleSrc:r.createElement(p,null),isExpanded:a})},m=["components"];function f(){return f=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var b={},h="wrapper";function v(e){var t=e.components,n=g(e,m);return(0,a.mdx)(h,f({},b,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getLineTimeseriesConfig = function getLineTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: new Date(2016, 0, 1).toISOString(),\n upperLimit: new Date(2016, 0, 12).toISOString(),\n ticks: {\n values: [new Date(2016, 0, 1).toISOString(), new Date(2016, 0, 2).toISOString(), new Date(2016, 0, 3).toISOString(), new Date(2016, 0, 4).toISOString(), new Date(2016, 0, 5).toISOString(), new Date(2016, 0, 6).toISOString(), new Date(2016, 0, 7).toISOString(), new Date(2016, 0, 8).toISOString(), new Date(2016, 0, 9).toISOString(), new Date(2016, 0, 10).toISOString(), new Date(2016, 0, 11).toISOString()],\n tickLabelsRotation: -45,\n format: '%Y, %X'\n }\n },\n y: {\n label: 'Line Set A',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true,\n locale: _carbonGraphs.default.helpers.LOCALE.en_US\n };\n};\nvar _default = exports.default = getLineTimeseriesConfig;\n")))}v.isMDXComponent=!0;var x=["components"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n(27647);var w={},y="wrapper";function D(e){var t=e.components,n=S(e,x);return(0,a.mdx)(y,O({},w,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"x-axis-tick-label-orientation"},"X-Axis Tick Label orientation"),(0,a.mdx)("p",null,"This is a simple timeseries line graph with x-axis ticks label orientation ",(0,a.mdx)("inlineCode",{parentName:"p"},"tickLabelsRotation = -45"),". Tick label rotation is used to prevent labels from overlapping in a narrow viewport or due to long tick labels."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(d,{mdxType:"LineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(v,{mdxType:"GraphConfig"})))}D.isMDXComponent=!0},27647:function(e,t,n){var r,a;void 0===(a="function"==typeof(r=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function r(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var r=n.offsetHeight;n.open=!0;var a=r!=n.offsetHeight;return document.body.removeChild(n),a}function a(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}r()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),a("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?r.call(t,n,t,e):r)||(e.exports=a)},16939:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/3164-f93865167f170e9f19a1.js b/3164-f93865167f170e9f19a1.js new file mode 100644 index 000000000..dd0f45169 --- /dev/null +++ b/3164-f93865167f170e9f19a1.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[3164],{84219:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),l={key:"uid_1",label:{display:"Data Label 1"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};t.default=l},73685:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={key:"uid_1",label:{display:"Data Label 1"},values:[{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:10},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:10},{x:new Date(2016,0,1,6,15).toISOString(),y:7},{x:new Date(2016,0,1,7,0).toISOString(),y:16},{x:new Date(2016,0,1,8,15).toISOString(),y:9},{x:new Date(2016,0,1,9,45).toISOString(),y:6},{x:new Date(2016,0,1,12,15).toISOString(),y:2},{x:new Date(2016,0,1,13,15).toISOString(),y:3},{x:new Date(2016,0,1,14,15).toISOString(),y:25},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}]};t.default=n},64477:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),l={key:"uid_3",label:{display:"Data Label 3"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,color:r.default.helpers.COLORS.BLUE,onClick:i.loadPopup,yAxis:"y",values:[{x:new Date(2016,0,1,1,5).toISOString(),y:15},{x:new Date(2016,0,1,2,15).toISOString(),y:21},{x:new Date(2016,0,1,3,15).toISOString(),y:null},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:19},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:22},{x:new Date(2016,0,1,19,45).toISOString(),y:23}]};t.default=l},28409:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),l={key:"uid_3",label:{display:"Data Label 3"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,color:r.default.helpers.COLORS.BLUE,onClick:i.loadPopup,yAxis:"y",values:[{x:new Date(2016,0,1,1,5).toISOString(),y:25},{x:new Date(2016,0,1,2,15).toISOString(),y:5},{x:new Date(2016,0,1,3,15).toISOString(),y:16},{x:new Date(2016,0,1,4,15).toISOString(),y:null},{x:new Date(2016,0,1,5,15).toISOString(),y:3},{x:new Date(2016,0,1,6,15).toISOString(),y:7},{x:new Date(2016,0,1,9,45).toISOString(),y:4},{x:new Date(2016,0,1,12,15).toISOString(),y:12},{x:new Date(2016,0,1,13,15).toISOString(),y:19},{x:new Date(2016,0,1,14,15).toISOString(),y:24}]};t.default=l},16597:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},78734:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),l=a(n(23986)),o=a(n(61770)),u=a(n(45839));n(45633);var s,p=a(n(29683)),d=a(n(16597)),c=a(n(84219)),f=a(n(73685)),g=a(n(64477)),m=a(n(28409)),S=u.default.deepClone((0,d.default)("#multipleDatasetsExample")),x=[u.default.deepClone(c.default),u.default.deepClone(g.default)],y={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){s=o.default.api.graph(S),x.forEach((function(e){s.loadContent(o.default.api.line(e))}))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),y),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){if(s){s.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),s.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={panData:[u.default.deepClone(f.default),u.default.deepClone(m.default)]};s.reflowMultipleDatasets(e)}}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(p.default,{id:"multipleDatasetsExample"}))}},3164:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var a=n(96540),r=n(36665),i=n(78734),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={};function p(e){var t=e.components,n=u(e,l);return(0,r.mdx)("wrapper",o({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseriesPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseriesPanning"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\nvar _datasetTimeseries1newData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1newData"));\nvar _datasetTimeseries2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries3"));\nvar _datasetTimeseries3newData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries3newData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseriesPanning.default)(\'#multipleDatasetsExample\'));\nvar dataset = [_utils.default.deepClone(_datasetTimeseries.default), _utils.default.deepClone(_datasetTimeseries2.default)];\nvar state = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar MultipleDatasetsLinePanningExample = function MultipleDatasetsLinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.line(data));\n });\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newDataset = {\n panData: [_utils.default.deepClone(_datasetTimeseries1newData.default), _utils.default.deepClone(_datasetTimeseries3newData.default)]\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "multipleDatasetsExample"\n }));\n};\nvar _default = exports.default = MultipleDatasetsLinePanningExample;\n')))}p.isMDXComponent=!0;var d=n(201),c=n(79679),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(d.A,{title:t||"Multiple Datasets",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(p,null),isExpanded:r})};n(33366);n(55020),n(12134),n(39102);var g=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var x={},y="wrapper";function h(e){var t=e.components,n=S(e,g);return(0,r.mdx)(y,m({},x,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"line-graph---panning"},"Line Graph - panning"),(0,r.mdx)("p",null,"This is a line graph example that implements panning. Click on the panning buttons to see the updated data."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)("h4",{id:"initial-data-1"},"Initial data 1"),(0,r.mdx)("initialData1",null),(0,r.mdx)("h4",{id:"updated-data-1"},"Updated data 1"),(0,r.mdx)("updatedData1",null),(0,r.mdx)("h4",{id:"initial-data-2"},"Initial data 2"),(0,r.mdx)("initialData1",null),(0,r.mdx)("h4",{id:"updated-data-2"},"Updated data 2"),(0,r.mdx)("updatedData1",null)))}h.isMDXComponent=!0},12134:function(e,t,n){n(96540),n(36665)},39102:function(e,t,n){n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},u="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(u,i({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_3\',\n label: {\n display: \'Data Label 3\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CIRCLE,\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n yAxis: \'y\',\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 15\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 21\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: null\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 19\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 28\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 22\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 23\n }]\n};\nvar _default = exports.default = data;\n')))}s.isMDXComponent=!0},33366:function(e,t,n){n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},u="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(u,i({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesPanningConfig = function getLineTimeseriesPanningConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesPanningConfig;\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/34242-61ca373c41f44dbf81c4.js b/34242-61ca373c41f44dbf81c4.js new file mode 100644 index 000000000..c507c470f --- /dev/null +++ b/34242-61ca373c41f44dbf81c4.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[34242],{61770:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(39139));n(54783);e.default=i.default},39139:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(43693)),r=a(n(59646)),o=a(n(2555)),u=n(72372),l=n(22639),c=a(n(21459));function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function f(t){for(var e=1;e0?n:0}},I=function(t){return t.config={},t.bandScale={x0:{},x1:{}},t.dataTarget={},t.valuesRange={},t},P=function(t){function e(t){var n,a,r,o;return(0,i.default)(this,e),n=O(this,e),I(n),n.config=(a=t,(new _.default).setInput(a).validateInput().clone().getConfig()),n.type="Bar",n.config.yAxis=(0,f.getDefaultValue)(n.config.yAxis,d.default.Y_AXIS),n.config.axisPadding=!1,n.valuesRange={},n.valuesRange.x=(r=n.config.values,o=r.filter((function(t){return null!==t.x&&void 0!==t.x})).map((function(t){return"string"==typeof t.x||t.x instanceof Date?v.default.getEpocFromDateString(t.x):t.x})),{min:Math.min.apply(Math,(0,c.default)(o)),max:Math.max.apply(Math,(0,c.default)(o))}),n.valuesRange[n.config.yAxis]=w(n.config.values),n}return(0,l.default)(e,t),(0,r.default)(e,[{key:"load",value:function(t){return(0,y.validateData)(this.config.values),(0,x.setGroupName)(this.config,t.content),(0,E.scaleBandAxis)(this.bandScale,t.config,t.content),this.dataTarget=(0,x.processDataPoints)(t.config,this.config),(0,x.draw)(t.scale,this.bandScale,t.config,t.svg,this.dataTarget),(0,A.updateSelectionBars)(this.dataTarget.internalValuesSubset,t.svg,t.config),(0,x.prepareLegendItems)(t.config,{clickHandler:(0,b.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,b.hoverHandler)(t.config.shownTargets,t.svg)},this.dataTarget,t.legendSVG),(0,h.prepareLabelShapeItem)(t.config,this.dataTarget,t.axesLabelShapeGroup[this.config.yAxis]),this}},{key:"unload",value:function(t){return(0,x.clear)(t.svg,this.dataTarget.key),(0,p.removeLegendItem)(t.legendSVG,this.dataTarget),(0,h.removeLabelShapeItem)(t.axesLabelShapeGroup[this.config.yAxis],this.dataTarget,t.config),(0,m.removeAxisInfoRowLabels)(t.svg.select(".".concat(g.default.axisInfoRow)),this.dataTarget.key),(0,A.clearSelectionDatum)(t.svg,this.dataTarget.key),I(this),this}},{key:"resize",value:function(t){return(0,E.scaleBandAxis)(this.bandScale,t.config,t.content),(0,E.setBarOffsets)(t.content,t.contentConfig,this,this.bandScale,t.config),(0,S.translateBarGraph)(t.scale,this.bandScale,t.svg,this.dataTarget,t.config),v.default.notEmpty(this.dataTarget.axisInfoRow)&&(0,S.translateTextLabel)(this.bandScale,t.scale,t.config,t.svg,this.dataTarget.axisInfoRow,this.dataTarget),v.default.notEmpty(this.dataTarget.regions)&&((0,T.processGoalLines)(t.scale,this.bandScale,t.config,this.dataTarget,this.config.yAxis),(0,T.translateRegion)(t.scale,t.config,t.svg.selectAll("rect[aria-describedby=region_".concat(this.dataTarget.key,"]")))),this}},{key:"reflow",value:function(t,e){var n={clickHandler:(0,b.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,b.hoverHandler)(t.config.shownTargets,t.svg)};this.config.values=e.values,(0,y.validateData)(this.config.values),this.dataTarget=(0,x.processDataPoints)(t.config,this.config);var a=t.config.shownTargets.lastIndexOf(e.key);a>-1&&t.config.shownTargets.splice(a,1);var i=t.content.filter((function(t){return t.config.key===e.key}));v.default.isEmptyArray(i)||(0,p.reflowLegend)(t.legendSVG,i[0].config,t,n);var r=t.config.axis.x.ticks.values.map((function(t){return{x:t,valueSubsetArray:[]}}));(0,h.updateShapesDuringReflow)(t,e,this),(0,E.scaleBandAxis)(this.bandScale,t.config,t.content);var o=t.svg.select(".".concat(g.default.barSelectionGroup)).selectAll(".".concat(g.default.taskBarSelection)).data(r);o.enter().append("rect").attr("aria-hidden",!0).classed(g.default.taskBarSelection,!0).attr("aria-describedby",(function(t){return"bar-selector-".concat(r.indexOf(t))})).attr("rx",3).attr("ry",3),o.exit().transition().call(d.default.d3Transition(t.config.settingsDictionary.transition)).remove(),(0,A.updateSelectionBars)(this.dataTarget.internalValuesSubset,t.svg,t.config);var u=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select('[class="'.concat(g.default.currentBarsGroup,'"]')).data([this.dataTarget]);u.selectAll(".".concat(g.default.bar)).data(this.dataTarget.internalValuesSubset).exit().remove();var l=u.selectAll(".".concat(g.default.bar," > rect")).data(this.dataTarget.internalValuesSubset);(0,x.drawDataBars)(t.scale,this.bandScale,t.config,t.svg,l.enter(),this.dataTarget.regions,this.dataTarget.axisInfoRow),this.resize(t),this.valuesRange[this.config.yAxis]=w(this.config.values),this.resize(t)}},{key:"redraw",value:function(t){return(0,x.clear)(t.svg,this.dataTarget.key),(0,m.removeAxisInfoRowLabels)(t.svg.select(".".concat(g.default.axisInfoRow)),this.dataTarget.key),(0,x.draw)(t.scale,this.bandScale,t.config,t.svg,this.dataTarget),this}}])}(s.GraphContent);e.default=P},16702:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(10832)),f=a(n(45839));function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}function h(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,p()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=h(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){return(0,s.validateBaseInput)(this.input),this}},{key:"clone",value:function(){return this.config=f.default.deepClone(this.input),this}}])}(s.default);e.default=g},98563:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.removeAxisInfoRowLabels=e.getTextLabelsYPosition=e.getTextLabelsXPosition=e.createAxisInfoRowLabel=void 0;var r=v(n(56194)),o=n(72372),u=n(34004),l=n(77317),c=v(n(22639)),s=n(85356),f=a(n(75090)),d=a(n(45839)),h=n(34675),p=n(73565);function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}function v(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var y=e.getTextLabelsXPosition=function(t,e,n){return d.default.isDefined(n)&&n4&&void 0!==arguments[4]?arguments[4]:l.default.Y_AXIS,r=e.x1.bandwidth()*l.default.DEFAULT_BAR_GRAPH_PADDING_ATTRIBUTES.REGION_WIDTH_RATIO;a.regions.forEach((function(f){!function(t,e,n,a){if((0,s.validateRegion)(t,e),h.default.isEmpty(t.x)&&!h.default.isDateInstance(t.x))throw new Error(c.default.THROW_MSG_BAR_REGION_EMPTY_X_VALUE);if(!(0,u.isValidAxisType)(t.x,a))throw new Error(c.default.THROW_MSG_REGION_INVALID_FORMAT);if(!n.filter((function(e){return h.default.isEqual(e,t.x)})).length)throw new Error(c.default.THROW_MSG_INVALID_REGION_X_AXIS_TICK)}(f,i,n.axis.x.ticks.values,n.axis.x.type),f.x=(0,o.parseTypedValue)(f.x,n.axis.x.type),f.group=a.group,f.xRange=function(t,e,n){var a=e.x0.bandwidth()*l.default.DEFAULT_BAR_GRAPH_PADDING_ATTRIBUTES.LEFT_SHIFT_OFFSET_RATIO,i=e.x1(n.group),r=e.x1.bandwidth()*l.default.DEFAULT_BAR_GRAPH_PADDING_ATTRIBUTES.REGION_LEFT_SHIFT_OFFSET_PADDING_RATIO;return t.x(n.x)+i-a+r}(t,e,f),f.width=r}))};var g=function(t){return t.axis||l.default.Y_AXIS},v=function(t){return function(e){return e.end?(0,d.round2Decimals)(t[g(e)](e.end)):0}},y=function(t,e,n,a){var i=e.end?(0,d.round2Decimals)(n[g(e)](e.end)):0;return(e.start?(0,d.round2Decimals)(n[g(e)](e.start))+l.default.DEFAULT_GOAL_LINE_STROKE_WIDTH:a.height+l.default.DEFAULT_GOAL_LINE_STROKE_WIDTH)-i||l.default.DEFAULT_GOAL_LINE_STROKE_WIDTH};e.createRegion=function(t,e,n,a,i){var o=n.selectAll("g").data(a);o.enter().append("rect").classed(f.default.region,!0).classed(f.default.barGoalLine,!0).attr("aria-hidden",e.shownTargets.indexOf(i)<0).attr("aria-describedby","region_".concat(i)).attr("style",(function(t){return"fill: ".concat(t.color||l.default.DEFAULT_BAR_REGION_COLOR,"; pointer-events: none")})).attr(l.default.X_AXIS,(function(t){return t.xRange||0})).attr(l.default.Y_AXIS,v(t)).attr("width",(function(t){return t.width||0})).attr("height",(function(n){return y(r.select(this),n,t,e)})),o.exit().transition().call(l.default.d3Transition(e.settingsDictionary.transition)).remove()},e.translateRegion=function(t,e,n){n.transition().call(l.default.d3Transition(e.settingsDictionary.transition)).attr(l.default.X_AXIS,(function(t){return t.xRange||0})).attr(l.default.Y_AXIS,v(t)).attr("width",(function(t){return t.width||0})).attr("height",(function(n){return y(r.select(this),n,t,e)}))}},63429:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.hoverHandler=e.clickHandler=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=c(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(18321),u=a(n(75090)),l=n(73565);function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(c=function(t){return t?n:e})(t)}var s=function(t){return function(){t.resize()}};e.clickHandler=function(t,e,n,a){return function(e,i){var c,f,d;0===n.shownTargets.length&&t.contentKeys.forEach((function(t){a.selectAll(".".concat(u.default.taskBar,'[aria-describedby="').concat(t,'"]')).attr("aria-hidden",(0,o.isLegendSelected)(r.select(e)))})),(0,o.legendClickHandler)(e),c=n.shownTargets,f=i,(d=c.indexOf(f.key))>-1?c.splice(d,1):c.push(f.key),n.shownTargets.length>=1?(a.selectAll('g[aria-describedby="'.concat(i.key,'"]')).attr("aria-hidden",(0,o.isLegendSelected)(r.select(e))),a.selectAll(".".concat(u.default.taskBar,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",(0,o.isLegendSelected)(r.select(e))),a.selectAll(".".concat(u.default.region,'[aria-describedby="region_').concat(i.key,'"]')).attr("aria-hidden",(function(){return!("true"===r.select(this).attr("aria-hidden"))})),(0,l.setSelectionIndicatorAttributes)(a.selectAll(".".concat(u.default.taskBarSelection)),!1),window.requestAnimationFrame(s(t))):(a.selectAll(".".concat(u.default.region,'[aria-describedby="region_').concat(i.key,'"]')).attr("aria-hidden",(function(){return!("true"===r.select(this).attr("aria-hidden"))})),a.selectAll('g[aria-describedby="'.concat(i.key,'"]')).attr("aria-hidden",(0,o.isLegendSelected)(r.select(e))),(0,l.setSelectionIndicatorAttributes)(a.selectAll(".".concat(u.default.taskBarSelection)),!1),window.requestAnimationFrame(s(t)))}},e.hoverHandler=function(t,e){return function(n,a){(0,o.legendHoverHandler)(t,e,n.key,a,[])}}},94878:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.setBarOffsets=e.scaleBandAxis=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(77317),u=a(n(22639)),l=a(n(45839)),c=a(n(98572));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}var f=function(t,e){var n=[];return l.default.notEmpty(t)&&t.forEach((function(t){var a;t instanceof c.default&&e.indexOf(t.config.key)>-1&&(a=t.config.group,n.indexOf(a)<0&&n.push(a))})),n};e.scaleBandAxis=function(t,e,n){l.default.notEmpty(e.axis.x.ticks)&&l.default.notEmpty(e.axis.x.ticks.values)&&(t.x0=r.scaleBand().domain(e.axis.x.ticks.values).range((0,o.getXAxisRange)(e)).paddingInner(function(t,e){return u.default.DEFAULT_BAR_GRAPH_PADDING_ATTRIBUTES.OUTER_PADDING_RATIO/(3*f(t,e).length+u.default.DEFAULT_BAR_GRAPH_PADDING_ATTRIBUTES.OUTER_PADDING_RATIO)}(n,e.shownTargets)),t.x1=r.scaleBand())},e.setBarOffsets=function(t,e,n,a,i){var r=i.shownTargets,o=e.filter((function(t){return t.key===n.config.key||t.group===n.config.group&&-1!==r.indexOf(t.key)}));!function(t,e){t.forEach((function(t){var n=0,a=0;e.forEach((function(e){var i=e.values.filter((function(e){return l.default.isEqual(e.x,t.x)}));i.length>0&&(i[0].y>0?n+=i[0].y:a+=i[0].y)})),t.y0=t.y<0?a:n}))}(n.dataTarget.internalValuesSubset,o.splice(o.indexOf(n.config)+1)),function(t,e,n,a){l.default.isEmpty(e)||l.default.isEmpty(t)||l.default.isEmpty(a.axis.x.ticks)||l.default.isEmpty(a.axis.x.ticks.values)||n.x1.domain(t).range([0,n.x0.bandwidth()])}(f(t,i.shownTargets),t,a,i)}},21668:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.updateSelectionBars=e.translateSelectBars=e.getSelectedData=e.drawSelectionBars=e.clearSelectionDatum=void 0;var r=n(77317),o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(22639)),u=a(n(75090)),l=a(n(45839)),c=n(73565);function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}var f=o.default.DEFAULT_BAR_SELECTION_PADDING;e.getSelectedData=function(t,e,n){return t.select("rect[aria-describedby=bar-selector-".concat(n.axis.x.type===o.AXIS_TYPE.TIME_SERIES?n.axis.x.ticks.values.indexOf(new Date(e.x).toISOString()):n.axis.x.ticks.values.indexOf(e.x),"]")).datum().valueSubsetArray.filter((function(t){return n.shownTargets.indexOf(t.key)>-1}))},e.clearSelectionDatum=function(t,e){t.selectAll(".".concat(u.default.taskBarSelection)).each((function(t){var n=t.valueSubsetArray.findIndex((function(t){return t.key===e}));n>-1&&t.valueSubsetArray.splice(n,1)}))},e.updateSelectionBars=function(t,e,n){e.selectAll(".".concat(u.default.taskBarSelection)).each((function(e){var a=t.filter((function(t){return n.axis.x.type===o.AXIS_TYPE.TIME_SERIES?t.x.toISOString()===e.x:t.x===e.x}));l.default.notEmpty(a)&&e.valueSubsetArray.push(a[0])}))},e.drawSelectionBars=function(t,e,n,a){var i=n.axis.x.ticks.values.map((function(t){return{x:t,valueSubsetArray:[]}})),l=a.append("g").classed(u.default.barSelectionGroup,!0).attr("transform","translate(".concat((0,c.getXAxisXPosition)(n),",").concat((0,r.calculateVerticalPadding)(n),")")).selectAll("".concat(u.default.taskBarSelection)).data(i);l.enter().append("rect").attr("aria-hidden",!0).classed(u.default.taskBarSelection,!0).attr("aria-describedby",(function(t){return"bar-selector-".concat(i.indexOf(t))})).attr("rx",3).attr("ry",3),l.exit().transition().call(o.default.d3Transition(n.settingsDictionary.transition)).remove()},e.translateSelectBars=function(t,e,n,a){return n.selectAll(".".concat(u.default.taskBarSelection)).each((function(i,r){var u=function(t,e,n,a){var i=(0,c.barAttributesHelper)(t,e),r=a.filter((function(t){return n.indexOf(t.key)>-1})),o=function(t){var e=0;if(l.default.notEmpty(t)){var n=Math.max(0,t[0].y+t[0].y0);t.forEach((function(t,a){var i=Math.max(0,t.y+t.y0);n<=i&&(e=a,n=i)}))}return e}(r),u=function(t){var e=0;if(l.default.notEmpty(t)){var n=Math.min(0,t[0].y+t[0].y0);t.forEach((function(t,a){var i=Math.min(0,t.y+t.y0);n>=i&&(e=a,n=i)}))}return e}(r),s=function(t){var e=0;if(l.default.notEmpty(t)){var n=0;t.forEach((function(t,a){var r=Math.max(n,i.x(t));r>n&&(e=a,n=r)}))}return e}(r),d=l.default.notEmpty(r)?i.x(r[0]):0,h=l.default.notEmpty(r)?i.y(r[o]):0,p=l.default.notEmpty(r)?i.x(r[s])+i.width():0,g=l.default.notEmpty(r)?i.y(r[u])+i.height(r[u]):0;return{x:function(){return l.default.notEmpty(r)?d-f:0},y:function(){return l.default.notEmpty(r)?h-f:0},height:function(){return l.default.notEmpty(r)?g-h+2*f:0},width:function(){return l.default.notEmpty(r)?p-d+2*f:0}}}(t,e,a.shownTargets,i.valueSubsetArray);n.select("rect[aria-describedby=bar-selector-".concat(r,"]")).transition().call(o.default.d3Transition(a.settingsDictionary.transition)).attr("x",u.x()).attr("y",u.y()).attr("height",u.height()).attr("width",u.width())}))}},80028:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.translateTextLabel=e.translateBarGraph=void 0;var i=a(n(22639)),r=a(n(75090)),o=n(98563),u=n(73565),l=n(21668);e.translateBarGraph=function(t,e,n,a,r){var o=(0,u.barAttributesHelper)(t,e);return(0,l.translateSelectBars)(t,e,n,r),n.selectAll("rect[aria-describedby=".concat(a.key,"]")).transition().call(i.default.d3Transition(r.settingsDictionary.transition)).attr("x",(function(t){return o.x(t)})).attr("y",(function(t){return o.y(t)})).attr("width",o.width()).attr("height",(function(t){return o.height(t)}))},e.translateTextLabel=function(t,e,n,a,l,c){var s=(0,u.barAttributesHelper)(e,t);return a.select(".".concat(r.default.axisInfoRow)).selectAll('g[aria-describedby="text_label_'.concat(c.key,'"]')).transition().call(i.default.d3Transition(n.settingsDictionary.transition)).attr("transform",(function(t,e){return"translate(".concat((0,o.getTextLabelsXPosition)(s,l,e),", ").concat((0,o.getTextLabelsYPosition)(n),")")}))}},63157:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(98572))},16818:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(28452)),u=a(n(63072)),l=a(n(29511)),c=n(72372),s=n(10832),f=a(n(22639)),d=n(85356),h=n(18321),p=n(42124),g=a(n(75090)),v=a(n(45839)),y=n(37337);function _(t,e,n){return e=(0,u.default)(e),(0,o.default)(t,m()?Reflect.construct(e,n||[],(0,u.default)(t).constructor):e.apply(t,n))}function m(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(m=function(){return!!t})()}var x=function(t){function e(t){var n;return(0,i.default)(this,e),(n=_(this,e)).config=(0,y.loadInput)(t),n.config.yAxis=(0,s.getDefaultValue)(n.config.yAxis,f.default.Y_AXIS),n.valuesRange={},n.valuesRange.x=(0,y.calculateValuesRangeXAxis)(n.config.values),n.valuesRange[n.config.yAxis]=(0,y.calculateValuesRangeYAxes)(n.config.values),n.dataTarget={},n}return(0,l.default)(e,t),(0,r.default)(e,[{key:"load",value:function(t){return console.warn("Bubble will be deprecated in a future release. Please use BubbleSingleDataset or BubbleMultipleDataset"),this.dataTarget=(0,y.processDataPoints)(t.config,this.config),(0,y.draw)(t.scale,t.config,t.svg,this.dataTarget),v.default.notEmpty(this.dataTarget.regions)&&(0,p.createRegion)(t.scale,t.config,t.svg.select(".".concat(g.default.regionGroup)),this.dataTarget.regions,"region_".concat(this.dataTarget.key),this.config.yAxis),(0,y.prepareLegendItems)(t.config,{clickHandler:(0,y.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,y.hoverHandler)(t.config.shownTargets,t.svg)},this.dataTarget,t.legendSVG),(0,d.prepareLabelShapeItem)(t.config,this.dataTarget,t.axesLabelShapeGroup[this.config.yAxis]),this}},{key:"unload",value:function(t){return(0,y.clear)(t.svg,this.dataTarget),(0,p.removeRegion)(t.svg.select(".".concat(g.default.regionGroup)),this.dataTarget),(0,h.removeLegendItem)(t.legendSVG,this.dataTarget),(0,d.removeLabelShapeItem)(t.axesLabelShapeGroup[this.config.yAxis],this.dataTarget,t.config),this.dataTarget={},this.config={},this}},{key:"resize",value:function(t){return v.default.notEmpty(this.dataTarget.regions)?t.content.length>1&&!t.config.shouldHideAllRegion&&((0,p.areRegionsIdentical)(t.svg)?t.config.shouldHideAllRegion=!1:((0,p.hideAllRegions)(t.svg),t.config.shouldHideAllRegion=!0)):((0,p.hideAllRegions)(t.svg),t.config.shouldHideAllRegion=!0),(0,p.translateRegion)(t.scale,t.config,t.svg.select(".".concat(g.default.regionGroup))),(0,y.translateBubbleGraph)(t.scale,t.svg,t.config),this}},{key:"reflow",value:function(t,e){var n={clickHandler:(0,y.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,y.hoverHandler)(t.config.shownTargets,t.svg)};this.config.values=e.values,this.dataTarget=(0,y.processDataPoints)(t.config,this.config);var a=t.config.shownTargets.lastIndexOf(e.key);a>-1&&t.config.shownTargets.splice(a,1);var i=t.content.filter((function(t){return t.config.key===e.key}));v.default.isEmptyArray(i)||(0,h.reflowLegend)(t.legendSVG,i[0].config,t,n);var r=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(g.default.currentPointsGroup)).data([this.dataTarget]);r.exit().remove(),r.selectAll(".".concat(g.default.pointGroup)).data(this.dataTarget).exit().remove();var o=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(g.default.currentPointsGroup)).selectAll('[class="'.concat(g.default.point,'"]')).data((0,y.getDataPointValues)(this.dataTarget));(0,y.drawBubbles)(t.scale,t.config,o.enter(),this.dataTarget,t.legendSVG),o.exit().transition().call(f.default.d3Transition(t.config.settingsDictionary.transition)).remove(),this.valuesRange.x=(0,y.calculateValuesRangeXAxis)(this.config.values),this.valuesRange[this.config.yAxis]=(0,y.calculateValuesRangeYAxes)(this.config.values)}},{key:"redraw",value:function(t){return(0,y.clear)(t.svg,this.dataTarget),(0,y.draw)(t.scale,t.config,t.svg,this.dataTarget,t.legendSVG),this}}])}(c.GraphContent);e.default=x},12656:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(10832)),f=a(n(45839));function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}function h(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,p()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=h(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){return(0,s.validateBaseInput)(this.input),this}},{key:"clone",value:function(){return this.config=f.default.deepClone(this.input),this}}])}(s.default);e.default=g},38048:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=x(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(22639)),f=n(85356),d=n(18321),h=n(42124),p=a(n(75090)),g=a(n(45839)),v=n(37337),y=n(50661),_=a(n(16818)),m=n(22974);function x(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(x=function(t){return t?n:e})(t)}function T(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,b()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var E=function(t){function e(){return(0,r.default)(this,e),T(this,e,arguments)}return(0,c.default)(e,t),(0,o.default)(e,[{key:"load",value:function(t){return t.content.length>s.BUBBLE.MAX_DATASETS_MULTIPLE_API?(console.warn("BubbleMultipleDataset is limited to a maximum of 7 datasets"),this):((0,m.validateData)(this.config.values),this.dataTarget=(0,v.processDataPoints)(t.config,this.config),(0,y.draw)(t.scale,t.config,t.svg,this.dataTarget),g.default.notEmpty(this.dataTarget.regions)&&(0,h.createRegion)(t.scale,t.config,t.svg.select(".".concat(p.default.regionGroup)),this.dataTarget.regions,"region_".concat(this.dataTarget.key),this.config.yAxis),(0,v.prepareLegendItems)(t.config,{clickHandler:(0,v.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,v.hoverHandler)(t.config.shownTargets,t.svg)},this.dataTarget,t.legendSVG),(0,f.prepareLabelShapeItem)(t.config,this.dataTarget,t.axesLabelShapeGroup[this.config.yAxis]),this)}},{key:"reflow",value:function(t,e){var n={clickHandler:(0,v.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,v.hoverHandler)(t.config.shownTargets,t.svg)};this.config.values=e.values,(0,m.validateData)(this.config.values),this.dataTarget=(0,v.processDataPoints)(t.config,this.config);var a=t.config.shownTargets.lastIndexOf(e.key);a>-1&&t.config.shownTargets.splice(a,1);var i=t.content.filter((function(t){return t.config.key===e.key}));g.default.isEmptyArray(i)||(0,d.reflowLegend)(t.legendSVG,i[0].config,t,n);var r=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(p.default.currentPointsGroup)).data([this.dataTarget]);r.exit().remove(),r.selectAll(".".concat(p.default.pointGroup)).data(this.dataTarget).exit().remove();var o=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(p.default.currentPointsGroup)).selectAll('[class="'.concat(p.default.point,'"]')).data((0,v.getDataPointValues)(this.dataTarget));(0,y.drawBubbles)(t.scale,t.config,o.enter(),this.dataTarget,t.legendSVG),o.exit().transition().call(s.default.d3Transition(t.config.settingsDictionary.transition)).remove(),this.valuesRange.x=(0,v.calculateValuesRangeXAxis)(this.config.values),this.valuesRange[this.config.yAxis]=(0,v.calculateValuesRangeYAxes)(this.config.values)}}])}(_.default);e.default=E},79064:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=x(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(22639)),f=n(85356),d=n(18321),h=n(42124),p=a(n(75090)),g=a(n(45839)),v=n(37337),y=n(41889),_=a(n(16818)),m=n(22974);function x(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(x=function(t){return t?n:e})(t)}function T(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,b()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function b(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(b=function(){return!!t})()}var E=function(t){function e(){return(0,r.default)(this,e),T(this,e,arguments)}return(0,c.default)(e,t),(0,o.default)(e,[{key:"load",value:function(t){return t.content.length>1?(console.warn("BubbleSingleDataset can only use one dataset."),this):g.default.isUndefined(t.content[0].config.color)&&g.default.isDefined(t.content[0].config.palette)&&t.content[0].config.values.length>s.BUBBLE.MAX_BUBBLES_SINGLE_DATASET?(console.warn("Cannot plot more than 4 bubbles using shades."),this):((0,m.validateData)(this.config.values),this.dataTarget=(0,v.processDataPoints)(t.config,this.config),(0,y.draw)(t.scale,t.config,t.svg,this.dataTarget),g.default.notEmpty(this.dataTarget.regions)&&(0,h.createRegion)(t.scale,t.config,t.svg.select(".".concat(p.default.regionGroup)),this.dataTarget.regions,"region_".concat(this.dataTarget.key),this.config.yAxis),(0,v.prepareLegendItems)(t.config,{clickHandler:(0,v.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,v.hoverHandler)(t.config.shownTargets,t.svg)},this.dataTarget,t.legendSVG),(0,f.prepareLabelShapeItem)(t.config,this.dataTarget,t.axesLabelShapeGroup[this.config.yAxis]),this)}},{key:"resize",value:function(t){return g.default.isEmpty(this.dataTarget.regions)&&((0,h.hideAllRegions)(t.svg),t.config.shouldHideAllRegion=!0),(0,h.translateRegion)(t.scale,t.config,t.svg.select(".".concat(p.default.regionGroup))),(0,v.translateBubbleGraph)(t.scale,t.svg,t.config),this}},{key:"reflow",value:function(t,e){var n={clickHandler:(0,v.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,v.hoverHandler)(t.config.shownTargets,t.svg)};this.config.values=e.values,(0,m.validateData)(this.config.values),this.dataTarget=(0,v.processDataPoints)(t.config,this.config);var a=t.config.shownTargets.lastIndexOf(e.key);a>-1&&t.config.shownTargets.splice(a,1);var i=t.content.filter((function(t){return t.config.key===e.key}));g.default.isEmptyArray(i)||(0,d.reflowLegend)(t.legendSVG,i[0].config,t,n);var r=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(p.default.currentPointsGroup)).data([this.dataTarget]);r.exit().remove(),r.selectAll(".".concat(p.default.pointGroup)).data(this.dataTarget).exit().remove();var o=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(p.default.currentPointsGroup)).selectAll('[class="'.concat(p.default.point,'"]')).data((0,v.getDataPointValues)(this.dataTarget));(0,y.drawBubbles)(t.scale,t.config,o.enter(),this.dataTarget,t.legendSVG),o.exit().transition().call(s.default.d3Transition(t.config.settingsDictionary.transition)).remove(),this.valuesRange.x=(0,v.calculateValuesRangeXAxis)(this.config.values),this.valuesRange[this.config.yAxis]=(0,v.calculateValuesRangeYAxes)(this.config.values)}},{key:"redraw",value:function(t){return(0,v.clear)(t.svg,this.dataTarget),(0,y.draw)(t.scale,t.config,t.svg,this.dataTarget,t.legendSVG),this}}])}(_.default);e.default=E},74515:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.generateColorSingleDataset=e.generateColor=e.bubbleScale=void 0;var r=c(n(56194)),o=c(n(22639)),u=a(n(45839));function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(l=function(t){return t?n:e})(t)}function c(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=l(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var s=e.bubbleScale=function(t){return r.scaleLinear().domain([t.weight.min,t.weight.max]).range([o.default.DEFAULT_BUBBLE_RADIUS_MIN,o.default.DEFAULT_BUBBLE_RADIUS_MAX])};e.generateColor=function(t){var e,n=t.hue.lowerShade,a=t.hue.upperShade;return e=u.default.isUndefined(t.weight)?t.values.map((function(t){return t.y})):t.values.map((function(e){return s(t)(e.weight)})),r.scaleLinear().domain(r.extent(e)).range([n,a])},e.generateColorSingleDataset=function(t){var e,n=[];if(e=u.default.isUndefined(t.weight)?t.values.map((function(t){return t.y})):t.values.map((function(e){return s(t)(e.weight)})),u.default.isDefined(t.palette))switch(n=t.palette,t.values.length){case 4:3===n.length&&n.unshift(o.BUBBLE.PALETTE.GRAY);break;case 2:1===n.length&&n.splice(1,1);break;case 1:1===n.length&&n.splice(1,2);break;default:n=t.palette}return r.scaleQuantile().domain(r.extent(e)).range(n)}},37337:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.translatePoints=e.translateBubbleGraph=e.transformPoint=e.toggleDataPointSelection=e.processDataPoints=e.prepareLegendItems=e.loadInput=e.isHueDefined=e.hoverHandler=e.getDataPointValues=e.drawBubbles=e.draw=e.decideRadius=e.dataPointActionHandler=e.clickHandler=e.clear=e.calculateValuesRangeYAxes=e.calculateValuesRangeXAxis=e.areWeightsDefined=void 0;var r=a(n(41132)),o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=_(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),u=n(10832),l=n(77317),c=a(n(22639)),s=a(n(74467)),f=n(18321),d=n(42124),h=a(n(75090)),p=a(n(45839)),g=n(34675),v=n(74515),y=a(n(12656));function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}var m=e.transformPoint=function(t){return function(e){var n;return"translate(".concat((n=e,t.x(n.x)),",").concat(function(e){return t[e.yAxis](e.y)}(e),")")}},x=e.translatePoints=function(t,e,n,a){return e.selectAll(".".concat(h.default.bubbleGraphContent," .").concat(n)).each((function(e){o.select(this).transition().call(c.default.d3Transition(a.settingsDictionary.transition)).attr("transform",(function(){return m(t)(e)}))}))},T=function(t){o.select(t).attr("aria-selected",!0),function(t){o.select(t.viewportElement).selectAll(".".concat(h.default.point)).select("circle").attr("fill-opacity",c.default.DEFAULT_BUBBLE_BLUR_OPACITY).attr("stroke-opacity",c.default.DEFAULT_BUBBLE_BLUR_STROKE_OPACITY),o.select(t).select("circle").attr("fill-opacity",c.default.DEFAULT_BUBBLE_OPACITY).attr("stroke-opacity",c.default.DEFAULT_BUBBLE_STROKE_OPACITY)}(t)},b=e.toggleDataPointSelection=function(t){T(t);var e=o.select(t.parentNode).select(".".concat(h.default.dataPointSelection));return e.attr("aria-hidden",!("true"===e.attr("aria-hidden"))),e},E=e.dataPointActionHandler=function(t,e,n){p.default.isEmpty(t.onClick)||b(n).call((function(n){return t.onClick((function(){n.attr("aria-hidden",!0),o.selectAll(".".concat(h.default.point)).attr("aria-selected",!1).select("circle").attr("fill-opacity",c.default.DEFAULT_BUBBLE_OPACITY).attr("stroke-opacity",c.default.DEFAULT_BUBBLE_STROKE_OPACITY)}),t.key,e,t,n)}))},A=(e.translateBubbleGraph=function(t,e,n){x(t,e,h.default.point,n),x(t,e,h.default.dataPointSelection,n)},e.getDataPointValues=function(t){return t.internalValuesSubset}),S=e.areWeightsDefined=function(t){return!!p.default.isDefined(t.weight)&&(p.default.isDefined(t.weight.min)&&p.default.isDefined(t.weight.max))},O=e.decideRadius=function(t,e){return S(t)&&p.default.isUndefined(t.weight.maxRadius)?(0,v.bubbleScale)(t)(e.weight):p.default.isUndefined(t.weight)?c.default.DEFAULT_BUBBLE_RADIUS_MAX:t.weight.maxRadius},D=e.isHueDefined=function(t){return p.default.isDefined(t)},w=function(t,e){return D(t.hue)&&S(t)?(0,v.generateColor)(t)((0,v.bubbleScale)(t)(e.weight)):D(t.hue)&&!1===S(t)?(0,v.generateColor)(t)(e.y):t.color},I=e.drawBubbles=function(t,e,n,a,i){n.append("g").classed(h.default.pointGroup,!0).each((function(e,n){var r,u,l=o.select(this);r=e,u=n,l.append("g").classed(h.default.dataPointSelection,!0).attr("transform",m(t)(r)).attr("aria-disabled",p.default.isDefined(r.onClick)).attr("aria-hidden",!0).attr("aria-describedby",r.key).on("click",(function(){E(r,u,this)})).append("circle").attr("r",(function(t){return O(a,t)+c.default.DEFAULT_BUBBLE_SELECTOR_RADIUS})),function(e,n,r){var o;e.append("g").classed(h.default.point,!0).attr("aria-disabled",!p.default.isFunction(n.onClick)).attr("transform",m(t)(n)).attr("aria-describedby","".concat(n.key)).attr("aria-selected",!1).attr("aria-hidden",i?"false"===(null===(o=i.select(".".concat(h.default.legendItem,"[aria-describedby='").concat(n.key,"']")))||void 0===o?void 0:o.attr("aria-current")):"false").on("click",(function(){E(n,r,this)})).append("circle").attr("aria-describedby",n.key).attr("r",(function(t){return O(a,t)})).attr("fill",(function(t){return w(a,t)})).attr("fill-opacity",c.default.DEFAULT_BUBBLE_OPACITY).attr("stroke",(function(t){return w(a,t)}))}(l,e,n)}))};e.draw=function(t,e,n,a,i){var r=n.append("g").classed(h.default.bubbleGraphContent,!0).attr("clip-path","url(#".concat(e.clipPathId,")")).attr("aria-hidden",e.shownTargets.indexOf(a.key)<0).attr("aria-describedby",a.key),o=r.selectAll(".".concat(h.default.currentPointsGroup)).data([a]);o.enter().append("g").classed(h.default.currentPointsGroup,!0).attr("transform","translate(".concat((0,l.getXAxisXPosition)(e),",").concat((0,l.calculateVerticalPadding)(e),")")),o.exit().transition().call(c.default.d3Transition(e.settingsDictionary.transition)).remove();var u=r.select(".".concat(h.default.currentPointsGroup)).selectAll(".".concat(h.default.point)).data(A(a).filter((function(t){return null!==t.y})));I(t,e,u.enter(),a,i),u.exit().transition().call(c.default.d3Transition(e.settingsDictionary.transition)).remove()},e.processDataPoints=function(t,e){var n=t.axis.x.type,a=function(t){if(!(0,l.isValidAxisType)(t,n))throw new Error(s.default.THROW_MSG_INVALID_FORMAT_TYPE);return(0,u.parseTypedValue)(t,n)};return t.shownTargets.push(e.key),e.internalValuesSubset=e.values.map((function(t){return{onClick:e.onClick,isCritical:t.isCritical||!1,x:a(t.x),y:t.y,weight:t.weight,color:e.color||c.default.DEFAULT_COLOR,label:e.label||{},yAxis:e.yAxis||c.default.Y_AXIS,key:e.key}})),e},e.clickHandler=function(t,e,n,a){return function(e,i){(0,f.legendClickHandler)(e);var r,u,l,c=(0,f.isLegendSelected)(o.select(e));r=n.shownTargets,u=i,(l=r.indexOf(u.key))>-1?r.splice(l,1):r.push(u.key),a.selectAll(".".concat(h.default.dataPointSelection,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",!0),a.selectAll(".".concat(h.default.point,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",c),window.requestAnimationFrame(function(t,e,n){return function(){(0,d.processRegions)(t,e,n)}}(t,n,a))}},e.hoverHandler=function(t,e){return function(n,a){(0,f.legendHoverHandler)(t,e,n.key,a,[function(t,e,n,i,r){e.selectAll(".".concat(h.default.point,'[aria-describedby="').concat(r,'"]')).classed(h.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER)}]),e.selectAll(".".concat(h.default.point,'[aria-describedby="').concat(n.key,'"]')).classed(h.default.highlight,a===c.default.HOVER_EVENT.MOUSE_ENTER),(0,d.regionLegendHoverHandler)(t,e,n.key,a)}},e.prepareLegendItems=function(t,e,n,a){n.label&&n.label.display&&a&&(0,f.loadLegendItem)(a,n,t,e)},e.clear=function(t,e){return(0,g.d3RemoveElement)(t,'g[aria-describedby="'.concat(e.key,'"]'))},e.calculateValuesRangeXAxis=function(t){var e=t.filter((function(t){return null!==t.x&&void 0!==t.x})).map((function(t){return"string"==typeof t.x||t.x instanceof Date?p.default.getEpocFromDateString(t.x):t.x}));return{min:Math.min.apply(Math,(0,r.default)(e)),max:Math.max.apply(Math,(0,r.default)(e))}},e.calculateValuesRangeYAxes=function(t){var e=t.filter((function(t){return null!==t.y})).map((function(t){return t.y}));return{min:Math.min.apply(Math,(0,r.default)(e)),max:Math.max.apply(Math,(0,r.default)(e))}},e.loadInput=function(t){return(new y.default).setInput(t).validateInput().clone().getConfig()}},50661:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.drawBubbles=e.draw=e.decideRadius=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(77317),u=a(n(22639)),l=a(n(75090)),c=a(n(45839)),s=n(37337),f=n(74515);function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}var h=e.decideRadius=function(t,e){return(0,s.areWeightsDefined)(t)&&c.default.isUndefined(t.weight.fixedRadius)?(0,f.bubbleScale)(t)(e.weight):c.default.isUndefined(t.weight)?u.default.DEFAULT_BUBBLE_RADIUS_MAX:t.weight.fixedRadius},p=e.drawBubbles=function(t,e,n,a){n.append("g").classed(l.default.pointGroup,!0).each((function(e,n){var i,o,f=r.select(this);i=e,o=n,f.append("g").classed(l.default.dataPointSelection,!0).attr("transform",(0,s.transformPoint)(t)(i)).attr("aria-disabled",c.default.isDefined(i.onClick)).attr("aria-hidden",!0).attr("aria-describedby",i.key).on("click",(function(){(0,s.dataPointActionHandler)(i,o,this)})).append("circle").attr("r",(function(t){return h(a,t)+u.default.DEFAULT_BUBBLE_SELECTOR_RADIUS})),function(e,n,i){var r;e.append("g").classed(l.default.point,!0).attr("aria-disabled",!c.default.isFunction(n.onClick)).attr("transform",(0,s.transformPoint)(t)(n)).attr("aria-describedby","".concat(n.key)).attr("aria-selected",!1).attr("aria-hidden","false"===(null===(r=document.querySelector(".".concat(l.default.legendItem,'[aria-describedby="').concat(n.key,'"]')))||void 0===r?void 0:r.getAttribute("aria-current"))).on("click",(function(){(0,s.dataPointActionHandler)(n,i,this)})).append("circle").attr("aria-describedby",n.key).attr("r",(function(t){return h(a,t)})).attr("fill",(function(){return a.color})).attr("fill-opacity",u.default.DEFAULT_BUBBLE_OPACITY).attr("stroke",(function(){return a.color}))}(f,e,n)}))};e.draw=function(t,e,n,a){var i=n.append("g").classed(l.default.bubbleGraphContent,!0).attr("clip-path","url(#".concat(e.clipPathId,")")).attr("aria-hidden",e.shownTargets.indexOf(a.key)<0).attr("aria-describedby",a.key),r=i.selectAll(".".concat(l.default.currentPointsGroup)).data([a]);r.enter().append("g").classed(l.default.currentPointsGroup,!0).attr("transform","translate(".concat((0,o.getXAxisXPosition)(e),",").concat((0,o.calculateVerticalPadding)(e),")")),r.exit().transition().call(u.default.d3Transition(e.settingsDictionary.transition)).remove();var c=i.select(".".concat(l.default.currentPointsGroup)).selectAll(".".concat(l.default.point)).data((0,s.getDataPointValues)(a));p(t,e,c.enter(),a),c.exit().transition().call(u.default.d3Transition(e.settingsDictionary.transition)).remove()}},41889:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.drawBubbles=e.draw=e.decideRadius=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(77317),u=a(n(22639)),l=a(n(75090)),c=a(n(45839)),s=n(74515),f=n(37337);function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}var h=function(t,e){return c.default.isDefined(t.color)?t.color:c.default.isDefined(t.palette)?(0,f.areWeightsDefined)(t)?(0,s.generateColorSingleDataset)(t)((0,s.bubbleScale)(t)(e.weight)):(0,s.generateColorSingleDataset)(t)(e.y):void 0},p=e.decideRadius=function(t,e){return(0,f.areWeightsDefined)(t)&&c.default.isUndefined(t.weight.fixedRadius)?(0,s.bubbleScale)(t)(e.weight):c.default.isUndefined(t.weight)?u.default.DEFAULT_BUBBLE_RADIUS_MAX:t.weight.fixedRadius},g=e.drawBubbles=function(t,e,n,a){n.append("g").classed(l.default.pointGroup,!0).each((function(e,n){var i,o,s=r.select(this);i=e,o=n,s.append("g").classed(l.default.dataPointSelection,!0).attr("transform",(0,f.transformPoint)(t)(i)).attr("aria-disabled",c.default.isDefined(i.onClick)).attr("aria-hidden",!0).attr("aria-describedby",i.key).on("click",(function(){(0,f.dataPointActionHandler)(i,o,this)})).append("circle").attr("r",(function(t){return p(a,t)+u.default.DEFAULT_BUBBLE_SELECTOR_RADIUS})),function(e,n,i){var r;e.append("g").classed(l.default.point,!0).attr("aria-disabled",!c.default.isFunction(n.onClick)).attr("transform",(0,f.transformPoint)(t)(n)).attr("aria-describedby","".concat(n.key)).attr("aria-selected",!1).attr("aria-hidden","false"===(null===(r=document.querySelector(".".concat(l.default.legendItem,'[aria-describedby="').concat(n.key,'"]')))||void 0===r?void 0:r.getAttribute("aria-current"))).on("click",(function(){(0,f.dataPointActionHandler)(n,i,this)})).append("circle").attr("aria-describedby",n.key).attr("r",(function(t){return p(a,t)})).attr("fill",(function(t){return h(a,t)})).attr("fill-opacity",u.default.DEFAULT_BUBBLE_OPACITY).attr("stroke",(function(t){return h(a,t)}))}(s,e,n)}))};e.draw=function(t,e,n,a){var i=n.append("g").classed(l.default.bubbleGraphContent,!0).attr("clip-path","url(#".concat(e.clipPathId,")")).attr("aria-hidden",e.shownTargets.indexOf(a.key)<0).attr("aria-describedby",a.key),r=i.selectAll(".".concat(l.default.currentPointsGroup)).data([a]);r.enter().append("g").classed(l.default.currentPointsGroup,!0).attr("transform","translate(".concat((0,o.getXAxisXPosition)(e),",").concat((0,o.calculateVerticalPadding)(e),")")),r.exit().transition().call(u.default.d3Transition(e.settingsDictionary.transition)).remove();var c=i.select(".".concat(l.default.currentPointsGroup)).selectAll(".".concat(l.default.point)).data((0,f.getDataPointValues)(a));g(t,e,c.enter(),a),c.exit().transition().call(u.default.d3Transition(e.settingsDictionary.transition)).remove()}},15282:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"Bubble",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"BubbleMultipleDataset",{enumerable:!0,get:function(){return o.default}}),Object.defineProperty(e,"BubbleSingleDataset",{enumerable:!0,get:function(){return r.default}});var i=a(n(16818)),r=a(n(79064)),o=a(n(38048))},82160:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=w(n(56194)),f=a(n(76148)),d=n(77317),h=a(n(22639)),p=n(22974),g=n(56690),v=a(n(74467)),y=n(89644),_=n(18321),m=a(n(53170)),x=a(n(75090)),T=a(n(45839)),b=n(85356),E=w(n(8658)),A=n(72763),S=n(13170),O=n(15553);function D(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(D=function(t){return t?n:e})(t)}function w(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=D(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function I(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,P()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function P(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(P=function(){return!!t})()}var k=h.default.BASE_CANVAS_WIDTH_PADDING,L=function(t,e){e.canvasWidth=parseInt(t.style("width"),10)-(0,m.default)(t)},M=function(t){return t.canvasHeight=(0,d.getYAxisHeight)(t)+2*(2*t.padding.bottom+t.padding.top)},R=function(t){return t.graphContainer=null,t.config={axis:{x:{},y:{}},shownTargets:{},actionLegend:[],dateline:[],eventline:[],pan:{}},t.axis={},t.scale={},t.svg=null,t.legendSVG=null,t.tracks=[],t.trackConfig=[],t.resizeHandler=null,t},N=function(t){function e(t){var n;return(0,r.default)(this,e),n=I(this,e),R(n),n.generate(t),n}return(0,c.default)(e,t),(0,o.default)(e,[{key:"generate",value:function(t){var e,n,a=this;this.config=(e=t,(new E.default).setInput(e).validateInput().clone().getConfig()),(0,E.processInput)(t,this.config),(n=this).graphContainer=s.select(n.config.bindTo),(0,S.updateAxesDomain)(n.config),n.config.height=(0,S.determineHeight)(n.config),(0,b.createTooltipDiv)(),function(t){L(t.graphContainer,t.config),(0,S.calculateAxesSize)(t.config),(0,S.calculateAxesLabelSize)(t.config),M(t.config),(0,S.scaleGraph)(t.scale,t.config)}(this);var i=s.select(this.config.bindTo).append("div").classed(x.default.container,!0).style("padding-top",this.config.removeContainerPadding&&0).style("padding-bottom",this.config.removeContainerPadding&&0);return this.svg=i.insert("svg",":first-child").classed(x.default.canvas,!0).attr("role","img").attr("height",this.config.canvasHeight).attr("width",this.config.padding.hasCustomPadding?this.config.canvasWidth:this.config.canvasWidth-k),(0,S.createDefs)(this.config,this.svg),(0,S.createGrid)(this.axis,this.scale,this.config,this.svg),(0,S.createContentContainer)(this.config,this.svg),(0,S.createAxes)(this.axis,this.scale,this.config,this.svg),(0,S.createGanttContent)(this.config,this.svg),T.default.notEmpty(this.config.dateline)&&(0,g.createDateline)(this.scale,this.config,this.svg),T.default.notEmpty(this.config.eventline)&&(0,y.createEventline)(this.scale,this.config,this.svg),this.config.showActionLegend&&(this.legendSVG=(0,_.createLegend)(this.config,this.config.bindLegendTo?s.select(this.config.bindLegendTo):i),this.config.shownTargets=this.config.actionLegend.map((function(t){return t.key})),this.config.actionLegend.forEach((function(t){return(0,A.renderLegendItems)(a.config,(0,A.prepareLegendEventHandlers)(a,a.config,a.svg,a.config.shownTargets),t,a.legendSVG)}))),(0,S.attachEventHandlers)(this),this.svg}},{key:"resize",value:function(){var t=this;if(this.graphContainer)return L(this.graphContainer,this.config),(0,S.scaleGraph)(this.scale,this.config),(0,O.translateGraph)(this),this.trackConfig.forEach((function(e){return e.resize(t)})),(0,O.translateLabelText)(this.scale,this.config,this.svg),this}},{key:"loadContent",value:function(t){var e=this;return(0,p.contentHandler)(t,(function(t){var n=(0,S.prepareLoadAtIndex)(e.scale,e.config,t,e.tracks.length),a=(0,S.createTrack)(t);e.trackConfig.splice(n,0,a),a.load(e),e.tracks.splice(n,0,t.key)})),(0,S.updateAxesDomain)(this.config),this.config.height=(0,S.determineHeight)(this.config),M(this.config),this.resize(),this.trackConfig.forEach((function(t){return t.redraw(e)})),this}},{key:"unloadContent",value:function(t){var e=this;return(0,p.contentHandler)(t,(function(t){var n=e.tracks.indexOf(t.key);if(n<0)throw new Error(v.default.THROW_MSG_INVALID_OBJECT_PROVIDED);e.trackConfig[n].unload(e),e.tracks.splice(n,1),e.trackConfig.splice(n,1)})),(0,S.updateAxesDomain)(this.config),this.config.height=(0,S.determineHeight)(this.config),M(this.config),this.resize(),this}},{key:"reflow",value:function(t){var e=this;console.warn("reflow is deprecated and will be removed a future major release. Please use reflowMultipleDatasets instead."),(0,d.setXAxisDomain)(this.config),(0,S.scaleGraph)(this.scale,this.config);var n=(0,A.prepareLegendEventHandlers)(this,this.config,this.svg,this.config.shownTargets);if((0,O.translateAxes)(this.axis,this.scale,this.config,this.svg),t&&this.tracks.includes(t.key)){var a=this.tracks.findIndex((function(e){return e===t.key}));this.trackConfig[a].reflow(this,t),(0,_.reflowLegend)(this.legendSVG,this.config.actionLegend[a],this,n)}return t&&t.eventline&&(this.config.eventline=t.eventline,(0,y.redrawEventlineContent)(this.scale,this.config,this.svg)),this.config.height=(0,S.determineHeight)(this.config),M(this.config),this.resize(),this.trackConfig.forEach((function(t){return t.redraw(e)})),this}},{key:"reflowMultipleDatasets",value:function(t){var e=this;(0,d.setXAxisDomain)(this.config),(0,S.scaleGraph)(this.scale,this.config);var n=(0,A.prepareLegendEventHandlers)(this,this.config,this.svg,this.config.shownTargets);return(0,O.translateAxes)(this.axis,this.scale,this.config,this.svg),t&&t.panData&&!T.default.isEmptyArray(t.panData)&&t.panData.forEach((function(t){var a=e.tracks.findIndex((function(e){return e===t.key}));a>-1&&(e.trackConfig[a].reflow(e,t),(0,_.reflowLegend)(e.legendSVG,e.config.actionLegend[a],e,n))})),t&&t.eventline&&(this.config.eventline=t.eventline,(0,y.redrawEventlineContent)(this.scale,this.config,this.svg)),this.config.height=(0,S.determineHeight)(this.config),M(this.config),this.resize(),this.trackConfig.forEach((function(t){return t.redraw(e)})),this}},{key:"destroy",value:function(){return(0,b.destroyTooltipDiv)(),(0,S.detachEventHandlers)(this),(0,S.d3RemoveElement)(this.graphContainer,".".concat(x.default.canvas)),(0,S.d3RemoveElement)(this.graphContainer,".".concat(x.default.container)),R(this),this}}])}(f.default);e.default=N},8658:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateTask=e.validateEvent=e.validateActivity=e.settingsDictionary=e.processInput=e.isUniqueKey=e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=a(n(94634)),f=T(n(10832)),d=n(99462),h=T(n(22639)),p=n(56690),g=a(n(74467)),v=n(89644),y=a(n(45839)),_=n(21459),m=n(18321);function x(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(x=function(t){return t?n:e})(t)}function T(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=x(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function b(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,E()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function E(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(E=function(){return!!t})()}var A=e.settingsDictionary=function(t){return(0,d.isPanningModeEnabled)(t)?{shouldClamp:!1,transition:h.default.D3_TRANSITION_PROPERTIES_DISABLED,shouldCreateDatelineDefs:!0}:{shouldClamp:!0,transition:h.default.D3_TRANSITION_PROPERTIES_ENABLED,shouldCreateDatelineDefs:!1}},S=(e.processInput=function(t,e){var n=y.default.deepClone(t.axis);return e.clipPathId=(0,d.generateClipPathId)(),e.datelineClipPathId=(0,d.generateDatelineClipPathId)(),e.bindTo=t.bindTo,e.bindLegendTo=t.bindLegendTo,e.padding=function(t,e){return y.default.isDefined(t.padding)?{top:(0,f.getDefaultValue)(e.top,h.default.PADDING.top),bottom:(0,f.getDefaultValue)(e.bottom,h.default.PADDING.bottom),right:(0,f.getDefaultValue)(e.right,h.default.PADDING.right),left:(0,f.getDefaultValue)(e.left,h.default.PADDING.trackLabel),hasCustomPadding:!0}:{top:h.default.PADDING.top,bottom:h.default.PADDING.bottom,right:h.default.PADDING.right,left:h.default.PADDING.trackLabel,hasCustomPadding:!1}}(e,t.padding),e.legendPadding=(0,m.getLegendPadding)(e,t.legendPadding),e.axis={x:{},y:{}},e.d3Locale=(0,f.getDefaultValue)(t.locale,_.DEFAULT_LOCALE),e.throttle=(0,f.getDefaultValue)(t.throttle,h.default.RESIZE_THROTTLE),e.dateline=(0,f.getDefaultValue)(y.default.deepClone(t.dateline),[]),e.eventline=(0,f.getDefaultValue)(y.default.deepClone(t.eventline),[]),e.actionLegend=(0,f.getDefaultValue)(y.default.deepClone(t.actionLegend),[]),e.settingsDictionary=A(t),e.showActionLegend=(0,f.getDefaultValue)(t.showActionLegend,!1),e.axis.x=(0,s.default)(n.x,{type:h.AXIS_TYPE.TIME_SERIES,show:(0,f.getDefaultValue)(n.x.show,!0),ticks:(0,f.getDefaultValue)(n.x.ticks,{}),domain:(0,f.getXAxisDomain)(h.AXIS_TYPE.TIME_SERIES,n.x.lowerLimit,n.x.upperLimit),rangeRounding:(0,f.getDefaultValue)(n.x.rangeRounding,!0)}),e.axis.y={show:!n.y||(0,f.getDefaultValue)(n.y.show,!0),trackCount:0,trackList:{},rangeRounding:!!n.y&&(0,f.getDefaultValue)(n.y.rangeRounding,!0)},e.shownTargets=[],e},e.isUniqueKey=function(t,e){return t.indexOf(e)<0},function(t){function e(){var t;return(0,r.default)(this,e),(t=b(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){if(y.default.isEmpty(this.input))throw new Error(g.default.THROW_MSG_NO_AXES_DATA_LOADED);if(y.default.isEmpty(this.input.bindTo))throw new Error(g.default.THROW_MSG_NO_BIND);if(y.default.isEmpty(this.input.axis)||y.default.isEmpty(this.input.axis.x))throw new Error(g.default.THROW_MSG_NO_AXIS_INFO);if(y.default.isEmpty(this.input.axis.x.lowerLimit)||y.default.isEmpty(this.input.axis.x.upperLimit))throw new Error(g.default.THROW_MSG_NO_AXIS_LIMIT_INFO);if(!y.default.isDate(this.input.axis.x.lowerLimit)||!y.default.isDate(this.input.axis.x.upperLimit))throw new Error(g.default.THROW_MSG_INVALID_AXIS_TYPE_VALUES);return y.default.notEmpty(this.input.dateline)&&this.input.dateline.forEach((function(t){(0,p.validateDateline)(t)})),y.default.notEmpty(this.input.eventline)&&this.input.eventline.forEach((function(t){(0,v.validateEventline)(t)})),this}},{key:"clone",value:function(){return this.config=y.default.deepClone(this.input),this}}])}(f.default));e.default=S,e.validateTask=function(t){if(y.default.isEmpty(t))throw new Error(g.default.THROW_MSG_NO_DATA_LOADED);if(y.default.isEmpty(t.key))throw new Error(g.default.THROW_MSG_TASKS_UNIQUE_KEY_NOT_PROVIDED);if(y.default.isEmpty(t.startDate)&&y.default.isEmpty(t.endDate))throw new Error(g.default.THROW_MSG_TASKS_START_AND_END_NOT_PROVIDED);if((y.default.isEmpty(t.startDate)||y.default.isEmpty(t.endDate))&&y.default.isEmpty(t.duration))throw new Error(g.default.THROW_MSG_TASKS_DURATION_NOT_PROVIDED);if(t.startDate&&!y.default.isDate(t.startDate)||t.endDate&&!y.default.isDate(t.endDate))throw new Error(g.default.THROW_MSG_TASKS_START_AND_END_TYPE_NOT_VALID);if(y.default.getTime(t.startDate)>y.default.getTime(t.endDate))throw new Error(g.default.THROW_MSG_TASKS_START_MORE_END)},e.validateActivity=function(t){if(y.default.isEmpty(t))throw new Error(g.default.THROW_MSG_NO_DATA_LOADED);if(y.default.isEmpty(t.key))throw new Error(g.default.THROW_MSG_ACTIVITIES_UNIQUE_KEY_NOT_PROVIDED);if(y.default.isEmpty(t.startDate)&&y.default.isEmpty(t.endDate))throw new Error(g.default.THROW_MSG_ACTIVITIES_START_AND_END_NOT_PROVIDED);if((y.default.isEmpty(t.startDate)||y.default.isEmpty(t.endDate))&&y.default.isEmpty(t.duration))throw new Error(g.default.THROW_MSG_ACTIVITIES_DURATION_NOT_PROVIDED);if(t.startDate&&!y.default.isDate(t.startDate)||t.endDate&&!y.default.isDate(t.endDate))throw new Error(g.default.THROW_MSG_ACTIVITIES_START_AND_END_TYPE_NOT_VALID);if(y.default.getTime(t.startDate)>y.default.getTime(t.endDate))throw new Error(g.default.THROW_MSG_ACTIVITIES_START_MORE_END)},e.validateEvent=function(t){if(y.default.isEmpty(t))throw new Error(g.default.THROW_MSG_NO_DATA_LOADED);if(y.default.isEmpty(t.key))throw new Error(g.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);if(y.default.isEmpty(t.values))throw new Error(g.default.THROW_MSG_NO_DATA_POINTS)}},1325:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateContent=e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=A(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),f=n(72372),d=a(n(74467)),h=n(85356),p=a(n(75090)),g=a(n(45839)),v=n(8658),y=n(72763),_=n(46954),m=n(13170),x=n(87435),T=n(75338),b=n(49130),E=n(15553);function A(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(A=function(t){return t?n:e})(t)}function S(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,O()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}e.validateContent=function(t){if(g.default.isEmpty(t))throw new Error(d.default.THROW_MSG_NO_DATA_LOADED);if(g.default.isEmpty(t.key))throw new Error(d.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);if(g.default.isEmpty(t.trackLabel)||g.default.isEmpty(t.trackLabel.display))throw new Error(d.default.THROW_MSG_UNIQUE_LABEL_NOT_PROVIDED)};var D=function(t,e){return t.selectAll(".".concat(p.default.axisYTrackLabel," .tick text")).each((function(t){var n,a,i=this;t&&(n=this,a=e.display,s.select(n).datum()===a)&&(0,h.shouldTruncateLabel)(e.display)&&s.select(this).style("cursor","pointer").on("click",(function(){g.default.isDefined(e.onClick)&&g.default.isFunction(e.onClick)?e.onClick(e.display,s.select(i)):(0,h.loadLabelPopup)(e.display,"y")}))}))},w=function(t){function e(t){var n,a;return(0,r.default)(this,e),(n=S(this,e)).config=(a=t,g.default.deepClone(a)),n.config.actionKeys=[],n.config.eventKeys=[],n.config.activityKeys=[],n.config.taskKeys=[],n.trackGroupPath=null,n}return(0,c.default)(e,t),(0,o.default)(e,[{key:"load",value:function(t){if(!(0,v.isUniqueKey)(t.tracks,this.config.key))throw new Error(d.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);return this.trackGroupPath=(0,m.createTrackContainer)(t.config,t.svg,this.config),(0,m.updateTrackProps)(t.config,this.config,!0),(0,b.loadGanttTrackSelector)(t,this.trackGroupPath,this.config),g.default.notEmpty(this.config.activities)&&(0,_.loadActivities)(t,this.trackGroupPath,this.config.trackLabel,this.config),g.default.notEmpty(this.config.tasks)&&(0,T.loadTasks)(t,this.trackGroupPath,this.config.trackLabel,this.config),g.default.notEmpty(this.config.events)&&(0,x.loadEvents)(t,this.trackGroupPath,this.config.trackLabel,this.config),g.default.notEmpty(this.config.actions)&&(0,y.loadActions)(t,this.trackGroupPath,this.config.trackLabel,this.config),this}},{key:"unload",value:function(t){return(0,m.updateTrackProps)(t.config,this.config),(0,b.unloadGanttTrackSelector)(t,this.trackGroupPath),g.default.notEmpty(this.config.activities)&&(0,_.unloadActivities)(t,this.trackGroupPath),g.default.notEmpty(this.config.tasks)&&(0,T.unloadTasks)(t,this.trackGroupPath),g.default.notEmpty(this.config.events)&&(0,x.unloadEvents)(t,this.trackGroupPath),g.default.notEmpty(this.config.actions)&&(0,y.unloadActions)(t,this.trackGroupPath),(0,m.removeTrackContainer)(t.svg,this.config.key),this.config={},this}},{key:"resize",value:function(t){return(0,m.scaleGraph)(t.scale,t.config),g.default.notEmpty(this.trackGroupPath)&&(0,E.translateTrackSelector)(t.scale,t.config,this.trackGroupPath,this.config),g.default.notEmpty(this.config.activities)&&(0,E.translateActivities)(t.scale,t.config,this.trackGroupPath),g.default.notEmpty(this.config.tasks)&&(0,E.translateTasks)(t.scale,t.config,this.trackGroupPath),(g.default.notEmpty(this.config.actions)||g.default.notEmpty(this.config.events))&&(0,E.translateDataPoints)(t.scale,t.config,this.trackGroupPath),this}},{key:"reflow",value:function(t,e){var n=this;if(g.default.notEmpty(e.activities)&&g.default.notEmpty(this.config.activities)){e.activityKeys=[],e.activities.forEach((function(t){if(e.activityKeys.push(t.key),n.config.activityKeys.includes(t.key)){var a=n.config.activityKeys.indexOf(t.key);n.config.activities[a].startDate=t.startDate,n.config.activities[a].endDate=t.endDate}})),this.config.activityKeys.slice(0).forEach((function(t){if(!e.activityKeys.includes(t)){var a=n.config.activityKeys.indexOf(t);n.config.activityKeys.splice(a,1),n.config.activities.splice(a,1)}}));var a=t.svg.selectAll(".".concat(p.default.trackGroup,'[aria-describedby="').concat(this.config.key,'"]'));(0,_.reflowActivities)(t.svg,t.config,t.scale,this,a)}if(g.default.notEmpty(e.tasks)&&g.default.notEmpty(this.config.tasks)){e.taskKeys=[],e.tasks.forEach((function(t){if(e.taskKeys.push(t.key),n.config.taskKeys.includes(t.key)){var a=n.config.taskKeys.indexOf(t.key);n.config.tasks[a].startDate=t.startDate,n.config.tasks[a].endDate=t.endDate}})),this.config.taskKeys.slice(0).forEach((function(t){if(!e.taskKeys.includes(t)){var a=n.config.taskKeys.indexOf(t);n.config.taskKeys.splice(a,1),n.config.tasks.splice(a,1)}}));var i=t.svg.selectAll(".".concat(p.default.trackGroup,'[aria-describedby="').concat(this.config.key,'"]'));(0,T.reflowTasks)(t.svg,t.config,t.scale,this,i)}if(g.default.notEmpty(e.events)&&g.default.notEmpty(this.config.events)){e.eventKeys=[],e.events.forEach((function(t){if(e.eventKeys.push(t.key),n.config.eventKeys.includes(t.key)){var a=n.config.eventKeys.indexOf(t.key);n.config.events[a].values=t.values}})),this.config.eventKeys.slice(0).forEach((function(t){if(!e.eventKeys.includes(t)){var a=n.config.eventKeys.indexOf(t);n.config.eventKeys.splice(a,1),n.config.events.splice(a,1)}}));var r=t.svg.selectAll(".".concat(p.default.trackGroup,'[aria-describedby="').concat(this.config.key,'"]'));(0,x.reflowEvents)(t.config,t.scale,this,r)}if(g.default.notEmpty(e.actions)&&g.default.notEmpty(this.config.actions)){e.actionKeys=[],e.actions.forEach((function(t){if(e.actionKeys.push(t.key),n.config.actionKeys.includes(t.key)){var a=n.config.actionKeys.indexOf(t.key);n.config.actions[a].values=t.values}})),this.config.actionKeys.slice(0).forEach((function(t){if(!e.actionKeys.includes(t)){var a=n.config.actionKeys.indexOf(t);n.config.actionKeys.splice(a,1),n.config.actions.splice(a,1)}}));var o=t.svg.selectAll(".".concat(p.default.trackGroup,'[aria-describedby="').concat(this.config.key,'"]'));(0,y.reflowActions)(t.config,t.scale,this,o,t.legendSVG)}this.resize(t)}},{key:"redraw",value:function(t){return D(t.svg,this.config.trackLabel),this}}])}(f.GraphContent);e.default=w},72763:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.unloadActions=e.renderLegendItems=e.reflowActions=e.processActionItems=e.prepareLegendEventHandlers=e.loadActions=e.hoverHandler=e.clickHandler=void 0;var r=y(n(56194)),o=n(72372),u=n(34004),l=y(n(22639)),c=a(n(74467)),s=n(18321),f=a(n(75090)),d=a(n(45839)),h=n(34675),p=n(8050),g=n(15553);function v(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(v=function(t){return t?n:e})(t)}function y(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=v(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var _=e.processActionItems=function(t,e,n){var a=function(t){if(!d.default.isDate(t))throw new Error(c.default.THROW_MSG_INVALID_FORMAT_TYPE);return d.default.parseDateTime(t)},i=function(t,e){var n=t.filter((function(t){return t.key===e}));if(!n.length)throw new Error(c.default.THROW_MSG_UNIQUE_ACTION_KEY_NOT_PROVIDED);return n[0]}(t.actionLegend,n.key);return n.values.map((function(r){return{key:n.key,onClick:n.onClick,x:a(r),y:e.display,label:i.label,color:i.color||l.default.DEFAULT_COLOR,shape:i.shape||l.SHAPES.CIRCLE,clickPassThrough:!!d.default.isDefined(t.clickPassThrough)&&t.clickPassThrough.actions}}))},m=e.clickHandler=function(t,e,n){return function(t,a){var i,o,u;(0,s.legendClickHandler)(t),i=e.shownTargets,o=a.key,(u=i.indexOf(o))>-1?i.splice(u,1):i.push(o),n.selectAll(".".concat(f.default.point,'[aria-describedby="').concat(a.key,'"]')).attr("aria-hidden",(function(){return!("true"===r.select(this).attr("aria-hidden"))}))}},x=e.hoverHandler=function(t,e){return function(n,a){(0,s.legendHoverHandler)(t,e,n.key,a,[function(t,e,n,i,r){return e.selectAll(".".concat(f.default.point,'[aria-describedby="').concat(r,'"]')).classed(f.default.blur,a===l.default.HOVER_EVENT.MOUSE_ENTER)}])}},T=(e.prepareLegendEventHandlers=function(t,e,n,a){return{clickHandler:m(t,e,n),hoverHandler:x(a,n)}},e.renderLegendItems=function(t,e,n,a){n.label&&n.label.display&&a&&(0,s.loadLegendItem)(a,n,t,e)},function(t){if(d.default.isEmpty(t))throw new Error(c.default.THROW_MSG_NO_DATA_LOADED);if(d.default.isEmpty(t.key))throw new Error(c.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);if(d.default.isEmpty(t.values))throw new Error(c.default.THROW_MSG_NO_DATA_POINTS)}),b=function(t){return T(t),d.default.deepClone(t)},E=function(t,e,n,a){return n.append("g").classed(f.default.pointGroup,!0).each((function(n,i){var l=r.select(this);(0,p.renderSelectionPath)(t,e,l,n,i),function(t,e,n,a,i,r){n.append((function(){var n;return new o.Shape((0,h.getShapeForTarget)(a)).getShapeElement((0,u.getDefaultSVGProps)({svgClassNames:f.default.point,svgStyles:"fill: ".concat((0,h.getColorForTarget)(a),";"),transformFn:(0,g.transformPoint)(t,e)(a),onClickFn:function(){(0,p.dataPointActionHandler)(a,i,this)},a11yAttributes:{"aria-hidden":r?"false"===(null===(n=r.select(".".concat(f.default.legendItem,"[aria-describedby='").concat(a.key,"']")))||void 0===n?void 0:n.attr("aria-current")):"false","aria-describedby":a.key,"aria-disabled":!d.default.isFunction(a.onClick)},additionalAttributes:{"pointer-events":a.clickPassThrough&&!d.default.isFunction(a.onClick)}}))}))}(t,e,l,n,i,a)}))};e.loadActions=function(t,e,n,a){return a.actions.forEach((function(i,r){(0,p.drawDataPoints)(t.scale,t.config,e,_(t.config,n,b(i)),E,!1),a.actionKeys.splice(r,0,i.key)}))},e.reflowActions=function(t,e,n,a,i){n.config.actions.forEach((function(t){T(t)})),a.selectAll(".".concat(f.default.currentPointsGroup,'[event="false"]')).remove(),n.config.actions.forEach((function(r){(0,p.drawDataPoints)(e,t,a,_(t,n.config.trackLabel,b(r)),E,!1,i)}))},e.unloadActions=function(t,e){return e.selectAll("g.".concat(f.default.currentPointsGroup)).remove()}},46954:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.unloadActivities=e.reflowActivities=e.loadActivities=void 0;var r=g(n(56194)),o=n(77317),u=n(95511),l=g(n(22639)),c=a(n(75090)),s=a(n(45839)),f=n(8658),d=n(13170),h=n(73001);function p(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(p=function(t){return t?n:e})(t)}function g(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=p(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var v=function(t,e,n){return{path:r.select(n),x:t.x(e.startDate),y:t.y(e.y)+l.default.DEFAULT_GANTT_ACTIVITY_PADDING.top,width:t.x(e.endDate)-t.x(e.startDate)||l.default.DEFAULT_GANTT_TASK_CHUNK_WIDTH,height:l.default.DEFAULT_GANTT_ACTIVITY_HEIGHT}},y=function(t,e,n,a,i,r){return(0,u.getRect)(t,e,n,a,i).classed(c.default.activityBar,!0).attr("style",r),t},_=function(t,e,n,a,i,r){return y(t,e,n,l.default.DEFAULT_GANTT_TASK_CHUNK_WIDTH,i,r),t},m=function(t,e,n){var a=v(t,e,n);((0,h.isAChunk)(e.startDate,e.endDate)?_:y)(a.path,a.x,a.y,a.width,a.height,e.style).attr("pointer-events",(function(){return e.clickPassThrough?"none":"auto"}))},x=function(t,e,n,a){var i=v(e,n,a);(function(t,e,n,a,i,r,o,f){var d="pattern-stripe-gantt-activity";return(s.default.isEmpty(e)||e.empty())&&t.append("defs"),t.select("#".concat(d)).empty()&&e.append("pattern").attr("id",d).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(135)").attr("width",l.default.DEFAULT_GANTT_ACTIVITY_STRIPE_WIDTH).attr("height",o).attr("style","fill: ".concat(l.default.DEFAULT_BAR_STRIPE_COLOR,";")).append("rect").attr("width",l.default.DEFAULT_GANTT_ACTIVITY_STRIPE_DISTANCE).attr("height",o),(0,u.getRect)(n,a,i,r,o).classed(c.default.activityBar,!0).attr("style",f),(0,u.getRect)(n,a,i,r,o).classed(c.default.activityBar,!0).attr("style","fill: url(#".concat(d,"); fill-opacity: 0.7;")),n})(t,t.select("defs"),i.path,i.x,i.y,i.width,i.height,n.style).attr("pointer-events",(function(){return n.clickPassThrough?"none":"auto"}))},T=function(t,e,n,a,i,r){var o=i.selectAll("g").data(r.map((function(t){return function(t,e,n){var a=n.duration?(0,h.getActivityDuration)(n.duration):0;return{y:e.display,startDate:(0,h.getStartDuration)(a,n.startDate,n.endDate),endDate:(0,h.getEndDuration)(a,n.startDate,n.endDate),dependencies:n.dependencies,color:n.color||l.COLORS.BLUE,label:n.label||null,key:n.key,style:(0,h.getActivityStyle)(n),isHashed:(0,d.isHashed)(n.style),clickPassThrough:!!s.default.isDefined(t.clickPassThrough)&&t.clickPassThrough.activities}}(n,a,s.default.deepClone(t))})));o.enter().append("g").classed(c.default.activity,!0).attr("aria-selected",!1).attr("aria-describedby",(function(t){return t.key})).each((function(n){n.isHashed?x(t,e,n,this):m(e,n,this)})),o.exit().transition().call(l.default.d3Transition(n.settingsDictionary.transition)).remove()};e.loadActivities=function(t,e,n,a){var i=e.append("g").classed(c.default.activityGroup,!0).attr("transform","translate(".concat((0,o.getXAxisXPosition)(t.config),",").concat((0,d.getXAxisYPosition)(t.config),")"));a.activities.forEach((function(t,e){(0,f.validateActivity)(t),a.activityKeys.splice(e,0,t.key)})),T(t.svg,t.scale,t.config,n,i,a.activities)},e.unloadActivities=function(t,e){return e.select("g.".concat(c.default.activityGroup)).remove()},e.reflowActivities=function(t,e,n,a,i){a.config.activities.forEach((function(t){(0,f.validateActivity)(t)}));var r=i.selectAll(".".concat(c.default.activityGroup));r.selectAll("g").remove(),T(t,n,e,a.config.trackLabel,r,a.config.activities)}},13170:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"attachEventHandlers",{enumerable:!0,get:function(){return p.attachEventHandlers}}),e.d3RemoveElement=e.createTrackSelectionContainer=e.createTrackContainer=e.createTrack=e.createGrid=e.createGanttContent=e.createDefs=e.createContentContainer=e.createAxes=e.calculateAxesSize=e.calculateAxesLabelSize=void 0,Object.defineProperty(e,"detachEventHandlers",{enumerable:!0,get:function(){return p.detachEventHandlers}}),e.getAxesScale=e.determineHeight=void 0,Object.defineProperty(e,"getColorForTarget",{enumerable:!0,get:function(){return p.getColorForTarget}}),Object.defineProperty(e,"getShapeForTarget",{enumerable:!0,get:function(){return p.getShapeForTarget}}),e.getXAxisWidth=void 0,Object.defineProperty(e,"getXAxisXPosition",{enumerable:!0,get:function(){return u.getXAxisXPosition}}),e.scaleGraph=e.removeTrackContainer=e.prepareLoadAtIndex=e.isHashed=e.getYAxisYPosition=e.getXAxisYPosition=void 0,Object.defineProperty(e,"translateCanvas",{enumerable:!0,get:function(){return p.translateCanvas}}),e.updateTrackProps=e.updateAxesDomain=void 0;var r=a(n(41132)),o=_(n(56194)),u=n(77317),l=_(n(22639)),c=n(9070),s=a(n(74467)),f=n(85356),d=a(n(75090)),h=a(n(45839)),p=n(34675),g=_(n(1325)),v=n(15553);function y(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(y=function(t){return t?n:e})(t)}function _(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=y(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var m=function(t){return Object.keys(t).map((function(e){return t[e].trackHeight})).map((function(t,e,n){return e>0?t+n.slice(0,e).reduce((function(t,e){return t+e}),0):t}))},x=(e.determineHeight=function(t){return h.default.isEmpty(t.axis.y.trackList)?0:parseInt(m(t.axis.y.trackList).pop(),10)},function(t,e,n){var a=Object.keys(n).map((function(t){return[t,n[t]]}));a.splice(e,0,[t.key,{trackHeight:t.dimension?t.dimension.trackHeight:l.default.DEFAULT_GANTT_TRACK_HEIGHT,trackLabel:t.trackLabel.display}]);var i={};return a.forEach((function(t){var e=[t[1]];i[t[0]]=e[0]})),i}),T=(e.updateTrackProps=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];!function(t){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?t.axis.y.trackCount+=1:t.axis.y.trackCount-=1}(t,n),n||delete t.axis.y.trackList[e.key]},e.updateAxesDomain=function(t){return t.axis.y.domain={lowerLimit:0,upperLimit:t.axis.y.trackCount||1},t},function(t){return(0,f.shouldTruncateLabel)(t)?(0,f.truncateLabel)(t):t}),b=function(t){return h.default.isEmpty(t)?[]:Object.keys(t).map((function(e){return t[e].trackLabel}))},E=(e.calculateAxesSize=function(t){t.axisSizes={},t.axisSizes.x=(0,u.getXAxisHeight)(t),t.axisSizes.y=function(t){if(t.padding.hasCustomPadding)return t.padding.left;var e=o.scaleOrdinal().domain(b(t.axis.y.trackList)).range([0].concat((0,r.default)(m(t.axis.y.trackList)))),n=o.axisLeft(e),a=o.select("body").append("div"),i=a.append("svg").append("g").call(n).node().getBoundingClientRect().width;return a.remove(),i}(t)},e.calculateAxesLabelSize=function(t){t.axisLabelWidths={},t.axisLabelWidths.y=t.padding.left},e.getXAxisYPosition=function(t){return 2*(t.padding.top+t.padding.bottom)}),A=e.getXAxisWidth=function(t){return t.canvasWidth-t.axisSizes.y-t.axisLabelWidths.y-E(t)},S=e.getYAxisYPosition=function(t){return E(t)},O=e.getAxesScale=function(t,e,n){return t.x=(0,u.prepareXAxis)(e.x,n.axis.x.ticks.values,A(n),(0,u.getAxisTickFormat)(n.d3Locale,n.axis.x.ticks.format,n.axis.x.type),l.AXES_ORIENTATION.X.TOP),t.y=function(t,e){return o.axisLeft(t).ticks(e/l.default.DEFAULT_Y_AXIS_SPACING).tickFormat(T).tickPadding(8)}(e.y,(0,u.getYAxisHeight)(n)),t},D=e.scaleGraph=function(t,e){t.x=o.scaleTime().domain([e.axis.x.domain.lowerLimit,e.axis.x.domain.upperLimit]).range([0,A(e)]).clamp(e.settingsDictionary.shouldClamp),t.y=o.scaleOrdinal().domain(b(e.axis.y.trackList)).range([0].concat((0,r.default)(m(e.axis.y.trackList)))),e.axis.x.rangeRounding&&t.x.nice()},w=(e.createDefs=function(t,e){var n=e.append("defs");n.append("clipPath").attr("id",t.clipPathId).append("rect").attr(l.default.X_AXIS,(0,u.getXAxisXPosition)(t)).attr(l.default.Y_AXIS,S(t)).attr("width",A(t)).attr("height",(0,u.getYAxisHeight)(t)),t.settingsDictionary.shouldCreateDatelineDefs&&t.dateline.length>0&&n.append("clipPath").attr("id",t.datelineClipPathId).append("rect").attr(l.default.X_AXIS,(0,u.getXAxisXPosition)(t)).attr(l.default.Y_AXIS,S(t)).attr("width",A(t)).attr("height",0)},function(t,e,n,a){t.append("g").classed(n,!0).call((0,v.translateVerticalGrid)(e,a))});e.createGrid=function(t,e,n,a){O(t,e,n);var i=a.append("g").classed(d.default.grid,!0).attr("transform","translate(".concat((0,u.getXAxisXPosition)(n),",").concat(E(n),")"));i.append("g").classed(d.default.gridH,!0).call((0,v.translateHorizontalGrid)(t,n)),(0,c.createVGrid)(i,t,n,w)},e.createAxes=function(t,e,n,a){O(t,e,n),(0,c.prepareHAxis)(e,t,n,u.prepareHorizontalAxis,l.AXES_ORIENTATION.X.TOP),a.append("g").classed(d.default.axis,!0).classed(d.default.axisX,!0).attr("aria-hidden",!n.axis.x.show).attr("transform","translate(".concat((0,u.getXAxisXPosition)(n),", ").concat(E(n),")")).call(t.x).call(u.resetD3FontSize),a.append("g").classed(d.default.axis,!0).classed(d.default.axisY,!0).classed(d.default.axisYTrackLabel,!0).attr("aria-hidden",!n.axis.y.show).attr("transform","translate(".concat((0,u.getYAxisXPosition)(n),",").concat(E(n),")")).call(t.y).call(u.resetD3FontSize)},e.createContentContainer=function(t,e){return e.append("rect").classed(d.default.contentContainer,!0).attr(l.default.X_AXIS,(0,u.getXAxisXPosition)(t)).attr(l.default.Y_AXIS,E(t)).attr("width",A(t)).attr("height",(0,u.getYAxisHeight)(t))},e.createTrackSelectionContainer=function(t,e){return e.append("g").classed(d.default.ganttTrackSelectorGroup,!0)},e.createGanttContent=function(t,e){return e.append("g").classed(d.default.ganttChartContent,!0).attr("clip-path","url(#".concat(t.clipPathId,")"))},e.prepareLoadAtIndex=function(t,e,n,a){if((0,g.validateContent)(n),h.default.notEmpty(n)&&h.default.notEmpty(n.loadAtIndex)){if(n.loadAtIndex<0)throw new Error(s.default.THROW_MSG_INVALID_LOAD_CONTENT_AT_INDEX);var i=n.loadAtIndex;return e.axis.y.trackList=x(n,i,e.axis.y.trackList),D(t,e),i}return e.axis.y.trackList=x(n,a,e.axis.y.trackList),a},e.createTrack=function(t){return new g.default(t)},e.createTrackContainer=function(t,e,n){return e.select(".".concat(d.default.ganttChartContent)).append("g").classed(d.default.trackGroup,!0).attr("aria-labelledby",n.trackLabel.display).attr("aria-describedby",n.key)},e.removeTrackContainer=function(t,e){return t.select('g[aria-describedby="'.concat(e,'"]')).remove()},e.isHashed=function(t){return!(h.default.isEmpty(t)||!t.isHashed)},e.d3RemoveElement=function(t,e){t&&(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.selectAll(e).remove():t.select(e).remove())}},8050:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.renderSelectionPathForEvents=e.renderSelectionPath=e.drawDataPoints=e.dataPointActionHandler=void 0;var r=v(n(56194)),o=n(72372),u=n(34004),l=n(77317),c=v(n(22639)),s=n(52097),f=a(n(75090)),d=a(n(45839)),h=n(13170),p=n(15553);function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}function v(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}e.drawDataPoints=function(t,e,n,a,i,r,o){var u=n.append("g").classed(f.default.currentPointsGroup,!0).attr("transform","translate(".concat((0,l.getXAxisXPosition)(e),", ").concat((0,h.getXAxisYPosition)(e),")")).attr("event",r).selectAll(".".concat(f.default.point)).data(a);o?i(t,e,u.enter(),o):i(t,e,u.enter()),u.exit().transition().call(c.default.d3Transition(e.settingsDictionary.transition)).remove()};var y=e.dataPointActionHandler=function(t,e,n){d.default.isEmpty(t.onClick)||function(t){var e=r.select(t.parentNode).select(".".concat(f.default.dataPointSelection));return e.attr("aria-hidden",!("true"===e.attr("aria-hidden"))),e}(n).call((function(n){return t.onClick((function(){return n.attr("aria-hidden",!0)}),t.key,e,t,n)}))};e.renderSelectionPath=function(t,e,n,a,i){return n.append((function(){return new o.Shape((0,s.getSVGObject)(c.SHAPES.CIRCLE,c.default.DEFAULT_PLOT_SELECTION_SCALE)).getShapeElement((0,u.getDefaultSVGProps)({svgClassNames:f.default.dataPointSelection,svgStyles:"",transformFn:(0,p.transformPoint)(t,e)(a),onClickFn:function(){y(a,i,this)},a11yAttributes:{"aria-hidden":!0,"aria-describedby":a.key,"aria-disabled":!d.default.isFunction(a.onClick)}}))}))},e.renderSelectionPathForEvents=function(t,e,n,a,i){return n.append((function(){return new o.Shape((0,s.getSVGObjectForEvent)(c.SHAPES.CIRCLE,a.shape.options,c.default.DEFAULT_PLOT_SELECTION_SCALE_FOR_EVENTS)).getShapeElement((0,u.getDefaultSVGProps)({svgClassNames:f.default.dataPointSelection,svgStyles:"",transformFn:(0,p.transformPoint)(t,e)(a),onClickFn:function(){y(a,i,this)},a11yAttributes:{"aria-hidden":!0,"aria-describedby":a.key,"aria-disabled":!d.default.isFunction(a.onClick)}}))}))}},73001:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.isAChunk=e.getTaskStyle=e.getStartDuration=e.getEndDuration=e.getDuration=e.getActivityStyle=e.getActivityDuration=e.calculatePercentage=void 0;var r=n(95511),o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=c(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(22639)),u=a(n(74467)),l=a(n(45839));function c(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(c=function(t){return t?n:e})(t)}e.getTaskStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.getBarStyle)(t.style,{color:t.color})},e.getActivityStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.color||o.COLORS.BLUE,n="fill: ".concat(e,"; fill-opacity: ").concat(o.default.DEFAULT_GANTT_ACTIVITY_OPACITY,"; stroke-width: 1px; stroke: ").concat(e);return l.default.isEmpty(t.style)||!0===t.style.isHashed&&(n="fill: ".concat(t.color||o.default.DEFAULT_ACTIVITY_BAR_HASH_COLOR,"; fill-opacity: ").concat(o.default.DEFAULT_GANTT_ACTIVITY_OPACITY,";")),n},e.getDuration=function(t){if(t&&!l.default.isFunction(t))throw new Error(u.default.THROW_MSG_TASKS_DURATION_NOT_FUNCTION);var e=t();if("number"!=typeof e)throw new Error(u.default.THROW_MSG_TASKS_DURATION_NOT_VALID);return e},e.getActivityDuration=function(t){if(t&&!l.default.isFunction(t))throw new Error(u.default.THROW_MSG_ACTIVITIES_DURATION_NOT_FUNCTION);var e=t();if("number"!=typeof e)throw new Error(u.default.THROW_MSG_ACTIVITIES_DURATION_NOT_VALID);return e},e.getStartDuration=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return l.default.isEmpty(e)?l.default.parseDateTime(l.default.getTime(n)-t):l.default.parseDateTime(e)},e.getEndDuration=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0;return l.default.isEmpty(n)?l.default.parseDateTime(l.default.getTime(e)+t):l.default.parseDateTime(n)},e.isAChunk=function(t,e){return l.default.getTime(e)-l.default.getTime(t)==0},e.calculatePercentage=function(t,e){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:100)*(e-t)/100}},87435:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.unloadEvents=e.reflowEvents=e.loadEvents=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=v(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(72372),u=n(34004),l=n(22639),c=a(n(74467)),s=a(n(75090)),f=a(n(45839)),d=n(34675),h=n(8658),p=n(8050),g=n(15553);function v(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(v=function(t){return t?n:e})(t)}var y=function(t,e,n){n.append("g").classed(s.default.pointGroup,!0).each((function(n,a){var i=r.select(this);f.default.isFunction(n.onClick)&&(0,p.renderSelectionPathForEvents)(t,e,i,n,a),function(t,e,n,a,i){n.append((function(){return new o.Shape((0,d.getShapeForTarget)(a)).getShapeElement((0,u.getDefaultSVGProps)({svgClassNames:s.default.point,svgStyles:"fill: ".concat((0,d.getColorForTarget)(a),";"),transformFn:(0,g.transformPoint)(t,e)(a),onClickFn:function(){(0,p.dataPointActionHandler)(a,i,this)},a11yAttributes:{"aria-hidden":!1,"aria-describedby":a.key,"aria-disabled":!f.default.isFunction(a.onClick)},additionalAttributes:{"pointer-events":a.clickPassThrough&&!f.default.isFunction(a.onClick)}}))}))}(t,e,i,n,a)}))},_=function(t,e,n){var a=function(t){if(!f.default.isDate(t))throw new Error(c.default.THROW_MSG_INVALID_FORMAT_TYPE);return f.default.parseDateTime(t)};return n.values.map((function(i){return{key:n.key,onClick:n.onClick,x:a(i),y:e.display,label:n.label,color:n.color||"",shape:n.shape||l.SHAPES.CIRCLE,clickPassThrough:!!f.default.isDefined(t.clickPassThrough)&&t.clickPassThrough.events}}))},m=function(t){return(0,h.validateEvent)(t),f.default.deepClone(t)};e.reflowEvents=function(t,e,n,a){n.config.events.forEach((function(t){(0,h.validateEvent)(t)})),a.selectAll(".".concat(s.default.currentPointsGroup,'[event="true"]')).remove(),n.config.events.forEach((function(i){(0,p.drawDataPoints)(e,t,a,_(t,n.config.trackLabel,m(i)),y,!0)}))},e.loadEvents=function(t,e,n,a){a.events.forEach((function(i,r){(0,p.drawDataPoints)(t.scale,t.config,e,_(t.config,n,m(i)),y,!0),a.eventKeys.splice(r,0,i.key)}))},e.unloadEvents=function(t,e){return e.selectAll("g.".concat(s.default.currentPointsGroup)).remove()}},75338:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.unloadTasks=e.renderTaskGroup=e.renderSelectionIndicator=e.renderPercentageBarGroup=e.renderHashedTaskGroup=e.reflowTasks=e.processTask=e.loadTasks=e.generatorArgs=void 0;var r=g(n(56194)),o=n(77317),u=n(95511),l=g(n(22639)),c=a(n(75090)),s=a(n(45839)),f=n(8658),d=n(13170),h=n(73001);function p(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(p=function(t){return t?n:e})(t)}function g(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=p(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var v=function(t,e,n){s.default.isEmpty(t.onClick)||function(t){var e=r.select(t),n=e.select(".".concat(c.default.taskBarSelection));return e.attr("aria-selected",!("true"===e.attr("aria-selected"))),n.attr("aria-hidden",!("true"===n.attr("aria-hidden"))),e}(n).call((function(n){return t.onClick((function(){var t=n.select(".".concat(c.default.taskBarSelection));t.attr("aria-hidden",!("true"===t.attr("aria-hidden"))),n.attr("aria-selected",!1)}),t.key,e,t,n)}))},y=e.processTask=function(t,e,n){var a=n.duration?(0,h.getDuration)(n.duration):0;return{onClick:n.onClick,y:e.display,startDate:(0,h.getStartDuration)(a,n.startDate,n.endDate),endDate:(0,h.getEndDuration)(a,n.startDate,n.endDate),percentage:n.percentage,dependencies:n.dependencies,color:n.color||l.COLORS.BLUE,label:n.label||null,key:n.key,style:(0,h.getTaskStyle)(n),isHashed:(0,d.isHashed)(n.style),clickPassThrough:!!s.default.isDefined(t.clickPassThrough)&&t.clickPassThrough.tasks}},_=e.generatorArgs=function(t,e,n){return{path:r.select(n),x:t.x(e.startDate),y:t.y(e.y)+l.default.DEFAULT_GANTT_TASK_PADDING.top,width:t.x(e.endDate)-t.x(e.startDate)||l.default.DEFAULT_GANTT_TASK_CHUNK_WIDTH,height:l.default.DEFAULT_GANTT_TASK_HEIGHT}},m=e.renderSelectionIndicator=function(t){(0,u.getRect)(t.path,t.x,t.y,t.width,t.height).classed(c.default.taskBarSelection,!0).attr("rx",3).attr("ry",3).attr("aria-hidden",!0)},x=e.renderPercentageBarGroup=function(t,e,n,a){var i=_(t,e,a);(0,u.getPercentageBar)(i.path,i.x,i.y,i.width,i.height,(0,h.calculatePercentage)(t.x(e.startDate),t.x(e.endDate),e.percentage),e.color).attr("aria-disabled",!s.default.isFunction(e.onClick)).attr("pointer-events",(function(){return e.clickPassThrough&&!s.default.isFunction(e.onClick)?"none":"auto"})).on("click",(function(){return v(e,n,a)}))},T=e.renderTaskGroup=function(t,e,n,a){var i=_(t,e,a);((0,h.isAChunk)(e.startDate,e.endDate)?u.getChunk:u.getBar)(i.path,i.x,i.y,i.width,i.height,e.style).attr("aria-disabled",!s.default.isFunction(e.onClick)).attr("pointer-events",(function(){return e.clickPassThrough&&!s.default.isFunction(e.onClick)?"none":"auto"})).on("click",(function(){return v(e,n,a)}))},b=e.renderHashedTaskGroup=function(t,e,n,a,i){var r=_(e,n,i);(0,u.getHashedBar)(t,t.select("defs"),r.path,r.x,r.y,r.width,r.height,n.style).attr("aria-disabled",!s.default.isFunction(n.onClick)).attr("pointer-events",(function(){return n.clickPassThrough&&!s.default.isFunction(n.onClick)?"none":"auto"})).on("click",(function(){return v(n,a,i)}))},E=function(t,e,n,a,i,r){var o=i.selectAll("g").data(r.map((function(t){return y(n,a,s.default.deepClone(t))})));o.enter().append("g").classed(c.default.task,!0).attr("aria-selected",!1).attr("aria-describedby",(function(t){return t.key})).each((function(n,a){var i=_(e,n,this);m(i),n.percentage?x(e,n,a,this):n.isHashed?b(t,e,n,a,this):T(e,n,a,this)})),o.exit().transition().call(l.default.d3Transition(n.settingsDictionary.transition)).remove()};e.reflowTasks=function(t,e,n,a,i){a.config.tasks.forEach((function(t){(0,f.validateTask)(t)}));var r=i.selectAll(".".concat(c.default.taskGroup));r.selectAll("g").remove(),E(t,n,e,a.config.trackLabel,r,a.config.tasks)},e.loadTasks=function(t,e,n,a){var i=e.append("g").classed(c.default.taskGroup,!0).attr("transform","translate(".concat((0,o.getXAxisXPosition)(t.config),",").concat((0,d.getXAxisYPosition)(t.config),")"));a.tasks.forEach((function(t,e){(0,f.validateTask)(t),a.taskKeys.splice(e,0,t.key)})),E(t.svg,t.scale,t.config,n,i,a.tasks)},e.unloadTasks=function(t,e){return e.select("g.".concat(c.default.taskGroup)).remove()}},49130:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.unloadGanttTrackSelector=e.loadGanttTrackSelector=e.generatorArgs=void 0;var i=n(95511),r=a(n(22639)),o=a(n(75090)),u=a(n(45839)),l=n(13170),c=e.generatorArgs=function(t,e,n,a){return{path:n,x:r.default.DEFAULT_GANTT_TRACK_SELECTION.x,y:e.y(a.trackLabel.display)+r.default.DEFAULT_GANTT_TRACK_SELECTION.y,width:(0,l.getXAxisWidth)(t)-r.default.DEFAULT_GANTT_TRACK_SELECTION.width,height:t.axis.y.trackList[a.key].trackHeight-r.default.DEFAULT_GANTT_TRACK_SELECTION.height}},s=function(t,e){(0,i.getRect)(t.path,t.x,t.y,t.width,t.height).attr("aria-selected",!1).classed(o.default.ganttTrackBarSelection,!0).attr("aria-describedby",e.key).attr("aria-disabled",!u.default.isFunction(e.onClick)).on("click",(function(){return function(t,e){var n,a,i;u.default.isEmpty(e.onClick)||(n=t,a=e.key,i=n.select("[aria-describedby='".concat(a,"']")),i.attr("aria-selected",!("true"===i.attr("aria-selected"))),i).call((function(t){return e.onClick((function(){var e="true"===t.attr("aria-selected");t.attr("aria-selected",!e)}),e.key,e,t)}))}(t.path,e)}))};e.loadGanttTrackSelector=function(t,e,n){var a=e.append("g").classed(o.default.ganttTrackSelectorGroup,!0).attr("transform","translate(".concat((0,l.getXAxisXPosition)(t.config),",").concat((0,l.getXAxisYPosition)(t.config),")"));s(c(t.config,t.scale,a,n),n)},e.unloadGanttTrackSelector=function(t,e){return e.select("g.".concat(o.default.ganttTrackSelectorGroup)).remove()}},15553:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.translateVerticalGrid=e.translateTrackSelector=e.translateTasks=e.translateLabelText=e.translateHorizontalGrid=e.translateGraph=e.translateDataPoints=e.translateAxes=e.translateActivities=e.transformPoint=void 0;var r=m(n(56194)),o=n(77317),u=m(n(22639)),l=n(56690),c=n(9070),s=n(89644),f=a(n(75090)),d=n(15861),h=a(n(45839)),p=n(34675),g=n(13170),v=n(73001),y=n(49130);function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}function m(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=_(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var x=".".concat(f.default.axisYTrackLabel," .tick text"),T=function(t,e,n){var a=function(t,e){return t.y.domain().indexOf(e)}(t,n);if(!t||function(t,e,n,a){return a<0||h.default.isEmpty(e.axis.y.trackList)||t.y.domain().length>Object.keys(e.axis.y.trackList).length}(t,e,0,a))return 0;var i;return(i=e.axis.y.trackList,Object.keys(i).map((function(t){return i[t].trackHeight})))[a]/2},b=function(t,e){return t?t.x(e):0},E=e.translateAxes=function(t,e,n,a){(0,g.getAxesScale)(t,e,n),(0,c.prepareHAxis)(e,t,n,o.prepareHorizontalAxis,u.AXES_ORIENTATION.X.TOP),a.select(".".concat(f.default.axisX)).transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat((0,g.getXAxisXPosition)(n),",").concat((0,g.getXAxisYPosition)(n),")")).call(t.x),a.select(".".concat(f.default.axisY)).transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat((0,o.getYAxisXPosition)(n),", ").concat((0,g.getYAxisYPosition)(n),")")).call(t.y)},A=e.translateVerticalGrid=function(t,e){var n;if(h.default.notEmpty(e.axis.x.ticks.values)){var a=e.axis.x.ticks.values;n=t.x.tickValues((0,o.processTickValues)(a)).tickSize(-1*(0,o.getYAxisHeight)(e),0,0).tickFormat("")}else n=t.x.tickSize(-1*(0,o.getYAxisHeight)(e),0,0).tickFormat("");return n},S=e.translateHorizontalGrid=function(t,e){return t.y.tickSize(-1*(0,g.getXAxisWidth)(e),0,0).tickFormat("")},O=function(t,e,n,a){t.select(".".concat(n)).transition().call(u.default.d3Transition(a.settingsDictionary.transition)).call(A(e,a))},D=(e.translateLabelText=function(t,e,n){return n.selectAll(x).attr("transform",function(t,e){return function(n){return"translate(".concat(b(),", ").concat(T(t,e,n),")")}}(t,e))},e.transformPoint=function(t,e){return function(n){return function(a){return"translate(".concat(b(t,n.x),",").concat(function(t,e,n){return(t?t.y(n):0)+T(t,e,n)}(t,e,n.y),") scale(").concat(a,")")}}}),w=function(t,e,n,a){return n.selectAll(a).each((function(n){r.select(this).select("g").transition().call(u.default.d3Transition(e.settingsDictionary.transition)).attr("transform",(function(){return D(t,e)(n)((0,d.getTransformScale)(this))}))}))};e.translateGraph=function(t){var e,n,a,i;(0,p.translateCanvas)(t.config,t.svg),function(t,e){if(e.select("clipPath#".concat(t.clipPathId)).selectAll("rect").attr("height",(0,o.getYAxisHeight)(t)).attr("width",(0,g.getXAxisWidth)(t)),t.settingsDictionary.shouldCreateDatelineDefs&&t.dateline.length>0){var n=Math.floor((0,l.getDatelineIndicatorHeight)()/2);e.select("clipPath#".concat(t.datelineClipPathId)).selectAll("rect").attr("height",t.height+n).attr("width",(0,g.getXAxisWidth)(t)).attr(u.default.Y_AXIS,(0,g.getYAxisYPosition)(t)-n)}}(t.config,t.svg),E(t.axis,t.scale,t.config,t.svg),e=t.axis,n=t.scale,a=t.config,i=t.svg,(0,g.getAxesScale)(e,n,a),i.select(".".concat(f.default.grid)).attr("transform","translate(".concat((0,g.getXAxisXPosition)(a),",").concat((0,g.getXAxisYPosition)(a),")")),i.select(".".concat(f.default.gridH)).transition().call(u.default.d3Transition(a.settingsDictionary.transition)).call(S(e,a)),(0,c.translateVGrid)(i,e,a,O),function(t,e){e.select(".".concat(f.default.contentContainer)).transition().call(u.default.d3Transition(t.settingsDictionary.transition)).attr("width",(0,g.getXAxisWidth)(t)).attr("height",(0,o.getYAxisHeight)(t))}(t.config,t.svg),(0,l.translateDateline)(t.scale,t.config,t.svg,g.getYAxisYPosition),(0,s.translateEventline)(t.scale,t.config,t.svg,g.getYAxisYPosition)},e.translateDataPoints=function(t,e,n){w(t,e,n,".".concat(f.default.point)),w(t,e,n,".".concat(f.default.dataPointSelection))},e.translateTasks=function(t,e,n){return n.selectAll("g.".concat(f.default.task)).selectAll("rect").each((function(){var n=r.select(this);n.classed(f.default.taskBarSelection)?function(t,e,n){var a=Math.floor(u.default.DEFAULT_GANTT_TASK_SELECTION_PADDING/2),i=Math.floor(u.default.DEFAULT_GANTT_TASK_SELECTION_PADDING/4);e.transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("x",(function(e){return t.x(e.startDate)-i})).attr("y",(function(e){return t.y(e.y)+u.default.DEFAULT_GANTT_TASK_PADDING.top-i})).attr("width",(function(e){return(t.x(e.endDate)-t.x(e.startDate)||u.default.DEFAULT_GANTT_TASK_CHUNK_WIDTH)+a})).attr("height",u.default.DEFAULT_GANTT_TASK_HEIGHT+a)}(t,n,e):function(t,e,n){e.transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("x",(function(e){return t.x(e.startDate)})).attr("y",(function(e){return t.y(e.y)+u.default.DEFAULT_GANTT_TASK_PADDING.top})).attr("width",(function(e){return e.percentage?r.select(this).classed(f.default.taskBarCompletion)?(0,v.calculatePercentage)(t.x(e.startDate),t.x(e.endDate),e.percentage):t.x(e.endDate)-t.x(e.startDate):t.x(e.endDate)-t.x(e.startDate)||u.default.DEFAULT_GANTT_TASK_CHUNK_WIDTH}))}(t,n,e)}))},e.translateTrackSelector=function(t,e,n,a){n.select(".".concat(f.default.ganttTrackSelectorGroup)).select("rect").each((function(){var n=r.select(this),i=(0,y.generatorArgs)(e,t,n,a);n.transition().call(u.default.d3Transition(e.settingsDictionary.transition)).attr("y",i.y).attr("width",i.width).attr("height",i.height)}))},e.translateActivities=function(t,e,n){return n.selectAll("g.".concat(f.default.activity)).selectAll("rect.".concat(f.default.activityBar)).each((function(){!function(t,e,n){e.transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("x",(function(e){return t.x(e.startDate)})).attr("y",(function(e){return t.y(e.y)+u.default.DEFAULT_GANTT_ACTIVITY_PADDING.top})).attr("width",(function(e){return t.x(e.endDate)-t.x(e.startDate)||u.default.DEFAULT_GANTT_ACTIVITY_CHUNK_WIDTH}))}(t,r.select(this),e)}))}},67341:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(82160))},77376:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=D(n(56194)),f=a(n(76148)),d=n(22974),h=n(77317),p=D(n(22639)),g=a(n(74467)),v=n(18321),y=n(42124),_=n(85356),m=a(n(75090)),x=D(n(3522)),T=a(n(45839)),b=n(56690),E=a(n(53170)),A=n(89644),S=n(34675);function O(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(O=function(t){return t?n:e})(t)}function D(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=O(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function w(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,I()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function I(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(I=function(){return!!t})()}var P=p.default.BASE_CANVAS_WIDTH_PADDING,k=function(t,e){e.canvasWidth=parseInt(t.style("width"),10)-(0,E.default)(t)},L=function(t){t.showLabel&&t.axis.x.label||t.axis.x.show?t.canvasHeight=(0,h.getYAxisHeight)(t)+2*(t.padding.bottom+t.padding.top+t.axisLabelHeights.x):t.canvasHeight=(0,h.getYAxisHeight)(t)+t.padding.bottom+t.padding.top+t.axisLabelHeights.x},M=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:p.default.Y_AXIS;return t.axis[e].dataRange.isRangeModified},R=function(t){return t.graphContainer=null,t.config={axis:{x:{},y:{},y2:{}},shownTargets:{},dateline:[],eventline:[],pan:{}},t.axis={axisInfoRow:{x:{}}},t.scale={},t.svg=null,t.legendSVG=null,t.axesLabelShapeGroup={},t.content=[],t.contentConfig=[],t.contentKeys=[],t.resizeHandler=null,t},N=function(t){function e(t){var n;return(0,r.default)(this,e),n=w(this,e),R(n),n.generate(t),n}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getGraphSVG",value:function(){return this.svg}},{key:"generate",value:function(t){var e;this.config=(new x.default).setInput(t).validateInput().cloneInput().processInput().getConfig(),(e=this).graphContainer=s.select(e.config.bindTo),(0,h.getAxesDataRange)({},"",e.config),T.default.isDefined(e.config.axis.x.allowCalibration)&&e.config.axis.x.allowCalibration&&(console.warn("allowCalibration for x-axis is a new feature that is currently a work in progress and may have stability issues. Use it at your own risk."),(0,h.getAxesDataRange)({},p.default.X_AXIS,e.config)),(!T.default.isDefined(e.config.axis.x.ticks.tickLabelsRotation)||!T.default.validTickLabelRotations.has(e.config.axis.x.ticks.tickLabelsRotation))&&(e.config.axis.x.ticks.tickLabelsRotation=0,console.warn("".concat(e.config.axis.x.ticks.tickLabelsRotation," is an invalid value for tickLabelsRotation. Valid values are: 0, -45. Resorting to the default value of 0"))),(0,S.updateAxesDomain)(e.config),(0,S.updateXAxisDomain)(e.config),(0,_.createTooltipDiv)(),function(t){t.config.height=(0,S.determineHeight)(t.config,t.config.dimension),k(t.graphContainer,t.config),(0,h.calculateAxesSize)(t.config),(0,h.calculateAxesLabelSize)(t.config),L(t.config),(0,S.scaleGraph)(t.scale,t.config)}(this);var n=s.select(this.config.bindTo).append("div").classed(m.default.container,!0).style("padding-top",this.config.removeContainerPadding&&0).style("padding-bottom",this.config.removeContainerPadding&&0);return this.svg=n.insert("svg",":first-child").classed(m.default.canvas,!0).attr("role","img").attr("height",this.config.canvasHeight).attr("width",this.config.padding.hasCustomPadding?this.config.canvasWidth:this.config.canvasWidth-P),this.config.opaqueBackground&&s.select(".".concat(m.default.container)).style("background-color",p.COLORS.WHITE),(0,S.createDefs)(this.config,this.svg),(0,y.createRegionContainer)(this.config,this.svg),(0,S.createGrid)(this.axis,this.scale,this.config,this.svg),(0,S.createContentContainer)(this.config,this.svg),!T.default.isUndefined(this.config.axis.x.allowCalibration)&&this.config.axis.x.allowCalibration||(0,h.createAxes)(this.axis,this.scale,this.config,this.svg),(0,h.createXAxisInfoRow)(this.axis,this.scale,this.config,this.svg),(0,S.createLabel)(this.config,this.svg,this),(0,h.createAxisReferenceLine)(this.axis,this.scale,this.config,this.svg),T.default.notEmpty(this.config.dateline)&&this.config.axis.x.type===p.AXIS_TYPE.TIME_SERIES&&(0,b.createDateline)(this.scale,this.config,this.svg),T.default.notEmpty(this.config.eventline)&&this.config.axis.x.type===p.AXIS_TYPE.TIME_SERIES&&(0,A.createEventline)(this.scale,this.config,this.svg),this.config.showLegend&&(this.legendSVG=(0,v.createLegend)(this.config,this.config.bindLegendTo?s.select(this.config.bindLegendTo):n)),this.config.showNoDataText&&(0,S.drawNoDataView)(this.config,this.svg),(0,S.attachEventHandlers)(this),this.svg}},{key:"resize",value:function(){var t=this;return this.graphContainer&&((0,h.calculateAxesLabelSize)(this.config),k(this.graphContainer,this.config),L(this.config),(0,S.scaleGraph)(this.scale,this.config),(0,S.translateGraph)(this),this.content.forEach((function(e){return e.resize(t)}))),this}},{key:"processContent",value:function(t){return(0,x.validateContent)(this.content,t),this.content.push(t),this.contentConfig.push(t.config),this.contentKeys.push(t.config.key),(0,S.setAxisPadding)(this.config.axisPadding,t),(0,h.getAxesDataRange)(t,t.config.yAxis,this.config,this.content),T.default.isDefined(this.config.axis.x.allowCalibration)&&this.config.axis.x.allowCalibration&&((0,h.getAxesDataRange)(t,p.default.X_AXIS,this.config,this.content),M(this.config,p.default.X_AXIS)&&(0,S.updateXAxisDomain)(this.config,t)),this.config.allowCalibration&&M(this.config,t.config.yAxis)&&(0,S.updateAxesDomain)(this.config,t),t.load(this),T.default.notEmpty(this.config.dateline)&&this.config.axis.x.type===p.AXIS_TYPE.TIME_SERIES&&(0,b.redrawDatelineContent)(this.scale,this.config,this.svg),T.default.notEmpty(this.config.eventline)&&this.config.axis.x.type===p.AXIS_TYPE.TIME_SERIES&&(0,A.redrawEventlineContent)(this.scale,this.config,this.svg),T.default.notEmpty(t.config.values)&&(0,S.removeNoDataView)(this.svg),this}},{key:"loadContent",value:function(t){var e=this;return(0,d.contentHandler)(t,(function(t){e.processContent(t)})),this.resize(),T.default.isDefined(this.config.axis.x.allowCalibration)&&this.config.axis.x.allowCalibration&&(0,h.createAxes)(this.axis,this.scale,this.config,this.svg),this}},{key:"unloadContent",value:function(t){var e=this;return(0,d.contentHandler)(t,(function(t){var n=e.contentKeys.indexOf(t.key||t.config.key);if(n<0)throw new Error(g.default.THROW_MSG_INVALID_OBJECT_PROVIDED);e.content[n].unload(e),e.content.splice(n,1),e.contentConfig.splice(n,1),e.contentKeys.splice(n,1),e.config.showNoDataText&&e.content.every((function(t){return T.default.isEmpty(t.config.values)}))&&(0,S.drawNoDataView)(e.config,e.svg)})),this.resize(),this}},{key:"reflow",value:function(t){var e=this;if(console.warn("reflow is deprecated and will be removed a future major release. Please use reflowMultipleDatasets instead."),t&&t.values){var n=this.contentKeys.findIndex((function(e){return e===t.key}));n>-1&&("Bar"===this.content[n].type&&t.values.length>0&&(this.config.axis.x.ticks.values=[],t.values.forEach((function(t){return e.config.axis.x.ticks.values.push(t.x)}))),this.content[n].reflow(this,t),(0,S.setAxisPadding)(this.config.axisPadding,this.content[n]),(0,h.getAxesDataRange)(this.content[n],this.content[n].config.yAxis,this.config,this.content),this.config.allowCalibration&&M(this.config,this.content[n].config.yAxis)&&(0,S.updateAxesDomain)(this.config,this.content[n]),this.config.showNoDataText&&this.content.every((function(t){return T.default.isEmpty(t.config.values)}))?((0,S.drawNoDataView)(this.config,this.svg),(0,b.redrawDatelineContent)(this.scale,this.config,this.svg)):T.default.notEmpty(this.content[n].config.values)&&(0,S.removeNoDataView)(this.svg))}return t&&t.eventline&&(this.config.eventline=t.eventline,(0,A.redrawEventlineContent)(this.scale,this.config,this.svg)),(0,h.setXAxisDomain)(this.config),(0,S.scaleGraph)(this.scale,this.config),(0,h.translateAxes)(this.axis,this.scale,this.config,this.svg),(0,S.translateContentContainer)(this.config,this.svg),t&&this.config.showLabel&&(this.config.axis.x.label=T.default.sanitize(t.xLabel)||this.config.axis.x.label,this.config.axis.y.label=T.default.sanitize(t.yLabel)||this.config.axis.y.label,this.config.axis.y2.label=T.default.sanitize(t.y2Label)||this.config.axis.y2.label,(0,S.handleLabelClickFunctionDuringReflow)(this.config)),this.resize(),this}},{key:"reflowMultipleDatasets",value:function(t){var e=this;return t&&t.panData&&!T.default.isEmptyArray(t.panData)&&t.panData.forEach((function(t){if(t.values){var n=e.contentKeys.findIndex((function(e){return e===t.key}));n>-1&&("Bar"===e.content[n].type&&t.values.length>0&&(e.config.axis.x.ticks.values=[],t.values.forEach((function(t){return e.config.axis.x.ticks.values.push(t.x)}))),e.content[n].reflow(e,t),(0,S.setAxisPadding)(e.config.axisPadding,e.content[n]),(0,h.getAxesDataRange)(e.content[n],e.content[n].config.yAxis,e.config,e.content),e.config.allowCalibration&&M(e.config,e.content[n].config.yAxis)&&(0,S.updateAxesDomain)(e.config,e.content[n]),e.config.showNoDataText&&e.content.every((function(t){return T.default.isEmpty(t.config.values)}))?((0,S.drawNoDataView)(e.config,e.svg),(0,b.redrawDatelineContent)(e.scale,e.config,e.svg)):T.default.notEmpty(e.content[n].config.values)&&(0,S.removeNoDataView)(e.svg))}})),t&&t.eventline&&(this.config.eventline=t.eventline,(0,A.redrawEventlineContent)(this.scale,this.config,this.svg)),(0,h.setXAxisDomain)(this.config),(0,S.scaleGraph)(this.scale,this.config),(0,h.translateAxes)(this.axis,this.scale,this.config,this.svg),t&&this.config.showLabel&&(this.config.axis.x.label=T.default.sanitize(t.xLabel)||this.config.axis.x.label,this.config.axis.y.label=T.default.sanitize(t.yLabel)||this.config.axis.y.label,this.config.axis.y2.label=T.default.sanitize(t.y2Label)||this.config.axis.y2.label,(0,S.handleLabelClickFunctionDuringReflow)(this.config)),this.resize(),this}},{key:"destroy",value:function(){return(0,S.detachEventHandlers)(this),(0,_.destroyTooltipDiv)(),(0,S.d3RemoveElement)(this.graphContainer,".".concat(m.default.canvas)),(0,S.d3RemoveElement)(this.graphContainer,".".concat(m.default.container)),R(this),this}}])}(f.default);e.default=N},3522:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateContent=e.settingsDictionary=e.isUniqueKey=e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=T(n(10832)),f=n(99462),d=n(77317),h=T(n(22639)),p=n(56690),g=a(n(74467)),v=n(89644),y=a(n(45839)),_=n(21459),m=n(18321);function x(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(x=function(t){return t?n:e})(t)}function T(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=x(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function b(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,E()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function E(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(E=function(){return!!t})()}var A={ticks:{},show:!1,domain:{lowerLimit:0,upperLimit:0}},S=e.settingsDictionary=function(t){return(0,f.isPanningModeEnabled)(t)?{shouldClamp:!1,transition:h.default.D3_TRANSITION_PROPERTIES_DISABLED,shouldCreateDatelineDefs:!0}:{shouldClamp:!0,transition:h.default.D3_TRANSITION_PROPERTIES_ENABLED,shouldCreateDatelineDefs:!1}},O=e.isUniqueKey=function(t,e){return!y.default.hasValue(t.map((function(t){return t.config.key})),e)},D=(e.validateContent=function(t,e){if(y.default.isEmpty(e))throw new Error(g.default.THROW_MSG_NO_DATA_LOADED);if(!O(t,e.config.key))throw new Error(g.default.THROW_MSG_NON_UNIQUE_PROPERTY)},function(t){function e(){var t;return(0,r.default)(this,e),(t=b(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){if(y.default.isEmpty(this.input))throw new Error(g.default.THROW_MSG_NO_AXES_DATA_LOADED);if(y.default.isEmpty(this.input.bindTo))throw new Error(g.default.THROW_MSG_NO_BIND);if(y.default.isEmpty(this.input.axis)||y.default.isEmpty(this.input.axis.x)||y.default.isEmpty(this.input.axis.y))throw new Error(g.default.THROW_MSG_NO_AXIS_INFO);if(y.default.notEmpty(this.input.axis.x.type)&&!y.default.hasValue(Object.values(h.AXIS_TYPE),this.input.axis.x.type))throw new Error(g.default.THROW_MSG_INVALID_TYPE);if(y.default.isEmpty(this.input.axis.x.lowerLimit)||y.default.isEmpty(this.input.axis.x.upperLimit)||y.default.isEmpty(this.input.axis.y.lowerLimit)||y.default.isEmpty(this.input.axis.y.upperLimit))throw new Error(g.default.THROW_MSG_NO_AXIS_LIMIT_INFO);if((0,s.getDefaultValue)(this.input.showXLabel,!0)&&y.default.isEmpty(this.input.axis.x.label)&&console.warn('A label for the x-axis is expected to be provided to meet accessibility standards. This label will become required starting in terra-graphs version 3.0.0. "showXLabel" can be set to false to hide the label for situations where the label should not be displayed.'),y.default.isEmpty(this.input.axis.y.label))throw new Error(g.default.THROW_MSG_NO_AXIS_LABEL_INFO);if((0,d.hasY2Axis)(this.input.axis)){if(y.default.isEmpty(this.input.axis.y2.lowerLimit)||y.default.isEmpty(this.input.axis.y2.upperLimit))throw new Error(g.default.THROW_MSG_NO_AXIS_LIMIT_INFO);if(y.default.isEmpty(this.input.axis.y2.label))throw new Error(g.default.THROW_MSG_NO_AXIS_LABEL_INFO)}if(y.default.notEmpty(this.input.dateline)&&this.input.axis.x.type!==h.AXIS_TYPE.TIME_SERIES)throw new Error(g.default.THROW_MSG_INVALID_TYPE);if(y.default.notEmpty(this.input.dateline)&&this.input.axis.x.type===h.AXIS_TYPE.TIME_SERIES&&this.input.dateline.forEach((function(t){(0,p.validateDateline)(t)})),y.default.notEmpty(this.input.eventline)&&this.input.axis.x.type!==h.AXIS_TYPE.TIME_SERIES)throw new Error(g.default.THROW_MSG_INVALID_TYPE);return y.default.notEmpty(this.input.eventline)&&this.input.axis.x.type===h.AXIS_TYPE.TIME_SERIES&&this.input.eventline.forEach((function(t){(0,v.validateEventline)(t)})),this}},{key:"cloneInput",value:function(){return this.config=y.default.deepClone(this.input),this}},{key:"processInput",value:function(){var t,e,n=y.default.deepClone(this.input.axis),a=function(t,e,n){var a=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.axis[e].ticks=(0,s.getDefaultValue)(n[e].ticks,{}),t.axis[e].show=(0,s.getDefaultValue)(n[e].show,a),t.axis[e].domain={lowerLimit:y.default.getNumber(n[e].lowerLimit),upperLimit:y.default.getNumber(n[e].upperLimit)},t.axis[e].rangeRounding=(0,s.getDefaultValue)(n[e].rangeRounding,!0),t.axis[e].suppressTrailingZeros=(0,s.getDefaultValue)(n[e].suppressTrailingZeros,!1),t};return this.config.clipPathId=(0,f.generateClipPathId)(),this.config.datelineClipPathId=(0,f.generateDatelineClipPathId)(),this.config.bindTo=this.input.bindTo,this.config.bindLegendTo=this.input.bindLegendTo,this.config.axis=n,this.config.dateline=(0,s.getDefaultValue)(y.default.deepClone(this.input.dateline),[]),this.config.eventline=(0,s.getDefaultValue)(y.default.deepClone(this.input.eventline),[]),this.config.padding=(t=this.config,e=this.input.padding,y.default.isDefined(t.padding)?{top:(0,s.getDefaultValue)(e.top,h.default.PADDING.top),bottom:(0,s.getDefaultValue)(e.bottom,h.default.PADDING.bottom),right:(0,s.getDefaultValue)(e.right,h.default.PADDING.right),left:(0,s.getDefaultValue)(e.left,h.default.PADDING.left),hasCustomPadding:!0}:{top:h.default.PADDING.top,bottom:h.default.PADDING.bottom,right:h.default.PADDING.right,left:h.default.PADDING.left,hasCustomPadding:!1}),this.config.locale=(0,s.getDefaultValue)(this.input.locale,_.DEFAULT_LOCALE),this.config.d3Locale=(0,s.getDefaultValue)(this.input.locale,_.DEFAULT_LOCALE),this.config.showNoDataText=(0,s.getDefaultValue)(this.input.showNoDataText,!0),this.config.throttle=(0,s.getDefaultValue)(this.input.throttle,h.default.RESIZE_THROTTLE),this.config.settingsDictionary=S(this.input),this.config.showLabel=(0,s.getDefaultValue)(this.input.showLabel,!0),this.config.showXLabel=(0,s.getDefaultValue)(this.input.showXLabel,!0),this.config.showLegend=(0,s.getDefaultValue)(this.input.showLegend,!0),this.config.showShapes=(0,s.getDefaultValue)(this.input.showShapes,!0),this.config.showHGrid=(0,s.getDefaultValue)(this.input.showHGrid,!0),this.config.showVGrid=(0,s.getDefaultValue)(this.input.showVGrid,!0),this.config.dimension=(0,s.getDefaultValue)(this.input.dimension,{}),this.config.allowCalibration=(0,s.getDefaultValue)(this.input.allowCalibration,!0),this.config.removeContainerPadding=(0,s.getDefaultValue)(this.input.removeContainerPadding,!1),this.config.legendPadding=(0,m.getLegendPadding)(this.config,this.input.legendPadding),this.config.opaqueBackground=(0,s.getDefaultValue)(this.input.opaqueBackground,!1),this.config.axis.x.type=(0,s.getDefaultValue)(n.x.type,h.AXIS_TYPE.DEFAULT),this.config.axis.x.ticks=(0,s.getDefaultValue)(n.x.ticks,{}),this.config.axis.x.show=(0,s.getDefaultValue)(n.x.show,!0),this.config.axis.x.orientation=(0,s.getDefaultValue)(n.x.orientation,h.AXES_ORIENTATION.X.BOTTOM),this.config.axis.x.domain=(0,s.getXAxisDomain)(this.config.axis.x.type,this.config.axis.x.lowerLimit,this.config.axis.x.upperLimit),this.config.axis.x.rangeRounding=(0,s.getDefaultValue)(n.x.rangeRounding,!0),this.config.axis.x.suppressTrailingZeros=(0,s.getDefaultValue)(n.x.suppressTrailingZeros,!1),this.config.axis.x.allowCalibration=(0,s.getDefaultValue)(n.x.allowCalibration,!1),(0,f.isPanningModeEnabled)(this.input)&&(this.config.axis.x.allowCalibration=!1),this.input.axis.y?a(this.config,h.default.Y_AXIS,n,!0):this.config.axis.y=A,this.input.axis.y2?a(this.config,h.default.Y2_AXIS,n):this.config.axis.y2=A,this.config.shownTargets=[],this.config.hasCriticality=!1,this.config.shouldHideAllRegion=!1,this.config.axisPadding={y:(0,s.getDefaultValue)(n.y.padDomain,!0),y2:(0,s.getDefaultValue)(n.y2.padDomain,!0)},this.config.axisInfoRowLabelHeight=0,this.config.axis.y.isConsumerProvidedFormat=y.default.isDefined(this.config.axis.y.ticks.format),this.config.axis.y2.isConsumerProvidedFormat=y.default.isDefined(this.config.axis.y2.ticks.format),this}}])}(s.default));e.default=D},34675:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.setAxisPadding=e.scaleGraph=e.removeNoDataView=e.padDomain=e.handleLabelClickFunctionDuringReflow=e.getShapeForTarget=e.getColorForTarget=e.getAxisInfoRowLabelHeight=e.drawNoDataView=e.determineHeight=e.detachEventHandlers=e.d3RemoveElement=e.createLabel=e.createGrid=e.createDefs=e.createContentContainer=e.attachEventHandlers=void 0,Object.defineProperty(e,"translateAxes",{enumerable:!0,get:function(){return l.translateAxes}}),e.updateXAxisDomain=e.updateAxesDomain=e.translateVerticalGrid=e.translateSVGElement=e.translateLabel=e.translateGrid=e.translateGraph=e.translateDefs=e.translateContentContainer=e.translateCanvas=void 0;var r=a(n(43693)),o=y(n(56194)),u=n(10832),l=n(77317),c=y(n(22639)),s=n(9070),f=n(85356),d=a(n(75090)),h=a(n(45839)),p=n(56690),g=n(89644);function v(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(v=function(t){return t?n:e})(t)}function y(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=v(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var _=c.default.BASE_CANVAS_WIDTH_PADDING,m=c.default.DEFAULT_HEIGHT,x=e.getAxisInfoRowLabelHeight=function(t){return h.default.isDefined(t.axisInfoRowLabelHeight)?t.axisInfoRowLabelHeight:0},T=e.translateCanvas=function(t,e){return e.attr("height",t.canvasHeight+x(t)).attr("width",t.padding.hasCustomPadding?t.canvasWidth:t.canvasWidth-_)},b=e.translateDefs=function(t,e){if(e.select("clipPath#".concat(t.clipPathId)).selectAll("rect").attr("height",t.height).attr("width",(0,l.getXAxisWidth)(t)).attr(c.default.Y_AXIS,t.axis.x.orientation&&(0,l.calculateVerticalPadding)(t)).attr(c.default.X_AXIS,(0,l.getXAxisXPosition)(t)),t.settingsDictionary.shouldCreateDatelineDefs&&t.dateline.length>0){var n=Math.floor((0,p.getDatelineIndicatorHeight)()/2);e.select("clipPath#".concat(t.datelineClipPathId)).selectAll("rect").attr("height",t.height+n).attr("width",(0,l.getXAxisWidth)(t)).attr(c.default.Y_AXIS,t.axis.x.orientation&&(0,l.calculateVerticalPadding)(t)-n)}},E=function(t,e){var n;if(h.default.notEmpty(e.axis.y.ticks.values)){var a=e.axis.y.ticks.values;n=t.y.tickValues((0,l.processTickValues)(a)).tickSize(-1*(0,l.getXAxisWidth)(e),0,0).tickFormat("")}else n=t.y.tickSize(-1*(0,l.getXAxisWidth)(e),0,0).tickFormat("");return n},A=e.translateVerticalGrid=function(t,e){var n,a=(0,l.isXAxisOrientationTop)(e.axis.x.orientation)?c.default.TICK_ORIENTATION.TOP:c.default.TICK_ORIENTATION.BOTTOM;if(h.default.notEmpty(e.axis.x.ticks.values)){var i=e.axis.x.ticks.values;if(h.default.isUndefined(e.axis.x.domain))n=t.x.tickValues((0,l.processTickValues)(i)).tickSize((0,l.getYAxisHeight)(e)*a,0,0).tickFormat("");else if(h.default.isDate(i))if(h.default.isUndefined(e.axis.x.domain.lowerLimit)||h.default.isUndefined(e.axis.x.domain.upperLimit))n=t.x.tickValues((0,l.processTickValues)(i)).tickSize((0,l.getYAxisHeight)(e)*a,0,0).tickFormat("");else{var r=i.filter((function(t){var n=new Date(t);return n>=e.axis.x.domain.lowerLimit&&n<=e.axis.x.domain.upperLimit}));n=t.x.tickValues((0,l.processTickValues)(r)).tickSize((0,l.getYAxisHeight)(e)*a,0,0).tickFormat("")}else n=t.x.tickValues((0,l.processTickValues)(i.filter((function(t){return t>=e.axis.x.domain.lowerLimit&&t<=e.axis.x.domain.upperLimit})))).tickSize((0,l.getYAxisHeight)(e)*a,0,0).tickFormat("")}else n=t.x.tickSize((0,l.getYAxisHeight)(e)*a,0,0).tickFormat("");return n},S=function(t,e,n,a){t.select(".".concat(n)).transition().call(c.default.d3Transition(a.settingsDictionary.transition)).call(A(e,a))},O=e.translateGrid=function(t,e,n,a){(0,l.getAxesScale)(t,e,n),a.select(".".concat(d.default.grid)).attr("transform","translate(".concat((0,l.getXAxisXPosition)(n),",").concat((0,l.calculateVerticalPadding)(n),")")),n.showHGrid&&a.select(".".concat(d.default.gridH)).transition().call(c.default.d3Transition(n.settingsDictionary.transition)).call(E(t,n)),n.showVGrid&&(0,s.translateVGrid)(a,t,n,S)},D=e.translateContentContainer=function(t,e){return e.select(".".concat(d.default.contentContainer)).transition().call(c.default.d3Transition(t.settingsDictionary.transition)).attr("width",(0,l.getXAxisWidth)(t)).attr("height",t.height).attr(c.default.Y_AXIS,t.axis.x.orientation&&(0,l.calculateVerticalPadding)(t)).attr(c.default.X_AXIS,(0,l.getXAxisXPosition)(t))},w=function(t){return{xAxisLimit:(0,l.getXAxisWidth)(t)/7.33,yAndY2AxisLimit:t.height/8}},I=function(t,e,n,a,i){return t.selectAll(".".concat(e," text")).each((function(){var t=this;(0,f.shouldTruncateLabel)(n.label,a)&&o.select(this).style("cursor","pointer").on("click",(function(){h.default.isDefined(n.onLabelClick)&&h.default.isFunction(n.onLabelClick)?n.onLabelClick(n.label,o.select(t)):(0,f.loadLabelPopup)(n.label,i)}))}))},P=(e.handleLabelClickFunctionDuringReflow=function(t){var e=w(t),n=function(t){return document.querySelector(".".concat(t," text"))},a=function(t,e,a){var i=null!==n(a)&&h.default.isFunction(o.select(n(a)).on("click"));t&&!(0,f.shouldTruncateLabel)(t,e)&&i&&o.select(n(a)).on("click",null).style("cursor","auto")};a(t.axis.x.label,e.xAxisLimit,d.default.axisLabelX),a(t.axis.y.label,e.yAndY2AxisLimit,d.default.axisLabelY),a(t.axis.y2.label,e.yAndY2AxisLimit,d.default.axisLabelY2)},e.translateLabel=function(t,e){var n=w(t);t.axis.x.label&&(e.select(".".concat(d.default.axisLabelX)).transition().call(c.default.d3Transition(t.settingsDictionary.transition)).attr("transform","translate(".concat((0,l.getXAxisLabelXPosition)(t),",").concat((0,l.getXAxisLabelYPosition)(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.X_AXIS),")")),e.selectAll(".".concat(d.default.axisLabelX," text")).each((function(){o.select(this).text((0,l.formatLabel)(t.axis.x.label,n.xAxisLimit))})),I(e,d.default.axisLabelX,t.axis.x,n.xAxisLimit,c.default.X_AXIS)),t.axis.y.label&&(e.select(".".concat(d.default.axisLabelY)).transition().call(c.default.d3Transition(t.settingsDictionary.transition)).attr("transform","translate(".concat((0,l.getYAxisLabelXPosition)(t),", ").concat((0,l.getYAxisLabelYPosition)(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.Y_AXIS),")")),e.selectAll(".".concat(d.default.axisLabelY," text")).each((function(){o.select(this).text((0,l.formatLabel)(t.axis.y.label,n.yAndY2AxisLimit))})),I(e,d.default.axisLabelY,t.axis.y,n.yAndY2AxisLimit,c.default.Y_AXIS)),(0,l.hasY2Axis)(t.axis)&&(e.select(".".concat(d.default.axisLabelY2)).transition().call(c.default.d3Transition(t.settingsDictionary.transition)).attr("transform","translate(".concat((0,l.getY2AxisLabelXPosition)(t),", ").concat((0,l.getYAxisLabelYPosition)(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.Y2_AXIS),")")),e.selectAll(".".concat(d.default.axisLabelY2," text")).each((function(){o.select(this).text((0,l.formatLabel)(t.axis.y2.label,n.yAndY2AxisLimit))})),I(e,d.default.axisLabelY2,t.axis.y2,n.yAndY2AxisLimit,c.default.Y2_AXIS))}),k=e.padDomain=function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=t.lowerLimit,a=t.upperLimit,i=.05*Math.abs(a-n);return{lowerLimit:n-(e?i:0),upperLimit:a+(e?i:0)}},L=(e.updateAxesDomain=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h.default.isEmpty(e))return t;t.outlierStretchFactor=(0,l.determineOutlierStretchFactorYAxes)(t);var n=e.config.yAxis||c.default.Y_AXIS,a=(t.axis[n].domain.upperLimit-t.axis[n].domain.lowerLimit)/2,i=(t.axis[n].domain.upperLimit+t.axis[n].domain.lowerLimit)/2,r={lowerLimit:i-a*t.outlierStretchFactor.lowerLimit,upperLimit:i+a*t.outlierStretchFactor.upperLimit};return t.axis[n].domain=k(r,t.axisPadding[n]),t},e.updateXAxisDomain=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(h.default.isEmpty(e)||!t.axis.x.allowCalibration)return t;t.axis.x.type===c.AXIS_TYPE.TIME_SERIES&&(t.axis.x.domain.upperLimit=h.default.getEpocFromDateString(t.axis.x.domain.upperLimit),t.axis.x.domain.lowerLimit=h.default.getEpocFromDateString(t.axis.x.domain.lowerLimit)),t.axis.x.outlierStretchFactor=(0,l.determineOutlierStretchFactorXAxis)(t);var n=(t.axis.x.domain.upperLimit-t.axis.x.domain.lowerLimit)/2,a=(t.axis.x.domain.upperLimit+t.axis.x.domain.lowerLimit)/2,i={lowerLimit:a-n*t.axis.x.outlierStretchFactor.lowerLimit,upperLimit:a+n*t.axis.x.outlierStretchFactor.upperLimit};return i.upperLimit===t.axis.x.dataRange.max||i.lowerLimit===t.axis.x.dataRange.min?t.axisPadding.x=!0:t.axisPadding.x=(0,u.getDefaultValue)(t.axisPadding.x,!1),t.axis.x.domain=k(i,t.axisPadding.x),t.axis.x.type===c.AXIS_TYPE.TIME_SERIES&&(t.axis.x.domain.upperLimit=h.default.getDateFromEpoc(t.axis.x.domain.upperLimit),t.axis.x.domain.lowerLimit=h.default.getDateFromEpoc(t.axis.x.domain.lowerLimit)),t},e.createDefs=function(t,e){var n=e.append("defs");n.append("clipPath").attr("id",t.clipPathId).append("rect").attr(c.default.X_AXIS,(0,l.getXAxisXPosition)(t)).attr(c.default.Y_AXIS,(0,l.calculateVerticalPadding)(t)).attr("width",(0,l.getXAxisWidth)(t)).attr("height",t.height),t.settingsDictionary.shouldCreateDatelineDefs&&t.dateline.length>0&&n.append("clipPath").attr("id",t.datelineClipPathId).append("rect").attr(c.default.X_AXIS,(0,l.getXAxisXPosition)(t)).attr(c.default.Y_AXIS,0).attr("width",(0,l.getXAxisWidth)(t)).attr("height",0)},function(t,e,n,a){t.append("g").classed(n,!0).call(A(e,a))}),M=(e.createGrid=function(t,e,n,a){(0,l.getAxesScale)(t,e,n);var i=a.append("g").classed(d.default.grid,!0).attr("transform","translate(".concat((0,l.getXAxisXPosition)(n),",").concat((0,l.calculateVerticalPadding)(n),")"));n.showHGrid&&i.append("g").classed(d.default.gridH,!0).call(E(t,n)),n.showVGrid&&(0,s.createVGrid)(i,t,n,L)},e.createLabel=function(t,e,n){if(t.showLabel){var a=w(t);if(t.showXLabel&&t.axis.x.label){var i=e.append("g").classed(d.default.axisLabelX,!0).attr("transform","translate(".concat((0,l.getXAxisLabelXPosition)(t),",").concat((0,l.getXAxisLabelYPosition)(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.X_AXIS),")"));(0,l.buildAxisLabel)(i,h.default.sanitize(t.axis.x.label),a.xAxisLimit),I(i,d.default.axisLabelX,t.axis.x,a.xAxisLimit,c.default.X_AXIS)}if(t.axis.y.label){var o=e.append("g").classed(d.default.axisLabelY,!0).attr("transform","translate(".concat((0,l.getYAxisLabelXPosition)(t),", ").concat((0,l.getYAxisLabelYPosition)(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.Y_AXIS),")"));(0,l.buildAxisLabel)(o,h.default.sanitize(t.axis.y.label),a.yAndY2AxisLimit),I(o,d.default.axisLabelY,t.axis.y,a.yAndY2AxisLimit,c.default.Y_AXIS)}if((0,l.hasY2Axis)(t.axis)){var u=e.append("g").classed(d.default.axisLabelY2,!0).attr("transform","translate(".concat((0,l.getY2AxisLabelXPosition)(t),", ").concat((0,l.getYAxisLabelYPosition)(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.Y2_AXIS),")"));(0,l.buildAxisLabel)(u,h.default.sanitize(t.axis.y2.label),a.yAndY2AxisLimit),I(e,d.default.axisLabelY2,t.axis.y2,a.yAndY2AxisLimit,c.default.Y2_AXIS),n.axesLabelShapeGroup=(0,r.default)((0,r.default)({},c.default.Y_AXIS,(0,f.buildYAxisLabelShapeContainer)(t,e)),c.default.Y2_AXIS,(0,f.buildY2AxisLabelShapeContainer)(t,e))}}},e.createContentContainer=function(t,e){return e.append("rect").classed(d.default.contentContainer,!0).attr(c.default.X_AXIS,(0,l.getXAxisXPosition)(t)).attr(c.default.Y_AXIS,(0,l.calculateVerticalPadding)(t))},e.scaleGraph=function(t,e){t.x=(0,u.getScale)(e.axis.x.type).domain([e.axis.x.domain.lowerLimit,e.axis.x.domain.upperLimit]).range((0,l.getXAxisRange)(e)).clamp(e.axis.x.allowCalibration),t.y=o.scaleLinear().domain([e.axis.y.domain.lowerLimit,e.axis.y.domain.upperLimit]).range((0,l.getYAxisRange)(e)).clamp(e.allowCalibration),e.axis.x.rangeRounding&&t.x.nice(),e.allowCalibration&&e.axis.y.rangeRounding&&t.y.nice(),(0,l.hasY2Axis)(e.axis)&&(t.y2=o.scaleLinear().domain([e.axis.y2.domain.lowerLimit,e.axis.y2.domain.upperLimit]).range((0,l.getYAxisRange)(e)).clamp(e.allowCalibration),e.allowCalibration&&e.axis.y2.rangeRounding&&t.y2.nice())},e.translateGraph=function(t){var e,n;T(t.config,t.svg),b(t.config,t.svg),(0,l.translateAxes)(t.axis,t.scale,t.config,t.svg),O(t.axis,t.scale,t.config,t.svg),D(t.config,t.svg),P(t.config,t.svg),(0,f.translateLabelShapeContainer)(t.config,t.axesLabelShapeGroup),(0,l.translateAxisReferenceLine)(t.axis,t.scale,t.config,t.svg),(0,p.translateDateline)(t.scale,t.config,t.svg,l.getYAxisYPosition),(0,g.translateEventline)(t.scale,t.config,t.svg,l.getYAxisYPosition),e=t.config,(n=t.svg).select(".".concat(d.default.noDataOverlay)).transition().call(c.default.d3Transition(e.settingsDictionary.transition)).attr("height",(0,l.getYAxisHeight)(e)/c.default.NO_DATA_VIEW_PROPORTION).attr("width",(0,l.getXAxisWidth)(e)),n.select(".".concat(d.default.noDataLabel)).transition().call(c.default.d3Transition(e.settingsDictionary.transition)).attr("x",(0,l.getXAxisLabelXPosition)(e)).attr("y",(0,l.getYAxisLabelYPosition)(e)+c.default.NO_DATA_LABEL_PADDING)},e.determineHeight=function(t,e){if(e.height)return e.height;var n=t.padding.top+t.padding.bottom,a=(m-n)/2;return t.outlierStretchFactor=(0,l.determineOutlierStretchFactorYAxes)(t),a*t.outlierStretchFactor.upperLimit+a*t.outlierStretchFactor.lowerLimit},e.getShapeForTarget=function(t){return t.shape||c.SHAPES.CIRCLE},e.getColorForTarget=function(t){return t.color||c.default.DEFAULT_COLOR},e.attachEventHandlers=function(t){var e,n=0,a=t.resize.bind(t),i=function(){return window.requestAnimationFrame(a)},r=(e=t.config,function(){clearTimeout(n),n=o.timeout(i,e.throttle)});window.addEventListener("resize",r,!0),t.resizeHandler=r},e.detachEventHandlers=function(t){window.removeEventListener("resize",t.resizeHandler,!0)},e.d3RemoveElement=function(t,e){t&&(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.selectAll(e).remove():t.select(e).remove())}),R=(e.setAxisPadding=function(t,e){var n=e.config,a=n.yAxis?n.yAxis:c.default.Y_AXIS;h.default.notEmpty(n.axisPadding)&&(t[a]=n.axisPadding)},e.removeNoDataView=function(t){M(t,".".concat(d.default.noDataContainer))});e.drawNoDataView=function(t,e){R(e);var n=(0,l.getYAxisHeight)(t)/c.default.NO_DATA_VIEW_PROPORTION,a=e.append("g").classed(d.default.noDataContainer,!0);return a.append("rect").classed(d.default.noDataOverlay,!0).attr(c.default.X_AXIS,(0,l.getXAxisXPosition)(t)).attr(c.default.Y_AXIS,(0,l.calculateVerticalPadding)(t)+n).attr("height",n).attr("width",(0,l.getXAxisWidth)(t)),a.append("text").classed(d.default.noDataLabel,!0).attr("x",(0,l.getXAxisLabelXPosition)(t)).attr("y",(0,l.getYAxisLabelYPosition)(t)+c.default.NO_DATA_LABEL_PADDING).append("tspan").text(t.locale.noData),e},e.translateSVGElement=function(t,e,n){t.select(".".concat(e)).attr("transform","translate(".concat((0,l.getXAxisXPosition)(n),",").concat((0,l.calculateVerticalPadding)(n),")"))}},62620:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(77376))},53174:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(28452)),u=a(n(63072)),l=a(n(29511)),c=a(n(41132)),s=n(72372),f=n(10832),d=a(n(22639)),h=n(85356),p=n(18321),g=n(42124),v=a(n(75090)),y=a(n(45839)),_=n(98173),m=a(n(30580));function x(t,e,n){return e=(0,u.default)(e),(0,o.default)(t,T()?Reflect.construct(e,n||[],(0,u.default)(t).constructor):e.apply(t,n))}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(T=function(){return!!t})()}var b=function(t){var e=t.filter((function(t){return null!==t.y&&void 0!==t.y})).map((function(t){return t.y}));return{min:Math.min.apply(Math,(0,c.default)(e)),max:Math.max.apply(Math,(0,c.default)(e))}},E=function(t){function e(t){var n,a,r,o;return(0,i.default)(this,e),(n=x(this,e)).config=(a=t,(new m.default).setInput(a).validateInput().clone().getConfig()),n.type="Line",n.config.yAxis=(0,f.getDefaultValue)(n.config.yAxis,d.default.Y_AXIS),n.valuesRange={},n.valuesRange.x=(r=n.config.values,o=r.filter((function(t){return null!==t.x&&void 0!==t.x})).map((function(t){return"string"==typeof t.x||t.x instanceof Date?y.default.getEpocFromDateString(t.x):t.x})),{min:Math.min.apply(Math,(0,c.default)(o)),max:Math.max.apply(Math,(0,c.default)(o))}),n.valuesRange[n.config.yAxis]=b(n.config.values),n.dataTarget={},n}return(0,l.default)(e,t),(0,r.default)(e,[{key:"load",value:function(t){return this.dataTarget=(0,_.processDataPoints)(t.config,this.config),(0,_.draw)(t.scale,t.config,t.svg,this.dataTarget),y.default.isEmptyArray(this.dataTarget.values)||(y.default.isEmptyArray(this.dataTarget.valueRegionSubset)?y.default.notEmpty(this.dataTarget.regions)&&(0,g.createRegion)(t.scale,t.config,t.svg.select(".".concat(v.default.regionGroup)),this.dataTarget.regions,"region_".concat(this.dataTarget.key),this.config.yAxis):(0,g.createValueRegion)(t.scale,t.config,t.svg.select(".".concat(v.default.regionGroup)),this.dataTarget.valueRegionSubset,"region_".concat(this.dataTarget.key),this.config.yAxis,this.dataTarget.interpolationType)),(0,_.prepareLegendItems)(t.config,{clickHandler:(0,_.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,_.hoverHandler)(t.config.shownTargets,t.svg)},this.dataTarget,t.legendSVG),(0,h.prepareLabelShapeItem)(t.config,this.dataTarget,t.axesLabelShapeGroup[this.config.yAxis]),this}},{key:"unload",value:function(t){return(0,_.clear)(t.svg,this.dataTarget),(0,g.removeRegion)(t.svg.select(".".concat(v.default.regionGroup)),this.dataTarget),(0,p.removeLegendItem)(t.legendSVG,this.dataTarget),(0,h.removeLabelShapeItem)(t.axesLabelShapeGroup[this.config.yAxis],this.dataTarget,t.config),this.dataTarget={},this.config={},this}},{key:"resize",value:function(t){return!y.default.isEmptyArray(this.dataTarget.values)&&t.config.shownTargets.indexOf(this.dataTarget.key)>-1&&(y.default.notEmpty(this.dataTarget.regions)||!y.default.isEmptyArray(this.dataTarget.valueRegionSubset)?(0,g.isSingleTargetDisplayed)(t.config.shownTargets,t.content)?t.config.shouldHideAllRegion=!1:t.config.shouldHideAllRegion=!(0,g.areRegionsIdentical)(t.svg):t.config.shouldHideAllRegion=!0),t.config.shouldHideAllRegion&&(0,g.hideAllRegions)(t.svg),(0,g.translateRegion)(t.scale,t.config,t.svg.select(".".concat(v.default.regionGroup),this.dataTarget.valueRegionSubset),this.dataTarget.yAxis,!y.default.isEmptyArray(this.dataTarget.valueRegionSubset),this.dataTarget.interpolationType),(0,_.translateLineGraph)(t.scale,t.svg,t.config),this}},{key:"reflow",value:function(t,e){this.config.values=e.values,this.dataTarget=(0,_.processDataPoints)(t.config,this.config);var n={clickHandler:(0,_.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,_.hoverHandler)(t.config.shownTargets,t.svg)},a=t.config.shownTargets.lastIndexOf(e.key);a>-1&&t.config.shownTargets.splice(a,1);var i=t.content.filter((function(t){return t.config.key===e.key}));y.default.isEmptyArray(i)||(0,p.reflowLegend)(t.legendSVG,i[0].config,t,n);var r=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll(".".concat(v.default.line)).data([this.dataTarget]);if((0,_.drawDataLines)(t.scale,t.config,r.enter()),r.exit().remove(),(0,h.updateShapesDuringReflow)(t,e,this),t.config.showShapes){t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll(".".concat(v.default.pointGroup)).data(this.dataTarget).exit().remove();var o=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(v.default.currentPointsGroup)).selectAll('[class*="'.concat(v.default.point,'"]')).data((0,_.getDataPointValues)(this.dataTarget).filter((function(t){return null!==t.y&&void 0!==t.y})));(0,_.drawDataPoints)(t.scale,t.config,o.enter(),t.legendSVG),o.exit().transition().call(d.default.d3Transition(t.config.settingsDictionary.transition)).remove()}this.valuesRange[this.config.yAxis]=b(this.config.values)}},{key:"redraw",value:function(t){return(0,_.clear)(t.svg,this.dataTarget),(0,_.draw)(t.scale,t.config,t.svg,this.dataTarget,t.legendSVG),this}}])}(s.GraphContent);e.default=E},30580:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(10832)),f=a(n(45839));function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}function h(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,p()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=h(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){return(0,s.validateBaseInput)(this.input),this}},{key:"clone",value:function(){return this.config=f.default.deepClone(this.input),this}}])}(s.default);e.default=g},98173:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.translatePoints=e.translateLines=e.translateLineGraph=e.transformPoint=e.toggleDataPointSelection=e.processDataPoints=e.prepareLegendItems=e.hoverHandler=e.getDataPointValues=e.drawDataPoints=e.drawDataLines=e.draw=e.createLine=e.clickHandler=e.clear=void 0;var r=T(n(56194)),o=n(72372),u=n(10832),l=n(34004),c=n(77317),s=T(n(22639)),f=a(n(74467)),d=n(18321),h=n(42124),p=n(52097),g=a(n(75090)),v=n(15861),y=a(n(45839)),_=n(34675),m=n(99462);function x(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(x=function(t){return t?n:e})(t)}function T(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=x(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var b=e.getDataPointValues=function(t){return t.internalValuesSubset},E=e.createLine=function(t,e){return r.line().defined((function(t){return null!==t.y&&void 0!==t.y})).x((function(e){return t.x(e.x)})).y((function(e){return t[e.yAxis](e.y)})).curve(e.interpolationType)(b(e))},A=e.transformPoint=function(t){return function(e){return function(n){var a;return"translate(".concat((a=e,t.x(a.x)),",").concat(function(e){return t[e.yAxis](e.y)}(e),") scale(").concat(n,")")}}},S=e.translateLines=function(t,e,n){return e.selectAll(".".concat(g.default.lineGraphContent," .").concat(g.default.line)).select("path").transition().call(s.default.d3Transition(n.settingsDictionary.transition)).attr("d",(function(e){return E(t,e)}))},O=e.translatePoints=function(t,e,n,a){return e.selectAll(".".concat(g.default.lineGraphContent," .").concat(n)).each((function(e){r.select(this).select("g").transition().call(s.default.d3Transition(a.settingsDictionary.transition)).attr("transform",(function(){return A(t)(e)((0,v.getTransformScale)(this))}))}))},D=e.toggleDataPointSelection=function(t){var e=r.select(t.parentNode).select(".".concat(g.default.dataPointSelection));return e.attr("aria-hidden",!("true"===e.attr("aria-hidden"))),e},w=function(t,e,n){y.default.isEmpty(t.onClick)||D(n).call((function(n){return t.onClick((function(){n.attr("aria-hidden",!0)}),t.key,e,t,n)}))},I=(e.translateLineGraph=function(t,e,n){(0,_.translateSVGElement)(e,g.default.currentLinesGroup,n),(0,_.translateSVGElement)(e,g.default.currentPointsGroup,n),S(t,e,n),O(t,e,g.default.point,n),O(t,e,g.default.dataPointSelection,n)},e.drawDataLines=function(t,e,n){return n.append("g").classed(g.default.line,!0).append("path").attr("d",(function(e){return E(t,e)})).attr("style",(function(t){return"stroke: ".concat((0,_.getColorForTarget)(t),"; stroke-dasharray: ").concat(t.style.strokeDashArray,";")})).attr("aria-hidden",!1).attr("aria-describedby",(function(t){return t.key}))}),P=e.drawDataPoints=function(t,e,n,a){var i=function(e,n,a,i){return e.append((function(){var e;return new o.Shape((0,_.getShapeForTarget)(n)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:"".concat(g.default.point," ").concat(i),transformFn:A(t)(n),onClickFn:function(){w(n,a,this)},a11yAttributes:{"aria-hidden":"false"===(null===(e=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(n.key,'"]')))||void 0===e?void 0:e.getAttribute("aria-current")),"aria-describedby":n.key,"aria-disabled":!y.default.isFunction(n.onClick)}}))}))};n.append("g").classed(g.default.pointGroup,!0).each((function(n,u){var c,f,d=r.select(this);c=n,f=u,d.append((function(){return new o.Shape((0,p.getSVGObject)(s.SHAPES.CIRCLE,s.default.DEFAULT_PLOT_SELECTION_SCALE)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:g.default.dataPointSelection,transformFn:A(t)(c),onClickFn:function(){w(c,f,this)},a11yAttributes:{"aria-hidden":!0,"aria-describedby":c.key,"aria-disabled":!y.default.isFunction(c.onClick)}}))})),n.isCritical&&(e.hasCriticality=!0,i(d,n,u,g.default.criticalityOuterPoint),i(d,n,u,g.default.criticalityInnerPoint)),function(e,n,i){e.append((function(){var e;return new o.Shape((0,_.getShapeForTarget)(n)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:g.default.point,svgStyles:"fill: ".concat((0,_.getColorForTarget)(n),";"),transformFn:A(t)(n),onClickFn:function(){w(n,i,this)},a11yAttributes:{"aria-hidden":a?"false"===(null===(e=a.select(".".concat(g.default.legendItem,"[aria-describedby='").concat(n.key,"']")))||void 0===e?void 0:e.attr("aria-current")):"false","aria-describedby":n.key,"aria-disabled":!y.default.isFunction(n.onClick)}}))}))}(d,n,u)}))};e.draw=function(t,e,n,a,i){var r=n.append("g").classed(g.default.lineGraphContent,!0).attr("clip-path","url(#".concat(e.clipPathId,")")).attr("aria-hidden",e.shownTargets.indexOf(a.key)<0).attr("aria-describedby",a.key),o=r.append("g").classed(g.default.currentLinesGroup,!0).attr("transform","translate(".concat((0,c.getXAxisXPosition)(e),",").concat((0,c.calculateVerticalPadding)(e),")")).selectAll(".".concat(g.default.line)).data([a]);if(I(t,e,o.enter()),o.exit().transition().call(s.default.d3Transition(e.settingsDictionary.transition)).remove(),a.showShapes){var u=r.selectAll(".".concat(g.default.currentPointsGroup)).data([a]);u.enter().append("g").classed(g.default.currentPointsGroup,!0).attr("transform","translate(".concat((0,c.getXAxisXPosition)(e),",").concat((0,c.calculateVerticalPadding)(e),")")),u.exit().transition().call(s.default.d3Transition(e.settingsDictionary.transition)).remove();var l=r.select(".".concat(g.default.currentPointsGroup)).selectAll(".".concat(g.default.point)).data(b(a).filter((function(t){return null!==t.y&&void 0!==t.y})));P(t,e,l.enter(),i),l.exit().transition().call(s.default.d3Transition(e.settingsDictionary.transition)).remove()}},e.processDataPoints=function(t,e){var n=t.axis.x.type,a=function(t){if(!(0,c.isValidAxisType)(t,n))throw new Error(f.default.THROW_MSG_INVALID_FORMAT_TYPE);return(0,u.parseTypedValue)(t,n)};return e.interpolationType=(0,u.getInterpolationType)(e.type),e.style=(0,u.getDefaultValue)(e.style,{}),e.style={strokeDashArray:(0,m.getStrokeDashArray)(e.style)},e.showShapes=(0,u.getDefaultValue)(e.showShapes,t.showShapes),e.legendOptions=(0,d.getDefaultLegendOptions)(t,e),t.shownTargets.push(e.key),e.internalValuesSubset=e.values.map((function(t){return{onClick:e.onClick,isCritical:t.isCritical||!1,x:a(t.x),y:t.y,color:e.color||s.default.DEFAULT_COLOR,label:e.label||{},shape:e.shape||s.SHAPES.CIRCLE,yAxis:e.yAxis||s.default.Y_AXIS,key:e.key}})),e.valueRegionSubset=function(t,e){var n,a=[],i=[],r={color:void 0,values:[]};return t.values.forEach((function(t){y.default.isEmpty(t.region)||y.default.isEmpty(t.region.start)||y.default.isEmpty(t.region.end)?(a.push(r),n=void 0,r={color:void 0,values:[]}):(n!==t.region.color&&(r.values.length>0&&a.push(r),r={color:t.region.color,values:[]}),n=t.region.color,r.color=t.region.color,r.values.push({x:e(t.x),start:t.region.start,end:t.region.end}))})),a.push(r),a.forEach((function(t){t.values.length>0&&(i.push(t),t.values.length>1&&(i.push({color:t.color,values:t.values.slice(0,1)}),i.push({color:t.color,values:t.values.slice(t.values.length-1)})))})),i}(e,a),e},e.clickHandler=function(t,e,n,a){return function(e,i){(0,d.legendClickHandler)(e);var o,u,l,c=(0,d.isLegendSelected)(r.select(e));o=n.shownTargets,u=i,(l=o.indexOf(u.key))>-1?o.splice(l,1):o.push(u.key),a.selectAll(".".concat(g.default.dataPointSelection,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",!0),a.selectAll('path[aria-describedby="'.concat(i.key,'"]')).attr("aria-hidden",c),a.selectAll(".".concat(g.default.point,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",c),window.requestAnimationFrame(function(t,e,n){return function(){(0,h.processRegions)(t,e,n)}}(t,n,a))}},e.hoverHandler=function(t,e){return function(n,a){(0,d.legendHoverHandler)(t,e,n.key,a,[function(t,e,n,i,r){e.selectAll(".".concat(g.default.point,'[aria-describedby="').concat(r,'"]')).classed(g.default.blur,a===s.default.HOVER_EVENT.MOUSE_ENTER)}]),e.selectAll('path[aria-describedby="'.concat(n.key,'"]')).classed(g.default.highlight,a===s.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll('svg[aria-describedby="'.concat(n.key,'"]')).classed(g.default.highlight,a===s.default.HOVER_EVENT.MOUSE_ENTER),(0,h.regionLegendHoverHandler)(t,e,n.key,a)}},e.prepareLegendItems=function(t,e,n,a){n.label&&n.label.display&&a&&(0,d.loadLegendItem)(a,n,t,e)},e.clear=function(t,e){return(0,_.d3RemoveElement)(t,'g[aria-describedby="'.concat(e.key,'"]'))}},81462:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(53174))},53078:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(28452)),u=a(n(63072)),l=a(n(29511)),c=a(n(73738)),s=a(n(41132)),f=n(72372),d=n(10832),h=a(n(22639)),p=n(85356),g=n(18321),v=n(42124),y=a(n(75090)),_=a(n(45839)),m=n(96419),x=n(9822),T=a(n(69428)),b=n(77317),E=n(22974);function A(t,e,n){return e=(0,u.default)(e),(0,o.default)(t,S()?Reflect.construct(e,n||[],(0,u.default)(t).constructor):e.apply(t,n))}function S(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(S=function(){return!!t})()}var O=function(t){var e=t.map((function(t){return Object.keys(t).map((function(e){return t[e].y}))}));return{min:Math.min.apply(Math,(0,s.default)(e.map((function(t){return Math.min.apply(Math,(0,s.default)(t))})))),max:Math.max.apply(Math,(0,s.default)(e.map((function(t){return Math.max.apply(Math,(0,s.default)(t))}))))}},D=function(t){return t.map((function(t){var e={};return(0,m.iterateOnPairType)((function(n){null==t[n]||"object"===(0,c.default)(t[n])&&0===Object.keys(t[n]).length||(e[n]=t[n])})),e}))},w=function(t){function e(t){var n,a,r,o;return(0,i.default)(this,e),(n=A(this,e)).config=(a=t,(new T.default).setInput(a).validateInput().clone().getConfig()),n.type="PairedResult",n.config.yAxis=(0,d.getDefaultValue)(n.config.yAxis,h.default.Y_AXIS),n.config.values=D(n.config.values),n.valuesRange={},n.valuesRange.x=(r=n.config.values,o=r.map((function(t){return Object.keys(t).map((function(e){return"string"==typeof t[e].x||t[e].x instanceof Date?_.default.getEpocFromDateString(t[e].x):t[e].x}))})),{min:Math.min.apply(Math,(0,s.default)(o.map((function(t){return Math.min.apply(Math,(0,s.default)(t))})))),max:Math.max.apply(Math,(0,s.default)(o.map((function(t){return Math.max.apply(Math,(0,s.default)(t))}))))}),n.valuesRange[n.config.yAxis]=O(n.config.values),n.dataTarget={},n}return(0,l.default)(e,t),(0,r.default)(e,[{key:"load",value:function(t){var e=this;return(0,E.validatePairedResultData)(this.config.values),this.dataTarget=(0,m.processDataPoints)(t.config,this.config),(0,m.draw)(t.scale,t.config,t.svg,this.dataTarget),_.default.isEmptyArray(this.dataTarget.values)||!_.default.notEmpty(this.dataTarget.regions)&&!_.default.notEmpty(this.dataTarget.valueRegionSubset)||(0,m.renderRegion)(t.scale,t.config,t.svg,this.dataTarget),(0,m.prepareLegendItems)(t.config,{clickHandler:(0,m.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,m.hoverHandler)(t.config,t.svg)},this.dataTarget,t.legendSVG),t.axesLabelShapeGroup[this.config.yAxis]&&(0,m.iterateOnPairType)((function(n){(0,p.prepareLabelShapeItem)(t.config,{key:"".concat(e.dataTarget.key,"_").concat(n),label:(0,m.getValue)(e.dataTarget.label,n),color:(0,m.getValue)(e.dataTarget.color,n),shape:(0,m.getValue)(e.dataTarget.shape,n),values:e.dataTarget.values},t.axesLabelShapeGroup[e.config.yAxis])})),this}},{key:"unload",value:function(t){var e=this;return(0,m.clear)(t.svg,this.dataTarget),(0,v.removeRegion)(t.svg.select(".".concat(y.default.regionGroup)),this.dataTarget),(0,m.iterateOnPairType)((function(n){var a="".concat(e.dataTarget.key,"_").concat(n);(0,g.removeLegendItem)(t.legendSVG,{key:a}),(0,p.removeLabelShapeItem)(t.axesLabelShapeGroup[e.config.yAxis],{key:a},t.config)})),this.dataTarget={},this.config={},this}},{key:"resize",value:function(t){var e=this;if(_.default.notEmpty(this.dataTarget.values)){if(_.default.notEmpty(this.dataTarget.regions)||_.default.notEmpty(this.dataTarget.valueRegionSubset)){var n=this.dataTarget.values;if((0,m.isSinglePairedResultTargetDisplayed)(t.config,t))t.config.shouldHideAllRegion=!1;else if(t.content.length>1){var a=n.every((function(t){return(0,m.isRegionMappedToAllValues)(t,e.dataTarget.regions||e.dataTarget.valueRegionSubset)}));t.config.shouldHideAllRegion=!a||t.config.shouldHideAllRegion||!(0,v.areRegionsIdentical)(t.svg)}(0,v.translateRegion)(t.scale,t.config,t.svg.select('g[aria-describedby="region_'.concat(this.dataTarget.key,'"]')),this.dataTarget.yAxis,_.default.notEmpty(this.dataTarget.valueRegionSubset))}else t.config.shouldHideAllRegion=!0;t.config.shouldHideAllRegion&&(0,v.hideAllRegions)(t.svg)}return(0,m.translatePairedResultGraph)(t.scale,t.svg,t.config),this}},{key:"reflow",value:function(t,e){var n=this,a={clickHandler:(0,m.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,m.hoverHandler)(t.config,t.svg)};this.config.values=_.default.deepClone(e.values),this.config.values=D(this.config.values),(0,E.validatePairedResultData)(this.config.values),this.dataTarget=(0,m.processDataPoints)(t.config,this.config,!0);["high","mid","low"].forEach((function(n){var i=(0,m.getValue)(t.contentConfig[0].label,n);if(i&&i.display){var r=t.contentConfig.filter((function(t){return t.key===e.key}));_.default.isEmptyArray(r)||(0,g.reflowLegend)(t.legendSVG,function(t,e){return{shape:(0,m.getValue)(t.shape,e),color:(0,m.getValue)(t.color,e),label:(0,m.getValue)(t.label,e),key:"".concat(t.key,"_").concat(e),values:t.values,legendOptions:t.legendOptions,type:e}}(r[0],n),t,a)}})),(0,m.iterateOnPairType)((function(e){var a="".concat(n.dataTarget.key,"_").concat(e);(0,p.removeLabelShapeItem)(t.axesLabelShapeGroup[n.config.yAxis],{key:a},t.config)})),_.default.isEmpty(e.values)||(0,m.iterateOnPairType)((function(e){(0,p.prepareLabelShapeItem)(t.config,{key:"".concat(n.dataTarget.key,"_").concat(e),label:(0,m.getValue)(n.dataTarget.label,e),color:(0,m.getValue)(n.dataTarget.color,e),shape:(0,m.getValue)(n.dataTarget.shape,e),values:n.dataTarget.values},t.axesLabelShapeGroup[n.config.yAxis])}));var i=(0,m.getDataPointValues)(this.dataTarget);t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll(".".concat(y.default.pairedBox)).remove();var r=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll(".".concat(y.default.pairedBox)).data(i);r.enter().append("g").classed(y.default.pairedBox,!0).attr("aria-selected",!1).attr("transform","translate(".concat((0,b.getXAxisXPosition)(t.config),",").concat((0,b.calculateVerticalPadding)(t.config),")")).call((function(e){(0,x.drawSelectionIndicator)(t.scale,t.config,e),(0,m.drawLine)(t.scale,t.config,e),(0,m.drawPoints)(t.scale,t.config,e,t.legendSVG)})),r.exit().remove(),this.valuesRange[this.config.yAxis]=O(this.config.values),this.resize(t)}},{key:"redraw",value:function(t){return(0,m.clear)(t.svg,this.dataTarget),(0,m.draw)(t.scale,t.config,t.svg,this.dataTarget,t.legendSVG),this}}])}(f.GraphContent);e.default=w},69428:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(10832)),f=a(n(45839));function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}function h(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,p()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=h(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){return(0,s.validateBaseInput)(this.input),this}},{key:"clone",value:function(){return this.config=f.default.deepClone(this.input),this}}])}(s.default);e.default=g},96419:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.getDataPointValues=e.drawPoints=e.drawLine=e.draw=e.createLine=e.clickHandler=e.clear=void 0,Object.defineProperty(e,"getSVGObject",{enumerable:!0,get:function(){return p.getSVGObject}}),e.translatePoints=e.translatePairedResultGraph=e.translateLines=e.transformPoint=e.renderRegion=e.processDataPoints=e.prepareLegendItems=e.iterateOnPairType=e.isSinglePairedResultTargetDisplayed=e.isRegionMappedToAllValues=e.hoverHandler=e.getValue=void 0;var r=T(n(56194)),o=n(72372),u=n(10832),l=n(34004),c=n(77317),s=T(n(22639)),f=a(n(74467)),d=n(18321),h=n(42124),p=n(52097),g=a(n(75090)),v=n(15861),y=a(n(45839)),_=n(34675),m=n(9822);function x(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(x=function(t){return t?n:e})(t)}function T(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=x(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var b=e.getValue=function(t,e){return t?t[e]:""},E=e.iterateOnPairType=function(t){return s.default.PAIR_ITEM_TYPES.forEach(t)},A=e.createLine=function(t,e){return r.line().x((function(e){return t.x(e.x)})).y((function(n){return t[e.yAxis](n.y)})).curve(s.default.DEFAULT_INTERPOLATION)([{x:e.high.x,y:e.high.y},{x:e.low.x,y:e.low.y}])},S=e.transformPoint=function(t,e){return function(n){return function(a){var i;return"translate(".concat((i=n,t.x(b(i,e).x)),",").concat(function(n){return t[n.yAxis](b(n,e).y)}(n),") scale(").concat(a,")")}}},O=e.translateLines=function(t,e,n){return e.selectAll(".".concat(g.default.pairedBoxGroup," .").concat(g.default.pairedLine)).transition().call(s.default.d3Transition(n.settingsDictionary.transition)).attr("d",(function(e){return e.high&&e.low?A(t,e):""}))},D=e.translatePoints=function(t,e,n){return E((function(a){e.selectAll(".".concat(g.default.pairedBoxGroup," .").concat(g.default.pairedPoint,".").concat(b(g.default,a))).each((function(e){r.select(this).select("g").transition().call(s.default.d3Transition(n.settingsDictionary.transition)).attr("transform",(function(){return S(t,a)(e)((0,v.getTransformScale)(this))}))}))}))},w=e.drawLine=function(t,e,n){return n.each((function(n,a){return r.select(this).append("path").classed(g.default.pairedLine,!0).attr("aria-describedby",n.key).attr("aria-hidden",(function(t){return!function(t){var n,a;return t.high&&t.low&&y.default.hasValue(e.shownTargets,t.high.key)&&y.default.hasValue(e.shownTargets,t.low.key)&&!1!==(null===(n=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(t.high.key,'"]')))||void 0===n?void 0:n.getAttribute("aria-current"))&&!1!==(null===(a=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(t.low.key,'"]')))||void 0===a?void 0:a.getAttribute("aria-current"))}(t)})).attr("aria-disabled",!y.default.isFunction(n.onClick)).attr("d",n.high&&n.low?A(t,n):"").on("click",(function(){(0,m.dataPointActionHandler)(e,n,a,this.parentNode)}))}))},I=e.drawPoints=function(t,e,n,a){n.each((function(n,i){var u=r.select(this);E((function(r){if(y.default.isDefined(b(n,r))){var c=b(n,r),s=u.append("g").classed(g.default.pointGroup,!0);c.isCritical&&(e.hasCriticality=!0,function(t,e,n,a,i,r){var u=function(n,a,i,r,u){return n.append((function(){var n;return new o.Shape((0,_.getShapeForTarget)(b(i,a))).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:"".concat(u),transformFn:S(t,a)(i),onClickFn:function(){(0,m.dataPointActionHandler)(e,i,r,this.parentNode.parentNode)},a11yAttributes:{"aria-hidden":"false"===(null===(n=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(b(i,a).key,'"]')))||void 0===n?void 0:n.getAttribute("aria-current")),"aria-describedby":b(i,a).key,"aria-disabled":!y.default.isFunction(i.onClick)}}))}))};u(n,a,i,r,"".concat(g.default.pairedPoint," ").concat(b(g.default,a)," ").concat(g.default.criticalityOuterPoint)),u(n,a,i,r,"".concat(g.default.pairedPoint," ").concat(b(g.default,a)," ").concat(g.default.criticalityInnerPoint))}(t,e,s,r,n,i)),function(n,i,r,u){n.append((function(){var n;return new o.Shape((0,_.getShapeForTarget)(b(r,i))).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:"".concat(g.default.pairedPoint," ").concat(b(g.default,i)),svgStyles:"fill: ".concat((0,_.getColorForTarget)(b(r,i)),";"),transformFn:S(t,i)(r),onClickFn:function(){(0,m.dataPointActionHandler)(e,r,u,this.parentNode.parentNode)},a11yAttributes:{"aria-hidden":a?"false"===(null===(n=a.select(".".concat(g.default.legendItem,"[aria-describedby='").concat(b(r,i).key,"']")))||void 0===n?void 0:n.attr("aria-current")):"false","aria-describedby":b(r,i).key,"aria-disabled":!y.default.isFunction(r.onClick)}}))}))}(s,r,n,i)}}))}))},P=e.getDataPointValues=function(t){return t.internalValuesSubset},k=(e.draw=function(t,e,n,a,i){var r=n.append("g").classed(g.default.pairedBoxGroup,!0).attr("clip-path","url(#".concat(e.clipPathId,")")).attr("aria-describedby",a.key).selectAll(".".concat(g.default.pairedBox)).data(P(a));r.enter().append("g").classed(g.default.pairedBox,!0).attr("aria-selected",!1).attr("transform","translate(".concat((0,c.getXAxisXPosition)(e),",").concat((0,c.calculateVerticalPadding)(e),")")).call((function(n){(0,m.drawSelectionIndicator)(t,e,n),w(t,e,n),I(t,e,n,i)})),r.exit().transition().call(s.default.d3Transition(e.settingsDictionary.transition)).remove()},e.processDataPoints=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=t.axis.x.type,i=function(t){if(!(0,c.isValidAxisType)(t,a))throw new Error(f.default.THROW_MSG_INVALID_FORMAT_TYPE);return(0,u.parseTypedValue)(t,a)},r={high:[],low:[],mid:[]},o={high:{color:void 0,values:[]},low:{color:void 0,values:[]},mid:{color:void 0,values:[]}};!n&&e.values.length<1&&function(t,e){["high","mid","low"].forEach((function(n){var a=b(e.label,n);a&&a.display&&(y.default.hasValue(t.shownTargets,"".concat(e.key,"_").concat(n))||t.shownTargets.push("".concat(e.key,"_").concat(n)))}))}(t,e),e.internalValuesSubset=e.values.map((function(a){var u={};return E((function(l){if(y.default.isDefined(b(a,l))){var c=b(a,l);u[l]={x:i(c.x),y:y.default.getNumber(c.y),isCritical:c.isCritical||!1,color:b(e.color,l)||s.default.DEFAULT_COLOR,label:b(e.label,l)||{},shape:b(e.shape,l)||s.SHAPES.CIRCLE,key:"".concat(e.key,"_").concat(l)},y.default.hasValue(t.shownTargets,u[l].key)||n||t.shownTargets.push(u[l].key),y.default.isEmpty(c.region)||y.default.isEmpty(c.region.start)||y.default.isEmpty(c.region.end)?o[l].values.length>0&&(r[l].push(o[l]),o[l]={color:void 0,values:[]}):(o[l].color!==c.region.color&&(o[l].values.length>0&&r[l].push(o[l]),o[l]={color:c.region.color,values:[]}),o[l].color=c.region.color,o[l].values.push({x:i(c.x),start:c.region.start,end:c.region.end}))}})),u.yAxis=e.yAxis||s.default.Y_AXIS,u.onClick=e.onClick,u.key=e.key,u}));var l={high:[],low:[],mid:[]},h=!1;return E((function(t){o[t].values.length>0&&r[t].push(o[t]),r[t].forEach((function(e){h=!0,l[t].push(e),e.values.length>1&&(l[t].push({color:e.color,values:e.values.slice(0,1)}),l[t].push({color:e.color,values:e.values.slice(e.values.length-1)}))}))})),e.valueRegionSubset=h?l:void 0,e.legendOptions=(0,d.getDefaultLegendOptions)(t,e),e},function(t,e){return e.each((function(){return r.select(this).select(".".concat(g.default.pairedLine)).attr("aria-hidden",(function(e){return!function(e){var n,a;return e.high&&e.low&&y.default.hasValue(t.shownTargets,e.high.key)&&y.default.hasValue(t.shownTargets,e.low.key)&&"true"===(null===(n=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(e.high.key,'"]')))||void 0===n?void 0:n.getAttribute("aria-current"))&&"true"===(null===(a=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(e.low.key,'"]')))||void 0===a?void 0:a.getAttribute("aria-current"))}(e)}))}))}),L=(e.translatePairedResultGraph=function(t,e,n){(0,m.translateSelectionBox)(t,e,n),(0,m.translateSelectionItem)(t,e,n),O(t,e,n),D(t,e,n)},e.isSinglePairedResultTargetDisplayed=function(t,e){var n=[];return t.shownTargets.forEach((function(t){e.contentKeys.forEach((function(e){t.includes(e)&&!n.includes(e)&&n.push(e)}))})),(0,h.isSingleTargetDisplayed)(n,e.content)}),M=(e.isRegionMappedToAllValues=function(t,e){return Object.keys(t).every((function(t){return Object.prototype.hasOwnProperty.call(e,t)}))},function(t,e,n,a){return function(){!function(t,e,n,a){var i=a.key;L(e,t)?e.shownTargets.concat([i]).forEach((function(t){(0,h.showHideRegion)(n,"region_".concat(t),e.shownTargets.indexOf(t)>-1)})):!e.shouldHideAllRegion&&e.shownTargets.length>0&&(0,h.areRegionsIdentical)(n)?n.selectAll(".".concat(g.default.region)).attr("aria-hidden",!1):(0,h.hideAllRegions)(n)}(t,e,n,a)}});e.clickHandler=function(t,e,n,a){return function(e,i){(0,d.legendClickHandler)(e);var o,u,l,c=(0,d.isLegendSelected)(r.select(e));o=n.shownTargets,u=i,(l=o.indexOf(u.key))>-1?o.splice(l,1):o.push(u.key),a.selectAll('path[aria-describedby="'.concat(i.key,'"]')).attr("aria-hidden",c),a.selectAll(".".concat(g.default.pairedPoint,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",c);var s="url(#".concat(n.clipPathId,")");r.selectAll(".".concat(g.default.pairedBoxGroup)).each((function(){if(r.select(this).attr("clip-path").replace(/['"]+/g,"")===s){var t=r.select(this).selectAll(".".concat(g.default.pairedBox));k(n,t)}})),window.requestAnimationFrame(M(t,n,a,i))}},e.hoverHandler=function(t,e){return function(n,a){(0,d.legendHoverHandler)(t.shownTargets,e,n.key,a,[function(t,e,n,a,i){e.selectAll(".".concat(g.default.region,'[aria-describedby="region_').concat(i,'"]')).classed(g.default.regionBlur,a===s.default.HOVER_EVENT.MOUSE_ENTER)}]),e.selectAll('path[aria-describedby="'.concat(n.key,'"]')).classed(g.default.highlight,a===s.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll(".".concat(g.default.pairedPoint,'[aria-describedby="').concat(n.key,'"]')).classed(g.default.highlight,a===s.default.HOVER_EVENT.MOUSE_ENTER),(0,h.regionLegendHoverHandler)(t.shownTargets,e,n.key,a)}},e.prepareLegendItems=function(t,e,n,a){n.label&&a&&E((function(i){var r=b(n.label,i);r&&r.display&&(0,d.loadLegendItem)(a,function(t,e){return{shape:b(t.shape,e),color:b(t.color,e),label:b(t.label,e),key:"".concat(t.key,"_").concat(e),values:n.values,legendOptions:n.legendOptions}}(n,i),t,e)}))},e.renderRegion=function(t,e,n,a){var i=n.select(".".concat(g.default.regionGroup)).append("g").classed(g.default.regionPairGroup,!0).attr("aria-describedby","region_".concat(a.key));i.call((function(){E((function(n){if(a.valueRegionSubset&&a.valueRegionSubset[n])(0,h.createValueRegion)(t,e,i,a.valueRegionSubset[n],"region_".concat(a.key,"_").concat(n),a.yAxis);else if(a.regions&&a.regions[n]){if(!y.default.isArray(a.regions[n])||y.default.isUndefined(a.regions[n]))throw new Error(f.default.THROW_MSG_REGION_EMPTY);(0,h.createRegion)(t,e,i,a.regions[n],"region_".concat(a.key,"_").concat(n),a.yAxis)}}))}))},e.clear=function(t,e){return(0,_.d3RemoveElement)(t,'g[aria-describedby="'.concat(e.key,'"]'))}},9822:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.translateSelectionItem=e.translateSelectionBox=e.drawSelectionIndicator=e.dataPointActionHandler=void 0;var r=h(n(56194)),o=h(n(34004)),u=h(n(22639)),l=a(n(75090)),c=n(15861),s=a(n(45839)),f=n(96419);function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}function h(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var p=function(t){return t.high?t.high:t.low?t.low:t.mid},g=function(t,e,n){var a=r.select(n);a.select("path").classed(l.default.dataPointDisplayEnable,(function(){return!r.select(this).classed(l.default.dataPointDisplayEnable)})),a.selectAll("svg").classed(l.default.dataPointDisplayEnable,(function(){return!r.select(this).classed(l.default.dataPointDisplayEnable)}));var i=a.select("rect");i.classed(l.default.dataPointDisplayEnable,!i.classed(l.default.dataPointDisplayEnable))},v=function(t,e){return!(!e.high||!e.low)&&function(t,e){return t.shownTargets.indexOf(e.high.key)<0||t.shownTargets.indexOf(e.low.key)<0}(t,e)||function(t,e){return t.shownTargets.indexOf(p(e).key)<0}(t,e)},y=(e.dataPointActionHandler=function(t,e,n,a){s.default.isEmpty(e.onClick)||function(t,e,n){var a=r.select(n),i=a.select(".".concat(l.default.dataPointSelection));return a.attr("aria-selected",!("true"===a.attr("aria-selected"))),i.attr("aria-hidden",!("true"===i.attr("aria-hidden"))),v(t,e)&&g(0,0,n),i}(t,e,a).call((function(a){return e.onClick((function(){var n=a.node().parentNode;r.select(n).attr("aria-selected",!1),a.attr("aria-hidden",!0),v(t,e)&&g(0,0,n)}),e.key,n,e,a)}))},function(t,e,n){return t.attr("x",(function(t){return e.x(t.high.x)-u.default.SELECTION_INDICATOR_X_POSITION})).attr("y",(function(t){return e[n.yAxis](t.high.y)-u.default.SELECTION_INDICATOR_Y_POSITION})).attr("width",(function(t){return e.x(t.low.x)-e.x(t.high.x)+2*u.default.SELECTION_INDICATOR_X_POSITION||2*u.default.SELECTION_INDICATOR_X_POSITION})).attr("height",(function(t){return e[n.yAxis](t.low.y)-e[n.yAxis](t.high.y)+2*u.default.SELECTION_INDICATOR_Y_POSITION}))}),_=function(t){return function(e){return function(n){var a;return"translate(".concat((a=e,t.x(p(a).x)),",").concat(function(n){return t[e.yAxis](p(n).y)}(e),") scale(").concat(n,")")}}};e.translateSelectionBox=function(t,e,n){return e.selectAll(".".concat(l.default.pairedBoxGroup," rect.").concat(l.default.dataPointSelection)).transition().call(u.default.d3Transition(n.settingsDictionary.transition)).each((function(e){return y(r.select(this).transition().call(u.default.d3Transition(n.settingsDictionary.transition)),t,e)}))},e.translateSelectionItem=function(t,e,n){return e.selectAll(".".concat(l.default.pairedBoxGroup," .").concat(l.default.dataPointSelection)).each((function(e){return r.select(this).select("g").transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("transform",(function(){return _(t)(e)((0,c.getTransformScale)(this))}))}))},e.drawSelectionIndicator=function(t,e,n){return n.each((function(e){return e.high&&e.low?function(t,e,n,a){return y(t.append("rect").classed(l.default.dataPointSelection,!0).attr("rx",3).attr("ry",3).attr("aria-hidden",!0).attr("aria-describedby",a.key),e,a)}(r.select(this),t,0,e):function(t,e,n,a){return t.append((function(){return new o.default((0,f.getSVGObject)(u.SHAPES.CIRCLE,u.default.DEFAULT_PLOT_SELECTION_SCALE)).getShapeElement((0,o.getDefaultSVGProps)({svgClassNames:l.default.dataPointSelection,transformFn:_(e)(a),a11yAttributes:{"aria-hidden":!0,"aria-describedby":a.key}}))}))}(r.select(this),t,0,e)}))}},89484:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(53078))},10152:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=b(n(56194)),f=a(n(76148)),d=a(n(74467)),h=n(18321),p=n(22974),g=a(n(75090)),v=n(34675),y=n(27302),_=n(72053),m=b(n(37658)),x=a(n(98787));function T(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(T=function(t){return t?n:e})(t)}function b(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=T(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function E(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,A()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function A(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(A=function(){return!!t})()}var S=function(t){return t.graphContainer=null,t.config={},t.svg=null,t.legendSVG=null,t.content=[],t.contentConfig=[],t.resizeHandler=null,t.d3PieLayoutTransformer=null,t.d3PieArcTransformer=null,t},O=function(t){var e;return t.graphContainer,(e=t.config).canvasWidth=e.width,function(t){t.canvasHeight=t.height}(t.config),function(t){t.canvasRadius=s.min([t.height,t.width])/2}(t.config),t.d3PieLayoutTransformer=(0,y.createPieLayout)(),t.d3PieArcTransformer=(0,y.createArc)(t.config.canvasRadius),t},D=function(t){function e(t){var n;return(0,r.default)(this,e),n=E(this,e),S(n),n.generate(t),n}return(0,c.default)(e,t),(0,o.default)(e,[{key:"generate",value:function(t){var e,n;this.config=(e=t,(new m.default).setInput(e).validateInput().clone().getConfig()),(0,m.processInput)(t,this.config),(n=this).graphContainer=s.select(n.config.bindTo),n.config.height=(0,y.determineHeight)(n.config,n.config.dimension),n.config.width=(0,y.determineHeight)(n.config,n.config.dimension),O(this);var a=s.select(this.config.bindTo).append("div").classed(g.default.container,!0).style("padding-top",this.config.removeContainerPadding&&0).style("padding-bottom",this.config.removeContainerPadding&&0);return this.svg=a.insert("svg",":first-child").classed(g.default.pieChartCanvas,!0).attr("role","img").attr("height",this.config.canvasHeight).attr("width",this.config.canvasWidth),(0,y.createDefs)(this.config,this.svg),(0,y.createPieContentContainer)(this.config,this.svg),this.config.showLegend&&(this.legendSVG=(0,h.createLegend)(this.config,this.config.bindLegendTo?s.select(this.config.bindLegendTo):a)),(0,y.attachEventHandlers)(this),this.svg}},{key:"resize",value:function(){return(0,_.translatePieGraph)(this),this}},{key:"loadContent",value:function(t){var e=this;return(0,p.contentHandler)(t,(function(t){var n=new x.default(t);n.load(e),e.content.push(t.key),e.contentConfig.push(n)})),this.contentConfig.forEach((function(t){return t.resize(e)})),this}},{key:"unloadContent",value:function(t){var e=this;return(0,p.contentHandler)(t,(function(t){var n=e.content.indexOf(t.key);if(n<0)throw new Error(d.default.THROW_MSG_INVALID_OBJECT_PROVIDED);e.contentConfig[n].unload(e),e.content.splice(n,1),e.contentConfig.splice(n,1),e.contentConfig.forEach((function(t){return t.resize(e)}))})),this}},{key:"destroy",value:function(){return(0,y.detachEventHandlers)(this),(0,v.d3RemoveElement)(this.graphContainer,".".concat(g.default.pieChartCanvas)),(0,v.d3RemoveElement)(this.graphContainer,".".concat(g.default.container)),S(this),this}}])}(f.default);e.default=D},37658:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.processInput=e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(10832)),f=n(99462),d=a(n(22639)),h=a(n(74467)),p=a(n(45839));function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}function v(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,y()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}e.processInput=function(t,e){return e.clipPathId=(0,f.generateClipPathId)(),e.bindTo=t.bindTo,e.bindLegendTo=t.bindLegendTo,e.dimension=(0,s.getDefaultValue)(t.dimension,{}),e.showLegend=(0,s.getDefaultValue)(t.showLegend,!0),e.legendPadding=function(t,e){return p.default.isDefined(t.legendPadding)?{top:(0,s.getDefaultValue)(e.top,d.default.PIE_LEGEND_PADDING.top),bottom:(0,s.getDefaultValue)(e.bottom,d.default.PIE_LEGEND_PADDING.bottom),right:(0,s.getDefaultValue)(e.right,d.default.PIE_LEGEND_PADDING.right),left:(0,s.getDefaultValue)(e.left,d.default.PIE_LEGEND_PADDING.left),hasCustomLegendPadding:!0}:{top:d.default.PIE_LEGEND_PADDING.top,bottom:d.default.PIE_LEGEND_PADDING.bottom,right:d.default.PIE_LEGEND_PADDING.right,left:d.default.PIE_LEGEND_PADDING.left,hasCustomLegendPadding:!1}}(e,t.legendPadding),e};var _=function(t){function e(){var t;return(0,r.default)(this,e),(t=v(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){if(p.default.isEmpty(this.input))throw new Error(h.default.THROW_MSG_INVALID_INPUT);if(p.default.isEmpty(this.input.bindTo))throw new Error(h.default.THROW_MSG_NO_BIND);return this}},{key:"clone",value:function(){return this.config=p.default.deepClone(this.input),this}}])}(s.default);e.default=_},98787:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.validateContent=e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(28452)),u=a(n(63072)),l=a(n(29511)),c=a(n(43693)),s=n(72372),f=a(n(22639)),d=a(n(74467)),h=n(18321),p=a(n(75090)),g=a(n(45839)),v=n(3522),y=n(27302),_=n(72053);function m(t,e,n){return e=(0,u.default)(e),(0,o.default)(t,x()?Reflect.construct(e,n||[],(0,u.default)(t).constructor):e.apply(t,n))}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}function T(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,a)}return n}function b(t){for(var e=1;e1&&!t.config.shouldHideAllRegion&&((0,g.areRegionsIdentical)(t.svg)?t.config.shouldHideAllRegion=!1:((0,g.hideAllRegions)(t.svg),t.config.shouldHideAllRegion=!0)):((0,g.hideAllRegions)(t.svg),t.config.shouldHideAllRegion=!0),(0,g.translateRegion)(t.scale,t.config,t.svg.select(".".concat(v.default.regionGroup))),(0,_.translateScatterGraph)(t.scale,t.svg,t.config),this}},{key:"reflow",value:function(t,e){this.config.values=e.values,(0,x.validateData)(this.config.values);var n={clickHandler:(0,_.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,_.hoverHandler)(t.config.shownTargets,t.svg)};this.dataTarget=(0,_.processDataPoints)(t.config,this.config);var a=t.config.shownTargets.lastIndexOf(e.key);a>-1&&t.config.shownTargets.splice(a,1);var i=t.content.filter((function(t){return t.config.key===e.key}));y.default.isEmptyArray(i)||(0,p.reflowLegend)(t.legendSVG,i[0].config,t,n),t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll(".".concat(v.default.pointGroup)).data(this.dataTarget).exit().remove();var r=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).select(".".concat(v.default.currentPointsGroup)).selectAll('[class*="'.concat(v.default.point,'"]')).data((0,_.getDataPointValues)(this.dataTarget));(0,_.drawDataPoints)(t.scale,t.config,r.enter(),t.legendSVG),r.exit().transition().call(d.default.d3Transition(t.config.settingsDictionary.transition)).remove(),(0,h.updateShapesDuringReflow)(t,e,this),this.valuesRange[this.config.yAxis]=E(this.config.values)}},{key:"redraw",value:function(t){return(0,_.clear)(t.svg,this.dataTarget),(0,_.draw)(t.scale,t.config,t.svg,this.dataTarget,t.legendSVG),this}}])}(s.GraphContent);e.default=A},76046:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(10832)),f=a(n(45839));function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}function h(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,p()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=h(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){return(0,s.validateBaseInput)(this.input),this}},{key:"clone",value:function(){return this.config=f.default.deepClone(this.input),this}}])}(s.default);e.default=g},77313:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.translateScatterGraph=e.translatePoints=e.transformPoint=e.toggleDataPointSelection=e.processDataPoints=e.prepareLegendItems=e.hoverHandler=e.getDataPointValues=e.drawDataPoints=e.draw=e.clickHandler=e.clear=void 0;var r=x(n(56194)),o=n(72372),u=n(10832),l=n(34004),c=n(77317),s=x(n(22639)),f=a(n(74467)),d=n(18321),h=n(42124),p=n(52097),g=a(n(75090)),v=n(15861),y=a(n(45839)),_=n(34675);function m(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(m=function(t){return t?n:e})(t)}function x(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=m(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var T=e.transformPoint=function(t){return function(e){return function(n){var a;return"translate(".concat((a=e,t.x(a.x)),",").concat(function(e){return t[e.yAxis](e.y)}(e),") scale(").concat(n,")")}}},b=e.translatePoints=function(t,e,n,a){return e.selectAll(".".concat(g.default.scatterGraphContent," .").concat(n)).each((function(e){r.select(this).select("g").transition().call(s.default.d3Transition(a.settingsDictionary.transition)).attr("transform",(function(){return T(t)(e)((0,v.getTransformScale)(this))}))}))},E=e.toggleDataPointSelection=function(t){var e=r.select(t.parentNode).select(".".concat(g.default.dataPointSelection));return e.attr("aria-hidden",!("true"===e.attr("aria-hidden"))),e},A=function(t,e,n){y.default.isEmpty(t.onClick)||E(n).call((function(n){return t.onClick((function(){n.attr("aria-hidden",!0)}),t.key,e,t,n)}))},S=(e.translateScatterGraph=function(t,e,n){(0,_.translateSVGElement)(e,g.default.currentPointsGroup,n),b(t,e,g.default.point,n),b(t,e,g.default.dataPointSelection,n)},e.getDataPointValues=function(t){return t.internalValuesSubset}),O=e.drawDataPoints=function(t,e,n,a){var i=function(e,n,a,i){return e.append((function(){var e;return new o.Shape((0,_.getShapeForTarget)(n)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:"".concat(g.default.point," ").concat(i),transformFn:T(t)(n),onClickFn:function(){A(n,a,this)},a11yAttributes:{"aria-hidden":"false"===(null===(e=document.querySelector(".".concat(g.default.legendItem,'[aria-describedby="').concat(n.key,'"]')))||void 0===e?void 0:e.getAttribute("aria-current")),"aria-describedby":n.key,"aria-disabled":!y.default.isFunction(n.onClick)}}))}))};n.append("g").classed(g.default.pointGroup,!0).each((function(n,u){var c,f,d=r.select(this);c=n,f=u,d.append((function(){return new o.Shape((0,p.getSVGObject)(s.SHAPES.CIRCLE,s.default.DEFAULT_PLOT_SELECTION_SCALE)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:g.default.dataPointSelection,transformFn:T(t)(c),onClickFn:function(){A(c,f,this)},a11yAttributes:{"aria-hidden":!0,"aria-describedby":c.key,"aria-disabled":!y.default.isFunction(c.onClick)}}))})),n.isCritical&&(e.hasCriticality=!0,i(d,n,u,g.default.criticalityOuterPoint),i(d,n,u,g.default.criticalityInnerPoint)),function(e,n,i){e.append((function(){var e;return new o.Shape((0,_.getShapeForTarget)(n)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:g.default.point,svgStyles:"fill: ".concat((0,_.getColorForTarget)(n),";"),transformFn:T(t)(n),onClickFn:function(){A(n,i,this)},a11yAttributes:{"aria-hidden":a?"false"===(null===(e=a.select(".".concat(g.default.legendItem,"[aria-describedby='").concat(n.key,"']")))||void 0===e?void 0:e.attr("aria-current")):"false","aria-describedby":n.key,"aria-disabled":!y.default.isFunction(n.onClick)}}))}))}(d,n,u)}))};e.draw=function(t,e,n,a,i){var r=n.append("g").classed(g.default.scatterGraphContent,!0).attr("clip-path","url(#".concat(e.clipPathId,")")).attr("aria-hidden",e.shownTargets.indexOf(a.key)<0).attr("aria-describedby",a.key),o=r.selectAll(".".concat(g.default.currentPointsGroup)).data([a]);o.enter().append("g").classed(g.default.currentPointsGroup,!0).attr("transform","translate(".concat((0,c.getXAxisXPosition)(e),",").concat((0,c.calculateVerticalPadding)(e),")")),o.exit().transition().call(s.default.d3Transition(e.settingsDictionary.transition)).remove();var u=r.select(".".concat(g.default.currentPointsGroup)).selectAll(".".concat(g.default.point)).data(S(a));O(t,e,u.enter(),i),u.exit().transition().call(s.default.d3Transition(e.settingsDictionary.transition)).remove()},e.processDataPoints=function(t,e){var n=t.axis.x.type,a=function(t){if(!(0,c.isValidAxisType)(t,n))throw new Error(f.default.THROW_MSG_INVALID_FORMAT_TYPE);return(0,u.parseTypedValue)(t,n)};return e.interpolationType=(0,u.getInterpolationType)(e.type),e.showShapes=!0,t.shownTargets.push(e.key),e.internalValuesSubset=e.values.map((function(t){return{onClick:e.onClick,isCritical:t.isCritical||!1,x:a(t.x),y:t.y,color:e.color||s.default.DEFAULT_COLOR,label:e.label||{},shape:e.shape||s.SHAPES.CIRCLE,yAxis:e.yAxis||s.default.Y_AXIS,key:e.key}})),e},e.clickHandler=function(t,e,n,a){return function(e,i){(0,d.legendClickHandler)(e);var o,u,l,c=(0,d.isLegendSelected)(r.select(e));o=n.shownTargets,u=i,(l=o.indexOf(u.key))>-1?o.splice(l,1):o.push(u.key),a.selectAll(".".concat(g.default.dataPointSelection,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",!0),a.selectAll('path[aria-describedby="'.concat(i.key,'"]')).attr("aria-hidden",c),a.selectAll(".".concat(g.default.point,'[aria-describedby="').concat(i.key,'"]')).attr("aria-hidden",c),window.requestAnimationFrame(function(t,e,n){return function(){(0,h.processRegions)(t,e,n)}}(t,n,a))}},e.hoverHandler=function(t,e){return function(n,a){(0,d.legendHoverHandler)(t,e,n.key,a,[function(t,e,n,i,r){e.selectAll(".".concat(g.default.point,'[aria-describedby="').concat(r,'"]')).classed(g.default.blur,a===s.default.HOVER_EVENT.MOUSE_ENTER)}]),e.selectAll('path[aria-describedby="'.concat(n.key,'"]')).classed(g.default.highlight,a===s.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll('svg[aria-describedby="'.concat(n.key,'"]')).classed(g.default.highlight,a===s.default.HOVER_EVENT.MOUSE_ENTER),(0,h.regionLegendHoverHandler)(t,e,n.key,a)}},e.prepareLegendItems=function(t,e,n,a){n.label&&n.label.display&&a&&(0,d.loadLegendItem)(a,n,t,e)},e.clear=function(t,e){return(0,_.d3RemoveElement)(t,'g[aria-describedby="'.concat(e.key,'"]'))}},99834:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(24380))},85740:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=O(n(56194)),f=a(n(76148)),d=n(77317),h=a(n(22639)),p=a(n(74467)),g=n(18321),v=a(n(75090)),y=n(34675),_=a(n(53170)),m=n(63287),x=n(70758),T=O(n(17438)),b=a(n(44095)),E=n(22974),A=a(n(45839));function S(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(S=function(t){return t?n:e})(t)}function O(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=S(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function D(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,w()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function w(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(w=function(){return!!t})()}var I=h.default.BASE_CANVAS_WIDTH_PADDING,P=function(t,e){e.canvasWidth=parseInt(t.style("width"),10)-(0,_.default)(t)},k=function(t){return t.graphContainer=null,t.config={axis:{x:{}},shownTargets:{},pan:{}},t.axis={},t.scale={},t.svg=null,t.legendSVG=null,t.content=[],t.contentConfig=[],t.resizeHandler=null,t},L=function(t){var e;return P(t.graphContainer,t.config),(0,m.calculateAxesSize)(t.config),(0,m.calculateAxesLabelSize)(t.config),(e=t.config).canvasHeight=(0,d.getYAxisHeight)(e)+2*(2*e.padding.bottom+e.padding.top),(0,m.scaleGraph)(t.scale,t.config),t},M=function(t){function e(t){var n;return(0,r.default)(this,e),n=D(this,e),k(n),n.generate(t),n}return(0,c.default)(e,t),(0,o.default)(e,[{key:"generate",value:function(t){var e,n;this.config=(e=t,(new T.default).setInput(e).validateInput().clone().getConfig()),(0,T.processInput)(t,this.config),(n=this).graphContainer=s.select(n.config.bindTo),n.config.height=(0,m.determineHeight)(n.config),L(this);var a=s.select(this.config.bindTo).append("div").classed(v.default.timelineContainer,!0).style("padding-top",this.config.removeContainerPadding&&0).style("padding-bottom",this.config.removeContainerPadding&&0);this.svg=a.insert("svg",":first-child").classed(v.default.canvas,!0).attr("role","img").attr("height",this.config.canvasHeight).attr("width",this.config.padding.hasCustomPadding?this.config.canvasWidth:this.config.canvasWidth-I),(0,m.createDefs)(this.config,this.svg),(0,m.createAxes)(this.axis,this.scale,this.config,this.svg);var i=document.querySelector(".".concat(v.default.timelineContainer)).querySelectorAll(".tick"),r=i[0].getBoundingClientRect().width,o=i[i.length-1].getBoundingClientRect().width;return document.querySelector(".".concat(v.default.timelineContainer)).querySelector(".carbon-axis.carbon-axis-x").getBoundingClientRect().width+r/2+o/2>this.config.canvasWidth&&(s.select(".".concat(v.default.timelineContainer)).select("defs").remove(),s.select(".".concat(v.default.timelineContainer)).select(".".concat(v.default.axisX)).remove(),this.config.padding.left=r/2,this.config.padding.right=o/2,(0,m.createDefs)(this.config,this.svg),(0,m.createAxes)(this.axis,this.scale,this.config,this.svg)),(0,m.createTimelineContent)(this.config,this.svg),(0,m.createLabel)(this.config,this.svg),this.config.showLegend&&(this.legendSVG=(0,g.createLegend)(this.config,this.config.bindLegendTo?s.select(this.config.bindLegendTo):a)),(0,m.attachEventHandlers)(this),this.svg}},{key:"resize",value:function(){var t=this;return P(this.graphContainer,this.config),(0,m.scaleGraph)(this.scale,this.config),(0,x.translateTimelineGraph)(this),this.contentConfig.forEach((function(e){return e.resize(t)})),this}},{key:"loadContent",value:function(t){var e=this;return(0,E.contentHandler)(t,(function(t){var n=new b.default(t);n.load(e),e.content.push(t.key),e.contentConfig.push(n)})),this.resize(),this}},{key:"unloadContent",value:function(t){var e=this;return(0,E.contentHandler)(t,(function(t){var n=e.content.indexOf(t.key);if(n<0)throw new Error(p.default.THROW_MSG_INVALID_OBJECT_PROVIDED);e.contentConfig[n].unload(e),e.content.splice(n,1),e.contentConfig.splice(n,1)})),this.resize(),this}},{key:"reflow",value:function(t){console.warn("reflow is deprecated and will be removed a future major release. Please use reflowMultipleDatasets instead.");var e={clickHandler:(0,m.clickHandler)(this,this,this.config,this.svg),hoverHandler:(0,m.hoverHandler)(this.config.shownTargets,this.svg)};if((0,d.setXAxisDomain)(this.config),(0,m.scaleGraph)(this.scale,this.config),(0,x.translateAxes)(this.axis,this.scale,this.config,this.svg),t&&t.values&&this.content.includes(t.key)){var n=this.content.findIndex((function(e){return e===t.key}));this.contentConfig[n].reflow(this,t)}return this.config.showLegend&&(0,g.reflowLegend)(this.legendSVG,this.contentConfig[0].config,this,e),this.resize(),this}},{key:"reflowMultipleDatasets",value:function(t){var e=this,n={clickHandler:(0,m.clickHandler)(this,this,this.config,this.svg),hoverHandler:(0,m.hoverHandler)(this.config.shownTargets,this.svg)};return(0,d.setXAxisDomain)(this.config),(0,m.scaleGraph)(this.scale,this.config),(0,x.translateAxes)(this.axis,this.scale,this.config,this.svg),t&&t.panData&&!A.default.isEmptyArray(t.panData)&&t.panData.forEach((function(t){var n=e.content.findIndex((function(e){return e===t.key}));n>-1&&e.contentConfig[n].reflow(e,t)})),this.config.showLegend&&(0,g.reflowLegend)(this.legendSVG,this.contentConfig[0].config,this,n),this.resize(),this}},{key:"destroy",value:function(){return(0,m.detachEventHandlers)(this),(0,y.d3RemoveElement)(this.graphContainer,".".concat(v.default.canvas)),(0,y.d3RemoveElement)(this.graphContainer,".".concat(v.default.timelineContainer)),k(this),this}}])}(f.default);e.default=M},17438:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.settingsDictionary=e.processInput=e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=a(n(94634)),f=m(n(10832)),d=n(99462),h=m(n(22639)),p=a(n(74467)),g=a(n(45839)),v=n(21459),y=n(18321);function _(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(_=function(t){return t?n:e})(t)}function m(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=_(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}function x(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,T()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(T=function(){return!!t})()}var b=e.settingsDictionary=function(t){return(0,d.isPanningModeEnabled)(t)?{shouldClamp:!1,transition:h.default.D3_TRANSITION_PROPERTIES_DISABLED}:{shouldClamp:!0,transition:h.default.D3_TRANSITION_PROPERTIES_ENABLED}},E=(e.processInput=function(t,e){var n=g.default.deepClone(t.axis);return e.clipPathId=(0,d.generateClipPathId)(),e.bindTo=t.bindTo,e.bindLegendTo=t.bindLegendTo,e.padding=function(t,e){return g.default.isDefined(t.padding)?{top:(0,f.getDefaultValue)(e.top,h.default.PADDING.top),bottom:(0,f.getDefaultValue)(e.bottom,h.default.PADDING.bottom),right:(0,f.getDefaultValue)(e.right,h.default.PADDING.right),left:(0,f.getDefaultValue)(e.left,h.default.PADDING.left),hasCustomPadding:!0}:{top:h.default.PADDING.top,bottom:h.default.PADDING.bottom,right:h.default.PADDING.right,left:h.default.PADDING.left,hasCustomPadding:!1}}(e,t.padding),e.padding.hasCustomPadding=g.default.isDefined(t.padding),e.legendPadding=(0,y.getLegendPadding)(e,t.legendPadding),e.axis={x:{}},e.d3Locale=(0,f.getDefaultValue)(t.locale,v.DEFAULT_LOCALE),e.throttle=(0,f.getDefaultValue)(t.throttle,h.default.RESIZE_THROTTLE),e.settingsDictionary=b(t),e.showLabel=(0,f.getDefaultValue)(t.showLabel,!0),e.showLegend=(0,f.getDefaultValue)(t.showLegend,!0),e.axis.x=(0,s.default)(n.x,{type:h.AXIS_TYPE.TIME_SERIES,show:!0,ticks:(0,f.getDefaultValue)(n.x.ticks,{}),domain:(0,f.getXAxisDomain)(h.AXIS_TYPE.TIME_SERIES,n.x.lowerLimit,n.x.upperLimit),rangeRounding:(0,f.getDefaultValue)(n.x.rangeRounding,!0)}),e.shownTargets=[],e},function(t){function e(){var t;return(0,r.default)(this,e),(t=x(this,e)).config=null,t.input=null,t}return(0,c.default)(e,t),(0,o.default)(e,[{key:"getConfig",value:function(){return this.config}},{key:"setInput",value:function(t){return this.input=t,this}},{key:"validateInput",value:function(){if(g.default.isEmpty(this.input))throw new Error(p.default.THROW_MSG_NO_AXES_DATA_LOADED);if(g.default.isEmpty(this.input.bindTo))throw new Error(p.default.THROW_MSG_NO_BIND);if(g.default.isEmpty(this.input.axis)||g.default.isEmpty(this.input.axis.x))throw new Error(p.default.THROW_MSG_NO_AXIS_INFO);if(g.default.isEmpty(this.input.axis.x.lowerLimit)||g.default.isEmpty(this.input.axis.x.upperLimit))throw new Error(p.default.THROW_MSG_NO_AXIS_LIMIT_INFO);if(!g.default.isDate(this.input.axis.x.lowerLimit)||!g.default.isDate(this.input.axis.x.upperLimit))throw new Error(p.default.THROW_MSG_INVALID_AXIS_TYPE_VALUES);return this}},{key:"clone",value:function(){return this.config=g.default.deepClone(this.input),this}}])}(f.default));e.default=E},44095:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateContent=e.default=void 0;var r=a(n(17383)),o=a(n(34579)),u=a(n(28452)),l=a(n(63072)),c=a(n(29511)),s=n(72372),f=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=m(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(22639)),d=a(n(74467)),h=n(18321),p=a(n(75090)),g=a(n(45839)),v=n(3522),y=n(63287),_=n(70758);function m(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(m=function(t){return t?n:e})(t)}function x(t,e,n){return e=(0,l.default)(e),(0,u.default)(t,T()?Reflect.construct(e,n||[],(0,l.default)(t).constructor):e.apply(t,n))}function T(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(T=function(){return!!t})()}var b=function(t){if(!g.default.isDate(t))throw new Error(d.default.THROW_MSG_INVALID_FORMAT_TYPE);return g.default.parseDateTime(t)},E=function(t,e){return t.shownTargets.push(e.key),e.internalValuesSubset=e.values.map((function(t){return{onClick:e.onClick,isCritical:t.isCritical||!1,x:b(t.x),content:t.content,color:e.color||f.default.DEFAULT_COLOR,label:e.label||{},shape:e.shape||f.SHAPES.CIRCLE,key:e.key}})),e},A=e.validateContent=function(t){if(g.default.isEmpty(t))throw new Error(d.default.THROW_MSG_NO_DATA_LOADED);if(g.default.isEmpty(t.key))throw new Error(d.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);if(g.default.isEmpty(t.label)||g.default.isEmpty(t.label.display))throw new Error(d.default.THROW_MSG_UNIQUE_LABEL_NOT_PROVIDED);if(g.default.isEmpty(t.values))throw new Error(d.default.THROW_MSG_NO_DATA_POINTS)},S=function(t,e,n,a,i){var r=(0,y.createTimelineContentGroup)(n,a,t.config).selectAll(".".concat(p.default.point)).data(i.internalValuesSubset);(0,y.createPoints)(e,n,r.enter()),r.exit().transition().call(f.default.d3Transition).remove()},O=function(t){function e(t){var n,a;return(0,r.default)(this,e),(n=x(this,e)).config=(A(a=t),g.default.deepClone(a)),n.dataTarget=null,n}return(0,c.default)(e,t),(0,o.default)(e,[{key:"load",value:function(t){if(!(0,v.isUniqueKey)(t.contentConfig,this.config.key))throw new Error(d.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);return this.dataTarget=E(t.config,this.config),S(this,t.scale,t.config,t.svg.select(".".concat(p.default.timelineGraphContent)),this.dataTarget),(0,y.prepareLegendItems)(t.config,{clickHandler:(0,y.clickHandler)(t,this,t.config,t.svg),hoverHandler:(0,y.hoverHandler)(t.config.shownTargets,t.svg)},this.dataTarget,t.legendSVG),this}},{key:"unload",value:function(t){return(0,y.clear)(t.svg,this.dataTarget),(0,h.removeLegendItem)(t.legendSVG,this.dataTarget),this.dataTarget={},this.config={},this}},{key:"resize",value:function(t){return(0,_.translatePoints)(t.scale,t.config,t.svg,this.config.key,".".concat(p.default.point)),(0,_.translatePoints)(t.scale,t.config,t.svg,this.config.key,".".concat(p.default.dataPointSelection)),this}},{key:"reflow",value:function(t,e){this.config.values=e.values,this.dataTarget=E(t.config,this.config);var n=t.config.shownTargets.lastIndexOf(e.key);n>-1&&t.config.shownTargets.splice(n,1),t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll(".".concat(p.default.pointGroup)).data(this.dataTarget).exit().remove();var a=t.svg.select('g[aria-describedby="'.concat(e.key,'"]')).selectAll('[class*="'.concat(p.default.point,'"]')).data(this.dataTarget.internalValuesSubset);(0,y.createPoints)(t.scale,t.config,a.enter()),a.exit().transition().call(f.default.d3Transition(t.config.settingsDictionary.transition)).remove(),this.resize(t)}},{key:"redraw",value:function(t){return(0,y.clear)(t.svg,this.dataTarget),S(this,t.scale,t.config,t.svg.select(".".concat(p.default.timelineGraphContent)),this.dataTarget),this}}])}(s.GraphContent);e.default=O},63287:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"attachEventHandlers",{enumerable:!0,get:function(){return p.attachEventHandlers}}),e.createTimelineContentGroup=e.createTimelineContent=e.createPoints=e.createLabel=e.createDefs=e.createAxes=e.clickHandler=e.clear=e.calculateAxesSize=e.calculateAxesLabelSize=void 0,Object.defineProperty(e,"detachEventHandlers",{enumerable:!0,get:function(){return p.detachEventHandlers}}),e.getAxesScale=e.determineHeight=void 0,Object.defineProperty(e,"getColorForTarget",{enumerable:!0,get:function(){return p.getColorForTarget}}),Object.defineProperty(e,"getShapeForTarget",{enumerable:!0,get:function(){return p.getShapeForTarget}}),e.scaleGraph=e.prepareLegendItems=e.hoverHandler=e.getXAxisYPosition=e.getXAxisXPosition=e.getXAxisWidth=e.getXAxisLabelYPosition=e.getXAxisLabelXPosition=void 0;var r=y(n(56194)),o=n(72372),u=n(34004),l=n(77317),c=y(n(22639)),s=n(18321),f=n(52097),d=a(n(75090)),h=a(n(45839)),p=n(34675),g=n(70758);function v(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(v=function(t){return t?n:e})(t)}function y(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=v(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}var _=c.default.TIMELINE_HEIGHT,m=(e.determineHeight=function(t){return _+t.padding.top-t.padding.bottom},e.calculateAxesLabelSize=function(t){t.axisLabelHeights={},t.axisLabelHeights.x=0,t.showLabel&&t.axis.x.label&&(t.axisLabelHeights.x=(0,l.getAxisLabelHeight)(t.axis.x.label))},e.calculateAxesSize=function(t){t.axisSizes={},t.axisSizes.x=(0,l.getXAxisHeight)(t)},e.getXAxisXPosition=function(t){return t.padding.left}),x=e.getXAxisYPosition=function(t){return 1.5*t.padding.top+t.padding.bottom},T=e.getXAxisWidth=function(t){return t.canvasWidth-t.padding.left-t.padding.right},b=e.getXAxisLabelXPosition=function(t){return m(t)+T(t)/2},E=e.getXAxisLabelYPosition=function(t){return x(t)+2*t.axisLabelHeights.x+4*t.padding.bottom},A=e.getAxesScale=function(t,e,n){return t.x=(0,l.prepareXAxis)(e.x,n.axis.x.ticks.values,T(n),(0,l.getAxisTickFormat)(n.d3Locale,n.axis.x.ticks.format,n.axis.x.type)).tickSize(c.default.DEFAULT_TIMELINE_TICK_LENGTH),t},S=(e.scaleGraph=function(t,e){t.x=r.scaleTime().domain([e.axis.x.domain.lowerLimit,e.axis.x.domain.upperLimit]).range([0,T(e)]).clamp(e.settingsDictionary.shouldClamp),e.axis.x.rangeRounding&&t.x.nice()},e.createDefs=function(t,e){return e.append("defs").append("clipPath").attr("id",t.clipPathId).append("rect").attr(c.default.X_AXIS,m(t)).attr(c.default.Y_AXIS,x(t)/2).attr("width",T(t)).attr("height",(0,l.getYAxisHeight)(t))},e.createAxes=function(t,e,n,a){A(t,e,n),a.append("g").classed(d.default.axis,!0).classed(d.default.axisX,!0).attr("aria-hidden",!1).attr("transform","translate(".concat(m(n),", ").concat(x(n),")")).call(t.x)},e.createLabel=function(t,e){if(t.showLabel&&t.axis.x.label){var n=e.append("g").classed(d.default.axisLabelX,!0).attr("transform","translate(".concat(b(t),",").concat(E(t),") rotate(").concat((0,l.getRotationForAxis)(c.default.X_AXIS),")"));(0,l.buildAxisLabel)(n,h.default.sanitize(t.axis.x.label))}},e.createTimelineContent=function(t,e){return e.append("g").classed(d.default.timelineGraphContent,!0).attr("clip-path","url(#".concat(t.clipPathId,")"))},e.createTimelineContentGroup=function(t,e,n){return e.append("g").classed(d.default.timelineContentGroup,!0).attr("transform","translate(".concat(m(t),",0)")).attr("aria-labelledby",n.label.display).attr("aria-describedby",n.key)},function(t,e,n){h.default.isEmpty(t.onClick)||function(t){var e=r.select(t.parentNode).select(".".concat(d.default.dataPointSelection));return e.attr("aria-hidden",!("true"===e.attr("aria-hidden"))),e}(n).call((function(n){return t.onClick((function(){n.attr("aria-hidden",!0)}),t.key,e,t,n)}))}),O=function(t,e,n){var a=t.path,i=t.value,r=t.index,l=e.objectScale,c=e.hiddenConfig,s=e.fillStyle,d=e.shapeStyle,p=e.pointStyle,v=n.scale,y=n.config,_=n.cls;a.append((function(){return new o.Shape((0,f.getSVGObject)(d,l)).getShapeElement((0,u.getDefaultSVGProps)({svgClassNames:"".concat(p," ").concat(_),svgStyles:"fill: ".concat(s,";"),transformFn:(0,g.transformPoint)(v,y)(i),onClickFn:function(){S(i,r,this)},a11yAttributes:{"aria-describedby":i.key,"aria-hidden":c,"aria-disabled":!h.default.isFunction(i.onClick)}}))}))};e.createPoints=function(t,e,n){var a=function(e,n,a,i,r){var o,u=c.default.DEFAULT_TIMELINE_SCALE,l="false"===(null===(o=document.querySelector(".".concat(d.default.legendItem,'[aria-describedby="').concat(n.key,'"]')))||void 0===o?void 0:o.getAttribute("aria-current")),s=(0,p.getShapeForTarget)(n),f=d.default.point;O({path:e,value:n,index:a},{objectScale:u,hiddenConfig:l,fillStyle:undefined,shapeStyle:s,pointStyle:f},{scale:t,config:r,cls:i})};n.append("g").classed(d.default.pointGroup,!0).each((function(n,i){var o,u,l,s,f,h,g=r.select(this);o=g,u=n,l=i,s=c.default.DEFAULT_TIMELINE_PLOT_SELECTION_SCALE,f=c.SHAPES.CIRCLE,h=d.default.dataPointSelection,O({path:o,value:u,index:l},{objectScale:s,hiddenConfig:!0,fillStyle:void 0,shapeStyle:f,pointStyle:void 0},{scale:t,config:e,cls:h}),n.isCritical&&(a(g,n,i,d.default.criticalityTimelineOuterPoint,e),a(g,n,i,d.default.criticalityTimelineInnerPoint,e)),function(n,a,i){var r,o=c.default.DEFAULT_TIMELINE_SCALE,u="false"===(null===(r=document.querySelector(".".concat(d.default.legendItem,'[aria-describedby="').concat(a.key,'"]')))||void 0===r?void 0:r.getAttribute("aria-current")),l=(0,p.getColorForTarget)(a),s=(0,p.getShapeForTarget)(a),f=d.default.point;O({path:n,value:a,index:i},{objectScale:o,hiddenConfig:u,fillStyle:l,shapeStyle:s,pointStyle:f},{scale:t,config:e,cls:void 0})}(g,n,i)}))},e.prepareLegendItems=function(t,e,n,a){n.label&&n.label.display&&a&&(0,s.loadLegendItem)(a,n,t,e)},e.clickHandler=function(t,e,n,a){return function(t,e){var i,o,u;(0,s.legendClickHandler)(t),i=n.shownTargets,o=e,(u=i.indexOf(o.key))>-1?i.splice(u,1):i.push(o.key),a.selectAll(".".concat(d.default.point,'[aria-describedby="').concat(e.key,'"]')).attr("aria-hidden",(0,s.isLegendSelected)(r.select(t))),window.requestAnimationFrame((function(){}))}},e.hoverHandler=function(t,e){return function(n,a){(0,s.legendHoverHandler)(t,e,n.key,a,[function(t,e,n,i,r){e.selectAll(".".concat(d.default.point,'[aria-describedby="').concat(r,'"]')).classed(d.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER)}])}},e.clear=function(t,e){return(0,p.d3RemoveElement)(t,'g[aria-describedby="'.concat(e.key,'"]'))}},70758:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.translateTimelineGraph=e.translatePoints=e.translateAxes=e.transformPoint=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=d(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(77317),u=a(n(22639)),l=a(n(75090)),c=n(15861),s=n(34675),f=n(63287);function d(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(d=function(t){return t?n:e})(t)}var h=e.translateAxes=function(t,e,n,a){(0,f.getAxesScale)(t,e,n),a.select(".".concat(l.default.axisX)).transition().call(u.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat((0,f.getXAxisXPosition)(n),",").concat((0,f.getXAxisYPosition)(n),")")).call(t.x)},p=e.transformPoint=function(t,e){return function(n){return function(a){var i;return"translate(".concat((i=n,t.x(i.x)),",").concat((0,f.getXAxisYPosition)(e),") scale(").concat(a,")")}}};e.translatePoints=function(t,e,n,a,i){return n.select(".".concat(l.default.timelineContentGroup,'[aria-describedby="').concat(a,'"]')).selectAll(i).each((function(n){r.select(this).select("g").transition().call(u.default.d3Transition(e.settingsDictionary.transition)).attr("transform",(function(){return p(t,e)(n)((0,c.getTransformScale)(this))}))}))},e.translateTimelineGraph=function(t){var e;(0,s.translateCanvas)(t.config,t.svg),e=t.config,t.svg.select("clipPath#".concat(e.clipPathId)).selectAll("rect").attr("height",(0,o.getYAxisHeight)(e)).attr("width",(0,f.getXAxisWidth)(e)),h(t.axis,t.scale,t.config,t.svg),function(t,e){t.axis.x.label&&e.select(".".concat(l.default.axisLabelX)).transition().call(u.default.d3Transition(t.settingsDictionary.transition)).attr("transform","translate(".concat((0,f.getXAxisLabelXPosition)(t),",").concat((0,f.getXAxisLabelYPosition)(t),") rotate(").concat((0,o.getRotationForAxis)(u.default.X_AXIS),")"))}(t.config,t.svg)}},19271:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(85740))},2555:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(63157)),r=a(n(67341)),o=a(n(62620)),u=a(n(81462)),l=a(n(89484)),c=a(n(66942)),s=a(n(19271)),f=a(n(99834)),d=n(15282);e.default={gantt:function(t){return new r.default(t)},graph:function(t){return new o.default(t)},line:function(t){return new u.default(t)},pairedResult:function(t){return new l.default(t)},timeline:function(t){return new s.default(t)},pie:function(t){return new c.default(t)},bar:function(t){return new i.default(t)},scatter:function(t){return new f.default(t)},bubble:function(t){return new d.Bubble(t)},bubbleSingleDataset:function(t){return new d.BubbleSingleDataset(t)},bubbleMultipleDataset:function(t){return new d.BubbleMultipleDataset(t)}}},34169:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(74467));e.default=function(){return(0,r.default)((function t(){(0,i.default)(this,t)}),[{key:"getConfig",value:function(){throw new Error(o.default.THROW_MSG_CONFIG_GET_CONFIG_NOT_IMPLEMENTED)}},{key:"setInput",value:function(t){throw new Error(o.default.THROW_MSG_CONFIG_SET_INPUT_NOT_IMPLEMENTED)}},{key:"validateInput",value:function(){throw new Error(o.default.THROW_MSG_CONFIG_VALIDATE_INPUT_NOT_IMPLEMENTED)}},{key:"clone",value:function(){throw new Error(o.default.THROW_MSG_CONFIG_CLONE_INPUT_NOT_IMPLEMENTED)}}])}()},99462:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateBaseInput=e.parseTypedValue=e.isPanningModeEnabled=e.getXAxisDomain=e.getType=e.getStrokeDashArray=e.getScale=e.getInterpolationType=e.getDefaultValue=e.generateDatelineClipPathId=e.generateClipPathId=void 0;var r=a(n(12550)),o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),u=n(22639),l=a(n(74467)),c=a(n(45839));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}e.validateBaseInput=function(t){if(c.default.isEmpty(t))throw new Error(l.default.THROW_MSG_NO_CONTENT_DATA_LOADED);if(c.default.isEmpty(t.key))throw new Error(l.default.THROW_MSG_UNIQUE_KEY_NOT_PROVIDED);if(!c.default.isArray(t.values))throw new Error(l.default.THROW_MSG_NO_DATA_POINTS)};var f=e.getDefaultValue=function(t,e){return c.default.isUndefined(t)?e:t},d=e.getType=function(t){return f(t,u.AXIS_TYPE.DEFAULT)};e.generateClipPathId=function(){return"carbon-".concat((0,r.default)(),"-clip")},e.generateDatelineClipPathId=function(){return"carbon-".concat((0,r.default)(),"-dateline-clip")},e.getInterpolationType=function(t){return f(t,u.LINE_TYPE.LINEAR)},e.getScale=function(t){return d(t)===u.AXIS_TYPE.TIME_SERIES?o.scaleTime():o.scaleLinear()},e.getXAxisDomain=function(t,e,n){return d(t)===u.AXIS_TYPE.TIME_SERIES?{lowerLimit:c.default.parseDateTime(e),upperLimit:c.default.parseDateTime(n)}:{lowerLimit:c.default.getNumber(e),upperLimit:c.default.getNumber(n)}},e.parseTypedValue=function(t,e){return d(e)===u.AXIS_TYPE.TIME_SERIES?c.default.parseDateTime(t):c.default.getNumber(t)},e.isPanningModeEnabled=function(t){return c.default.isDefined(t.pan)&&t.pan.enabled},e.getStrokeDashArray=function(t){return f(t.strokeDashArray,"0")}},10832:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(e,"getDefaultValue",{enumerable:!0,get:function(){return r.getDefaultValue}}),Object.defineProperty(e,"getInterpolationType",{enumerable:!0,get:function(){return r.getInterpolationType}}),Object.defineProperty(e,"getScale",{enumerable:!0,get:function(){return r.getScale}}),Object.defineProperty(e,"getType",{enumerable:!0,get:function(){return r.getType}}),Object.defineProperty(e,"getXAxisDomain",{enumerable:!0,get:function(){return r.getXAxisDomain}}),Object.defineProperty(e,"parseTypedValue",{enumerable:!0,get:function(){return r.parseTypedValue}}),Object.defineProperty(e,"validateBaseInput",{enumerable:!0,get:function(){return r.validateBaseInput}});var i=a(n(34169)),r=n(99462)},62297:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(74467));e.default=function(){return(0,r.default)((function t(){(0,i.default)(this,t)}),[{key:"generate",value:function(t){throw new Error(o.default.THROW_MSG_CONSTRUCT_GENERATE_NOT_IMPLEMENTED)}},{key:"loadContent",value:function(t){throw new Error(o.default.THROW_MSG_CONSTRUCT_LOAD_NOT_IMPLEMENTED)}},{key:"unloadContent",value:function(t){throw new Error(o.default.THROW_MSG_CONSTRUCT_UNLOAD_NOT_IMPLEMENTED)}},{key:"resize",value:function(){throw new Error(o.default.THROW_MSG_CONSTRUCT_RESIZE_NOT_IMPLEMENTED)}},{key:"destroy",value:function(){throw new Error(o.default.THROW_MSG_CONSTRUCT_DESTROY_NOT_IMPLEMENTED)}}])}()},76148:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(62297))},7233:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=a(n(74467));e.default=function(){return(0,r.default)((function t(){(0,i.default)(this,t)}),[{key:"load",value:function(t){throw new Error(o.default.THROW_MSG_CONTENT_LOAD_NOT_IMPLEMENTED)}},{key:"unload",value:function(t){throw new Error(o.default.THROW_MSG_CONTENT_UNLOAD_NOT_IMPLEMENTED)}},{key:"resize",value:function(t){throw new Error(o.default.THROW_MSG_CONTENT_RESIZE_NOT_IMPLEMENTED)}},{key:"redraw",value:function(t){throw new Error(o.default.THROW_MSG_CONTENT_REDRAW_NOT_IMPLEMENTED)}}])}()},73242:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"default",{enumerable:!0,get:function(){return i.default}});var i=a(n(7233))},79813:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.getDefaultSVGProps=e.default=void 0;var i=a(n(17383)),r=a(n(34579)),o=n(23841),u=e.getDefaultSVGProps=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.svgClassNames,n=void 0===e?"":e,a=t.svgStyles,i=void 0===a?"":a,r=t.transformFn,o=void 0===r?function(){}:r,u=t.onClickFn,l=void 0===u?function(){}:u,c=t.a11yAttributes,s=void 0===c?{}:c,f=t.additionalAttributes;return{svgClassNames:n,svgStyles:i,transformFn:o,onClickFn:l,a11yAttributes:s,additionalAttributes:void 0===f?{}:f}},l=function(){return(0,r.default)((function t(e){(0,i.default)(this,t),(0,o.validateShape)(e),this.shape=e}),[{key:"getShapeElement",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,o.createSVG)(this.shape,t||u(),e)}}])}();l.getDefaultSVGProps=u;e.default=l},23841:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateShape=e.createSVG=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=s(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=a(n(22639)),u=a(n(74467)),l=a(n(75090)),c=a(n(45839));function s(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(s=function(t){return t?n:e})(t)}var f={PATH:"path",CIRCLE:"circle",RECT:"rect",POLYGON:"polygon",G:"g",STYLE:"style"},d=function(t){return document.createElementNS(r.namespaces.svg,t)},h=(e.validateShape=function(t){if(c.default.isEmpty(t[f.PATH]))throw new Error(u.default.THROW_MSG_SHAPE_PATH_EMPTY);if(c.default.isEmpty(t.options))throw new Error(u.default.THROW_MSG_SHAPE_OPTIONS_EMPTY);if(c.default.isEmpty(t.options.x)||c.default.isEmpty(t.options.y)||c.default.isEmpty(t.options.scale))throw new Error(u.default.THROW_MSG_SHAPE_OPTIONS_PROPERTY_INVALID)},function(t,e,n){return(c.default.isArray(n)?n:[n]).forEach((function(a){t.append((function(){return(t=a,i=r.select(d(e)),Object.keys(t).forEach((function(e){"_html"!==e?i.attr(e,t[e]||""):i.html(n._html)})),i).node();var t,i}))})),t});e.createSVG=function(t,e){var n=e.svgClassNames,a=e.svgStyles,i=e.transformFn,u=e.onClickFn,c=e.a11yAttributes,s=e.additionalAttributes,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2],g=r.select(d("svg")).attr("x",t.options.x).attr("y",t.options.y).attr("style",a).attr("class","".concat(l.default.svgIcon," ").concat(n)).attr("role","img").attr("pointer-events",s["pointer-events"]?"none":"auto").on("click",u);return p&&g.attr("viewBox",o.default.VIEW_BOX_SIZE),function(){for(var t=arguments.length,e=new Array(t),n=0;n1&&void 0!==arguments[1]?arguments[1]:c.default.Y_AXIS;return o.min(t[e].domain())<0&&o.max(t[e].domain())>0},m=function(t){return[{x:t.x.domain()[0],y:0},{x:t.x.domain()[1],y:0}]},x=function(t,e){return o.line().x((function(e){return t.x(e.x)})).y((function(n){return t[e](n.y)}))},T=e.hasY2Axis=function(t){return f.default.isDefined(t.y2)&&t.y2.show},b=e.isXAxisOrientationTop=function(t){return t===c.AXES_ORIENTATION.X.TOP},E=function(t){var e=t.scale().tickFormat().toString();return"".concat(e.slice(0,e.length-1),"~").concat(e.slice(e.length-1))},A=e.processTickValues=function(t){return f.default.isEmpty(t)?null:t.map((function(t){return f.default.isDate(t)?f.default.parseDateTime(t):t}))},S=e.prepareXAxis=function(t,e,n,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:c.AXES_ORIENTATION.X.BOTTOM,r=arguments.length>5?arguments[5]:void 0,u=arguments.length>6?arguments[6]:void 0,l=o.axisBottom(t);if(b(i)&&(l=o.axisTop(t)),e&&0!==e.length)if(f.default.isDate(e))if(f.default.isUndefined(r)||f.default.isUndefined(u))l.ticks(Math.max(n/c.default.MAX_TICK_VARIANCE,c.default.MIN_TICKS)).tickValues(A(e)).tickFormat(a);else{var s=e.filter((function(t){var e=new Date(t);return e>=r&&e<=u}));l.tickValues(A(s)).tickFormat(o.timeFormat(a))}else l.ticks(Math.max(n/c.default.MAX_TICK_VARIANCE,c.default.MIN_TICKS)).tickValues(A(e.filter((function(t){return t>=r&&t<=u})))).tickFormat(a);else l.ticks(Math.max(n/c.default.MAX_TICK_VARIANCE,c.default.MIN_TICKS)).tickValues(A(e)).tickFormat(a);return l},O=e.getXAxisWidth=function(t){return t.canvasWidth-t.axisSizes.y-t.axisSizes.y2-t.axisLabelWidths.y-t.axisLabelWidths.y2},D=e.getAxisTickFormat=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.AXIS_TYPE.DEFAULT;if(""===e)return e;var a=n===c.AXIS_TYPE.TIME_SERIES?o.timeFormatDefaultLocale(t):o.formatDefaultLocale(t);if(f.default.isEmpty(e)){if("default"===n)return d.DEFAULT_TICK_FORMAT;switch(t.locale){case d.default.es_ES.locale:case d.default.pt_BR.locale:return g.getDefaultDateFormat;case d.default.de_DE.locale:return g.getGermanDateFormat;case d.default.sv_SE.locale:return g.getSwedishDateFormat;case d.default.nl_NL.locale:return g.getDefaultDateFormat;case d.default.fr_FR.locale:return g.getFrenchDateFormat;default:return d.DEFAULT_TICK_FORMAT}}return a.format(e)},w=e.prepareYAxis=function(t,e,n,a){return o.axisLeft(t).ticks(n/c.default.DEFAULT_Y_AXIS_SPACING).tickValues(e).tickFormat(a)},I=e.prepareY2Axis=function(t,e,n,a){return o.axisRight(t).ticks(n/c.default.DEFAULT_Y_AXIS_SPACING).tickValues(e).tickFormat(a)},P=function(t,e){var n,a=0;return t.forEach((function(t){if(0!==t){var e;e=Math.abs(t);var n=-Math.floor(Math.log10(e));n>a&&(a=n)}})),a>0&&a<6&&(n=e.suppressTrailingZeros?".".concat(a%10,"~f"):".".concat(a%10,"f")),n},k=e.generateYAxesTickValues=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:c.default.DEFAULT_TICKSCOUNT;n=Math.abs(n);var a=[];a.push(t),a.push(e),t<0&&a.push(0);for(var i=(e-t)/(n+1),r=1;r<=n;r+=1)a.push(t+i*r);return a.sort((function(t,e){return t-e})),a},L=e.getTicksCountFromRange=function(t){var e;switch(!0){case t<=c.default.AXISRANGE_ONE:e=c.default.DEFAULT_TICKSCOUNT-4;break;case t<=c.default.AXISRANGE_TWO:e=c.default.DEFAULT_TICKSCOUNT-3;break;case t<=c.default.AXISRANGE_THREE:e=c.default.DEFAULT_TICKSCOUNT-2;break;case t<=c.default.AXISRANGE_FOUR:e=c.default.DEFAULT_TICKSCOUNT-1;break;default:e=c.default.DEFAULT_TICKSCOUNT}return e},M=e.getAverageTicksCount=function(t,e){var n=L(t),a=L(e);return Math.round((n+a)/2)},R=e.getAxesScale=function(t,e,n){var a,i;if(n.axis.x.suppressTrailingZeros&&n.axis.x.type===c.AXIS_TYPE.DEFAULT&&f.default.isUndefined(n.axis.x.ticks.format)&&(t.x=b(n.axis.x.orientation)?o.axisTop(e.x):o.axisBottom(e.x),a=E(t.x)),t.x=S(e.x,n.axis.x.ticks.values,O(n),D(n.d3Locale,f.default.isDefined(n.axis.x.ticks.format)?n.axis.x.ticks.format:a,n.axis.x.type),n.axis.x.orientation,n.axis.x.domain.lowerLimit,n.axis.x.domain.upperLimit),a=null,t.axisInfoRow.x=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.AXES_ORIENTATION.X.BOTTOM,n=o.axisBottom(t);return b(e)&&(n=o.axisTop(t)),n.tickValues([]),n}(e.x,(i=n.axis.x.orientation,b(i)?c.AXES_ORIENTATION.X.BOTTOM:c.AXES_ORIENTATION.X.TOP)),T(n.axis)){if(f.default.isDefined(n.axis.y.ticks.values))return n.axis.y.suppressTrailingZeros&&f.default.isUndefined(n.axis.y.ticks.format)&&(t.y=o.axisLeft(e.y),a=E(t.y)),t.y=w(e.y,n.axis.y.ticks.values,n.height,D(n.locale,f.default.isDefined(n.axis.y.ticks.format)?n.axis.y.ticks.format:a)),a=null,n.axis.y2.suppressTrailingZeros&&f.default.isUndefined(n.axis.y2.ticks.format)&&(t.y2=o.axisRight(e.y2),a=E(t.y2)),t.y2=I(e.y2,n.axis.y2.ticks.values,n.height,D(n.locale,f.default.isDefined(n.axis.y2.ticks.format)?n.axis.y2.ticks.format:a)),t;var u,l,s=n.axis.y.domain.lowerLimit,d=n.axis.y.domain.upperLimit,h=n.axis.y2.domain.lowerLimit,p=n.axis.y2.domain.upperLimit;if(n.allowCalibration){var g=o.scaleLinear().domain([s,d]).nice().domain(),v=(0,r.default)(g,2);s=v[0],d=v[1];var y=o.scaleLinear().domain([h,p]).nice().domain(),_=(0,r.default)(y,2);h=_[0],p=_[1]}if(f.default.isDefined(n.ticksCount)&&n.ticksCount<=c.default.TICKSCOUNT_MAXLIMIT)u=k(s,d,n.ticksCount),l=k(h,p,n.ticksCount);else{var m,x=d-s,A=p-h,L=Math.max(x,A),R=Math.min(x,A),N=L/R;if(Number.isInteger(N)&&Number.isInteger(R/N)&&N>2)m=N;else for(var C=9;C>=3;C-=1)if(Number.isInteger(L/C)&&Number.isInteger(R/C)){m=C;break}f.default.isUndefined(m)&&(m=M(x,A)+1),u=k(s,d,m-1),l=k(h,p,m-1)}n.axis.y.suppressTrailingZeros&&f.default.isUndefined(n.axis.y.ticks.format)&&(t.y=o.axisLeft(e.y),a=E(t.y)),!n.axis.y.isConsumerProvidedFormat&&f.default.isUndefined(n.axis.y.ticks.values)&&(n.axis.y.ticks.format=P(u,n.axis.y)),t.y=w(e.y,u,n.height,D(n.locale,f.default.isDefined(n.axis.y.ticks.format)?n.axis.y.ticks.format:a)),a=null,n.axis.y2.suppressTrailingZeros&&f.default.isUndefined(n.axis.y2.ticks.format)&&(t.y2=o.axisRight(e.y2),a=E(t.y2)),!n.axis.y2.isConsumerProvidedFormat&&f.default.isUndefined(n.axis.y2.ticks.values)&&(n.axis.y2.ticks.format=P(l,n.axis.y2)),t.y2=I(e.y2,l,n.height,D(n.locale,f.default.isDefined(n.axis.y2.ticks.format)?n.axis.y2.ticks.format:a))}else{var H=n.axis.y.domain.lowerLimit,G=n.axis.y.domain.upperLimit;if(f.default.isDefined(n.axis.y.ticks.values))n.axis.y.suppressTrailingZeros&&f.default.isUndefined(n.axis.y.ticks.format)&&(t.y=o.axisLeft(e.y),a=E(t.y)),t.y=w(e.y,n.axis.y.ticks.values,n.height,D(n.locale,f.default.isDefined(n.axis.y.ticks.format)?n.axis.y.ticks.format:a));else if(f.default.isDefined(n.ticksCount)||n.ticksCount<=c.default.TICKSCOUNT_MAXLIMIT){var V=k(H,G,n.ticksCount);n.axis.y.suppressTrailingZeros&&f.default.isUndefined(n.axis.y.ticks.format)&&(t.y=o.axisLeft(e.y),a=E(t.y)),!n.axis.y.isConsumerProvidedFormat&&f.default.isUndefined(n.axis.y.ticks.values)&&(n.axis.y.ticks.format=P(V,n.axis.y)),t.y=w(e.y,V,n.height,D(n.locale,f.default.isDefined(n.axis.y.ticks.format)?n.axis.y.ticks.format:a))}else n.axis.y.suppressTrailingZeros&&f.default.isUndefined(n.axis.y.ticks.format)&&(t.y=o.axisLeft(e.y),a=E(t.y)),t.y=w(e.y,void 0,n.height,D(n.locale,f.default.isDefined(n.axis.y.ticks.format)?n.axis.y.ticks.format:a))}return t},N=e.prepareHorizontalAxis=function(t,e,n,a){return S(t.x,e,O(n),D(n.d3Locale,n.axis.x.ticks.format,n.axis.x.type),a)},C=e.getXAxisXPosition=function(t){return t.axisSizes.y+t.axisLabelWidths.y},H=e.calculateVerticalPadding=function(t){return b(t.axis.x.orientation)?t.axisLabelHeights.x?2*t.axisLabelHeights.x+t.padding.top:t.padding.top:t.padding.bottom},G=e.getYAxisHeight=function(t){return t.height},V=e.getXAxisYPosition=function(t){return b(t.axis.x.orientation)?H(t):G(t)+H(t)},F=e.resetD3FontSize=function(t){return t.attr("font-size",null).attr("font-family",null)},j=e.getYAxisXPosition=function(t){return C(t)},X=e.getYAxisYPosition=function(t){return H(t)},Y=e.getY2AxisXPosition=function(t){return j(t)+O(t)},U=e.getY2AxisYPosition=function(t){return H(t)},W=(e.createAxes=function(t,e,n,a){R(t,e,n),(0,h.prepareHAxis)(e,t,n,N),a.append("g").classed(s.default.axis,!0).classed(s.default.axisX,!0).attr("aria-hidden",!n.axis.x.show).attr("transform","translate(".concat(C(n),", ").concat(V(n),")")).call(t.x).call(F).attr("id","x").selectAll("text").style("text-anchor",(function(){if(!f.default.isDefined(n.axis.x.ticks.tickLabelsRotation))return n.axis.x.ticks.tickLabelsRotation=0,"middle";var t=n.axis.x.ticks.tickLabelsRotation;return 0===t?"middle":0!==t?"end":(f.default.validTickLabelRotations.has(t),"middle")})).attr("transform",(function(){return"rotate(".concat(n.axis.x.ticks.tickLabelsRotation,")")})),a.append("g").classed(s.default.axis,!0).classed(s.default.axisY,!0).attr("aria-hidden",!n.axis.y.show).attr("transform","translate(".concat(j(n),", ").concat(X(n),")")).call(t.y).call(F),T(n.axis)&&a.append("g").classed(s.default.axis,!0).classed(s.default.axisY2,!0).attr("transform","translate(".concat(Y(n),", ").concat(U(n),")")).call(t.y2).call(F)},e.getAxisInfoRowYPosition=function(t){return b(t.axis.x.orientation)?G(t)+H(t):H(t)}),B=(e.createXAxisInfoRow=function(t,e,n,a){R(t,e,n),a.append("g").classed(s.default.axis,!0).classed(s.default.axisInfoRow,!0).attr("aria-hidden",!0).attr("transform","translate(".concat(C(n),", ").concat(W(n),")")).call(t.axisInfoRow.x).call(F)},e.createAxisReferenceLine=function(t,e,n,a){var i="translate(".concat(j(n),", ").concat(X(n),")"),r=function(t,n){return t.classed(s.default.axisReferenceLine,!0).attr("aria-hidden",!_(e,n)).attr("transform",i).attr("d",x(e,n)(m(e)))};r(a.append("path"),c.default.Y_AXIS).classed(s.default.axis,!0).classed(s.default.axisY,!0),T(n.axis)&&r(a.append("path"),c.default.Y2_AXIS).classed(s.default.axis,!0).classed(s.default.axisY2,!0)},e.getRotationForAxis=function(t){switch(t){case c.default.Y_AXIS:return-90;case c.default.Y2_AXIS:return 90;default:return 0}}),z=(e.getXAxisLabelXPosition=function(t){return C(t)+O(t)/2},e.getXAxisLabelYPosition=function(t){return b(t.axis.x.orientation)?H(t)-2*t.axisLabelHeights.x:V(t)+2*t.axisLabelHeights.x+2*(t.padding.bottom-t.axisInfoRowLabelHeight)},e.getYAxisLabelXPosition=function(t){return T(t.axis)?t.padding.left-t.axisLabelWidths.y:t.padding.left}),K=e.getYAxisLabelYPosition=function(t){return X(t)+(G(t)-t.padding.left/2)/2},q=(e.getYAxisLabelShapeXPosition=function(t){return z(t)+c.default.BASE_LABEL_ICON_HEIGHT_PADDING},e.getYAxisLabelShapeYPosition=function(t,e){return K(t)+e*c.default.BASE_LABEL_ICON_HEIGHT_PADDING/1.5},e.getY2AxisLabelShapeYPosition=function(t,e){return K(t)-e*c.default.BASE_LABEL_ICON_HEIGHT_PADDING/1.5},e.getY2AxisLabelXPosition=function(t){return Y(t)+t.padding.right+t.axisLabelWidths.y2}),J=(e.getY2AxisLabelShapeXPosition=function(t){return q(t)-c.default.BASE_LABEL_ICON_HEIGHT_PADDING},e.getXAxisHeight=function(t){if(t.padding.hasCustomPadding)return t.padding.bottom;var e=(0,l.getScale)(t.axis.x.type).domain([t.axis.x.domain.lowerLimit,t.axis.x.domain.upperLimit]).range([0,t.canvasWidth]),n=o.axisBottom(e),a=o.select("body").append("div"),i=a.append("svg").append("g").call(n);if(t.axis.x.ticks&&0!==t.axis.x.ticks.tickLabelsRotation){i.selectAll(".tick text").attr("transform","rotate(".concat(t.axis.x.ticks.tickLabelsRotation,")"));var r=i.node().getBoundingClientRect().height;return a.remove(),r}var u=i.node().getBoundingClientRect().height;return a.remove(),u}),Q=(e.getXAxisRange=function(t){return[0,O(t)]},e.getYAxisRange=function(t){return[G(t),0]},e.formatLabel=function(t,e){return(0,p.shouldTruncateLabel)(t,Math.abs(e))?(0,p.truncateLabel)(t,Math.abs(e)):t}),Z=e.buildAxisLabel=function(t,e,n){return t.append("text").attr("text-anchor","middle").append("tspan").text(Q(e,n))},$=e.getAxisLabelWidth=function(t,e,n){var a,i=o.select("body").append("div"),r=i.append("svg").append("g").attr("transform","rotate(".concat(B(e),")"));return Z(r,t),a=f.default.isDefined(n)&&T(n.axis)&&0===t.trim().length?c.default.DEFAULT_CHARACTER_SVG_ELEMENT_WIDTH:r.node().getBoundingClientRect().width,i.remove(),a},tt=e.getAxisLabelHeight=function(t,e){var n=o.select("body").append("div"),a=n.append("svg").append("g");e&&a.attr("transform","rotate(".concat(e*c.default.DEFAULT_OVERLAPPING_PADDING,")")),Z(a,t);var i=a.node().getBoundingClientRect().height;return n.remove(),i},et=e.getYAxisWidth=function(t,e){if(e.padding.hasCustomPadding)return e.padding.left;var n=o.scaleLinear().domain([e.axis[t].domain.lowerLimit,e.axis[t].domain.upperLimit]).range([e.height,0]),a=o.axisLeft(n),i=o.select("body").append("div"),r=i.append("svg").append("g").call(a).node().getBoundingClientRect().width;return i.remove(),r},nt=(e.calculateAxesSize=function(t){t.axisSizes={},t.axisSizes.y=et(c.default.Y_AXIS,t)+t.padding.left,t.axisSizes.y2=function(t){return t.padding.hasCustomPadding?t.padding.right:T(t.axis)?et(c.default.Y2_AXIS,t):20}(t)+t.padding.right,t.axisSizes.x=J(t)},e.calculateAxesLabelSize=function(t){if(t.axisLabelHeights={},t.axisLabelWidths={},t.axisLabelHeights.x=0,t.axisLabelWidths.y=0,t.axisLabelWidths.y2=0,t.showLabel){if(t.axis.x.label){var e=t.axis.x.ticks&&t.axis.x.ticks.tickLabelsRotation;t.axisLabelHeights.x=tt(t.axis.x.label,e)}t.axis.y.label&&(t.axisLabelWidths.y=c.default.DEFAULT_CHARACTER_SVG_ELEMENT_WIDTH),T(t.axis)&&t.axis.y2.label&&(t.axisLabelWidths.y2=T(t.axis)?$(t.axis.y2.label,c.default.Y2_AXIS,t):0)}},function(t,e){var n=(t.axis[e].domain.upperLimit-t.axis[e].domain.lowerLimit)/2;return t.axis[e].domain.lowerLimit+n}),at=(e.setXAxisDomain=function(t){t.axis.x.domain=(0,l.getXAxisDomain)(t.axis.x.type,t.axis.x.lowerLimit,t.axis.x.upperLimit)},function(t,e){var n=t.axis[e].domain.upperLimit,a=t.axis[e].dataRange.max>n?t.axis[e].dataRange.max:n,i=nt(t,e),r=Math.abs((a-i)/(n-i));return r>1?r:1}),it=function(t,e){var n=t.axis[e].domain.lowerLimit,a=nt(t,e),i=t.axis[e].dataRange.min1?r:1};e.determineOutlierStretchFactorXAxis=function(t){var e={};return e.upperLimit=at(t,c.default.X_AXIS),e.lowerLimit=it(t,c.default.X_AXIS),e},e.determineOutlierStretchFactorYAxes=function(t){var e={};if(e.upperLimit=at(t,c.default.Y_AXIS),e.lowerLimit=it(t,c.default.Y_AXIS),T(t.axis)){var n=at(t,c.default.Y2_AXIS),a=it(t,c.default.Y2_AXIS);e.upperLimit=n>e.upperLimit?n:e.upperLimit,e.lowerLimit=a>e.lowerLimit?a:e.lowerLimit}return e},e.translateAxes=function(t,e,n,a){R(t,e,n),(0,h.prepareHAxis)(e,t,n,N),a.select(".".concat(s.default.axisX)).transition().call(c.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat(C(n),",").concat(V(n),")")).call(t.x).selectAll("text").style("text-anchor",(function(){if(!f.default.isDefined(n.axis.x.ticks.tickLabelsRotation))return n.axis.x.ticks.tickLabelsRotation=0,"middle";var t=n.axis.x.ticks.tickLabelsRotation;return 0===t?"middle":0!==t?"end":(f.default.validTickLabelRotations.has(t),"middle")})).attr("transform",(function(){return"rotate(".concat(n.axis.x.ticks.tickLabelsRotation,")")})),a.select(".".concat(s.default.axisY)).transition().call(c.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat(j(n),", ").concat(X(n),")")).call(t.y),T(n.axis)&&a.select(".".concat(s.default.axisY2)).transition().call(c.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat(Y(n),", ").concat(U(n),")")).call(t.y2),a.select(".".concat(s.default.axisInfoRow)).transition().call(c.default.d3Transition(n.settingsDictionary.transition)).attr("transform","translate(".concat(C(n),", ").concat(W(n),")")).call(t.axisInfoRow.x)},e.translateAxisReferenceLine=function(t,e,n,a){var i=function(t,a){return t.transition().call(c.default.d3Transition(n.settingsDictionary.transition)).attr("aria-hidden",!1).attr("d",x(e,a)(m(e)))};_(e,c.default.Y_AXIS)&&i(a.select("path.".concat(s.default.axis,".").concat(s.default.axisY,".").concat(s.default.axisReferenceLine)),c.default.Y_AXIS),T(n.axis)&&_(e,c.default.Y2_AXIS)&&i(a.select("path.".concat(s.default.axis,".").concat(s.default.axisY2,".").concat(s.default.axisReferenceLine)),c.default.Y2_AXIS)},e.getAxesDataRange=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:c.default.Y_AXIS,n=arguments.length>2?arguments[2]:void 0,a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[];if(f.default.isEmpty(n.axis.x.dataRange)&&(n.axis.x.dataRange={}),f.default.isEmpty(n.axis.y.dataRange)&&(n.axis.y.dataRange={}),T(n.axis)&&f.default.isEmpty(n.axis.y2.dataRange)&&(n.axis.y2.dataRange={}),!f.default.isEmpty(t)&&!f.default.isEmpty(t.valuesRange)){var i,r=function(t,e,n){if(t instanceof u.default){var a=0,i=0;return e.filter((function(e){return e instanceof u.default&&e.config.group===t.config.group})).forEach((function(t){i+=t.valuesRange[n].max,a+=t.valuesRange[n].min})),{min:a,max:i}}return{min:t.valuesRange[n].min,max:t.valuesRange[n].max}}(t,a,e),o=n.axis[e].dataRange.oldMin,l=n.axis[e].dataRange.oldMax;i=0===o||0===l?!(o<=r.min||l>=r.max):!(o&&l&&(o<=r.min||l>=r.max)),n.axis[e].dataRange.isRangeModified=i,i&&(n.axis[e].dataRange.oldMin=n.axis[e].dataRange.min,n.axis[e].dataRange.oldMax=n.axis[e].dataRange.max,n.axis[e].dataRange.min=r.min,n.axis[e].dataRange.max=r.max)}},e.isValidAxisType=function(t,e){return(f.default.isDate(t)||f.default.isDateInstance(t))&&(0,l.getType)(e)===c.AXIS_TYPE.TIME_SERIES||!f.default.isDate(t)&&!f.default.isDateInstance(t)&&(0,l.getType)(e)!==c.AXIS_TYPE.TIME_SERIES}},95511:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.getRect=e.getPercentageBar=e.getHashedBar=e.getChunk=e.getBarStyle=e.getBar=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=l(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(22639)),o=a(n(75090)),u=a(n(45839));function l(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(l=function(t){return t?n:e})(t)}e.getBarStyle=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=(arguments.length>1?arguments[1]:void 0).color||r.default.DEFAULT_BAR_COLOR,n="fill: ".concat(e,"; stroke: ").concat(e,";");return u.default.isEmpty(t)||(!0===t.isDotted&&(n="".concat(n,"; stroke-width: 1; stroke-dasharray: 2, 2;")),!0===t.isHollow&&(n="".concat(n," fill: ").concat(r.COLORS.WHITE,"; stroke-width: 1;")),!0===t.isHashed&&(n="".concat(n," stroke-width: 1;"))),n};var c=e.getRect=function(t,e,n,a,i){return t.append("rect").attr("x",e).attr("y",n).attr("width",a).attr("height",i)},s=e.getBar=function(t,e,n,a,i,r){return c(t,e,n,a,i).classed(o.default.taskBar,!0).attr("style",r),t};e.getChunk=function(t,e,n,a,i,o){return s(t,e,n,r.default.DEFAULT_GANTT_TASK_CHUNK_WIDTH,i,o),t},e.getPercentageBar=function(t,e,n,a,i,u,l){return c(t,e,n,a,i).classed(o.default.taskBar,!0).attr("style","fill: ".concat(r.COLORS.WHITE,"; stroke: ").concat(l,"; stroke-width: 1;")),c(t,e,n,u,i).classed(o.default.taskBarCompletion,!0).attr("style","fill: ".concat(l,";")),t},e.getHashedBar=function(t,e,n,a,i,l,s,f){var d="pattern-stripe";return(u.default.isEmpty(e)||e.empty())&&t.append("defs"),t.select("#".concat(d)).empty()&&e.append("pattern").attr("id",d).attr("patternUnits","userSpaceOnUse").attr("patternTransform","rotate(45)").attr("width",r.default.DEFAULT_GANTT_TASK_STRIPE_WIDTH).attr("height",s).attr("style","fill: ".concat(r.default.DEFAULT_BAR_STRIPE_COLOR,";")).append("rect").attr("width",r.default.DEFAULT_GANTT_TASK_STRIPE_DISTANCE).attr("height",s),c(n,a,i,l,s).classed(o.default.taskBar,!0).attr("style",f||"fill: ".concat(r.default.DEFAULT_TASK_BAR_HASH_COLOR,";")),c(n,a,i,l,s).classed(o.default.taskBar,!0).attr("style","fill: url(#".concat(d,");")),n}},22639:function(t,e,n){"use strict";var a=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.SHAPES_LIGHT=e.SHAPES=e.LINE_TYPE=e.COLORS=e.BUBBLE=e.AXIS_TYPE=e.AXES_ORIENTATION=void 0;var i=u(n(56194)),r=u(n(74191));function o(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(o=function(t){return t?n:e})(t)}function u(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=a(t)&&"function"!=typeof t)return{default:t};var n=o(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&{}.hasOwnProperty.call(t,u)){var l=r?Object.getOwnPropertyDescriptor(t,u):null;l&&(l.get||l.set)?Object.defineProperty(i,u,l):i[u]=t[u]}return i.default=t,n&&n.set(t,i),i}var l=e.COLORS={BLUE:"#176ba0",GREEN:"#076e00",ORANGE:"#b54900",PINK:"#ae0868",PURPLE:"#9c19a3",YELLOW:"#ffc20a",LIGHT_BLUE:"#008fe0",LIGHT_GREEN:"#4b9b1c",LIGHT_ORANGE:"#e46511",LIGHT_PINK:"#e16092",LIGHT_PURPLE:"#bc70c7",LIGHT_YELLOW:"#ffda6c",BLACK:"#1c1f21",GREY:"#a7aaab",LAVENDER:"#8374c2",WHITE:"#ffffff"},c=(e.BUBBLE={MAX_BUBBLES_SINGLE_DATASET:4,MAX_DATASETS_MULTIPLE_API:7,PALETTE:{BLUE:["#008fe0","#044e7b","#001624"],GREEN:["#4b9b1c","#2c5e12","#122702"],ORANGE:["#e46511","#883e10","#371a06"],PINK:["#ade868","#6d0a48","#32062a"],PURPLE:["#9c19a3","#5c1060","#240425"],GRAY:"#949494"}},e.SHAPES={CIRCLE:r.CIRCLE,CROSS:r.CROSS,DIAMOND:r.DIAMOND,RHOMBUS:r.RHOMBUS,SQUARE:r.SQUARE,TEAR_ALT:r.TEAR_ALT,TEAR_DROP:r.TEAR_DROP,TRIANGLE:r.TRIANGLE,TRIANGLE_DOWN:r.TRIANGLE_DOWN,VERTICAL_BAR:r.VERTICAL_BAR,X:r.X});e.SHAPES_LIGHT={CIRCLE:r.CIRCLE_LIGHT,CROSS:r.CROSS_LIGHT,DIAMOND:r.DIAMOND_LIGHT,RHOMBUS:r.RHOMBUS_LIGHT,SQUARE:r.SQUARE_LIGHT,TEAR_ALT:r.TEAR_ALT_LIGHT,TEAR_DROP:r.TEAR_DROP_LIGHT,TRIANGLE:r.TRIANGLE_LIGHT,TRIANGLE_DOWN:r.TRIANGLE_DOWN_LIGHT,VERTICAL_BAR:r.VERTICAL_BAR_LIGHT,X:r.X_LIGHT},e.AXIS_TYPE={DEFAULT:"default",TIME_SERIES:"timeseries"},e.LINE_TYPE={LINEAR:i.curveLinear,SPLINE:i.curveCardinal},e.AXES_ORIENTATION={X:{TOP:"top",BOTTOM:"bottom"},Y:{LEFT:"left",RIGHT:"right"}},e.default={PADDING:{top:10,bottom:10,left:30,right:50,trackLabel:100},LEGEND_PADDING:{top:4,bottom:4,left:8,right:8},PIE_LEGEND_PADDING:{top:8,bottom:8,left:8,right:8},PAIR_ITEM_TYPES:["high","mid","low"],ISO8601_DATE_TIME_MILLI:/(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2}(:\d{2}(\.\d+)*)*)Z/,RESIZE_THROTTLE:1e3/60,BASE_CANVAS_WIDTH_PADDING:10,BASE_LABEL_ICON_SPACING:20,BASE_LABEL_ICON_WIDTH_PADDING:5,BASE_LABEL_ICON_HEIGHT_PADDING:12,TEXT_LABEL_ICON_WIDTH_PADDING:8,TEXT_LABEL_ICON_HEIGHT_PADDING:5,TEXT_LABEL_VERTICAL_POSITION:{top:-10,bottom:20},DEFAULT_TICKSCOUNT:7,TICKSCOUNT_MAXLIMIT:19,AXISRANGE_ONE:20,AXISRANGE_TWO:50,AXISRANGE_THREE:100,AXISRANGE_FOUR:500,TIMELINE_HEIGHT:40,PIE_CHART_DEFAULT_HEIGHT:250,DEFAULT_HEIGHT:250,DEFAULT_PLOT_SCALE:.275,DEFAULT_PLOT_SELECTION_SCALE:{posX:1.95,posY:1.95,scale:2},DEFAULT_PLOT_SELECTION_SCALE_FOR_EVENTS:{posX:9,posY:7,scale:1.3},DEFAULT_TIMELINE_PLOT_SELECTION_SCALE:{posX:2,posY:2,scale:2.2},DEFAULT_TIMELINE_SCALE:{posX:1.15,posY:1.15,scale:1.25},DEFAULT_TIMELINE_TICK_LENGTH:12,DEFAULT_LABEL_CHARACTER_LIMIT:12,DEFAULT_GANTT_TRACK_HEIGHT:41,DEFAULT_GANTT_TRACK_SELECTION:{x:1,y:1,width:2,height:1.5},DEFAULT_GANTT_TASK_HEIGHT:23,DEFAULT_GANTT_TASK_PADDING:{top:9,bottom:9},DEFAULT_GANTT_TASK_CHUNK_WIDTH:5,DEFAULT_GANTT_ACTIVITY_CHUNK_WIDTH:5,DEFAULT_GANTT_TASK_SELECTION_PADDING:25,DEFAULT_GANTT_ACTIVITY_OPACITY:.5,DEFAULT_GANTT_ACTIVITY_HEIGHT:31,DEFAULT_GANTT_ACTIVITY_PADDING:{top:5,bottom:5},DEFAULT_BAR_GRAPH_PADDING_ATTRIBUTES:{WIDTH_RATIO:.66,LEFT_SHIFT_OFFSET_RATIO:.5,LEFT_SHIFT_OFFSET_PADDING_RATIO:.16,OUTER_PADDING_RATIO:2.5,REGION_LEFT_SHIFT_OFFSET_PADDING_RATIO:.08,REGION_WIDTH_RATIO:.83},DEFAULT_BAR_HASH_COLOR:"#d3d4d5",DEFAULT_BAR_COLOR:l.BLUE,DEFAULT_BAR_REGION_COLOR:"#bcbfc0",DEFAULT_GOAL_LINE_STROKE_WIDTH:5,DEFAULT_REGION_LINE_STROKE_WIDTH:5,DEFAULT_BAR_SELECTION_PADDING:5,DEFAULT_ACTIVITY_BAR_HASH_COLOR:"#d3d4d5",DEFAULT_TASK_BAR_HASH_COLOR:l.BLUE,DEFAULT_BAR_STRIPE_COLOR:"#fff",DEFAULT_GANTT_TASK_STRIPE_WIDTH:4,DEFAULT_GANTT_TASK_STRIPE_DISTANCE:2,DEFAULT_GANTT_ACTIVITY_STRIPE_WIDTH:7,DEFAULT_GANTT_ACTIVITY_STRIPE_DISTANCE:2,DEFAULT_CHARACTER_SVG_ELEMENT_WIDTH:16.5,DEFAULT_Y_AXIS_SPACING:30,HOVER_EVENT:{MOUSE_ENTER:"enter",MOUSE_EXIT:"exit"},VIEW_BOX_SIZE:"0 0 48 48",DEFAULT_COLOR:l.BLACK,DEFAULT_PIE_COLOR:l.BLUE,DEFAULT_PIE_LEGEND_SHAPE:c.SQUARE,DEFAULT_PIE_INNER_RADIUS:1,DEFAULT_PIE_PAD_ANGLE:.01,X_AXIS:"x",Y_AXIS:"y",Y2_AXIS:"y2",MIN_TICKS:3,MAX_TICK_VARIANCE:140,DEFAULT_INTERPOLATION:i.curveLinear,SELECTION_INDICATOR_X_POSITION:10,SELECTION_INDICATOR_Y_POSITION:12.5,D3_TRANSITION_PROPERTIES_ENABLED:{duration:250,ease:i.easeLinear},D3_TRANSITION_PROPERTIES_DISABLED:{duration:0,ease:i.easeLinear},d3Transition:function(t){return function(e){return e.duration(t.duration).ease(t.ease)}},TICK_ORIENTATION:{TOP:-1,BOTTOM:1},NO_DATA_VIEW_PROPORTION:3,NO_DATA_LABEL_PADDING:15,DEFAULT_BUBBLE_RADIUS_MIN:3,DEFAULT_BUBBLE_RADIUS_MAX:30,DEFAULT_BUBBLE_SELECTOR_RADIUS:4,DEFAULT_BUBBLE_OPACITY:"0.4",DEFAULT_BUBBLE_BLUR_OPACITY:"0.1",DEFAULT_BUBBLE_STROKE_OPACITY:"1",DEFAULT_BUBBLE_BLUR_STROKE_OPACITY:"0.3",DEFAULT_LEGEND_LINE_WIDTH:28,DEFAULT_LEGEND_LINE_WIDTH_WITH_SYMBOL:18,LEGEND_LINE_POSITION:1.5,DEFAULT_OVERLAPPING_PADDING:.55}},22974:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.validatePairedResultData=e.validateData=e.contentHandler=void 0;var i=a(n(45839)),r=a(n(74467)),o=n(96419);e.contentHandler=function(t,e){i.default.isArray(t)?t.forEach((function(t){return e(t)})):e(t)},e.validateData=function(t){t.map((function(t){if(i.default.isEmpty(t.y))throw new Error(r.default.THROW_MSG_INVALID_DATA)}))},e.validatePairedResultData=function(t){t.map((function(t){(0,o.iterateOnPairType)((function(e){if(i.default.isDefined((0,o.getValue)(t,e))&&i.default.isEmpty(t[e].y))throw new Error(r.default.THROW_MSG_INVALID_DATA)}))}))}},56690:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.validateDateline=e.translateDateline=e.redrawDatelineContent=e.getDatelineIndicatorHeight=e.createDateline=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=a(n(45839)),u=a(n(74467)),l=a(n(75090)),c=n(72372),s=n(34004),f=n(34675),d=n(15861),h=a(n(22639)),p=n(77317);function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}var v=e.translateDateline=function(t,e,n,a){if(!o.default.isEmpty(e.dateline)){var i=n.selectAll(".".concat(l.default.datelineGroup)).transition().call(h.default.d3Transition(e.settingsDictionary.transition)).attr("transform","translate(".concat((0,p.getXAxisXPosition)(e),",").concat(a(e),")"));i.selectAll(".".concat(l.default.datelinePoint)).select("g").attr("transform",(function(e){return"translate(".concat(t.x(o.default.parseDateTime(e.value)),", 0) scale(").concat((0,d.getTransformScale)(this),")")})),i.selectAll(".".concat(l.default.dateline)).attr("x1",(function(e){return t.x(o.default.parseDateTime(e.value))})).attr("y1",0).attr("x2",(function(e){return t.x(o.default.parseDateTime(e.value))})).attr("y2",(0,p.getYAxisHeight)(e))}},y=function(t,e){o.default.isEmpty(t.onClick)||function(t){var e=r.select(t.parentNode);return e.attr("aria-selected",!("true"===e.attr("aria-selected"))),e}(e).call((function(n){return t.onClick((function(){n.attr("aria-selected",!1)}),t,r.select(e))}))},_=e.getDatelineIndicatorHeight=function(){var t=[];return r.selectAll(".".concat(l.default.datelinePoint)).each((function(){var e=this.getBBox().height;t.push(e)})),Math.max.apply(Math,t)},m=e.createDateline=function(t,e,n){var a;if(a=e.settingsDictionary.shouldCreateDatelineDefs?n.append("g").classed(l.default.datelineContent,!0).attr("clip-path","url(#".concat(e.datelineClipPathId,")")):n.append("g").classed(l.default.datelineContent,!0),e.dateline.forEach((function(t){var n=a.append("g").classed(l.default.datelineGroup,!0).datum(t).attr("style",(function(t){return"fill: ".concat(t.color,"; stroke: ").concat(t.color,";")})).attr("aria-selected",!1),i=!!o.default.isDefined(e.clickPassThrough)&&e.clickPassThrough.datelines;n.append("line").classed(l.default.dateline,!0).attr("style",(function(t){return"fill: ".concat(t.color,"; stroke: ").concat(t.color)})).attr("pointer-events",i?"none":"auto"),n.append((function(e){return new c.Shape((0,f.getShapeForTarget)(e)).getShapeElement((0,s.getDefaultSVGProps)({svgClassNames:l.default.datelinePoint,svgStyles:"fill: ".concat(e.color,"; stroke: ").concat(e.color),transformFn:function(t){return"scale(".concat(t,")")},onClickFn:function(){y(e,this)},a11yAttributes:{"aria-hidden":!t.showDatelineIndicator,"aria-disabled":!o.default.isFunction(t.onClick)}}))}))})),v(t,e,n,p.getYAxisYPosition),e.settingsDictionary.shouldCreateDatelineDefs&&e.dateline.length>0){var i=Math.floor(_()/2);n.select("clipPath#".concat(e.datelineClipPathId)).selectAll("rect").attr("height",(0,p.getYAxisHeight)(e)+i).attr(h.default.Y_AXIS,(0,p.getYAxisYPosition)(e)-i)}};e.redrawDatelineContent=function(t,e,n){n.select(".".concat(l.default.datelineContent)).empty()||(n.select(".".concat(l.default.datelineContent)).remove(),m(t,e,n))},e.validateDateline=function(t){if(o.default.isEmpty(t))throw new Error(u.default.THROW_MSG_DATELINE_OBJECT_NOT_PROVIDED);if(o.default.isEmpty(t.value))throw new Error(u.default.THROW_MSG_DATELINE_NOT_PROVIDED);if(!o.default.isDate(t.value))throw new Error(u.default.THROW_MSG_DATELINE_TYPE_NOT_VALID);if(o.default.isEmpty(t.color))throw new Error(u.default.THROW_MSG_DATELINE_COLOR_NOT_PROVIDED);if(t.showDatelineIndicator&&o.default.isEmpty(t.shape))throw new Error(u.default.THROW_MSG_DATELINE_SHAPE_NOT_PROVIDED)}},9070:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.translateVGrid=e.prepareHAxis=e.createVGrid=void 0;var i=a(n(75090)),r=a(n(45839)),o="lowerStepTickValues",u="midpointTickValues",l="upperStepTickValues",c=function(t,e,n,a){return{axis:{x:{ticks:{values:t},orientation:"".concat(n)}},height:"".concat(e),settingsDictionary:{transition:a}}},s=function(t){switch(t){case o:return i.default.gridLowerStep;case u:return i.default.gridMidpoint;case l:return i.default.gridUpperStep;default:return""}},f=function(t,e,n,a,i,r,o,u){var l=c(n,i,a,r);u(t,e,s(o),l)},d=function(t,e,n,a,i,r,o,u){var l=c(n,i,a,r);u(t,e,s(o),l)},h=function(t){return!r.default.isEmpty(t)&&(r.default.notEmpty(t.midpointTickValues)||r.default.notEmpty(t.upperStepTickValues)||r.default.notEmpty(t.lowerStepTickValues))};e.createVGrid=function(t,e,n,a){h(n.axis.x.ticks)?function(t,e,n,a){r.default.notEmpty(n.axis.x.ticks.values)&&r.default.isEmpty(n.axis.x.ticks.lowerStepTickValues)?f(t,e,n.axis.x.ticks.values,n.axis.x.orientation,n.height,n.settingsDictionary.transition,o,a):r.default.notEmpty(n.axis.x.ticks.lowerStepTickValues)&&f(t,e,n.axis.x.ticks.lowerStepTickValues,n.axis.x.orientation,n.height,n.settingsDictionary.transition,o,a),r.default.notEmpty(n.axis.x.ticks.midpointTickValues)&&f(t,e,n.axis.x.ticks.midpointTickValues,n.axis.x.orientation,n.height,n.settingsDictionary.transition,u,a),r.default.notEmpty(n.axis.x.ticks.upperStepTickValues)&&f(t,e,n.axis.x.ticks.upperStepTickValues,n.axis.x.orientation,n.height,n.settingsDictionary.transition,l,a)}(t,e,n,a):a(t,e,i.default.gridV,n)},e.prepareHAxis=function(t,e,n,a){var i,o,u=arguments.length>4&&void 0!==arguments[4]?arguments[4]:n.axis.x.orientation;if(h(n.axis.x.ticks)){var l={values:n.axis.x.ticks.lowerStepTickValues?n.axis.x.ticks.lowerStepTickValues:n.axis.x.ticks.values,upperStepTickValues:n.axis.x.ticks.upperStepTickValues};e.x=a(t,(i=l,o=[],r.default.notEmpty(i.values)&&(o=o.concat(i.values)),r.default.notEmpty(i.upperStepTickValues)&&(o=o.concat(i.upperStepTickValues)),o),n,u)}},e.translateVGrid=function(t,e,n,a){h(n.axis.x.ticks)?function(t,e,n,a){r.default.notEmpty(n.axis.x.ticks.values)&&r.default.isEmpty(n.axis.x.ticks.lowerStepTickValues)?d(t,e,n.axis.x.ticks.values,n.axis.x.orientation,n.height,n.settingsDictionary.transition,o,a):r.default.notEmpty(n.axis.x.ticks.lowerStepTickValues)&&d(t,e,n.axis.x.ticks.lowerStepTickValues,n.axis.x.orientation,n.height,n.settingsDictionary.transition,o,a),r.default.notEmpty(n.axis.x.ticks.midpointTickValues)&&d(t,e,n.axis.x.ticks.midpointTickValues,n.axis.x.orientation,n.height,n.settingsDictionary.transition,u,a),r.default.notEmpty(n.axis.x.ticks.upperStepTickValues)&&d(t,e,n.axis.x.ticks.upperStepTickValues,n.axis.x.orientation,n.height,n.settingsDictionary.transition,l,a)}(t,e,n,a):a(t,e,i.default.gridV,n)}},74467:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={THROW_MSG_CONSTRUCT_GENERATE_NOT_IMPLEMENTED:"Generate function not implemented from Construct.",THROW_MSG_CONSTRUCT_LOAD_NOT_IMPLEMENTED:"LoadContent function not implemented from Construct.",THROW_MSG_CONSTRUCT_UNLOAD_NOT_IMPLEMENTED:"UnloadContent function not implemented from Construct.",THROW_MSG_CONSTRUCT_RESIZE_NOT_IMPLEMENTED:"Resize function not implemented from Construct.",THROW_MSG_CONSTRUCT_DESTROY_NOT_IMPLEMENTED:"Destroy function not implemented from Construct.",THROW_MSG_SHAPE_PATH_EMPTY:"Shape Path property cannot be empty.",THROW_MSG_SHAPE_OPTIONS_EMPTY:"Shape Options property cannot be empty.",THROW_MSG_SHAPE_OPTIONS_PROPERTY_INVALID:"Invalid Shape Options property attributes (x, y, scale).",THROW_MSG_INVALID_INPUT:"Invalid input provided.",THROW_MSG_NO_BIND:"Invalid input format, graph DOM id must be provided.",THROW_MSG_NO_AXES_DATA_LOADED:"Graph axes data needs to be loaded.",THROW_MSG_NO_DATA_LOADED:"Graph data needs to be loaded.",THROW_MSG_INVALID_CALLBACK_FUNCTION:"Argument needs to be a function.",THROW_MSG_NO_DATA_POINTS:"Invalid input format, data points must be provided.",THROW_MSG_INVALID_DATA_PROPERTY:"Invalid input format, all data object properties must be provided.",THROW_MSG_NON_UNIQUE_PROPERTY:"Invalid input format, label and key must be unique.",THROW_MSG_UNIQUE_KEY_NOT_PROVIDED:"Invalid input format, unique key must be provided.",THROW_MSG_UNIQUE_LABEL_NOT_PROVIDED:"Invalid input format, unique label must be provided.",THROW_MSG_NO_CONTENT_DATA_LOADED:"Content data needs to be loaded.",THROW_MSG_NO_AXIS_INFO:"Invalid input format, axis must be provided.",THROW_MSG_NO_AXIS_LIMIT_INFO:"Invalid input format, axis limits must be provided.",THROW_MSG_NO_AXIS_LABEL_INFO:"Invalid input format, axis labels for all axes must be provided.",THROW_MSG_INVALID_TYPE:"Invalid input format, type must be valid.",THROW_MSG_INVALID_AXIS_TYPE_VALUES:"Axis type invalid, bounds need to be in ISO8601 datetime format.",THROW_MSG_INVALID_FORMAT_TYPE:"Type cannot be default, if data-points are in date time format.",THROW_MSG_INVALID_OBJECT_PROVIDED:"Invalid object provided as argument.",THROW_MSG_CONTENT_LOAD_NOT_IMPLEMENTED:"Load function has not been implemented for this graph type.",THROW_MSG_CONTENT_UNLOAD_NOT_IMPLEMENTED:"Unload function has not been implemented for this graph type.",THROW_MSG_CONTENT_RESIZE_NOT_IMPLEMENTED:"Resize function has not been implemented for this graph type.",THROW_MSG_CONTENT_REDRAW_NOT_IMPLEMENTED:"Redraw function has not been implemented for this graph type.",THROW_MSG_CONFIG_GET_CONFIG_NOT_IMPLEMENTED:"GetInput not been implemented for BaseConfig.",THROW_MSG_CONFIG_SET_INPUT_NOT_IMPLEMENTED:"SetInput not been implemented for BaseConfig.",THROW_MSG_CONFIG_VALIDATE_INPUT_NOT_IMPLEMENTED:"Input validation has not been implemented.",THROW_MSG_CONFIG_CLONE_INPUT_NOT_IMPLEMENTED:"Clone input function has not been implemented.",THROW_MSG_INVALID_LOAD_CONTENT_AT_INDEX:"Invalid input provided. Content cannot be loaded at index less than zero.",THROW_MSG_INVALID_DATA:"Invalid data provided, data cannot consists of values like null/undefined",THROW_MSG_REGION_EMPTY:"Region in data object cannot be empty.",THROW_MSG_REGION_INVALID_AXIS_PROVIDED:"Region axis provided is invalid.",THROW_MSG_REGION_INVALID_VALUE_TYPE_PROVIDED:"Region 'start' and 'end' value has invalid type.",THROW_MSG_REGION_START_END_MISSING:"Region cannot have both 'start' and 'end' empty.",THROW_MSG_REGION_START_MORE_END:"Region 'start' cannot be larger than 'end'.",THROW_MSG_TASKS_NOT_PROVIDED:"Invalid input format, task(s) must be provided for a track.",THROW_MSG_TASKS_UNIQUE_KEY_NOT_PROVIDED:"Invalid input format; unique key must be provided for each task.",THROW_MSG_TASKS_START_AND_END_NOT_PROVIDED:"Invalid input format; both start date and end date cannot be empty.",THROW_MSG_TASKS_DURATION_NOT_PROVIDED:"Invalid input format; start date or end date cannot be empty for a task. No duration function provided.",THROW_MSG_TASKS_START_AND_END_TYPE_NOT_VALID:"Input type invalid, start date and end date needs to be in ISO8601 datetime format.",THROW_MSG_TASKS_START_MORE_END:"Input input format; start date cannot be larger than end date.",THROW_MSG_TASKS_DURATION_NOT_FUNCTION:"Invalid property: duration; Duration needs to be a function.",THROW_MSG_TASKS_DURATION_NOT_VALID:"Invalid property: duration; Duration needs to return a number.",THROW_MSG_ACTIVITIES_NOT_PROVIDED:"Invalid input format, task(s) must be provided for a track.",THROW_MSG_ACTIVITIES_UNIQUE_KEY_NOT_PROVIDED:"Invalid input format; unique key must be provided for each task.",THROW_MSG_ACTIVITIES_START_AND_END_NOT_PROVIDED:"Invalid input format; both start date and end date cannot be empty.",THROW_MSG_ACTIVITIES_DURATION_NOT_PROVIDED:"Invalid input format; start date or end date cannot be empty for a task. No duration function provided.",THROW_MSG_ACTIVITIES_START_AND_END_TYPE_NOT_VALID:"Input type invalid, start date and end date needs to be in ISO8601 datetime format.",THROW_MSG_ACTIVITIES_START_MORE_END:"Input input format; start date cannot be larger than end date.",THROW_MSG_ACTIVITIES_DURATION_NOT_FUNCTION:"Invalid property: duration; Duration needs to be a function.",THROW_MSG_ACTIVITIES_DURATION_NOT_VALID:"Invalid property: duration; Duration needs to return a number.",THROW_MSG_UNIQUE_ACTION_KEY_NOT_PROVIDED:"Invalid property, a valid unique action key must be provided matching the legend key.",THROW_MSG_DATELINE_OBJECT_NOT_PROVIDED:"Invalid property, a valid dateline object must be provided.",THROW_MSG_DATELINE_NOT_PROVIDED:"Invalid property, a valid dateline value must be provided.",THROW_MSG_DATELINE_TYPE_NOT_VALID:"Invalid property, dateline value type must be in ISO8601 datetime format.",THROW_MSG_DATELINE_COLOR_NOT_PROVIDED:"Invalid property, a valid dateline color value must be provided.",THROW_MSG_DATELINE_SHAPE_NOT_PROVIDED:"Invalid property, a valid dateline shape value must be provided.",THROW_MSG_EVENTLINE_OBJECT_NOT_PROVIDED:"Invalid property, a valid eventline object must be provided.",THROW_MSG_EVENTLINE_NOT_PROVIDED:"Invalid property, a valid eventline value must be provided.",THROW_MSG_EVENTLINE_TYPE_NOT_VALID:"Invalid property, eventline value type must be in ISO8601 datetime format.",THROW_MSG_EVENTLINE_COLOR_NOT_PROVIDED:"Invalid property, a valid eventline color value must be provided.",THROW_MSG_INVALID_X_AXIS_TICK_VALUES:"Invalid X Axis, tick values are required for Bar graph content.",THROW_MSG_EMPTY_X_AXIS_TICK_VALUES:"Invalid X Axis, tick values cannot be empty.",THROW_MSG_BAR_REGION_EMPTY_X_VALUE:"Region for Bar graph content cannot have 'x' value empty.",THROW_MSG_INVALID_REGION_X_AXIS_TICK:"Invalid X Axis, tick values are required for Bar region.",THROW_MSG_REGION_INVALID_FORMAT:"Region x type for bar graph cannot be default, if data-points are in date time format.",THROW_MSG_AXIS_INFO_ROW_EMPTY_TICK_VALUES:"Invalid X Axis Info Row, tick info values are required.",THROW_MSG_AXIS_INFO_ROW_INVALID_TICK_VALUES:"Invalid X Axis Info Row, tick info values should match with X Axis tick values.",THROW_MSG_AXIS_INFO_ROW_VALUE_NOT_PROVIDED:"Invalid X Axis Info Row input format, value property must be provided.",THROW_MSG_AXIS_INFO_ROW_LABEL_DISPLAY_NOT_PROVIDED:"Invalid X Axis Info Row input format, display must be provided for label property.",THROW_MSG_LEGEND_LABEL_NOT_PROVIDED:"Invalid property, a valid label object with a valid string must be provided.",THROW_MSG_LEGEND_LABEL_FORMAT_NOT_PROVIDED:"Invalid property, a valid label.format callback function property must be provided."}},89644:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.validateEventline=e.translateEventline=e.redrawEventlineContent=e.createEventline=void 0;var i=a(n(45839)),r=a(n(74467)),o=a(n(75090)),u=n(15861),l=a(n(22639)),c=n(77317),s=e.translateEventline=function(t,e,n,a){if(!i.default.isEmpty(e.eventline)){var r=n.selectAll(".".concat(o.default.eventlineGroup)).transition().call(l.default.d3Transition(e.settingsDictionary.transition)).attr("transform","translate(".concat((0,c.getXAxisXPosition)(e),",").concat(a(e),")"));r.selectAll(".".concat(o.default.eventlinePoint)).select("g").attr("transform",(function(e){return"translate(".concat(t.x(i.default.parseDateTime(e.value)),", 0) scale(").concat((0,u.getTransformScale)(this),")")})),r.selectAll(".".concat(o.default.eventline)).attr("x1",(function(e){return t.x(i.default.parseDateTime(e.value))})).attr("y1",0).attr("x2",(function(e){return t.x(i.default.parseDateTime(e.value))})).attr("y2",(0,c.getYAxisHeight)(e))}},f=e.createEventline=function(t,e,n){var a=n.append("g").classed(o.default.eventlineContent,!0).attr("clip-path","url(#".concat(e.clipPathId,")"));e.eventline.forEach((function(t){var n=a.append("g").classed(o.default.eventlineGroup,!0).datum(t).attr("style",(function(t){return"fill: ".concat(t.color,"; stroke: ").concat(t.color,";")})).attr("aria-selected",!1),r=!!i.default.isDefined(e.clickPassThrough)&&e.clickPassThrough.eventlines;n.append("line").classed(o.default.eventline,!0).attr("style",(function(t){return"fill: ".concat(t.color,"; stroke: ").concat(t.color,"; stroke-dasharray: ").concat(void 0!==t.style&&void 0!==t.style.strokeDashArray?t.style.strokeDashArray:"2,2")})).attr("pointer-events",r?"none":"auto").attr("aria-hidden",!1)})),s(t,e,n,c.getYAxisYPosition)};e.redrawEventlineContent=function(t,e,n){n.select(".".concat(o.default.eventlineContent)).empty()||(n.select(".".concat(o.default.eventlineContent)).remove(),f(t,e,n))},e.validateEventline=function(t){if(i.default.isEmpty(t))throw new Error(r.default.THROW_MSG_EVENTLINE_OBJECT_NOT_PROVIDED);if(i.default.isEmpty(t.value))throw new Error(r.default.THROW_MSG_EVENTLINE_NOT_PROVIDED);if(!i.default.isDate(t.value))throw new Error(r.default.THROW_MSG_EVENTLINE_TYPE_NOT_VALID);if(i.default.isEmpty(t.color))throw new Error(r.default.THROW_MSG_EVENTLINE_COLOR_NOT_PROVIDED)}},85356:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.updateShapesDuringReflow=e.truncateLabel=e.translateLabelShapeContainer=e.shouldTruncateLabel=e.removeLabelShapeItem=e.prepareLabelShapeItem=e.loadLabelPopup=e.destroyTooltipDiv=e.createTooltipDiv=e.buildYAxisLabelShapeContainer=e.buildY2AxisLabelShapeContainer=void 0;var r=g(n(56194)),o=n(34675),u=n(72372),l=n(34004),c=n(77317),s=g(n(22639)),f=a(n(75090)),d=a(n(45839)),h=n(74191);function p(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(p=function(t){return t?n:e})(t)}function g(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=p(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}e.shouldTruncateLabel=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.DEFAULT_LABEL_CHARACTER_LIMIT;return t.length>e},e.truncateLabel=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:s.default.DEFAULT_LABEL_CHARACTER_LIMIT;return t.substring(0,e).concat("...")},e.loadLabelPopup=function(t,e){r.select("#".concat(f.default.labelPopupOverlay)).remove(),r.select("#".concat(f.default.labelPopupTooltip)).attr("style","").selectAll("g").remove();var n=function(t){var e=document.querySelector("#".concat(f.default.labelPopupTooltip));return r.select("body").append("div","#".concat(f.default.labelPopupTooltip)).attr("id",f.default.labelPopupOverlay).classed(f.default.labelPopupOverlay,!0).on("click",(function t(){r.select(e).attr("style","display:none;").selectAll("g").remove(),r.select("#".concat(f.default.labelPopupOverlay)).remove(),e.removeEventListener("click",t),window.removeEventListener("resize",t)})),"y2"===t?r.select("#".concat(f.default.labelPopupTooltip)).style("left","".concat(r.event.pageX-250,"px")).style("top","".concat(r.event.pageY+5,"px")):r.select("#".concat(f.default.labelPopupTooltip)).style("left","".concat(r.event.pageX+5,"px")).style("top","".concat(r.event.pageY+5,"px"))}(e);return n.append("g").append("g").classed("popup-item",!0).append("g").classed("popup-text",!0).text(t)};var v=function(t){return t.selectAll("svg").size()},y=function(t,e){return e.transition().call(s.default.d3Transition(t.settingsDictionary.transition)).attr("transform","translate(".concat((0,c.getYAxisLabelShapeXPosition)(t),", ").concat((0,c.getYAxisLabelShapeYPosition)(t,v(e)),") rotate(").concat((0,c.getRotationForAxis)(s.default.Y_AXIS),")"))},_=function(t,e){return e.transition().call(s.default.d3Transition(t.settingsDictionary.transition)).attr("transform","translate(".concat((0,c.getY2AxisLabelShapeXPosition)(t),", ").concat((0,c.getY2AxisLabelShapeYPosition)(t,v(e)),") rotate(").concat((0,c.getRotationForAxis)(s.default.Y2_AXIS),")"))},m=(e.buildYAxisLabelShapeContainer=function(t,e){var n=e.append("g").classed(f.default.axisLabelYShapeContainer,!0);return n.attr("transform","translate(".concat((0,c.getYAxisLabelShapeXPosition)(t),", ").concat((0,c.getYAxisLabelShapeYPosition)(t,v(n)),")")),y(t,n),n},e.buildY2AxisLabelShapeContainer=function(t,e){var n=e.append("g").classed(f.default.axisLabelY2ShapeContainer,!0);return n.attr("transform","translate(".concat((0,c.getY2AxisLabelShapeXPosition)(t),", ").concat((0,c.getY2AxisLabelShapeYPosition)(t,v(n)),")")),_(t,n),n},function(t,e){return t.selectAll("svg").transition().call(s.default.d3Transition(e.settingsDictionary.transition)).each((function(t,e){r.select(this).attr("x",(function(){return s.default.BASE_LABEL_ICON_SPACING*e}))}))}),x=e.prepareLabelShapeItem=function(t,e,n){e.label&&e.label.display&&n&&(!function(t,e){if(e.values.length>0)e.showShapes||void 0===e.showShapes?t.append((function(){return new u.Shape(e.shape||s.SHAPES.CIRCLE).getShapeElement((0,l.getDefaultSVGProps)({svgStyles:"fill: ".concat((0,o.getColorForTarget)(e),";"),transformFn:function(t){return"scale(".concat(t,")")},a11yAttributes:{"aria-describedby":e.key}}))})):t.append((function(){return new u.Shape("0"===e.style.strokeDashArray?h.LINE:h.LINE_DASHED).getShapeElement((0,l.getDefaultSVGProps)({svgStyles:"fill: ".concat((0,o.getColorForTarget)(e),'; stroke-dasharray: "').concat(e.style.strokeDashArray,'"'),transformFn:function(t){return"scale(".concat(t,")")},a11yAttributes:{"aria-describedby":e.key}}))}))}(n,e),m(n,t))},T=e.removeLabelShapeItem=function(t,e,n){d.default.notEmpty(t)&&((0,o.d3RemoveElement)(t,'svg[aria-describedby="'.concat(e.key,'"]')),m(t,n))};e.translateLabelShapeContainer=function(t,e){(0,c.hasY2Axis)(t.axis)&&d.default.notEmpty(e)&&(y(t,e[s.default.Y_AXIS]),_(t,e[s.default.Y2_AXIS]))},e.createTooltipDiv=function(){r.select("body").append("div").attr("id",f.default.labelPopupTooltip).style("display","none").classed(f.default.labelPopupTooltip,!0)},e.destroyTooltipDiv=function(){if(document.querySelector(".".concat(f.default.labelPopupTooltip))){var t=document.querySelector(".".concat(f.default.labelPopupTooltip));t.parentNode&&t.parentNode.removeChild(t)}},e.updateShapesDuringReflow=function(t,e,n){T(t.axesLabelShapeGroup[n.config.yAxis],n.dataTarget,t.config),d.default.isEmpty(e.values)||x(t.config,n.dataTarget,t.axesLabelShapeGroup[n.config.yAxis])}},18321:function(t,e,n){"use strict";var a=n(24994),i=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.removeLegendItem=e.reflowLegend=e.loadPieLegendItem=e.loadLegendItem=e.legendHoverHandler=e.legendClickHandler=e.isLegendSelected=e.getLegendPadding=e.getDefaultLegendOptions=e.createLegend=void 0;var r=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=g(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&{}.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(56194)),o=n(34675),u=n(72372),l=n(34004),c=a(n(22639)),s=a(n(74467)),f=a(n(75090)),d=a(n(45839)),h=n(10832),p=n(99462);function g(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(g=function(t){return t?n:e})(t)}var v=function(t){if(!t)throw new Error(s.default.THROW_MSG_LEGEND_LABEL_NOT_PROVIDED);if(d.default.isDefined(t.format)&&!d.default.isFunction(t.format))throw new Error(s.default.THROW_MSG_LEGEND_LABEL_FORMAT_NOT_PROVIDED)},y=function(t){return d.default.sanitize(t)},_=function(t){return t.legendOptions&&!1===t.legendOptions.showElement&&d.default.isEmptyArray(t.values)?"none":""},m=function(t,e){return t.append((function(){return new u.Shape((0,o.getShapeForTarget)(e)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:e.legendOptions&&e.legendOptions.showLine?f.default.legendItemIconWithLine:f.default.legendItemIcon,svgStyles:"fill: ".concat((0,o.getColorForTarget)(e),";")}),!0)}))},x=function(t,e){e.legendOptions?((e.showShapes||void 0===e.showShapes)&&e.legendOptions.showShape&&m(t,e),e.legendOptions.showLine&&function(t,e){var n=t.append("svg").classed(e.legendOptions.showShape?f.default.legendItemLineWithIcon:f.default.legendItemLine,!0);n.append("line").attr("x2",c.default.DEFAULT_LEGEND_LINE_WIDTH).classed(f.default.legendItemWhiteLine,!0),n.append("line").attr("x1",1).attr("x2",e.legendOptions.showShape?c.default.DEFAULT_LEGEND_LINE_WIDTH_WITH_SYMBOL-1:c.default.DEFAULT_LEGEND_LINE_WIDTH-1).attr("y1",c.default.LEGEND_LINE_POSITION).attr("y2",c.default.LEGEND_LINE_POSITION).attr("style","stroke: ".concat((0,o.getColorForTarget)(e),";\n stroke-dasharray: ").concat(e.legendOptions.style.strokeDashArray,";\n stroke-width: 1px;"))}(t,e)):m(t,e)},T=(e.loadLegendItem=function(t,e,n,a){if(!d.default.isFunction(a.clickHandler))throw new Error("Invalid Argument: eventHandlers needs a clickHandler callback function.");if(!d.default.isFunction(a.hoverHandler))throw new Error("Invalid Argument: eventHandlers needs a hoverHandler callback function.");v(e.label);var i=y(e.label.display),r=n.shownTargets.indexOf(e.key),o=!!e.label.isDisabled||d.default.isEmptyArray(e.values),u=t.append("li").classed(f.default.legendItem,!0).attr("aria-current",o||r>-1).attr("aria-disabled",o).style("display",_(e)).attr("role","listitem").attr("aria-labelledby",i).attr("aria-describedby",e.key).style("margin",n.legendPadding.hasCustomLegendPadding&&0).style("padding","".concat(n.legendPadding.top,"px ").concat(n.legendPadding.right,"px ").concat(n.legendPadding.bottom,"px ").concat(n.legendPadding.left,"px"));!o&&r>-1&&u.on("click",(function(){return a.clickHandler(this,e)})).on("mouseenter",(function(){return a.hoverHandler(e,c.default.HOVER_EVENT.MOUSE_ENTER)})).on("mouseleave",(function(){return a.hoverHandler(e,c.default.HOVER_EVENT.MOUSE_EXIT)}));var l=u.append("button").classed(f.default.legendItemBtn,!0).attr("title",i).attr("tabindex",o?-1:0).append("span").attr("class",f.default.legendItemSpan);return x(l,e),u.append("label").classed(f.default.legendItemText,!0).attr("tabindex",-1).text(i),t},e.removeLegendItem=function(t,e){return(0,o.d3RemoveElement)(t,'li[aria-describedby="'.concat(e.key,'"]'))},e.createLegend=function(t,e){return e.append("ul").classed(f.default.legend,!0).attr("role","list").style("flex-direction",t.bindLegendTo&&"column")},e.isLegendSelected=function(t){return"true"!==t.attr("aria-current")});e.legendClickHandler=function(t){var e=r.select(t);return e.attr("aria-current",T(e))},e.legendHoverHandler=function(t,e,n,a){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];t.filter((function(t){return t!==n})).forEach((function(r){e.selectAll('svg[aria-describedby="'.concat(r,'"]')).classed(f.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll('path[aria-describedby="'.concat(r,'"]')).classed(f.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll(".".concat(f.default.pairedLine)).classed(f.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll('rect[aria-describedby="'.concat(r,'"]')).classed(f.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll(".".concat(f.default.barGoalLine,'[aria-describedby="region_').concat(r,'"]')).attr("aria-hidden",a===c.default.HOVER_EVENT.MOUSE_ENTER),e.selectAll('[aria-describedby="text_label_'.concat(r,'"]')).classed(f.default.blur,a===c.default.HOVER_EVENT.MOUSE_ENTER),d.default.notEmpty(i)&&i.forEach((function(i){return i(t,e,n,a,r)}))}))},e.loadPieLegendItem=function(t,e,n,a){var i=n.hoverHandler;v(e.label);var r,s,d,h=(r=e.label.display,s=e.value,(d=e.label.format)?d(r,s):"".concat(y(r),": ").concat(s)),p=t.append("li").classed(f.default.pieLegendItem,!0).attr("role","listitem").attr("tabindex",0).attr("aria-labelledby",h).attr("aria-describedby",e.key).style("margin",a.legendPadding.hasCustomLegendPadding&&0).style("padding","".concat(a.legendPadding.top,"px ").concat(a.legendPadding.right,"px ").concat(a.legendPadding.bottom,"px ").concat(a.legendPadding.left,"px"));p.append((function(){return new u.Shape((0,o.getShapeForTarget)(e)).getShapeElement((0,l.getDefaultSVGProps)({svgClassNames:f.default.pieLegendItemIcon,svgStyles:"fill: ".concat((0,o.getColorForTarget)(e),";")}),!0)})),p.append("label").classed(f.default.legendItemText,!0).text(h),p.on("mouseenter",(function(){return i(e,c.default.HOVER_EVENT.MOUSE_ENTER)})).on("mouseleave",(function(){return i(e,c.default.HOVER_EVENT.MOUSE_EXIT)}))},e.getDefaultLegendOptions=function(t,e){var n=(0,h.getDefaultValue)(e.legendOptions,{showShape:!0,showLine:!1===e.showShapes,showElement:!0});return n.showShape=!1!==e.showShapes&&(0,h.getDefaultValue)(n.showShape,!0),n.showLine=(0,h.getDefaultValue)(n.showLine,!1),n.showElement=(0,h.getDefaultValue)(n.showElement,!0),n.style=(0,h.getDefaultValue)(n.style,{}),n.style.strokeDashArray?n.style={strokeDashArray:(0,p.getStrokeDashArray)(n.style)}:!1===e.showShapes?n.style.strokeDashArray=e.style.strokeDashArray:n.style={strokeDashArray:(0,p.getStrokeDashArray)(n.style)},n},e.getLegendPadding=function(t,e){return d.default.isDefined(t.legendPadding)?{top:(0,h.getDefaultValue)(e.top,c.default.LEGEND_PADDING.top),bottom:(0,h.getDefaultValue)(e.bottom,c.default.LEGEND_PADDING.bottom),right:(0,h.getDefaultValue)(e.right,c.default.LEGEND_PADDING.right),left:(0,h.getDefaultValue)(e.left,c.default.LEGEND_PADDING.left),hasCustomLegendPadding:!0}:{top:c.default.LEGEND_PADDING.top,bottom:c.default.LEGEND_PADDING.bottom,right:c.default.LEGEND_PADDING.right,left:c.default.LEGEND_PADDING.left,hasCustomLegendPadding:!1}},e.reflowLegend=function(t,e,n,a){var i=n.config.shownTargets.indexOf(e.key),r=!!e.label.isDisabled||d.default.isEmptyArray(e.values),o=t.select('li[aria-describedby="'.concat(e.key,'"]')).attr("aria-current",r||i>-1).attr("aria-disabled",r).style("display",_(e));return r?o.on("click",(function(){return null})).on("mouseenter",(function(){return null})).on("mouseleave",(function(){return null})):o.on("click",(function(){return a.clickHandler(this,e)})).on("mouseenter",(function(){return a.hoverHandler(e,c.default.HOVER_EVENT.MOUSE_ENTER)})).on("mouseleave",(function(){return a.hoverHandler(e,c.default.HOVER_EVENT.MOUSE_EXIT)})),t}},49009:function(t,e,n){"use strict";var a=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.getSwedishDateFormat=e.getGermanDateFormat=e.getFrenchDateFormat=e.getDefaultDateFormat=void 0;var i=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=a(t)&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&{}.hasOwnProperty.call(t,u)){var l=o?Object.getOwnPropertyDescriptor(t,u):null;l&&(l.get||l.set)?Object.defineProperty(i,u,l):i[u]=t[u]}return i.default=t,n&&n.set(t,i),i}(n(56194));function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}e.getDefaultDateFormat=function(t){return i.timeSecond(t)Number(t.end))throw new Error(c.default.THROW_MSG_REGION_START_MORE_END)},v=(e.removeRegion=function(t,e){return(0,o.d3RemoveElement)(t,'[aria-describedby="region_'.concat(e.key,'"]'),!0)},e.createRegionContainer=function(t,e){return e.append("g").classed(s.default.regionGroup,!0)},function(t){return t.axis||l.default.Y_AXIS}),y=function(t,e){return function(n){return n.end?(0,f.round2Decimals)(t[v(n)](n.end))+(0,u.calculateVerticalPadding)(e):(0,u.calculateVerticalPadding)(e)}},_=function(t,e,n,a){var i=a.height,r=d.default.getNumber(t.attr(l.default.Y_AXIS));return(e.start?(0,f.round2Decimals)(n[v(e)](e.start))+(0,u.calculateVerticalPadding)(a):i+(0,u.calculateVerticalPadding)(a))-r||l.default.DEFAULT_REGION_LINE_STROKE_WIDTH},m=(e.createRegion=function(t,e,n,a,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:l.default.Y_AXIS;a.forEach((function(a){g(a,o),n.append("rect").datum(a).classed(s.default.region,!0).attr("aria-hidden",!1).attr("aria-describedby",i).attr("style",a.color?"fill: ".concat(a.color,";"):"").attr(l.default.X_AXIS,(0,u.getXAxisXPosition)(e)).attr(l.default.Y_AXIS,y(t,e)(a)).attr("width",(0,u.getXAxisWidth)(e)).attr("height",(function(){return _(r.select(this),a,t,e)}))}))},function(t,e,n){return r.area().curve(n).x((function(e){return t.x(e.x)})).y0((function(n){return t[e](n.start)})).y1((function(n){return t[e](n.end)}))}),x=(e.createValueRegion=function(t,e,n,a,i){var r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:l.default.Y_AXIS,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:l.LINE_TYPE.LINEAR;return a.forEach((function(a){return n.append("g").attr("transform","translate(".concat((0,u.getXAxisXPosition)(e),",").concat((0,u.calculateVerticalPadding)(e),")")).append("path").attr("aria-describedby",i).attr("aria-hidden",!1).classed(s.default.region,!0).classed(s.default.valueRegion,1===a.values.length).datum(a.values).attr("style","fill: ".concat(a.color,"; \n stroke: ").concat(a.color,";")).attr("d",m(t,r,o))}))},e.translateRegion=function(t,e,n){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l.default.Y_AXIS,i=arguments.length>4?arguments[4]:void 0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:l.LINE_TYPE.LINEAR;return i?n.selectAll(".".concat(s.default.region)).transition().call(l.default.d3Transition(e.settingsDictionary.transition)).attr("d",m(t,a,o)):n.selectAll(".".concat(s.default.region)).attr(l.default.X_AXIS,(0,u.getXAxisXPosition)(e)).attr(l.default.Y_AXIS,y(t,e)).transition().call(l.default.d3Transition(e.settingsDictionary.transition)).attr("width",(0,u.getXAxisWidth)(e)).attr("height",(function(n){return _(r.select(this),n,t,e)}))},e.areRegionsIdentical=function(t){var e=t.selectAll(".".concat(s.default.region)).data(),n=e[0];return!e.some((function(t){return!(!d.default.isArray(n)&&!d.default.isArray(t))||(n.start!==t.start||n.end!==t.end||n.axis!==t.axis)}))}),T=e.hideAllRegions=function(t){return t.selectAll(".".concat(s.default.region)).attr("aria-hidden",!0)},b=(e.showHideRegion=function(t,e,n){return t.selectAll(".".concat(s.default.region,'[aria-describedby="').concat(e,'"]')).attr("aria-hidden",!n)},e.isSingleTargetDisplayed=function(t,e){var n=0;return e.forEach((function(e){n+=t.includes(e.dataTarget.key)&&!d.default.isEmptyArray(e.dataTarget.values)?1:0})),1===n});e.processRegions=function(t,e,n){var a=t.content,i=e.shownTargets,o=e.shouldHideAllRegion;b(i,a)?function(t,e){e.forEach((function(e){return t.selectAll(".".concat(s.default.region,'[aria-describedby="region_').concat(e,'"]')).attr("aria-hidden",(function(){return!("true"===r.select(this).attr("aria-hidden"))}))}))}(n,i):function(t,e){t.shownTargets.length>1&&!t.shouldHideAllRegion&&x(e)?e.selectAll(".".concat(s.default.region)).attr("aria-hidden",!1):T(e)}({shownTargets:i,shouldHideAllRegion:o},n)},e.regionLegendHoverHandler=function(t,e,n,a){var i=a===l.default.HOVER_EVENT.MOUSE_ENTER&&t.indexOf(n)>-1;e.selectAll(".".concat(s.default.region,'[aria-describedby="region_').concat(n,'"]')).classed(s.default.regionHighlight,i)}},52097:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.getSVGObjectForEvent=e.getSVGObject=void 0;var i=a(n(45839));e.getSVGObject=function(t,e){var n=e.posX,a=e.posY,r=e.scale,o=i.default.deepClone(t);return o.options.x=t.options.x*n,o.options.y=t.options.y*a,o.options.scale*=r,o},e.getSVGObjectForEvent=function(t,e,n){var a=n.posX,r=n.posY,o=n.scale,u=i.default.deepClone(t);return u.options.x=e.x-a*e.scale,u.options.y=e.y-r*e.scale,u.options.scale=e.scale*o,u}},75090:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={container:"carbon-graph-container",timelineContainer:"carbon-timeline-container",canvas:"carbon-graph-canvas",canvasXAxis:"carbon-x-axis-canvas",axis:"carbon-axis",axisX:"carbon-axis-x",axisY:"carbon-axis-y",axisY2:"carbon-axis-y2",axisReferenceLine:"carbon-axis-reference-line",grid:"carbon-grid",gridH:"carbon-horizontal-grid",gridV:"carbon-vertical-grid",gridLowerStep:"carbon-lower-step-grid",gridMidpoint:"carbon-midpoint-grid",gridUpperStep:"carbon-upper-step-grid",highlight:"carbon-highlight",blur:"carbon-blur",bubbleBlur:"carbon-bubble-blur",svgIcon:"carbon-svg-icon",axisLabelX:"carbon-x-axis-label",axisLabelY:"carbon-y-axis-label",axisLabelY2:"carbon-y2-axis-label",axisLabelYShapeContainer:"carbon-y-axis-label-shape-container",axisLabelY2ShapeContainer:"carbon-y2-axis-label-shape-container",axisLabelRow:"carbon-axis-label-row",axisLabel:"carbon-axis-label-item",axisYTrackLabel:"carbon-y-axis-track-label",legend:"carbon-legend",legendItem:"carbon-legend-item",legendItemBtn:"carbon-legend-item-btn",legendItemIcon:"carbon-legend-item-icon",legendItemIconWithLine:"carbon-legend-item-icon-with-line",legendItemLine:"carbon-legend-item-line",legendItemLineWithIcon:"carbon-legend-item-line-with-icon",legendItemSpan:"carbon-legend-item-span",legendItemWhiteLine:"carbon-legend-white-line",legendItemText:"carbon-legend-item-text",contentContainer:"carbon-content-container",datelineContent:"carbon-dateline-content",datelineGroup:"carbon-dateline-group",datelinePoint:"carbon-dateline-point",dateline:"carbon-dateline",eventlineContent:"carbon-eventline-content",eventlineGroup:"carbon-eventline-group",eventline:"carbon-eventline",noDataContainer:"carbon-no-data-container",noDataLabel:"carbon-no-data-label",noDataOverlay:"carbon-no-data-overlay",labelPopupOverlay:"carbon-label-popup-overlay",labelPopupTooltip:"carbon-label-popup-tooltip",lineGraphContent:"carbon-line-graph-content",currentLinesGroup:"carbon-data-lines-group",currentPointsGroup:"carbon-data-points-group",dataPointSelection:"carbon-selected-data-point",dataPointDisplayEnable:"carbon-data-pair--selected",bubbleGraphContent:"carbon-bubble-graph-content",pairedBoxGroup:"carbon-data-pairs-group",pairedBox:"carbon-data-pair",pointGroup:"carbon-data-points",line:"carbon-line",point:"carbon-point",pairedLine:"carbon-paired-line",pairedPoint:"carbon-paired-point",high:"carbon-high",low:"carbon-low",mid:"carbon-mid",regionGroup:"carbon-region-group",regionPairGroup:"carbon-region-pair-group",region:"carbon-region",regionHighlight:"carbon-region-highlight",regionBlur:"carbon-region-blur",valueRegion:"carbon-value-region",criticalityOuterPoint:"carbon-criticality-outer",criticalityInnerPoint:"carbon-criticality-inner",criticalityTimelineOuterPoint:"carbon-timeline-criticality-outer",criticalityTimelineInnerPoint:"carbon-timeline-criticality-inner",ganttChartContent:"carbon-gantt-chart-content",trackGroup:"carbon-data-track-group",ganttTrackSelectorGroup:"carbon-gantt-track-selector-group",ganttTrackBarSelection:"carbon-track-selected-bar",taskGroup:"carbon-data-task-group",task:"carbon-data-task",taskBar:"carbon-data-bar",taskBarSelection:"carbon-data-selected-bar",taskBarCompletion:"carbon-data-completion-bar",activityGroup:"carbon-data-activity-group",activity:"carbon-data-activity",activityBar:"carbon-data-activity-bar",timelineGraphContent:"carbon-timeline-graph-content",timelineContentGroup:"carbon-timeline-content-group",bar:"carbon-bar-graph",barGraphContent:"carbon-bar-graph-content",currentBarsGroup:"carbon-data-bars-group",barHashedRect:"carbon-data-bar--hashed",barSelectionGroup:"carbon-bar-selector-group",barGoalLine:"carbon-bar-goal-line",axisInfoRow:"carbon-axis-info-row",axisInfoRowItem:"carbon-axis-info-row-item",axisInfoRowIcon:"carbon-axis-info-row-icon",axisInfoRowDisplay:"carbon-axis-info-row-item-display",axisInfoRowSecondaryDisplay:"carbon-axis-info-row-item-sec-display",pieChartCanvas:"carbon-pie-chart-canvas",pieChartContent:"carbon-pie-chart-content",pieContentGroup:"carbon-data-pie-group",pieContentSlice:"carbon-data-pie-slice",pieLegendItem:"carbon-pie-legend-item",pieLegendItemIcon:"carbon-pie-legend-item-icon",pieLegendItemSliceHover:"carbon-pie-legend-item-slice-hover",scatterGraphContent:"carbon-scatter-graph-content"}},15861:function(t,e,n){"use strict";var a=n(73738);Object.defineProperty(e,"__esModule",{value:!0}),e.round2Decimals=e.getTransformScale=e.getSVGAnimatedTransformList=e.getCurrentTransform=void 0;var i=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=a(t)&&"function"!=typeof t)return{default:t};var n=r(e);if(n&&n.has(t))return n.get(t);var i={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in t)if("default"!==u&&{}.hasOwnProperty.call(t,u)){var l=o?Object.getOwnPropertyDescriptor(t,u):null;l&&(l.get||l.set)?Object.defineProperty(i,u,l):i[u]=t[u]}return i.default=t,n&&n.set(t,i),i}(n(56194));function r(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(r=function(t){return t?n:e})(t)}var o=e.getCurrentTransform=function(t){return i.select(t).attr("transform")},u=e.round2Decimals=function(t){return Math.round(100*(t+1e-5))/100},l=function(t,e){return t[0]*e[0]+t[1]*e[1]},c=function(t){var e=Math.sqrt(l(t,t));return e&&(t[0]/=e,t[1]/=e),e},s=e.getSVGAnimatedTransformList=function(t){var e=document.createElementNS("http://www.w3.org/2000/svg","g");e.setAttributeNS(null,"transform",t);var n,a,i,r=e.transform.baseVal.consolidate(),o=r?r.matrix:{a:1,b:0,c:0,d:1,e:0,f:0},u=[o.a,o.b],s=[o.c,o.d],f=c(u),d=l(u,s),h=c(((n=s)[0]+=(i=-d)*(a=u)[0],n[1]+=i*a[1],n))||0;return u[0]*s[1]0&&void 0!==arguments[0]?arguments[0]:function(t){return t};return function(){return!t.apply(void 0,arguments)}},u=function(t){return Array.isArray(t)},l=function(t){return"undefined"==typeof t},c=o(l),s=function(t){return"undefined"==typeof t||null===t||function(t){return"string"==typeof t}(t)&&0===t.length||"object"===(0,i.default)(t)&&0===Object.keys(t).length},f=o(s),d=function(t){return r.default.ISO8601_DATE_TIME_MILLI.test(t)},h=function(t){return t instanceof Date},p=function(t){return new Date(t)},g=new Set([0,-45]);e.default={deepClone:function t(e){return u(e)?e.map(t):e&&"object"===(0,i.default)(e)?Object.keys(e).reduce((function(n,a){return c(e[a])&&(n[a]=t(e[a])),n}),{}):e},getEpocFromDateString:function(t){return parseInt(new Date(t).getTime(),10)},getDateFromEpoc:function(t){return new Date(t)},getNumber:function(t){return t?Number(t):0},getTime:function(t){return p(t).getTime()},hasValue:function(t,e){return Object.keys(t).some((function(n){return t[n]===e}))},isArray:u,isBoolean:function(t){return"boolean"==typeof t&&!Number.isNaN(t)},isFunction:function(t){return"function"==typeof t},isDate:d,isDateInstance:h,isDefined:c,isEmptyArray:function(t){return Array.isArray(t)&&0===t.length},isEmpty:s,isEqual:function(t,e){return d(t)||h(t)?function(t,e){return t.getTime()===e.getTime()}(p(t),p(e)):t===e},isNumber:function(t){return"number"==typeof t&&!Number.isNaN(t)},isUndefined:l,notEmpty:f,parseDateTime:p,sanitize:function(t){return"string"==typeof t?t.replace(//g,">"):t},validTickLabelRotations:g}},80390:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"de_DE",decimal:",",thousands:".",grouping:[3],currency:[""," €"],dateTime:"%A, der %e. %B %Y, %X",date:"%d.%m.%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sonntag","Montag","Dienstag","Mittwoch","Donnerstag","Freitag","Samstag"],shortDays:["So,","Mo,","Di,","Mi,","Do,","Fr,","Sa,"],months:["Januar","Februar","März","April","Mai","Juni","Juli","August","September","Oktober","November","Dezember"],shortMonths:["Jan","Feb","Mrz","Apr","Mai","Jun","Jul","Aug","Sep","Okt","Nov","Dez"],noData:"Keine Daten"}},4395:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"en_AU",decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %e %b %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],noData:"No Data"}},33033:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"en_CA",decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],noData:"No Data"}},71204:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"en_GB",decimal:".",thousands:",",grouping:[3],currency:["£",""],dateTime:"%a %e %b %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],noData:"No Data"}},5381:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"en_US",decimal:".",thousands:",",grouping:[3],currency:["$",""],dateTime:"%a %b %e %X %Y",date:"%m/%d/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],noData:"No Data"}},96928:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"en_ES",decimal:",",thousands:".",grouping:[3],currency:[""," €"],dateTime:"%A, %e de %B de %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["domingo","lunes","martes","miércoles","jueves","viernes","sábado"],shortDays:["dom.","lun.","mar.","mié.","jue.","vie.","sáb."],months:["enero","febrero","marzo","abril","mayo","junio","julio","agosto","septiembre","octubre","noviembre","diciembre"],shortMonths:["ene.","feb.","mar.","abr.","may.","jun.","jul.","ago.","sep.","oct.","nov.","dic."],noData:"Sin datos"}},91659:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"fr_FR",decimal:",",thousands:".",grouping:[3],currency:[""," €"],dateTime:"%A, le %e %B %Y, %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["dimanche","lundi","mardi","mercredi","jeudi","vendredi","samedi"],shortDays:["dim.","lun.","mar.","mer.","jeu.","ven.","sam."],months:["janvier","février","mars","avril","mai","juin","juillet","août","septembre","octobre","novembre","décembre"],shortMonths:["janv.","févr.","mars","avr.","mai","juin","juil.","août","sept.","oct.","nov.","déc."],noData:"Aucune donnée"}},21459:function(t,e,n){"use strict";var a=n(24994);Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.DEFAULT_TICK_FORMAT=e.DEFAULT_LOCALE=void 0;var i=a(n(80390)),r=a(n(4395)),o=a(n(33033)),u=a(n(71204)),l=a(n(5381)),c=a(n(96928)),s=a(n(91659)),f=a(n(48717)),d=a(n(96192)),h=a(n(63580)),p=a(n(38011)),g=(e.DEFAULT_TICK_FORMAT=null,e.DEFAULT_LOCALE=l.default,{de_DE:i.default,en_AU:r.default,en_CA:o.default,en_GB:u.default,en_US:l.default,es_ES:c.default,fr_FR:s.default,pt_BR:d.default,ja_JP:f.default,nl_NL:h.default,sv_SE:p.default});e.default=g},48717:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"ja_JP",decimal:".",thousands:",",grouping:[3],currency:["","円"],dateTime:"%Y %b %e %a %X",date:"%Y/%m/%d",time:"%H:%M:%S",periods:["AM","PM"],days:["日曜日","月曜日","火曜日","水曜日","木曜日","金曜日","土曜日"],shortDays:["日","月","火","水","木","金","土"],months:["睦月","如月","弥生","卯月","皐月","水無月","文月","葉月","長月","神無月","霜月","師走"],shortMonths:["1月","2月","3月","4月","5月","6月","7月","8月","9月","10月","11月","12月"],noData:"データなし"}},63580:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"nl_NL",decimal:",",thousands:".",grouping:[3],currency:["€ ",""],dateTime:"%a %e %B %Y %T",date:"%d-%m-%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["zondag","maandag","dinsdag","woensdag","donderdag","vrijdag","zaterdag"],shortDays:["zo","ma","di","wo","do","vr","za"],months:["januari","februari","maart","april","mei","juni","juli","augustus","september","oktober","november","december"],shortMonths:["jan","feb","mrt","apr","mei","jun","jul","aug","sep","okt","nov","dec"],noData:"Geen gegevens"}},96192:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"pt_BR",decimal:",",thousands:".",grouping:[3],currency:["R$",""],dateTime:"%A, %e de %B de %Y. %X",date:"%d/%m/%Y",time:"%H:%M:%S",periods:["AM","PM"],days:["Domingo","Segunda","Terça","Quarta","Quinta","Sexta","Sábado"],shortDays:["dom","seg","ter","qua","qui","sex","sáb"],months:["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],shortMonths:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],noData:"Sem dados"}},38011:function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;e.default={locale:"sv_SE",decimal:",",thousands:".",grouping:[3],currency:[""," kr"],dateTime:"%A den %d %B %Y %X",date:"%Y-%m-%d",time:"%H:%M:%S",periods:["fm","em"],days:["Söndag","Måndag","Tisdag","Onsdag","Torsdag","Fredag","Lördag"],shortDays:["Sön","Mån","Tis","Ons","Tor","Fre","Lör"],months:["Januari","Februari","Mars","April","Maj","Juni","Juli","Augusti","September","Oktober","November","December"],shortMonths:["jan","feb","mar","apr","maj","jun","jul","aug","sep","okt","nov","dec"],noData:"Ingen information"}},201:function(t,e,n){"use strict";var a=n(24994),i=n(73738);e.A=void 0;var r=a(n(85715)),o=function(t,e){if(!e&&t&&t.__esModule)return t;if(null===t||"object"!=i(t)&&"function"!=typeof t)return{default:t};var n=p(e);if(n&&n.has(t))return n.get(t);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if("default"!==o&&Object.prototype.hasOwnProperty.call(t,o)){var u=r?Object.getOwnPropertyDescriptor(t,o):null;u&&(u.get||u.set)?Object.defineProperty(a,o,u):a[o]=t[o]}return a.default=t,n&&n.set(t,a),a}(n(96540)),u=a(n(5556)),l=a(n(67967)),c=n(92912),s=a(n(49558)),f=a(n(53665)),d=n(25966),h=a(n(89986));function p(t){if("function"!=typeof WeakMap)return null;var e=new WeakMap,n=new WeakMap;return(p=function(t){return t?n:e})(t)}var g=l.default.bind(h.default),v={example:u.default.element,exampleSrc:u.default.element,exampleCssSrc:u.default.element,title:u.default.string,description:u.default.node,isExpanded:u.default.bool},y=function(t){t.currentTarget.setAttribute("data-focus-styles-enabled","true")},_=function(t){t.currentTarget.setAttribute("data-focus-styles-enabled","false")},m=function(t){var e=t.example,n=t.exampleSrc,a=t.exampleCssSrc,i=t.title,u=t.description,l=t.isExpanded,h=(0,o.useState)(l),p=(0,r.default)(h,2),v=p[0],m=p[1],x=(0,o.useState)(!1),T=(0,r.default)(x,2),b=T[0],E=T[1],A=o.default.useContext(c.ThemeContext),S=void 0!==a,O=function(){E(!b),v&&m(!v)},D=function(){m(!v),b&&E(!b)},w=function(t,e){t.nativeEvent.keyCode!==d.KEY_SPACE&&t.nativeEvent.keyCode!==d.KEY_RETURN||(t.preventDefault(),e())};return o.default.createElement("div",{className:g("template",A.className)},o.default.createElement("div",{className:g("header")},i&&o.default.createElement("h2",{className:g("title")},i)),o.default.createElement("div",{className:g("content")},u&&o.default.createElement("div",{className:g("description")},u),e),o.default.createElement("div",{className:g("footer")},n?o.default.createElement("div",{className:g("button-container")},S&&o.default.createElement("button",{type:"button",className:g("css-toggle","item",{"is-selected":b}),onClick:O,onKeyDown:function(t){return w(t,O)},onBlur:y,onMouseDown:_,tabIndex:0,"data-focus-styles-enabled":!0},o.default.createElement(s.default,{className:g("chevron")}),o.default.createElement("span",null,"CSS"),o.default.createElement(f.default,{className:g("chevron")})),o.default.createElement("button",{type:"button",className:g("code-toggle","item",{"is-selected":v}),onClick:D,onKeyDown:function(t){return w(t,D)},onBlur:y,onMouseDown:_,tabIndex:0,"data-focus-styles-enabled":!0},o.default.createElement(s.default,{className:g("chevron")}),o.default.createElement("span",null,"Code"),o.default.createElement(f.default,{className:g("chevron")}))):null,o.default.createElement("div",null,b&&o.default.createElement("div",{className:g("css")},a),v&&o.default.createElement("div",{className:g("code")},n))))};m.propTypes=v,m.defaultProps={isExpanded:!1};e.A=m},47212:function(t,e){!function(t){"use strict";function e(t,e){return te?1:t>=e?0:NaN}function n(t){return 1===t.length&&(t=a(t)),{left:function(e,n,a,i){for(null==a&&(a=0),null==i&&(i=e.length);a>>1;t(e[r],n)<0?a=r+1:i=r}return a},right:function(e,n,a,i){for(null==a&&(a=0),null==i&&(i=e.length);a>>1;t(e[r],n)>0?i=r:a=r+1}return a}}}function a(t){return function(n,a){return e(t(n),a)}}var i=n(e),r=i.right,o=i.left;function u(t,e){null==e&&(e=l);for(var n=0,a=t.length-1,i=t[0],r=new Array(a<0?0:a);nt?1:e>=t?0:NaN}function f(t){return null===t?NaN:+t}function d(t,e){var n,a,i=t.length,r=0,o=-1,u=0,l=0;if(null==e)for(;++o1)return l/(r-1)}function h(t,e){var n=d(t,e);return n?Math.sqrt(n):n}function p(t,e){var n,a,i,r=t.length,o=-1;if(null==e){for(;++o=n)for(a=i=n;++on&&(a=n),i=n)for(a=i=n;++on&&(a=n),i0)return[t];if((a=e0)for(t=Math.ceil(t/o),e=Math.floor(e/o),r=new Array(i=Math.ceil(e-t+1));++u=0?(r>=T?10:r>=b?5:r>=E?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(r>=T?10:r>=b?5:r>=E?2:1)}function O(t,e,n){var a=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(a)/Math.LN10)),r=a/i;return r>=T?i*=10:r>=b?i*=5:r>=E&&(i*=2),ef;)d.pop(),--h;var p,g=new Array(h+1);for(i=0;i<=h;++i)(p=g[i]=[]).x0=i>0?d[i-1]:s,p.x1=i=1)return+n(t[a-1],a-1,t);var a,i=(a-1)*e,r=Math.floor(i),o=+n(t[r],r,t);return o+(+n(t[r+1],r+1,t)-o)*(i-r)}}function P(t,n,a){return t=y.call(t,f).sort(e),Math.ceil((a-n)/(2*(I(t,.75)-I(t,.25))*Math.pow(t.length,-1/3)))}function k(t,e,n){return Math.ceil((n-e)/(3.5*h(t)*Math.pow(t.length,-1/3)))}function L(t,e){var n,a,i=t.length,r=-1;if(null==e){for(;++r=n)for(a=n;++ra&&(a=n)}else for(;++r=n)for(a=n;++ra&&(a=n);return a}function M(t,e){var n,a=t.length,i=a,r=-1,o=0;if(null==e)for(;++r=0;)for(e=(a=t[i]).length;--e>=0;)n[--o]=a[e];return n}function C(t,e){var n,a,i=t.length,r=-1;if(null==e){for(;++r=n)for(a=n;++rn&&(a=n)}else for(;++r=n)for(a=n;++rn&&(a=n);return a}function H(t,e){for(var n=e.length,a=new Array(n);n--;)a[n]=t[e[n]];return a}function G(t,n){if(a=t.length){var a,i,r=0,o=0,u=t[o];for(null==n&&(n=e);++r=i.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var l,c,f,d=-1,h=n.length,p=i[r++],g=a(),v=o();++di.length)return t;var a,r=c[n-1];return null!=e&&n>=i.length?a=t.entries():(a=[],t.each((function(t,e){a.push({key:e,values:f(t,n)})}))),null!=r?a.sort((function(t,e){return r(t.key,e.key)})):a}return n={object:function(t){return s(t,0,r,o)},map:function(t){return s(t,0,u,l)},entries:function(t){return f(s(t,0,u,l),0)},key:function(t){return i.push(t),n},sortKeys:function(t){return c[i.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}}function r(){return{}}function o(t,e,n){t[e]=n}function u(){return a()}function l(t,e,n){t.set(e,n)}function c(){}n.prototype=a.prototype={constructor:n,has:function(t){return e+t in this},get:function(t){return this[e+t]},set:function(t,n){return this[e+t]=n,this},remove:function(t){var n=e+t;return n in this&&delete this[n]},clear:function(){for(var t in this)t[0]===e&&delete this[t]},keys:function(){var t=[];for(var n in this)n[0]===e&&t.push(n.slice(1));return t},values:function(){var t=[];for(var n in this)n[0]===e&&t.push(this[n]);return t},entries:function(){var t=[];for(var n in this)n[0]===e&&t.push({key:n.slice(1),value:this[n]});return t},size:function(){var t=0;for(var n in this)n[0]===e&&++t;return t},empty:function(){for(var t in this)if(t[0]===e)return!1;return!0},each:function(t){for(var n in this)n[0]===e&&t(this[n],n.slice(1),this)}};var s=a.prototype;function f(t,e){var n=new c;if(t instanceof c)t.each((function(t){n.add(t)}));else if(t){var a=-1,i=t.length;if(null==e)for(;++a>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?b(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?b(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=s.exec(t))?new S(e[1],e[2],e[3],1):(e=f.exec(t))?new S(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=d.exec(t))?b(e[1],e[2],e[3],e[4]):(e=h.exec(t))?b(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=p.exec(t))?I(e[1],e[2]/100,e[3]/100,1):(e=g.exec(t))?I(e[1],e[2]/100,e[3]/100,e[4]):v.hasOwnProperty(t)?T(v[t]):"transparent"===t?new S(NaN,NaN,NaN,0):null}function T(t){return new S(t>>16&255,t>>8&255,255&t,1)}function b(t,e,n,a){return a<=0&&(t=e=n=NaN),new S(t,e,n,a)}function E(t){return t instanceof a||(t=x(t)),t?new S((t=t.rgb()).r,t.g,t.b,t.opacity):new S}function A(t,e,n,a){return 1===arguments.length?E(t):new S(t,e,n,null==a?1:a)}function S(t,e,n,a){this.r=+t,this.g=+e,this.b=+n,this.opacity=+a}function O(){return"#"+w(this.r)+w(this.g)+w(this.b)}function D(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function w(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function I(t,e,n,a){return a<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new L(t,e,n,a)}function P(t){if(t instanceof L)return new L(t.h,t.s,t.l,t.opacity);if(t instanceof a||(t=x(t)),!t)return new L;if(t instanceof L)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),u=NaN,l=o-r,c=(o+r)/2;return l?(u=e===o?(n-i)/l+6*(n0&&c<1?0:u,new L(u,l,c,t.opacity)}function k(t,e,n,a){return 1===arguments.length?P(t):new L(t,e,n,null==a?1:a)}function L(t,e,n,a){this.h=+t,this.s=+e,this.l=+n,this.opacity=+a}function M(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}e(a,x,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:y,formatHex:y,formatHsl:_,formatRgb:m,toString:m}),e(S,A,n(a,{brighter:function(t){return t=null==t?r:Math.pow(r,t),new S(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new S(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:O,formatHex:O,formatRgb:D,toString:D})),e(L,k,n(a,{brighter:function(t){return t=null==t?r:Math.pow(r,t),new L(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?i:Math.pow(i,t),new L(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,a=n+(n<.5?n:1-n)*e,i=2*n-a;return new S(M(t>=240?t-240:t+120,i,a),M(t,i,a),M(t<120?t+240:t-120,i,a),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var R=Math.PI/180,N=180/Math.PI,C=18,H=.96422,G=1,V=.82521,F=4/29,j=6/29,X=3*j*j,Y=j*j*j;function U(t){if(t instanceof z)return new z(t.l,t.a,t.b,t.opacity);if(t instanceof et)return nt(t);t instanceof S||(t=E(t));var e,n,a=Q(t.r),i=Q(t.g),r=Q(t.b),o=K((.2225045*a+.7168786*i+.0606169*r)/G);return a===i&&i===r?e=n=o:(e=K((.4360747*a+.3850649*i+.1430804*r)/H),n=K((.0139322*a+.0971045*i+.7141733*r)/V)),new z(116*o-16,500*(e-o),200*(o-n),t.opacity)}function W(t,e){return new z(t,0,0,null==e?1:e)}function B(t,e,n,a){return 1===arguments.length?U(t):new z(t,e,n,null==a?1:a)}function z(t,e,n,a){this.l=+t,this.a=+e,this.b=+n,this.opacity=+a}function K(t){return t>Y?Math.pow(t,1/3):t/X+F}function q(t){return t>j?t*t*t:X*(t-F)}function J(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Q(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Z(t){if(t instanceof et)return new et(t.h,t.c,t.l,t.opacity);if(t instanceof z||(t=U(t)),0===t.a&&0===t.b)return new et(NaN,0=0&&(n=t.slice(a+1),t=t.slice(0,a)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function r(t,e){for(var n,a=0,i=t.length;a0)for(var n,a,i=new Array(n),r=0;rE}x.mouse("drag")}function D(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null),o(n.event.view,p),i(),x.mouse("end")}function w(){if(v.apply(this,arguments)){var t,e,i=n.event.changedTouches,r=y.apply(this,arguments),o=i.length;for(t=0;t=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function n(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,a=t.slice(0,n);return[a.length>1?a[0]+a.slice(2):a,+t.slice(n+1)]}function a(t){return(t=n(Math.abs(t)))?t[1]:NaN}function i(t,e){return function(n,a){for(var i=n.length,r=[],o=0,u=t[0],l=0;i>0&&u>0&&(l+u+1>a&&(u=Math.max(1,a-l)),r.push(n.substring(i-=u,i+u)),!((l+=u+1)>a));)u=t[o=(o+1)%t.length];return r.reverse().join(e)}}function r(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}var o,u=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function l(t){if(!(e=u.exec(t)))throw new Error("invalid format: "+t);var e;return new c({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function c(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function s(t){t:for(var e,n=t.length,a=1,i=-1;a0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}function f(t,e){var a=n(t,e);if(!a)return t+"";var i=a[0],r=a[1],u=r-(o=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,l=i.length;return u===l?i:u>l?i+new Array(u-l+1).join("0"):u>0?i.slice(0,u)+"."+i.slice(u):"0."+new Array(1-u).join("0")+n(t,Math.max(0,e+u-1))[0]}function d(t,e){var a=n(t,e);if(!a)return t+"";var i=a[0],r=a[1];return r<0?"0."+new Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+new Array(r-i.length+2).join("0")}l.prototype=c.prototype,c.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var h={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:e,e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return d(100*t,e)},r:d,s:f,X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}};function p(t){return t}var g,v=Array.prototype.map,y=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function _(t){var e=void 0===t.grouping||void 0===t.thousands?p:i(v.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",u=void 0===t.currency?"":t.currency[1]+"",c=void 0===t.decimal?".":t.decimal+"",f=void 0===t.numerals?p:r(v.call(t.numerals,String)),d=void 0===t.percent?"%":t.percent+"",g=void 0===t.minus?"-":t.minus+"",_=void 0===t.nan?"NaN":t.nan+"";function m(t){var a=(t=l(t)).fill,i=t.align,r=t.sign,p=t.symbol,v=t.zero,m=t.width,x=t.comma,T=t.precision,b=t.trim,E=t.type;"n"===E?(x=!0,E="g"):h[E]||(void 0===T&&(T=12),b=!0,E="g"),(v||"0"===a&&"="===i)&&(v=!0,a="0",i="=");var A="$"===p?n:"#"===p&&/[boxX]/.test(E)?"0"+E.toLowerCase():"",S="$"===p?u:/[%p]/.test(E)?d:"",O=h[E],D=/[defgprs%]/.test(E);function w(t){var n,u,l,d=A,h=S;if("c"===E)h=O(t)+h,t="";else{var p=(t=+t)<0||1/t<0;if(t=isNaN(t)?_:O(Math.abs(t),T),b&&(t=s(t)),p&&0==+t&&"+"!==r&&(p=!1),d=(p?"("===r?r:g:"-"===r||"("===r?"":r)+d,h=("s"===E?y[8+o/3]:"")+h+(p&&"("===r?")":""),D)for(n=-1,u=t.length;++n(l=t.charCodeAt(n))||l>57){h=(46===l?c+t.slice(n+1):t.slice(n))+h,t=t.slice(0,n);break}}x&&!v&&(t=e(t,1/0));var w=d.length+t.length+h.length,I=w>1)+d+t+h+I.slice(w);break;default:t=I+d+t+h}return f(t)}return T=void 0===T?6:/[gprs]/.test(E)?Math.max(1,Math.min(21,T)):Math.max(0,Math.min(20,T)),w.toString=function(){return t+""},w}function x(t,e){var n=m(((t=l(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(a(e)/3))),r=Math.pow(10,-i),o=y[8+i/3];return function(t){return n(r*t)+o}}return{format:m,formatPrefix:x}}function m(e){return g=_(e),t.format=g.format,t.formatPrefix=g.formatPrefix,g}function x(t){return Math.max(0,-a(Math.abs(t)))}function T(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(a(e)/3)))-a(Math.abs(t)))}function b(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,a(e)-a(t))+1}m({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),t.FormatSpecifier=c,t.formatDefaultLocale=m,t.formatLocale=_,t.formatSpecifier=l,t.precisionFixed=x,t.precisionPrefix=T,t.precisionRound=b,Object.defineProperty(t,"__esModule",{value:!0})}(e)},50528:function(t,e,n){!function(t,e){"use strict";function n(){return new a}function a(){this.reset()}a.prototype={constructor:a,reset:function(){this.s=this.t=0},add:function(t){r(i,t,this.t),r(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new a;function r(t,e,n){var a=t.s=e+n,i=a-e,r=a-i;t.t=e-r+(n-i)}var o=1e-6,u=1e-12,l=Math.PI,c=l/2,s=l/4,f=2*l,d=180/l,h=l/180,p=Math.abs,g=Math.atan,v=Math.atan2,y=Math.cos,_=Math.ceil,m=Math.exp,x=Math.log,T=Math.pow,b=Math.sin,E=Math.sign||function(t){return t>0?1:t<0?-1:0},A=Math.sqrt,S=Math.tan;function O(t){return t>1?0:t<-1?l:Math.acos(t)}function D(t){return t>1?c:t<-1?-c:Math.asin(t)}function w(t){return(t=b(t/2))*t}function I(){}function P(t,e){t&&L.hasOwnProperty(t.type)&&L[t.type](t,e)}var k={Feature:function(t,e){P(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,a=-1,i=n.length;++a=0?1:-1,i=a*n,r=y(e=(e*=h)/2+s),o=b(e),u=F*o,l=V*r+u*y(i),c=u*a*b(i);j.add(v(c,l)),G=t,V=r,F=o}function K(t){return X.reset(),N(t,Y),2*X}function q(t){return[v(t[1],t[0]),D(t[2])]}function J(t){var e=t[0],n=t[1],a=y(n);return[a*y(e),a*b(e),b(n)]}function Q(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Z(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function $(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function tt(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function et(t){var e=A(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var nt,at,it,rt,ot,ut,lt,ct,st,ft,dt,ht,pt,gt,vt,yt,_t,mt,xt,Tt,bt,Et,At,St,Ot,Dt,wt=n(),It={point:Pt,lineStart:Lt,lineEnd:Mt,polygonStart:function(){It.point=Rt,It.lineStart=Nt,It.lineEnd=Ct,wt.reset(),Y.polygonStart()},polygonEnd:function(){Y.polygonEnd(),It.point=Pt,It.lineStart=Lt,It.lineEnd=Mt,j<0?(nt=-(it=180),at=-(rt=90)):wt>o?rt=90:wt<-o&&(at=-90),ft[0]=nt,ft[1]=it},sphere:function(){nt=-(it=180),at=-(rt=90)}};function Pt(t,e){st.push(ft=[nt=t,it=t]),ert&&(rt=e)}function kt(t,e){var n=J([t*h,e*h]);if(ct){var a=Z(ct,n),i=Z([a[1],-a[0],0],a);et(i),i=q(i);var r,o=t-ot,u=o>0?1:-1,l=i[0]*d*u,c=p(o)>180;c^(u*otrt&&(rt=r):c^(u*ot<(l=(l+360)%360-180)&&lrt&&(rt=e)),c?tHt(nt,it)&&(it=t):Ht(t,it)>Ht(nt,it)&&(nt=t):it>=nt?(tit&&(it=t)):t>ot?Ht(nt,t)>Ht(nt,it)&&(it=t):Ht(t,it)>Ht(nt,it)&&(nt=t)}else st.push(ft=[nt=t,it=t]);ert&&(rt=e),ct=n,ot=t}function Lt(){It.point=kt}function Mt(){ft[0]=nt,ft[1]=it,It.point=Pt,ct=null}function Rt(t,e){if(ct){var n=t-ot;wt.add(p(n)>180?n+(n>0?360:-360):n)}else ut=t,lt=e;Y.point(t,e),kt(t,e)}function Nt(){Y.lineStart()}function Ct(){Rt(ut,lt),Y.lineEnd(),p(wt)>o&&(nt=-(it=180)),ft[0]=nt,ft[1]=it,ct=null}function Ht(t,e){return(e-=t)<0?e+360:e}function Gt(t,e){return t[0]-e[0]}function Vt(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:eHt(a[0],a[1])&&(a[1]=i[1]),Ht(i[0],a[1])>Ht(a[0],a[1])&&(a[0]=i[0])):r.push(a=i);for(o=-1/0,e=0,a=r[n=r.length-1];e<=n;a=i,++e)i=r[e],(u=Ht(a[1],i[0]))>o&&(o=u,nt=i[0],it=a[1])}return st=ft=null,nt===1/0||at===1/0?[[NaN,NaN],[NaN,NaN]]:[[nt,at],[it,rt]]}var jt={sphere:I,point:Xt,lineStart:Ut,lineEnd:zt,polygonStart:function(){jt.lineStart=Kt,jt.lineEnd=qt},polygonEnd:function(){jt.lineStart=Ut,jt.lineEnd=zt}};function Xt(t,e){t*=h;var n=y(e*=h);Yt(n*y(t),n*b(t),b(e))}function Yt(t,e,n){++dt,pt+=(t-pt)/dt,gt+=(e-gt)/dt,vt+=(n-vt)/dt}function Ut(){jt.point=Wt}function Wt(t,e){t*=h;var n=y(e*=h);St=n*y(t),Ot=n*b(t),Dt=b(e),jt.point=Bt,Yt(St,Ot,Dt)}function Bt(t,e){t*=h;var n=y(e*=h),a=n*y(t),i=n*b(t),r=b(e),o=v(A((o=Ot*r-Dt*i)*o+(o=Dt*a-St*r)*o+(o=St*i-Ot*a)*o),St*a+Ot*i+Dt*r);ht+=o,yt+=o*(St+(St=a)),_t+=o*(Ot+(Ot=i)),mt+=o*(Dt+(Dt=r)),Yt(St,Ot,Dt)}function zt(){jt.point=Xt}function Kt(){jt.point=Jt}function qt(){Qt(Et,At),jt.point=Xt}function Jt(t,e){Et=t,At=e,t*=h,e*=h,jt.point=Qt;var n=y(e);St=n*y(t),Ot=n*b(t),Dt=b(e),Yt(St,Ot,Dt)}function Qt(t,e){t*=h;var n=y(e*=h),a=n*y(t),i=n*b(t),r=b(e),o=Ot*r-Dt*i,u=Dt*a-St*r,l=St*i-Ot*a,c=A(o*o+u*u+l*l),s=D(c),f=c&&-s/c;xt+=f*o,Tt+=f*u,bt+=f*l,ht+=s,yt+=s*(St+(St=a)),_t+=s*(Ot+(Ot=i)),mt+=s*(Dt+(Dt=r)),Yt(St,Ot,Dt)}function Zt(t){dt=ht=pt=gt=vt=yt=_t=mt=xt=Tt=bt=0,N(t,jt);var e=xt,n=Tt,a=bt,i=e*e+n*n+a*a;return il?t+Math.round(-t/f)*f:t,e]}function ne(t,e,n){return(t%=f)?e||n?te(ie(t),re(e,n)):ie(t):e||n?re(e,n):ee}function ae(t){return function(e,n){return[(e+=t)>l?e-f:e<-l?e+f:e,n]}}function ie(t){var e=ae(t);return e.invert=ae(-t),e}function re(t,e){var n=y(t),a=b(t),i=y(e),r=b(e);function o(t,e){var o=y(e),u=y(t)*o,l=b(t)*o,c=b(e),s=c*n+u*a;return[v(l*i-s*r,u*n-c*a),D(s*i+l*r)]}return o.invert=function(t,e){var o=y(e),u=y(t)*o,l=b(t)*o,c=b(e),s=c*i-l*r;return[v(l*i+c*r,u*n+s*a),D(s*n-u*a)]},o}function oe(t){function e(e){return(e=t(e[0]*h,e[1]*h))[0]*=d,e[1]*=d,e}return t=ne(t[0]*h,t[1]*h,t.length>2?t[2]*h:0),e.invert=function(e){return(e=t.invert(e[0]*h,e[1]*h))[0]*=d,e[1]*=d,e},e}function ue(t,e,n,a,i,r){if(n){var o=y(e),u=b(e),l=a*n;null==i?(i=e+a*f,r=e-l/2):(i=le(o,i),r=le(o,r),(a>0?ir)&&(i+=a*f));for(var c,s=i;a>0?s>r:s1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}}function fe(t,e){return p(t[0]-e[0])=0;--r)i.point((f=s[r])[0],f[1]);else a(h.x,h.p.x,-1,i);h=h.p}s=(h=h.o).z,p=!p}while(!h.v);i.lineEnd()}}}function pe(t){if(e=t.length){for(var e,n,a=0,i=t[0];++a=0?1:-1,R=M*L,N=R>l,C=E*P;if(ge.add(v(C*M*b(R),A*k+C*y(R))),u+=N?L+M*f:L,N^x>=n^w>=n){var H=Z(J(m),J(O));et(H);var G=Z(r,H);et(G);var V=(N^L>=0?-1:1)*D(G[2]);(a>V||a===V&&(H[0]||H[1]))&&(d+=N^L>=0?1:-1)}}return(u<-o||u0){for(d||(r.polygonStart(),d=!0),r.lineStart(),t=0;t1&&2&i&&c.push(c.pop().concat(c.shift())),u.push(c.filter(me))}return h}}function me(t){return t.length>1}function xe(t,e){return((t=t.x)[0]<0?t[1]-c-o:c-t[1])-((e=e.x)[0]<0?e[1]-c-o:c-e[1])}var Te=_e((function(){return!0}),be,Ae,[-l,-c]);function be(t){var e,n=NaN,a=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(r,u){var s=r>0?l:-l,f=p(r-n);p(f-l)0?c:-c),t.point(i,a),t.lineEnd(),t.lineStart(),t.point(s,a),t.point(r,a),e=0):i!==s&&f>=l&&(p(n-i)o?g((b(e)*(r=y(a))*b(n)-b(a)*(i=y(e))*b(t))/(i*r*u)):(e+a)/2}function Ae(t,e,n,a){var i;if(null==t)i=n*c,a.point(-l,i),a.point(0,i),a.point(l,i),a.point(l,0),a.point(l,-i),a.point(0,-i),a.point(-l,-i),a.point(-l,0),a.point(-l,i);else if(p(t[0]-e[0])>o){var r=t[0]0,i=p(e)>o;function r(e,a,i,r){ue(r,t,n,i,e,a)}function u(t,n){return y(t)*y(n)>e}function c(t){var e,n,r,o,c;return{lineStart:function(){o=r=!1,c=1},point:function(d,h){var p,g=[d,h],v=u(d,h),y=a?v?0:f(d,h):v?f(d+(d<0?l:-l),h):0;if(!e&&(o=r=v)&&t.lineStart(),v!==r&&(!(p=s(e,g))||fe(e,p)||fe(g,p))&&(g[2]=1),v!==r)c=0,v?(t.lineStart(),p=s(g,e),t.point(p[0],p[1])):(p=s(e,g),t.point(p[0],p[1],2),t.lineEnd()),e=p;else if(i&&e&&a^v){var _;y&n||!(_=s(g,e,!0))||(c=0,a?(t.lineStart(),t.point(_[0][0],_[0][1]),t.point(_[1][0],_[1][1]),t.lineEnd()):(t.point(_[1][0],_[1][1]),t.lineEnd(),t.lineStart(),t.point(_[0][0],_[0][1],3)))}!v||e&&fe(e,g)||t.point(g[0],g[1]),e=g,r=v,n=y},lineEnd:function(){r&&t.lineEnd(),e=null},clean:function(){return c|(o&&r)<<1}}}function s(t,n,a){var i=[1,0,0],r=Z(J(t),J(n)),u=Q(r,r),c=r[0],s=u-c*c;if(!s)return!a&&t;var f=e*u/s,d=-e*c/s,h=Z(i,r),g=tt(i,f);$(g,tt(r,d));var v=h,y=Q(g,v),_=Q(v,v),m=y*y-_*(Q(g,g)-1);if(!(m<0)){var x=A(m),T=tt(v,(-y-x)/_);if($(T,g),T=q(T),!a)return T;var b,E=t[0],S=n[0],O=t[1],D=n[1];S0^T[1]<(p(T[0]-E)l^(E<=T[0]&&T[0]<=S)){var P=tt(v,(-y+x)/_);return $(P,g),[T,q(P)]}}}function f(e,n){var i=a?t:l-t,r=0;return e<-i?r|=1:e>i&&(r|=2),n<-i?r|=4:n>i&&(r|=8),r}return _e(u,c,r,a?[0,-t]:[-l,t-l])}function Oe(t,e,n,a,i,r){var o,u=t[0],l=t[1],c=0,s=1,f=e[0]-u,d=e[1]-l;if(o=n-u,f||!(o>0)){if(o/=f,f<0){if(o0){if(o>s)return;o>c&&(c=o)}if(o=i-u,f||!(o<0)){if(o/=f,f<0){if(o>s)return;o>c&&(c=o)}else if(f>0){if(o0)){if(o/=d,d<0){if(o0){if(o>s)return;o>c&&(c=o)}if(o=r-l,d||!(o<0)){if(o/=d,d<0){if(o>s)return;o>c&&(c=o)}else if(d>0){if(o0&&(t[0]=u+c*f,t[1]=l+c*d),s<1&&(e[0]=u+s*f,e[1]=l+s*d),!0}}}}}var De=1e9,we=-De;function Ie(t,n,a,i){function r(e,r){return t<=e&&e<=a&&n<=r&&r<=i}function u(e,r,o,u){var c=0,f=0;if(null==e||(c=l(e,o))!==(f=l(r,o))||s(e,r)<0^o>0)do{u.point(0===c||3===c?t:a,c>1?i:n)}while((c=(c+o+4)%4)!==f);else u.point(r[0],r[1])}function l(e,i){return p(e[0]-t)0?0:3:p(e[0]-a)0?2:1:p(e[1]-n)0?1:0:i>0?3:2}function c(t,e){return s(t.x,e.x)}function s(t,e){var n=l(t,1),a=l(e,1);return n!==a?n-a:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var l,s,f,d,h,p,g,v,y,_,m,x=o,T=se(),b={point:E,lineStart:D,lineEnd:w,polygonStart:S,polygonEnd:O};function E(t,e){r(t,e)&&x.point(t,e)}function A(){for(var e=0,n=0,a=s.length;ni&&(d-r)*(i-o)>(h-o)*(t-r)&&++e:h<=i&&(d-r)*(i-o)<(h-o)*(t-r)&&--e;return e}function S(){x=T,l=[],s=[],m=!0}function O(){var t=A(),n=m&&t,a=(l=e.merge(l)).length;(n||a)&&(o.polygonStart(),n&&(o.lineStart(),u(null,null,1,o),o.lineEnd()),a&&he(l,c,t,u,o),o.polygonEnd()),x=o,l=s=f=null}function D(){b.point=I,s&&s.push(f=[]),_=!0,y=!1,g=v=NaN}function w(){l&&(I(d,h),p&&y&&T.rejoin(),l.push(T.result())),b.point=E,y&&x.lineEnd()}function I(e,o){var u=r(e,o);if(s&&f.push([e,o]),_)d=e,h=o,p=u,_=!1,u&&(x.lineStart(),x.point(e,o));else if(u&&y)x.point(e,o);else{var l=[g=Math.max(we,Math.min(De,g)),v=Math.max(we,Math.min(De,v))],c=[e=Math.max(we,Math.min(De,e)),o=Math.max(we,Math.min(De,o))];Oe(l,c,t,n,a,i)?(y||(x.lineStart(),x.point(l[0],l[1])),x.point(c[0],c[1]),u||x.lineEnd(),m=!1):u&&(x.lineStart(),x.point(e,o),m=!1)}g=e,v=o,y=u}return b}}function Pe(){var t,e,n,a=0,i=0,r=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Ie(a,i,r,o)(e=n)},extent:function(u){return arguments.length?(a=+u[0][0],i=+u[0][1],r=+u[1][0],o=+u[1][1],t=e=null,n):[[a,i],[r,o]]}}}var ke,Le,Me,Re=n(),Ne={sphere:I,point:I,lineStart:Ce,lineEnd:I,polygonStart:I,polygonEnd:I};function Ce(){Ne.point=Ge,Ne.lineEnd=He}function He(){Ne.point=Ne.lineEnd=I}function Ge(t,e){ke=t*=h,Le=b(e*=h),Me=y(e),Ne.point=Ve}function Ve(t,e){t*=h;var n=b(e*=h),a=y(e),i=p(t-ke),r=y(i),o=a*b(i),u=Me*n-Le*a*r,l=Le*n+Me*a*r;Re.add(v(A(o*o+u*u),l)),ke=t,Le=n,Me=a}function Fe(t){return Re.reset(),N(t,Ne),+Re}var je=[null,null],Xe={type:"LineString",coordinates:je};function Ye(t,e){return je[0]=t,je[1]=e,Fe(Xe)}var Ue={Feature:function(t,e){return Be(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,a=-1,i=n.length;++a0&&(i=Ye(t[r],t[r-1]))>0&&n<=i&&a<=i&&(n+a-i)*(1-Math.pow((n-a)/i,2))o})).map(s)).concat(e.range(_(u/v)*v,r,v).filter((function(t){return p(t%m)>o})).map(f))}return T.lines=function(){return b().map((function(t){return{type:"LineString",coordinates:t}}))},T.outline=function(){return{type:"Polygon",coordinates:[d(i).concat(h(l).slice(1),d(a).reverse().slice(1),h(c).reverse().slice(1))]}},T.extent=function(t){return arguments.length?T.extentMajor(t).extentMinor(t):T.extentMinor()},T.extentMajor=function(t){return arguments.length?(i=+t[0][0],a=+t[1][0],c=+t[0][1],l=+t[1][1],i>a&&(t=i,i=a,a=t),c>l&&(t=c,c=l,l=t),T.precision(x)):[[i,c],[a,l]]},T.extentMinor=function(e){return arguments.length?(n=+e[0][0],t=+e[1][0],u=+e[0][1],r=+e[1][1],n>t&&(e=n,n=t,t=e),u>r&&(e=u,u=r,r=e),T.precision(x)):[[n,u],[t,r]]},T.step=function(t){return arguments.length?T.stepMajor(t).stepMinor(t):T.stepMinor()},T.stepMajor=function(t){return arguments.length?(y=+t[0],m=+t[1],T):[y,m]},T.stepMinor=function(t){return arguments.length?(g=+t[0],v=+t[1],T):[g,v]},T.precision=function(e){return arguments.length?(x=+e,s=$e(u,r,90),f=tn(n,t,x),d=$e(c,l,90),h=tn(i,a,x),T):x},T.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function nn(){return en()()}function an(t,e){var n=t[0]*h,a=t[1]*h,i=e[0]*h,r=e[1]*h,o=y(a),u=b(a),l=y(r),c=b(r),s=o*y(n),f=o*b(n),p=l*y(i),g=l*b(i),_=2*D(A(w(r-a)+o*l*w(i-n))),m=b(_),x=_?function(t){var e=b(t*=_)/m,n=b(_-t)/m,a=n*s+e*p,i=n*f+e*g,r=n*u+e*c;return[v(i,a)*d,v(r,A(a*a+i*i))*d]}:function(){return[n*d,a*d]};return x.distance=_,x}function rn(t){return t}var on,un,ln,cn,sn=n(),fn=n(),dn={point:I,lineStart:I,lineEnd:I,polygonStart:function(){dn.lineStart=hn,dn.lineEnd=vn},polygonEnd:function(){dn.lineStart=dn.lineEnd=dn.point=I,sn.add(p(fn)),fn.reset()},result:function(){var t=sn/2;return sn.reset(),t}};function hn(){dn.point=pn}function pn(t,e){dn.point=gn,on=ln=t,un=cn=e}function gn(t,e){fn.add(cn*t-ln*e),ln=t,cn=e}function vn(){gn(on,un)}var yn=1/0,_n=yn,mn=-yn,xn=mn,Tn={point:bn,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var t=[[yn,_n],[mn,xn]];return mn=xn=-(_n=yn=1/0),t}};function bn(t,e){tmn&&(mn=t),e<_n&&(_n=e),e>xn&&(xn=e)}var En,An,Sn,On,Dn=0,wn=0,In=0,Pn=0,kn=0,Ln=0,Mn=0,Rn=0,Nn=0,Cn={point:Hn,lineStart:Gn,lineEnd:jn,polygonStart:function(){Cn.lineStart=Xn,Cn.lineEnd=Yn},polygonEnd:function(){Cn.point=Hn,Cn.lineStart=Gn,Cn.lineEnd=jn},result:function(){var t=Nn?[Mn/Nn,Rn/Nn]:Ln?[Pn/Ln,kn/Ln]:In?[Dn/In,wn/In]:[NaN,NaN];return Dn=wn=In=Pn=kn=Ln=Mn=Rn=Nn=0,t}};function Hn(t,e){Dn+=t,wn+=e,++In}function Gn(){Cn.point=Vn}function Vn(t,e){Cn.point=Fn,Hn(Sn=t,On=e)}function Fn(t,e){var n=t-Sn,a=e-On,i=A(n*n+a*a);Pn+=i*(Sn+t)/2,kn+=i*(On+e)/2,Ln+=i,Hn(Sn=t,On=e)}function jn(){Cn.point=Hn}function Xn(){Cn.point=Un}function Yn(){Wn(En,An)}function Un(t,e){Cn.point=Wn,Hn(En=Sn=t,An=On=e)}function Wn(t,e){var n=t-Sn,a=e-On,i=A(n*n+a*a);Pn+=i*(Sn+t)/2,kn+=i*(On+e)/2,Ln+=i,Mn+=(i=On*t-Sn*e)*(Sn+t),Rn+=i*(On+e),Nn+=3*i,Hn(Sn=t,On=e)}function Bn(t){this._context=t}Bn.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,f)}},result:I};var zn,Kn,qn,Jn,Qn,Zn=n(),$n={point:I,lineStart:function(){$n.point=ta},lineEnd:function(){zn&&ea(Kn,qn),$n.point=I},polygonStart:function(){zn=!0},polygonEnd:function(){zn=null},result:function(){var t=+Zn;return Zn.reset(),t}};function ta(t,e){$n.point=ea,Kn=Jn=t,qn=Qn=e}function ea(t,e){Jn-=t,Qn-=e,Zn.add(A(Jn*Jn+Qn*Qn)),Jn=t,Qn=e}function na(){this._string=[]}function aa(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function ia(t,e){var n,a,i=4.5;function r(t){return t&&("function"==typeof i&&a.pointRadius(+i.apply(this,arguments)),N(t,n(a))),a.result()}return r.area=function(t){return N(t,n(dn)),dn.result()},r.measure=function(t){return N(t,n($n)),$n.result()},r.bounds=function(t){return N(t,n(Tn)),Tn.result()},r.centroid=function(t){return N(t,n(Cn)),Cn.result()},r.projection=function(e){return arguments.length?(n=null==e?(t=null,rn):(t=e).stream,r):t},r.context=function(t){return arguments.length?(a=null==t?(e=null,new na):new Bn(e=t),"function"!=typeof i&&a.pointRadius(i),r):e},r.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(a.pointRadius(+t),+t),r):i},r.projection(t).context(e)}function ra(t){return{stream:oa(t)}}function oa(t){return function(e){var n=new ua;for(var a in t)n[a]=t[a];return n.stream=e,n}}function ua(){}function la(t,e,n){var a=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=a&&t.clipExtent(null),N(n,t.stream(Tn)),e(Tn.result()),null!=a&&t.clipExtent(a),t}function ca(t,e,n){return la(t,(function(n){var a=e[1][0]-e[0][0],i=e[1][1]-e[0][1],r=Math.min(a/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(a-r*(n[1][0]+n[0][0]))/2,u=+e[0][1]+(i-r*(n[1][1]+n[0][1]))/2;t.scale(150*r).translate([o,u])}),n)}function sa(t,e,n){return ca(t,[[0,0],e],n)}function fa(t,e,n){return la(t,(function(n){var a=+e,i=a/(n[1][0]-n[0][0]),r=(a-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([r,o])}),n)}function da(t,e,n){return la(t,(function(n){var a=+e,i=a/(n[1][1]-n[0][1]),r=-i*n[0][0],o=(a-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([r,o])}),n)}na.prototype={_radius:4.5,_circle:aa(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=aa(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}},ua.prototype={constructor:ua,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var ha=16,pa=y(30*h);function ga(t,e){return+e?ya(t,e):va(t)}function va(t){return oa({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}function ya(t,e){function n(a,i,r,u,l,c,s,f,d,h,g,y,_,m){var x=s-a,T=f-i,b=x*x+T*T;if(b>4*e&&_--){var E=u+h,S=l+g,O=c+y,w=A(E*E+S*S+O*O),I=D(O/=w),P=p(p(O)-1)e||p((x*R+T*N)/b-.5)>.3||u*h+l*g+c*y2?t[2]%360*h:0,L()):[_*d,m*d,x*d]},P.angle=function(t){return arguments.length?(T=t%360*h,L()):T*d},P.reflectX=function(t){return arguments.length?(b=t?-1:1,L()):b<0},P.reflectY=function(t){return arguments.length?(E=t?-1:1,L()):E<0},P.precision=function(t){return arguments.length?(o=ga(u,I=t*t),M()):A(I)},P.fitExtent=function(t,e){return ca(P,t,e)},P.fitSize=function(t,e){return sa(P,t,e)},P.fitWidth=function(t,e){return fa(P,t,e)},P.fitHeight=function(t,e){return da(P,t,e)},function(){return e=t.apply(this,arguments),P.invert=e.invert&&k,L()}}function Aa(t){var e=0,n=l/3,a=Ea(t),i=a(e,n);return i.parallels=function(t){return arguments.length?a(e=t[0]*h,n=t[1]*h):[e*d,n*d]},i}function Sa(t){var e=y(t);function n(t,n){return[t*e,b(n)/e]}return n.invert=function(t,n){return[t/e,D(n*e)]},n}function Oa(t,e){var n=b(t),a=(n+b(e))/2;if(p(a)=.12&&i<.234&&a>=-.425&&a<-.214?l:i>=.166&&i<.234&&a>=-.214&&a<-.115?c:u).invert(t)},f.stream=function(n){return t&&e===n?t:t=Ia([u.stream(e=n),l.stream(n),c.stream(n)])},f.precision=function(t){return arguments.length?(u.precision(t),l.precision(t),c.precision(t),d()):u.precision()},f.scale=function(t){return arguments.length?(u.scale(t),l.scale(.35*t),c.scale(t),f.translate(u.translate())):u.scale()},f.translate=function(t){if(!arguments.length)return u.translate();var e=u.scale(),r=+t[0],f=+t[1];return n=u.translate(t).clipExtent([[r-.455*e,f-.238*e],[r+.455*e,f+.238*e]]).stream(s),a=l.translate([r-.307*e,f+.201*e]).clipExtent([[r-.425*e+o,f+.12*e+o],[r-.214*e-o,f+.234*e-o]]).stream(s),i=c.translate([r-.205*e,f+.212*e]).clipExtent([[r-.214*e+o,f+.166*e+o],[r-.115*e-o,f+.234*e-o]]).stream(s),d()},f.fitExtent=function(t,e){return ca(f,t,e)},f.fitSize=function(t,e){return sa(f,t,e)},f.fitWidth=function(t,e){return fa(f,t,e)},f.fitHeight=function(t,e){return da(f,t,e)},f.scale(1070)}function ka(t){return function(e,n){var a=y(e),i=y(n),r=t(a*i);return[r*i*b(e),r*b(n)]}}function La(t){return function(e,n){var a=A(e*e+n*n),i=t(a),r=b(i),o=y(i);return[v(e*r,a*o),D(a&&n*r/a)]}}var Ma=ka((function(t){return A(2/(1+t))}));function Ra(){return ba(Ma).scale(124.75).clipAngle(179.999)}Ma.invert=La((function(t){return 2*D(t/2)}));var Na=ka((function(t){return(t=O(t))&&t/b(t)}));function Ca(){return ba(Na).scale(79.4188).clipAngle(179.999)}function Ha(t,e){return[t,x(S((c+e)/2))]}function Ga(){return Va(Ha).scale(961/f)}function Va(t){var e,n,a,i=ba(t),r=i.center,o=i.scale,u=i.translate,c=i.clipExtent,s=null;function f(){var r=l*o(),u=i(oe(i.rotate()).invert([0,0]));return c(null==s?[[u[0]-r,u[1]-r],[u[0]+r,u[1]+r]]:t===Ha?[[Math.max(u[0]-r,s),e],[Math.min(u[0]+r,n),a]]:[[s,Math.max(u[1]-r,e)],[n,Math.min(u[1]+r,a)]])}return i.scale=function(t){return arguments.length?(o(t),f()):o()},i.translate=function(t){return arguments.length?(u(t),f()):u()},i.center=function(t){return arguments.length?(r(t),f()):r()},i.clipExtent=function(t){return arguments.length?(null==t?s=e=n=a=null:(s=+t[0][0],e=+t[0][1],n=+t[1][0],a=+t[1][1]),f()):null==s?null:[[s,e],[n,a]]},f()}function Fa(t){return S((c+t)/2)}function ja(t,e){var n=y(t),a=t===e?b(t):x(n/y(e))/x(Fa(e)/Fa(t)),i=n*T(Fa(t),a)/a;if(!a)return Ha;function r(t,e){i>0?e<-c+o&&(e=-c+o):e>c-o&&(e=c-o);var n=i/T(Fa(e),a);return[n*b(a*t),i-n*y(a*t)]}return r.invert=function(t,e){var n=i-e,r=E(a)*A(t*t+n*n),o=v(t,p(n))*E(n);return n*a<0&&(o-=l*E(t)*E(n)),[o/a,2*g(T(i/r,1/a))-c]},r}function Xa(){return Aa(ja).scale(109.5).parallels([30,30])}function Ya(t,e){return[t,e]}function Ua(){return ba(Ya).scale(152.63)}function Wa(t,e){var n=y(t),a=t===e?b(t):(n-y(e))/(e-t),i=n/a+t;if(p(a)2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)}$a.invert=function(t,e){for(var n,a=e,i=a*a,r=i*i*i,o=0;oo&&--i>0);return[t/(.8707+(r=a*a)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),a]},oi.invert=La(D),li.invert=La((function(t){return 2*g(t)})),si.invert=function(t,e){return[-e,2*g(m(t))-c]},t.geoAlbers=wa,t.geoAlbersUsa=Pa,t.geoArea=K,t.geoAzimuthalEqualArea=Ra,t.geoAzimuthalEqualAreaRaw=Ma,t.geoAzimuthalEquidistant=Ca,t.geoAzimuthalEquidistantRaw=Na,t.geoBounds=Ft,t.geoCentroid=Zt,t.geoCircle=ce,t.geoClipAntimeridian=Te,t.geoClipCircle=Se,t.geoClipExtent=Pe,t.geoClipRectangle=Ie,t.geoConicConformal=Xa,t.geoConicConformalRaw=ja,t.geoConicEqualArea=Da,t.geoConicEqualAreaRaw=Oa,t.geoConicEquidistant=Ba,t.geoConicEquidistantRaw=Wa,t.geoContains=Ze,t.geoDistance=Ye,t.geoEqualEarth=ti,t.geoEqualEarthRaw=$a,t.geoEquirectangular=Ua,t.geoEquirectangularRaw=Ya,t.geoGnomonic=ni,t.geoGnomonicRaw=ei,t.geoGraticule=en,t.geoGraticule10=nn,t.geoIdentity=ai,t.geoInterpolate=an,t.geoLength=Fe,t.geoMercator=Ga,t.geoMercatorRaw=Ha,t.geoNaturalEarth1=ri,t.geoNaturalEarth1Raw=ii,t.geoOrthographic=ui,t.geoOrthographicRaw=oi,t.geoPath=ia,t.geoProjection=ba,t.geoProjectionMutator=Ea,t.geoRotation=oe,t.geoStereographic=ci,t.geoStereographicRaw=li,t.geoStream=N,t.geoTransform=ra,t.geoTransverseMercator=fi,t.geoTransverseMercatorRaw=si,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(47212))},31888:function(t,e){!function(t){"use strict";function e(t,e){return t.parent===e.parent?1:2}function n(t){return t.reduce(a,0)/t.length}function a(t,e){return t+e.x}function i(t){return 1+t.reduce(r,0)}function r(t,e){return Math.max(t,e.y)}function o(t){for(var e;e=t.children;)t=e[0];return t}function u(t){for(var e;e=t.children;)t=e[e.length-1];return t}function l(){var t=e,a=1,r=1,l=!1;function c(e){var c,s=0;e.eachAfter((function(e){var a=e.children;a?(e.x=n(a),e.y=i(a)):(e.x=c?s+=t(e,c):0,e.y=0,c=e)}));var f=o(e),d=u(e),h=f.x-t(f,d)/2,p=d.x+t(d,f)/2;return e.eachAfter(l?function(t){t.x=(t.x-e.x)*a,t.y=(e.y-t.y)*r}:function(t){t.x=(t.x-h)/(p-h)*a,t.y=(1-(e.y?t.y/e.y:1))*r})}return c.separation=function(e){return arguments.length?(t=e,c):t},c.size=function(t){return arguments.length?(l=!1,a=+t[0],r=+t[1],c):l?null:[a,r]},c.nodeSize=function(t){return arguments.length?(l=!0,a=+t[0],r=+t[1],c):l?[a,r]:null},c}function c(t){var e=0,n=t.children,a=n&&n.length;if(a)for(;--a>=0;)e+=n[a].value;else e=1;t.value=e}function s(){return this.eachAfter(c)}function f(t){var e,n,a,i,r=this,o=[r];do{for(e=o.reverse(),o=[];r=e.pop();)if(t(r),n=r.children)for(a=0,i=n.length;a=0;--n)i.push(e[n]);return this}function h(t){for(var e,n,a,i=this,r=[i],o=[];i=r.pop();)if(o.push(i),e=i.children)for(n=0,a=e.length;n=0;)n+=a[i].value;e.value=n}))}function g(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))}function v(t){for(var e=this,n=y(e,t),a=[e];e!==n;)e=e.parent,a.push(e);for(var i=a.length;t!==n;)a.splice(i,0,t),t=t.parent;return a}function y(t,e){if(t===e)return t;var n=t.ancestors(),a=e.ancestors(),i=null;for(t=n.pop(),e=a.pop();t===e;)i=t,t=n.pop(),e=a.pop();return i}function _(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function m(){var t=[];return this.each((function(e){t.push(e)})),t}function x(){var t=[];return this.eachBefore((function(e){e.children||t.push(e)})),t}function T(){var t=this,e=[];return t.each((function(n){n!==t&&e.push({source:n.parent,target:n})})),e}function b(t,e){var n,a,i,r,o,u=new D(t),l=+t.value&&(u.value=t.value),c=[u];for(null==e&&(e=A);n=c.pop();)if(l&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),r=o-1;r>=0;--r)c.push(a=n.children[r]=new D(i[r])),a.parent=n,a.depth=n.depth+1;return u.eachBefore(O)}function E(){return b(this).eachBefore(S)}function A(t){return t.children}function S(t){t.data=t.data.data}function O(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function D(t){this.data=t,this.depth=this.height=0,this.parent=null}D.prototype=b.prototype={constructor:D,count:s,each:f,eachAfter:h,eachBefore:d,sum:p,sort:g,path:v,ancestors:_,descendants:m,leaves:x,links:T,copy:E};var w=Array.prototype.slice;function I(t){for(var e,n,a=t.length;a;)n=Math.random()*a--|0,e=t[a],t[a]=t[n],t[n]=e;return t}function P(t){for(var e,n,a=0,i=(t=I(w.call(t))).length,r=[];a0&&n*n>a*a+i*i}function R(t,e){for(var n=0;n(o*=o)?(a=(c+o-i)/(2*c),r=Math.sqrt(Math.max(0,o/c-a*a)),n.x=t.x-a*u-r*l,n.y=t.y-a*l+r*u):(a=(c+i-o)/(2*c),r=Math.sqrt(Math.max(0,i/c-a*a)),n.x=e.x+a*u-r*l,n.y=e.y+a*l+r*u)):(n.x=e.x+n.r,n.y=e.y)}function F(t,e){var n=t.r+e.r-1e-6,a=e.x-t.x,i=e.y-t.y;return n>0&&n*n>a*a+i*i}function j(t){var e=t._,n=t.next._,a=e.r+n.r,i=(e.x*n.r+n.x*e.r)/a,r=(e.y*n.r+n.y*e.r)/a;return i*i+r*r}function X(t){this._=t,this.next=null,this.previous=null}function Y(t){if(!(i=t.length))return 0;var e,n,a,i,r,o,u,l,c,s,f;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;V(n,e,a=t[2]),e=new X(e),n=new X(n),a=new X(a),e.next=a.previous=n,n.next=e.previous=a,a.next=n.previous=e;t:for(u=3;u0)throw new Error("cycle");return r}return n.id=function(e){return arguments.length?(t=B(e),n):t},n.parentId=function(t){return arguments.length?(e=B(t),n):e},n}function ct(t,e){return t.parent===e.parent?1:2}function st(t){var e=t.children;return e?e[0]:t.t}function ft(t){var e=t.children;return e?e[e.length-1]:t.t}function dt(t,e,n){var a=n/(e.i-t.i);e.c-=a,e.s+=n,t.c+=a,e.z+=n,e.m+=n}function ht(t){for(var e,n=0,a=0,i=t.children,r=i.length;--r>=0;)(e=i[r]).z+=n,e.m+=n,n+=e.s+(a+=e.c)}function pt(t,e,n){return t.a.parent===e.parent?t.a:n}function gt(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function vt(t){for(var e,n,a,i,r,o=new gt(t,0),u=[o];e=u.pop();)if(a=e._.children)for(e.children=new Array(r=a.length),i=r-1;i>=0;--i)u.push(n=e.children[i]=new gt(a[i],i)),n.parent=e;return(o.parent=new gt(null,0)).children=[o],o}function yt(){var t=ct,e=1,n=1,a=null;function i(i){var u=vt(i);if(u.eachAfter(r),u.parent.m=-u.z,u.eachBefore(o),a)i.eachBefore(l);else{var c=i,s=i,f=i;i.eachBefore((function(t){t.xs.x&&(s=t),t.depth>f.depth&&(f=t)}));var d=c===s?1:t(c,s)/2,h=d-c.x,p=e/(s.x+d+h),g=n/(f.depth||1);i.eachBefore((function(t){t.x=(t.x+h)*p,t.y=t.depth*g}))}return i}function r(e){var n=e.children,a=e.parent.children,i=e.i?a[e.i-1]:null;if(n){ht(e);var r=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-r):e.z=r}else i&&(e.z=i.z+t(e._,i._));e.parent.A=u(e,i,e.parent.A||a[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function u(e,n,a){if(n){for(var i,r=e,o=e,u=n,l=r.parent.children[0],c=r.m,s=o.m,f=u.m,d=l.m;u=ft(u),r=st(r),u&&r;)l=st(l),(o=ft(o)).a=e,(i=u.z+f-r.z-c+t(u._,r._))>0&&(dt(pt(u,e,a),e,i),c+=i,s+=i),f+=u.m,c+=r.m,d+=l.m,s+=o.m;u&&!ft(o)&&(o.t=u,o.m+=f-s),r&&!st(l)&&(l.t=r,l.m+=c-d,a=e)}return a}function l(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(a=!1,e=+t[0],n=+t[1],i):a?null:[e,n]},i.nodeSize=function(t){return arguments.length?(a=!0,e=+t[0],n=+t[1],i):a?[e,n]:null},i}function _t(t,e,n,a,i){for(var r,o=t.children,u=-1,l=o.length,c=t.value&&(i-n)/t.value;++ud&&(d=u),v=s*s*g,(h=Math.max(d/v,v/f))>p){s-=u;break}p=h}y.push(o={value:s,dice:l1?e:1)},n}(mt);function bt(){var t=Tt,e=!1,n=1,a=1,i=[0],r=z,o=z,u=z,l=z,c=z;function s(t){return t.x0=t.y0=0,t.x1=n,t.y1=a,t.eachBefore(f),i=[0],e&&t.eachBefore(tt),t}function f(e){var n=i[e.depth],a=e.x0+n,s=e.y0+n,f=e.x1-n,d=e.y1-n;f=e-1){var l=u[t];return l.x0=a,l.y0=i,l.x1=r,void(l.y1=o)}for(var f=c[t],d=n/2+f,h=t+1,p=e-1;h>>1;c[g]o-i){var _=(a*y+r*v)/n;s(t,h,v,a,i,_,o),s(h,e,y,_,i,r,o)}else{var m=(i*y+o*v)/n;s(t,h,v,a,i,r,m),s(h,e,y,a,m,r,o)}}s(0,l,t.value,e,n,a,i)}function At(t,e,n,a,i){(1&t.depth?_t:et)(t,e,n,a,i)}var St=function t(e){function n(t,n,a,i,r){if((o=t._squarify)&&o.ratio===e)for(var o,u,l,c,s,f=-1,d=o.length,h=t.value;++f1?e:1)},n}(mt);t.cluster=l,t.hierarchy=b,t.pack=J,t.packEnclose=P,t.packSiblings=U,t.partition=nt,t.stratify=lt,t.tree=yt,t.treemap=bt,t.treemapBinary=Et,t.treemapDice=et,t.treemapResquarify=St,t.treemapSlice=_t,t.treemapSliceDice=At,t.treemapSquarify=Tt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},55796:function(t,e,n){!function(t,e){"use strict";function n(t,e,n,a,i){var r=t*t,o=r*t;return((1-3*t+3*r-o)*e+(4-6*r+3*o)*n+(1+3*t+3*r-3*o)*a+o*i)/6}function a(t){var e=t.length-1;return function(a){var i=a<=0?a=0:a>=1?(a=1,e-1):Math.floor(a*e),r=t[i],o=t[i+1],u=i>0?t[i-1]:2*r-o,l=i180||n<-180?n-360*Math.round(n/360):n):r(isNaN(t)?e:t)}function c(t){return 1==(t=+t)?s:function(e,n){return n-e?u(e,n,t):r(isNaN(e)?n:e)}}function s(t,e){var n=e-t;return n?o(t,n):r(isNaN(t)?e:t)}var f=function t(n){var a=c(n);function i(t,n){var i=a((t=e.rgb(t)).r,(n=e.rgb(n)).r),r=a(t.g,n.g),o=a(t.b,n.b),u=s(t.opacity,n.opacity);return function(e){return t.r=i(e),t.g=r(e),t.b=o(e),t.opacity=u(e),t+""}}return i.gamma=t,i}(1);function d(t){return function(n){var a,i,r=n.length,o=new Array(r),u=new Array(r),l=new Array(r);for(a=0;ar&&(i=e.slice(r,i),u[o]?u[o]+=i:u[++o]=i),(n=n[0])===(a=a[0])?u[o]?u[o]+=a:u[++o]=a:(u[++o]=null,l.push({i:o,x:x(n,a)})),r=E.lastIndex;return r180?e+=360:e-t>180&&(t+=360),r.push({i:n.push(i(n)+"rotate(",null,a)-2,x:x(t,e)})):e&&n.push(i(n)+"rotate("+e+a)}function u(t,e,n,r){t!==e?r.push({i:n.push(i(n)+"skewX(",null,a)-2,x:x(t,e)}):e&&n.push(i(n)+"skewX("+e+a)}function l(t,e,n,a,r,o){if(t!==n||e!==a){var u=r.push(i(r)+"scale(",null,",",null,")");o.push({i:u-4,x:x(t,n)},{i:u-2,x:x(e,a)})}else 1===n&&1===a||r.push(i(r)+"scale("+n+","+a+")")}return function(e,n){var a=[],i=[];return e=t(e),n=t(n),r(e.translateX,e.translateY,n.translateX,n.translateY,a,i),o(e.rotate,n.rotate,a,i),u(e.skewX,n.skewX,a,i),l(e.scaleX,e.scaleY,n.scaleX,n.scaleY,a,i),e=n=null,function(t){for(var e,n=-1,r=i.length;++na)if(Math.abs(d*c-s*f)>a&&o){var p=i-u,g=r-l,v=c*c+s*s,y=p*p+g*g,_=Math.sqrt(v),m=Math.sqrt(h),x=o*Math.tan((e-Math.acos((v+h-y)/(2*_*m)))/2),T=x/m,b=x/_;Math.abs(T-1)>a&&(this._+="L"+(t+T*f)+","+(n+T*d)),this._+="A"+o+","+o+",0,0,"+ +(d*p>f*g)+","+(this._x1=t+b*c)+","+(this._y1=n+b*s)}else this._+="L"+(this._x1=t)+","+(this._y1=n)},arc:function(t,r,o,u,l,c){t=+t,r=+r,c=!!c;var s=(o=+o)*Math.cos(u),f=o*Math.sin(u),d=t+s,h=r+f,p=1^c,g=c?u-l:l-u;if(o<0)throw new Error("negative radius: "+o);null===this._x1?this._+="M"+d+","+h:(Math.abs(this._x1-d)>a||Math.abs(this._y1-h)>a)&&(this._+="L"+d+","+h),o&&(g<0&&(g=g%n+n),g>i?this._+="A"+o+","+o+",0,1,"+p+","+(t-s)+","+(r-f)+"A"+o+","+o+",0,1,"+p+","+(this._x1=d)+","+(this._y1=h):g>a&&(this._+="A"+o+","+o+",0,"+ +(g>=e)+","+p+","+(this._x1=t+o*Math.cos(l))+","+(this._y1=r+o*Math.sin(l))))},rect:function(t,e,n,a){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +a+"h"+-n+"Z"},toString:function(){return this._}},t.path=o,Object.defineProperty(t,"__esModule",{value:!0})}(e)},47516:function(t,e,n){!function(t,e,n,a,i,r,o){"use strict";function u(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function l(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var c=Array.prototype,s=c.map,f=c.slice,d={name:"implicit"};function h(){var t=e.map(),n=[],a=[],i=d;function r(e){var r=e+"",o=t.get(r);if(!o){if(i!==d)return i;t.set(r,o=n.push(e))}return a[(o-1)%a.length]}return r.domain=function(a){if(!arguments.length)return n.slice();n=[],t=e.map();for(var i,o,u=-1,l=a.length;++ua&&(e=n,n=a,a=e),function(t){return Math.max(n,Math.min(a,t))}}function E(t,e,n){var a=t[0],i=t[1],r=e[0],o=e[1];return i2?A:E,r=o=null,p}function p(e){return isNaN(e=+e)?n:(r||(r=i(u.map(t),l,c)))(t(d(e)))}return p.invert=function(n){return d(e((o||(o=i(l,u.map(t),a.interpolateNumber)))(n)))},p.domain=function(t){return arguments.length?(u=s.call(t,_),d===x||(d=b(u)),h()):u.slice()},p.range=function(t){return arguments.length?(l=f.call(t),h()):l.slice()},p.rangeRound=function(t){return l=f.call(t),c=a.interpolateRound,h()},p.clamp=function(t){return arguments.length?(d=t?b(u):x,p):d!==x},p.interpolate=function(t){return arguments.length?(c=t,h()):c},p.unknown=function(t){return arguments.length?(n=t,p):n},function(n,a){return t=n,e=a,h()}}function D(t,e){return O()(t,e)}function w(t,e,a,r){var o,u=n.tickStep(t,e,a);switch((r=i.formatSpecifier(null==r?",f":r)).type){case"s":var l=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(o=i.precisionPrefix(u,l))||(r.precision=o),i.formatPrefix(r,l);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(o=i.precisionRound(u,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=o-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(o=i.precisionFixed(u))||(r.precision=o-2*("%"===r.type))}return i.format(r)}function I(t){var e=t.domain;return t.ticks=function(t){var a=e();return n.ticks(a[0],a[a.length-1],null==t?10:t)},t.tickFormat=function(t,n){var a=e();return w(a[0],a[a.length-1],null==t?10:t,n)},t.nice=function(a){null==a&&(a=10);var i,r=e(),o=0,u=r.length-1,l=r[o],c=r[u];return c0?(l=Math.floor(l/i)*i,c=Math.ceil(c/i)*i,i=n.tickIncrement(l,c,a)):i<0&&(l=Math.ceil(l*i)/i,c=Math.floor(c*i)/i,i=n.tickIncrement(l,c,a)),i>0?(r[o]=Math.floor(l/i)*i,r[u]=Math.ceil(c/i)*i,e(r)):i<0&&(r[o]=Math.ceil(l*i)/i,r[u]=Math.floor(c*i)/i,e(r)),t},t}function P(){var t=D(x,x);return t.copy=function(){return S(t,P())},u.apply(t,arguments),I(t)}function k(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=s.call(e,_),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return k(t).unknown(e)},t=arguments.length?s.call(t,_):[0,1],I(n)}function L(t,e){var n,a=0,i=(t=t.slice()).length-1,r=t[a],o=t[i];return o0){for(;hc)break;v.push(d)}}else for(;h=1;--f)if(!((d=s*f)c)break;v.push(d)}}else v=n.ticks(h,p,Math.min(p-h,g)).map(a);return i?v.reverse():v},r.tickFormat=function(t,n){if(null==n&&(n=10===u?".0e":","),"function"!=typeof n&&(n=i.format(n)),t===1/0)return n;null==t&&(t=10);var o=Math.max(1,u*t/r.ticks().length);return function(t){var i=t/a(Math.round(e(t)));return i*u0?i[n-1]:e[0],n=i?[r[i-1],a]:[r[n-1],r[n]]},l.unknown=function(e){return arguments.length?(t=e,l):l},l.thresholds=function(){return r.slice()},l.copy=function(){return tt().domain([e,a]).range(o).unknown(t)},u.apply(I(l),arguments)}function et(){var t,e=[.5],a=[0,1],i=1;function r(r){return r<=r?a[n.bisect(e,r,0,i)]:t}return r.domain=function(t){return arguments.length?(e=f.call(t),i=Math.min(e.length,a.length-1),r):e.slice()},r.range=function(t){return arguments.length?(a=f.call(t),i=Math.min(e.length,a.length-1),r):a.slice()},r.invertExtent=function(t){var n=a.indexOf(t);return[e[n-1],e[n]]},r.unknown=function(e){return arguments.length?(t=e,r):t},r.copy=function(){return et().domain(e).range(a).unknown(t)},u.apply(r,arguments)}var nt=1e3,at=60*nt,it=60*at,rt=24*it,ot=7*rt,ut=30*rt,lt=365*rt;function ct(t){return new Date(t)}function st(t){return t instanceof Date?+t:+new Date(+t)}function ft(t,e,a,i,r,o,u,l,c){var f=D(x,x),d=f.invert,h=f.domain,p=c(".%L"),g=c(":%S"),v=c("%I:%M"),y=c("%I %p"),_=c("%a %d"),m=c("%b %d"),T=c("%B"),b=c("%Y"),E=[[u,1,nt],[u,5,5*nt],[u,15,15*nt],[u,30,30*nt],[o,1,at],[o,5,5*at],[o,15,15*at],[o,30,30*at],[r,1,it],[r,3,3*it],[r,6,6*it],[r,12,12*it],[i,1,rt],[i,2,2*rt],[a,1,ot],[e,1,ut],[e,3,3*ut],[t,1,lt]];function A(n){return(u(n)=0&&"xmlns"!==(e=t.slice(0,a))&&(t=t.slice(a+1)),n.hasOwnProperty(e)?{space:n[e],local:t}:t}function i(t){return function(){var n=this.ownerDocument,a=this.namespaceURI;return a===e&&n.documentElement.namespaceURI===e?n.createElement(t):n.createElementNS(a,t)}}function r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function o(t){var e=a(t);return(e.local?r:i)(e)}function u(){}function l(t){return null==t?u:function(){return this.querySelector(t)}}function c(t){"function"!=typeof t&&(t=l(t));for(var e=this._groups,n=e.length,a=new Array(n),i=0;i=E&&(E=b+1);!(m=v[E])&&++E=0;)(a=i[r])&&(o&&4^a.compareDocumentPosition(o)&&o.parentNode.insertBefore(a,o),o=a);return this}function D(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=w);for(var n=this._groups,a=n.length,i=new Array(a),r=0;re?1:t>=e?0:NaN}function I(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function P(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t}function k(){for(var t=this._groups,e=0,n=t.length;e1?this.each((null==e?Y:"function"==typeof e?W:U)(t,e,null==n?"":n)):z(this.node(),t)}function z(t,e){return t.style.getPropertyValue(e)||X(t).getComputedStyle(t,null).getPropertyValue(e)}function K(t){return function(){delete this[t]}}function q(t,e){return function(){this[t]=e}}function J(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function Q(t,e){return arguments.length>1?this.each((null==e?K:"function"==typeof e?J:q)(t,e)):this.node()[t]}function Z(t){return t.trim().split(/^|\s+/)}function $(t){return t.classList||new tt(t)}function tt(t){this._node=t,this._names=Z(t.getAttribute("class")||"")}function et(t,e){for(var n=$(t),a=-1,i=e.length;++a=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var wt={};function It(t,e,n){return t=Pt(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function Pt(e,n,a){return function(i){var r=t.event;t.event=i;try{e.call(this,this.__data__,n,a)}finally{t.event=r}}}function kt(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function Lt(t){return function(){var e=this.__on;if(e){for(var n,a=0,i=-1,r=e.length;a1?0:t<-1?f:Math.acos(t)}function g(t){return t>=1?d:t<=-1?-d:Math.asin(t)}function v(t){return t.innerRadius}function y(t){return t.outerRadius}function _(t){return t.startAngle}function m(t){return t.endAngle}function x(t){return t&&t.padAngle}function T(t,e,n,a,i,r,o,u){var l=n-t,c=a-e,f=o-i,d=u-r,h=d*l-f*c;if(!(h*hL*L+M*M&&(O=w,D=I),{cx:O,cy:D,x01:-d,y01:-h,x11:O*(i/E-1),y11:D*(i/E-1)}}function E(){var t=v,o=y,E=n(0),A=null,S=_,O=m,D=x,w=null;function I(){var n,v,y=+t.apply(this,arguments),_=+o.apply(this,arguments),m=S.apply(this,arguments)-d,x=O.apply(this,arguments)-d,I=a(x-m),P=x>m;if(w||(w=n=e.path()),_s)if(I>h-s)w.moveTo(_*r(m),_*l(m)),w.arc(0,0,_,m,x,!P),y>s&&(w.moveTo(y*r(x),y*l(x)),w.arc(0,0,y,x,m,P));else{var k,L,M=m,R=x,N=m,C=x,H=I,G=I,V=D.apply(this,arguments)/2,F=V>s&&(A?+A.apply(this,arguments):c(y*y+_*_)),j=u(a(_-y)/2,+E.apply(this,arguments)),X=j,Y=j;if(F>s){var U=g(F/y*l(V)),W=g(F/_*l(V));(H-=2*U)>s?(N+=U*=P?1:-1,C-=U):(H=0,N=C=(m+x)/2),(G-=2*W)>s?(M+=W*=P?1:-1,R-=W):(G=0,M=R=(m+x)/2)}var B=_*r(M),z=_*l(M),K=y*r(C),q=y*l(C);if(j>s){var J,Q=_*r(R),Z=_*l(R),$=y*r(N),tt=y*l(N);if(Is?Y>s?(k=b($,tt,B,z,_,Y,P),L=b(Q,Z,K,q,_,Y,P),w.moveTo(k.cx+k.x01,k.cy+k.y01),Ys&&H>s?X>s?(k=b(K,q,Q,Z,y,-X,P),L=b(B,z,$,tt,y,-X,P),w.lineTo(k.cx+k.x01,k.cy+k.y01),X=f;--d)c.point(y[d],_[d]);c.lineEnd(),c.areaEnd()}v&&(y[s]=+t(h,s,n),_[s]=+i(h,s,n),c.point(a?+a(h,s,n):y[s],r?+r(h,s,n):_[s]))}if(p)return c=null,p+""||null}function f(){return w().defined(o).curve(l).context(u)}return s.x=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),a=null,s):t},s.x0=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),s):t},s.x1=function(t){return arguments.length?(a=null==t?null:"function"==typeof t?t:n(+t),s):a},s.y=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),r=null,s):i},s.y0=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),s):i},s.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:n(+t),s):r},s.lineX0=s.lineY0=function(){return f().x(t).y(i)},s.lineY1=function(){return f().x(t).y(r)},s.lineX1=function(){return f().x(a).y(i)},s.defined=function(t){return arguments.length?(o="function"==typeof t?t:n(!!t),s):o},s.curve=function(t){return arguments.length?(l=t,null!=u&&(c=l(u)),s):l},s.context=function(t){return arguments.length?(null==t?u=c=null:c=l(u=t),s):u},s}function P(t,e){return et?1:e>=t?0:NaN}function k(t){return t}function L(){var t=k,e=P,a=null,i=n(0),r=n(h),o=n(0);function u(n){var u,l,c,s,f,d=n.length,p=0,g=new Array(d),v=new Array(d),y=+i.apply(this,arguments),_=Math.min(h,Math.max(-h,r.apply(this,arguments)-y)),m=Math.min(Math.abs(_)/d,o.apply(this,arguments)),x=m*(_<0?-1:1);for(u=0;u0&&(p+=f);for(null!=e?g.sort((function(t,n){return e(v[t],v[n])})):null!=a&&g.sort((function(t,e){return a(n[t],n[e])})),u=0,c=p?(_-d*x)/p:0;u0?f*c:0)+x,v[l]={data:n[l],index:u,value:f,startAngle:y,endAngle:s,padAngle:m};return v}return u.value=function(e){return arguments.length?(t="function"==typeof e?e:n(+e),u):t},u.sortValues=function(t){return arguments.length?(e=t,a=null,u):e},u.sort=function(t){return arguments.length?(a=t,e=null,u):a},u.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:n(+t),u):i},u.endAngle=function(t){return arguments.length?(r="function"==typeof t?t:n(+t),u):r},u.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),u):o},u}A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}};var M=N(S);function R(t){this._curve=t}function N(t){function e(e){return new R(t(e))}return e._curve=t,e}function C(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(N(t)):e()._curve},t}function H(){return C(w().curve(M))}function G(){var t=I().curve(M),e=t.curve,n=t.lineX0,a=t.lineX1,i=t.lineY0,r=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return C(n())},delete t.lineX0,t.lineEndAngle=function(){return C(a())},delete t.lineX1,t.lineInnerRadius=function(){return C(i())},delete t.lineY0,t.lineOuterRadius=function(){return C(r())},delete t.lineY1,t.curve=function(t){return arguments.length?e(N(t)):e()._curve},t}function V(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}R.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};var F=Array.prototype.slice;function j(t){return t.source}function X(t){return t.target}function Y(t){var a=j,i=X,r=O,o=D,u=null;function l(){var n,l=F.call(arguments),c=a.apply(this,l),s=i.apply(this,l);if(u||(u=n=e.path()),t(u,+r.apply(this,(l[0]=c,l)),+o.apply(this,l),+r.apply(this,(l[0]=s,l)),+o.apply(this,l)),n)return u=null,n+""||null}return l.source=function(t){return arguments.length?(a=t,l):a},l.target=function(t){return arguments.length?(i=t,l):i},l.x=function(t){return arguments.length?(r="function"==typeof t?t:n(+t),l):r},l.y=function(t){return arguments.length?(o="function"==typeof t?t:n(+t),l):o},l.context=function(t){return arguments.length?(u=null==t?null:t,l):u},l}function U(t,e,n,a,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+a)/2,n,e,i,a,i)}function W(t,e,n,a,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,a,n,a,i)}function B(t,e,n,a,i){var r=V(e,n),o=V(e,n=(n+i)/2),u=V(a,n),l=V(a,i);t.moveTo(r[0],r[1]),t.bezierCurveTo(o[0],o[1],u[0],u[1],l[0],l[1])}function z(){return Y(U)}function K(){return Y(W)}function q(){var t=Y(B);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var J={draw:function(t,e){var n=Math.sqrt(e/f);t.moveTo(n,0),t.arc(0,0,n,0,h)}},Q={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},Z=Math.sqrt(1/3),$=2*Z,tt={draw:function(t,e){var n=Math.sqrt(e/$),a=n*Z;t.moveTo(0,-n),t.lineTo(a,0),t.lineTo(0,n),t.lineTo(-a,0),t.closePath()}},et=.8908130915292852,nt=Math.sin(f/10)/Math.sin(7*f/10),at=Math.sin(h/10)*nt,it=-Math.cos(h/10)*nt,rt={draw:function(t,e){var n=Math.sqrt(e*et),a=at*n,i=it*n;t.moveTo(0,-n),t.lineTo(a,i);for(var r=1;r<5;++r){var o=h*r/5,u=Math.cos(o),l=Math.sin(o);t.lineTo(l*n,-u*n),t.lineTo(u*a-l*i,l*a+u*i)}t.closePath()}},ot={draw:function(t,e){var n=Math.sqrt(e),a=-n/2;t.rect(a,a,n,n)}},ut=Math.sqrt(3),lt={draw:function(t,e){var n=-Math.sqrt(e/(3*ut));t.moveTo(0,2*n),t.lineTo(-ut*n,-n),t.lineTo(ut*n,-n),t.closePath()}},ct=-.5,st=Math.sqrt(3)/2,ft=1/Math.sqrt(12),dt=3*(ft/2+1),ht={draw:function(t,e){var n=Math.sqrt(e/dt),a=n/2,i=n*ft,r=a,o=n*ft+n,u=-r,l=o;t.moveTo(a,i),t.lineTo(r,o),t.lineTo(u,l),t.lineTo(ct*a-st*i,st*a+ct*i),t.lineTo(ct*r-st*o,st*r+ct*o),t.lineTo(ct*u-st*l,st*u+ct*l),t.lineTo(ct*a+st*i,ct*i-st*a),t.lineTo(ct*r+st*o,ct*o-st*r),t.lineTo(ct*u+st*l,ct*l-st*u),t.closePath()}},pt=[J,Q,tt,ot,rt,lt,ht];function gt(){var t=n(J),a=n(64),i=null;function r(){var n;if(i||(i=n=e.path()),t.apply(this,arguments).draw(i,+a.apply(this,arguments)),n)return i=null,n+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:n(e),r):t},r.size=function(t){return arguments.length?(a="function"==typeof t?t:n(+t),r):a},r.context=function(t){return arguments.length?(i=null==t?null:t,r):i},r}function vt(){}function yt(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function _t(t){this._context=t}function mt(t){return new _t(t)}function xt(t){this._context=t}function Tt(t){return new xt(t)}function bt(t){this._context=t}function Et(t){return new bt(t)}function At(t,e){this._basis=new _t(t),this._beta=e}_t.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:yt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},xt.prototype={areaStart:vt,areaEnd:vt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},bt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,a=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,a):this._context.moveTo(n,a);break;case 3:this._point=4;default:yt(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},At.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var a,i=t[0],r=e[0],o=t[n]-i,u=e[n]-r,l=-1;++l<=n;)a=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(i+a*o),this._beta*e[l]+(1-this._beta)*(r+a*u));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var St=function t(e){function n(t){return 1===e?new _t(t):new At(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function Ot(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function Dt(t,e){this._context=t,this._k=(1-e)/6}Dt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Ot(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:Ot(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var wt=function t(e){function n(t){return new Dt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function It(t,e){this._context=t,this._k=(1-e)/6}It.prototype={areaStart:vt,areaEnd:vt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Ot(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Pt=function t(e){function n(t){return new It(t,e)}return n.tension=function(e){return t(+e)},n}(0);function kt(t,e){this._context=t,this._k=(1-e)/6}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Ot(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Lt=function t(e){function n(t){return new kt(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Mt(t,e,n){var a=t._x1,i=t._y1,r=t._x2,o=t._y2;if(t._l01_a>s){var u=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);a=(a*u-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*u-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>s){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,f=3*t._l23_a*(t._l23_a+t._l12_a);r=(r*c+t._x1*t._l23_2a-e*t._l12_2a)/f,o=(o*c+t._y1*t._l23_2a-n*t._l12_2a)/f}t._context.bezierCurveTo(a,i,r,o,t._x2,t._y2)}function Rt(t,e){this._context=t,this._alpha=e}Rt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Mt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Nt=function t(e){function n(t){return e?new Rt(t,e):new Dt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ct(t,e){this._context=t,this._alpha=e}Ct.prototype={areaStart:vt,areaEnd:vt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Mt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Ht=function t(e){function n(t){return e?new Ct(t,e):new It(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Gt(t,e){this._context=t,this._alpha=e}Gt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var n=this._x2-t,a=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+a*a,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Mt(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};var Vt=function t(e){function n(t){return e?new Gt(t,e):new kt(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function Ft(t){this._context=t}function jt(t){return new Ft(t)}function Xt(t){return t<0?-1:1}function Yt(t,e,n){var a=t._x1-t._x0,i=e-t._x1,r=(t._y1-t._y0)/(a||i<0&&-0),o=(n-t._y1)/(i||a<0&&-0),u=(r*i+o*a)/(a+i);return(Xt(r)+Xt(o))*Math.min(Math.abs(r),Math.abs(o),.5*Math.abs(u))||0}function Ut(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Wt(t,e,n){var a=t._x0,i=t._y0,r=t._x1,o=t._y1,u=(r-a)/3;t._context.bezierCurveTo(a+u,i+u*e,r-u,o-u*n,r,o)}function Bt(t){this._context=t}function zt(t){this._context=new Kt(t)}function Kt(t){this._context=t}function qt(t){return new Bt(t)}function Jt(t){return new zt(t)}function Qt(t){this._context=t}function Zt(t){var e,n,a=t.length-1,i=new Array(a),r=new Array(a),o=new Array(a);for(i[0]=0,r[0]=2,o[0]=t[0]+2*t[1],e=1;e=0;--e)i[e]=(o[e]-i[e+1])/r[e];for(r[a-1]=(t[a]+i[a-1])/2,e=0;e1)for(var n,a,i,r=1,o=t[e[0]],u=o.length;r=0;)n[e]=e;return n}function oe(t,e){return t[e]}function ue(){var t=n([]),e=re,a=ie,i=oe;function r(n){var r,o,u=t.apply(this,arguments),l=n.length,c=u.length,s=new Array(c);for(r=0;r0){for(var n,a,i,r=0,o=t[0].length;r0)for(var n,a,i,r,o,u,l=0,c=t[e[0]].length;l0?(a[0]=r,a[1]=r+=i):i<0?(a[1]=o,a[0]=o+=i):(a[0]=0,a[1]=i)}function se(t,e){if((n=t.length)>0){for(var n,a=0,i=t[e[0]],r=i.length;a0&&(a=(n=t[e[0]]).length)>0){for(var n,a,i,r=0,o=1;or&&(r=e,a=n);return a}function pe(t){var e=t.map(ge);return re(t).sort((function(t,n){return e[t]-e[n]}))}function ge(t){for(var e,n=0,a=-1,i=t.length;++a=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}},t.arc=E,t.area=I,t.areaRadial=G,t.curveBasis=mt,t.curveBasisClosed=Tt,t.curveBasisOpen=Et,t.curveBundle=St,t.curveCardinal=wt,t.curveCardinalClosed=Pt,t.curveCardinalOpen=Lt,t.curveCatmullRom=Nt,t.curveCatmullRomClosed=Ht,t.curveCatmullRomOpen=Vt,t.curveLinear=S,t.curveLinearClosed=jt,t.curveMonotoneX=qt,t.curveMonotoneY=Jt,t.curveNatural=$t,t.curveStep=ee,t.curveStepAfter=ae,t.curveStepBefore=ne,t.line=w,t.lineRadial=H,t.linkHorizontal=z,t.linkRadial=q,t.linkVertical=K,t.pie=L,t.pointRadial=V,t.radialArea=G,t.radialLine=H,t.stack=ue,t.stackOffsetDiverging=ce,t.stackOffsetExpand=le,t.stackOffsetNone=ie,t.stackOffsetSilhouette=se,t.stackOffsetWiggle=fe,t.stackOrderAppearance=de,t.stackOrderAscending=pe,t.stackOrderDescending=ve,t.stackOrderInsideOut=ye,t.stackOrderNone=re,t.stackOrderReverse=_e,t.symbol=gt,t.symbolCircle=J,t.symbolCross=Q,t.symbolDiamond=tt,t.symbolSquare=ot,t.symbolStar=rt,t.symbolTriangle=lt,t.symbolWye=ht,t.symbols=pt,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(4562))},80768:function(t,e,n){!function(t,e){"use strict";function n(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function a(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function i(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function r(t){var r=t.dateTime,o=t.date,l=t.time,c=t.periods,s=t.days,f=t.shortDays,d=t.months,B=t.shortMonths,dt=h(c),At=p(c),St=h(s),Ot=p(s),Dt=h(f),wt=p(f),It=h(d),Pt=p(d),kt=h(B),Lt=p(B),Mt={a:zt,A:Kt,b:qt,B:Jt,c:null,d:N,e:N,f:F,g:Q,G:$,H:C,I:H,j:G,L:V,m:j,M:X,p:Qt,q:Zt,Q:bt,s:Et,S:Y,u:U,U:W,V:z,w:K,W:q,x:null,X:null,y:J,Y:Z,Z:tt,"%":Tt},Rt={a:$t,A:te,b:ee,B:ne,c:null,d:et,e:et,f:ot,g:yt,G:mt,H:nt,I:at,j:it,L:rt,m:ut,M:lt,p:ae,q:ie,Q:bt,s:Et,S:ct,u:st,U:ft,V:ht,w:pt,W:gt,x:null,X:null,y:vt,Y:_t,Z:xt,"%":Tt},Nt={a:Ft,A:jt,b:Xt,B:Yt,c:Ut,d:S,e:S,f:k,g:T,G:x,H:D,I:D,j:O,L:P,m:A,M:w,p:Vt,q:E,Q:M,s:R,S:I,u:v,U:y,V:_,w:g,W:m,x:Wt,X:Bt,y:T,Y:x,Z:b,"%":L};function Ct(t,e){return function(n){var a,i,r,o=[],l=-1,c=0,s=t.length;for(n instanceof Date||(n=new Date(+n));++l53)return null;"w"in c||(c.w=1),"Z"in c?(l=(u=a(i(c.y,0,1))).getUTCDay(),u=l>4||0===l?e.utcMonday.ceil(u):e.utcMonday(u),u=e.utcDay.offset(u,7*(c.V-1)),c.y=u.getUTCFullYear(),c.m=u.getUTCMonth(),c.d=u.getUTCDate()+(c.w+6)%7):(l=(u=n(i(c.y,0,1))).getDay(),u=l>4||0===l?e.timeMonday.ceil(u):e.timeMonday(u),u=e.timeDay.offset(u,7*(c.V-1)),c.y=u.getFullYear(),c.m=u.getMonth(),c.d=u.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:"W"in c?1:0),l="Z"in c?a(i(c.y,0,1)).getUTCDay():n(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,a(c)):n(c)}}function Gt(t,e,n,a){for(var i,r,o=0,l=e.length,c=n.length;o=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(r=Nt[i in u?e.charAt(o++):i])||(a=r(t,n,a))<0)return-1}else if(i!=n.charCodeAt(a++))return-1}return a}function Vt(t,e,n){var a=dt.exec(e.slice(n));return a?(t.p=At[a[0].toLowerCase()],n+a[0].length):-1}function Ft(t,e,n){var a=Dt.exec(e.slice(n));return a?(t.w=wt[a[0].toLowerCase()],n+a[0].length):-1}function jt(t,e,n){var a=St.exec(e.slice(n));return a?(t.w=Ot[a[0].toLowerCase()],n+a[0].length):-1}function Xt(t,e,n){var a=kt.exec(e.slice(n));return a?(t.m=Lt[a[0].toLowerCase()],n+a[0].length):-1}function Yt(t,e,n){var a=It.exec(e.slice(n));return a?(t.m=Pt[a[0].toLowerCase()],n+a[0].length):-1}function Ut(t,e,n){return Gt(t,r,e,n)}function Wt(t,e,n){return Gt(t,o,e,n)}function Bt(t,e,n){return Gt(t,l,e,n)}function zt(t){return f[t.getDay()]}function Kt(t){return s[t.getDay()]}function qt(t){return B[t.getMonth()]}function Jt(t){return d[t.getMonth()]}function Qt(t){return c[+(t.getHours()>=12)]}function Zt(t){return 1+~~(t.getMonth()/3)}function $t(t){return f[t.getUTCDay()]}function te(t){return s[t.getUTCDay()]}function ee(t){return B[t.getUTCMonth()]}function ne(t){return d[t.getUTCMonth()]}function ae(t){return c[+(t.getUTCHours()>=12)]}function ie(t){return 1+~~(t.getUTCMonth()/3)}return Mt.x=Ct(o,Mt),Mt.X=Ct(l,Mt),Mt.c=Ct(r,Mt),Rt.x=Ct(o,Rt),Rt.X=Ct(l,Rt),Rt.c=Ct(r,Rt),{format:function(t){var e=Ct(t+="",Mt);return e.toString=function(){return t},e},parse:function(t){var e=Ht(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=Ct(t+="",Rt);return e.toString=function(){return t},e},utcParse:function(t){var e=Ht(t+="",!0);return e.toString=function(){return t},e}}}var o,u={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,s=/[\\^$*+?|[\]().{}]/g;function f(t,e,n){var a=t<0?"-":"",i=(a?-t:t)+"",r=i.length;return a+(r68?1900:2e3),n+a[0].length):-1}function b(t,e,n){var a=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return a?(t.Z=a[1]?0:-(a[2]+(a[3]||"00")),n+a[0].length):-1}function E(t,e,n){var a=l.exec(e.slice(n,n+1));return a?(t.q=3*a[0]-3,n+a[0].length):-1}function A(t,e,n){var a=l.exec(e.slice(n,n+2));return a?(t.m=a[0]-1,n+a[0].length):-1}function S(t,e,n){var a=l.exec(e.slice(n,n+2));return a?(t.d=+a[0],n+a[0].length):-1}function O(t,e,n){var a=l.exec(e.slice(n,n+3));return a?(t.m=0,t.d=+a[0],n+a[0].length):-1}function D(t,e,n){var a=l.exec(e.slice(n,n+2));return a?(t.H=+a[0],n+a[0].length):-1}function w(t,e,n){var a=l.exec(e.slice(n,n+2));return a?(t.M=+a[0],n+a[0].length):-1}function I(t,e,n){var a=l.exec(e.slice(n,n+2));return a?(t.S=+a[0],n+a[0].length):-1}function P(t,e,n){var a=l.exec(e.slice(n,n+3));return a?(t.L=+a[0],n+a[0].length):-1}function k(t,e,n){var a=l.exec(e.slice(n,n+6));return a?(t.L=Math.floor(a[0]/1e3),n+a[0].length):-1}function L(t,e,n){var a=c.exec(e.slice(n,n+1));return a?n+a[0].length:-1}function M(t,e,n){var a=l.exec(e.slice(n));return a?(t.Q=+a[0],n+a[0].length):-1}function R(t,e,n){var a=l.exec(e.slice(n));return a?(t.s=+a[0],n+a[0].length):-1}function N(t,e){return f(t.getDate(),e,2)}function C(t,e){return f(t.getHours(),e,2)}function H(t,e){return f(t.getHours()%12||12,e,2)}function G(t,n){return f(1+e.timeDay.count(e.timeYear(t),t),n,3)}function V(t,e){return f(t.getMilliseconds(),e,3)}function F(t,e){return V(t,e)+"000"}function j(t,e){return f(t.getMonth()+1,e,2)}function X(t,e){return f(t.getMinutes(),e,2)}function Y(t,e){return f(t.getSeconds(),e,2)}function U(t){var e=t.getDay();return 0===e?7:e}function W(t,n){return f(e.timeSunday.count(e.timeYear(t)-1,t),n,2)}function B(t){var n=t.getDay();return n>=4||0===n?e.timeThursday(t):e.timeThursday.ceil(t)}function z(t,n){return t=B(t),f(e.timeThursday.count(e.timeYear(t),t)+(4===e.timeYear(t).getDay()),n,2)}function K(t){return t.getDay()}function q(t,n){return f(e.timeMonday.count(e.timeYear(t)-1,t),n,2)}function J(t,e){return f(t.getFullYear()%100,e,2)}function Q(t,e){return f((t=B(t)).getFullYear()%100,e,2)}function Z(t,e){return f(t.getFullYear()%1e4,e,4)}function $(t,n){var a=t.getDay();return f((t=a>=4||0===a?e.timeThursday(t):e.timeThursday.ceil(t)).getFullYear()%1e4,n,4)}function tt(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+f(e/60|0,"0",2)+f(e%60,"0",2)}function et(t,e){return f(t.getUTCDate(),e,2)}function nt(t,e){return f(t.getUTCHours(),e,2)}function at(t,e){return f(t.getUTCHours()%12||12,e,2)}function it(t,n){return f(1+e.utcDay.count(e.utcYear(t),t),n,3)}function rt(t,e){return f(t.getUTCMilliseconds(),e,3)}function ot(t,e){return rt(t,e)+"000"}function ut(t,e){return f(t.getUTCMonth()+1,e,2)}function lt(t,e){return f(t.getUTCMinutes(),e,2)}function ct(t,e){return f(t.getUTCSeconds(),e,2)}function st(t){var e=t.getUTCDay();return 0===e?7:e}function ft(t,n){return f(e.utcSunday.count(e.utcYear(t)-1,t),n,2)}function dt(t){var n=t.getUTCDay();return n>=4||0===n?e.utcThursday(t):e.utcThursday.ceil(t)}function ht(t,n){return t=dt(t),f(e.utcThursday.count(e.utcYear(t),t)+(4===e.utcYear(t).getUTCDay()),n,2)}function pt(t){return t.getUTCDay()}function gt(t,n){return f(e.utcMonday.count(e.utcYear(t)-1,t),n,2)}function vt(t,e){return f(t.getUTCFullYear()%100,e,2)}function yt(t,e){return f((t=dt(t)).getUTCFullYear()%100,e,2)}function _t(t,e){return f(t.getUTCFullYear()%1e4,e,4)}function mt(t,n){var a=t.getUTCDay();return f((t=a>=4||0===a?e.utcThursday(t):e.utcThursday.ceil(t)).getUTCFullYear()%1e4,n,4)}function xt(){return"+0000"}function Tt(){return"%"}function bt(t){return+t}function Et(t){return Math.floor(+t/1e3)}function At(e){return o=r(e),t.timeFormat=o.format,t.timeParse=o.parse,t.utcFormat=o.utcFormat,t.utcParse=o.utcParse,o}At({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var St="%Y-%m-%dT%H:%M:%S.%LZ";function Ot(t){return t.toISOString()}var Dt=Date.prototype.toISOString?Ot:t.utcFormat(St);function wt(t){var e=new Date(t);return isNaN(e)?null:e}var It=+new Date("2000-01-01T00:00:00.000Z")?wt:t.utcParse(St);t.isoFormat=Dt,t.isoParse=It,t.timeFormatDefaultLocale=At,t.timeFormatLocale=r,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(174))},174:function(t,e){!function(t){"use strict";var e=new Date,n=new Date;function a(t,i,r,o){function u(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return u.floor=function(e){return t(e=new Date(+e)),e},u.ceil=function(e){return t(e=new Date(e-1)),i(e,1),t(e),e},u.round=function(t){var e=u(t),n=u.ceil(t);return t-e0))return o;do{o.push(r=new Date(+e)),i(e,a),t(e)}while(r=n)for(;t(n),!e(n);)n.setTime(n-1)}),(function(t,n){if(t>=t)if(n<0)for(;++n<=0;)for(;i(t,-1),!e(t););else for(;--n>=0;)for(;i(t,1),!e(t););}))},r&&(u.count=function(a,i){return e.setTime(+a),n.setTime(+i),t(e),t(n),Math.floor(r(e,n))},u.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?u.filter(o?function(e){return o(e)%t==0}:function(e){return u.count(0,e)%t==0}):u:null}),u}var i=a((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?a((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):i:null};var r=i.range,o=1e3,u=6e4,l=36e5,c=864e5,s=6048e5,f=a((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+e*o)}),(function(t,e){return(e-t)/o}),(function(t){return t.getUTCSeconds()})),d=f.range,h=a((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*o)}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getMinutes()})),p=h.range,g=a((function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*o-t.getMinutes()*u)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getHours()})),v=g.range,y=a((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/c}),(function(t){return t.getDate()-1})),_=y.range;function m(t){return a((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*u)/s}))}var x=m(0),T=m(1),b=m(2),E=m(3),A=m(4),S=m(5),O=m(6),D=x.range,w=T.range,I=b.range,P=E.range,k=A.range,L=S.range,M=O.range,R=a((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),N=R.range,C=a((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));C.every=function(t){return isFinite(t=Math.floor(t))&&t>0?a((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var H=C.range,G=a((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+e*u)}),(function(t,e){return(e-t)/u}),(function(t){return t.getUTCMinutes()})),V=G.range,F=a((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+e*l)}),(function(t,e){return(e-t)/l}),(function(t){return t.getUTCHours()})),j=F.range,X=a((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/c}),(function(t){return t.getUTCDate()-1})),Y=X.range;function U(t){return a((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/s}))}var W=U(0),B=U(1),z=U(2),K=U(3),q=U(4),J=U(5),Q=U(6),Z=W.range,$=B.range,tt=z.range,et=K.range,nt=q.range,at=J.range,it=Q.range,rt=a((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),ot=rt.range,ut=a((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));ut.every=function(t){return isFinite(t=Math.floor(t))&&t>0?a((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var lt=ut.range;t.timeDay=y,t.timeDays=_,t.timeFriday=S,t.timeFridays=L,t.timeHour=g,t.timeHours=v,t.timeInterval=a,t.timeMillisecond=i,t.timeMilliseconds=r,t.timeMinute=h,t.timeMinutes=p,t.timeMonday=T,t.timeMondays=w,t.timeMonth=R,t.timeMonths=N,t.timeSaturday=O,t.timeSaturdays=M,t.timeSecond=f,t.timeSeconds=d,t.timeSunday=x,t.timeSundays=D,t.timeThursday=A,t.timeThursdays=k,t.timeTuesday=b,t.timeTuesdays=I,t.timeWednesday=E,t.timeWednesdays=P,t.timeWeek=x,t.timeWeeks=D,t.timeYear=C,t.timeYears=H,t.utcDay=X,t.utcDays=Y,t.utcFriday=J,t.utcFridays=at,t.utcHour=F,t.utcHours=j,t.utcMillisecond=i,t.utcMilliseconds=r,t.utcMinute=G,t.utcMinutes=V,t.utcMonday=B,t.utcMondays=$,t.utcMonth=rt,t.utcMonths=ot,t.utcSaturday=Q,t.utcSaturdays=it,t.utcSecond=f,t.utcSeconds=d,t.utcSunday=W,t.utcSundays=Z,t.utcThursday=q,t.utcThursdays=nt,t.utcTuesday=z,t.utcTuesdays=tt,t.utcWednesday=K,t.utcWednesdays=et,t.utcWeek=W,t.utcWeeks=Z,t.utcYear=ut,t.utcYears=lt,Object.defineProperty(t,"__esModule",{value:!0})}(e)},18844:function(t,e){!function(t){"use strict";var e,n,a=0,i=0,r=0,o=1e3,u=0,l=0,c=0,s="object"==typeof performance&&performance.now?performance:Date,f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function d(){return l||(f(h),l=s.now()+c)}function h(){l=0}function p(){this._call=this._time=this._next=null}function g(t,e,n){var a=new p;return a.restart(t,e,n),a}function v(){d(),++a;for(var t,n=e;n;)(t=l-n._time)>=0&&n._call.call(null,t),n=n._next;--a}function y(){l=(u=s.now())+c,a=i=0;try{v()}finally{a=0,m(),l=0}}function _(){var t=s.now(),e=t-u;e>o&&(c-=e,u=t)}function m(){for(var t,a,i=e,r=1/0;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(a=i._next,i._next=null,i=t?t._next=a:e=a);n=t,x(r)}function x(t){a||(i&&(i=clearTimeout(i)),t-l>24?(t<1/0&&(i=setTimeout(y,t-s.now()-c)),r&&(r=clearInterval(r))):(r||(u=s.now(),r=setInterval(_,o)),a=1,f(y)))}function T(t,e,n){var a=new p;return e=null==e?0:+e,a.restart((function(n){a.stop(),t(n+e)}),e,n),a}function b(t,e,n){var a=new p,i=e;return null==e?(a.restart(t,e,n),a):(e=+e,n=null==n?d():+n,a.restart((function r(o){o+=i,a.restart(r,i+=e,n),t(o)}),e,n),a)}p.prototype=g.prototype={constructor:p,restart:function(t,a,i){if("function"!=typeof t)throw new TypeError("callback is not a function");i=(null==i?d():+i)+(null==a?0:+a),this._next||n===this||(n?n._next=this:e=this,n=this),this._call=t,this._time=i,x()},stop:function(){this._call&&(this._call=null,this._time=1/0,x())}},t.interval=b,t.now=d,t.timeout=T,t.timer=g,t.timerFlush=v,Object.defineProperty(t,"__esModule",{value:!0})}(e)},44330:function(t,e,n){!function(t,e,n,a,i,r,o){"use strict";var u=n.dispatch("start","end","cancel","interrupt"),l=[],c=0,s=1,f=2,d=3,h=4,p=5,g=6;function v(t,e,n,a,i,r){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};x(t,n,{name:e,index:a,group:i,on:u,tween:l,time:r.time,delay:r.delay,duration:r.duration,ease:r.ease,timer:null,state:c})}function y(t,e){var n=m(t,e);if(n.state>c)throw new Error("too late; already scheduled");return n}function _(t,e){var n=m(t,e);if(n.state>d)throw new Error("too late; already running");return n}function m(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function x(t,e,n){var i,r=t.__transition;function o(t){n.state=s,n.timer.restart(u,n.delay,n.time),n.delay<=t&&u(t-n.delay)}function u(o){var p,v,y,_;if(n.state!==s)return c();for(p in r)if((_=r[p]).name===n.name){if(_.state===d)return a.timeout(u);_.state===h?(_.state=g,_.timer.stop(),_.on.call("interrupt",t,t.__data__,_.index,_.group),delete r[p]):+pf&&n.state=0&&(t=t.slice(0,e)),!t||"start"===t}))}function Q(t,e,n){var a,i,r=J(e)?y:_;return function(){var o=r(this,t),u=o.on;u!==a&&(i=(a=u).copy()).on(e,n),o.on=i}}function Z(t,e){var n=this._id;return arguments.length<2?m(this.node(),n).on.on(t):this.each(Q(n,t,e))}function $(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function tt(){return this.on("end.remove",$(this._id))}function et(t){var n=this._name,a=this._id;"function"!=typeof t&&(t=e.selector(t));for(var i=this._groups,r=i.length,o=new Array(r),u=0;us&&n.name===e)return new Et([[t]],Pt,e,+a);return null}t.active=kt,t.interrupt=T,t.transition=At,Object.defineProperty(t,"__esModule",{value:!0})}(e,n(37332),n(42332),n(18844),n(55796),n(76776),n(34496))},54783:function(t,e,n){"use strict";n.r(e),e.default={}},89986:function(t,e,n){"use strict";n.r(e),e.default={"clinical-lowlight-theme":"ExampleTemplate-module__clinical-lowlight-theme___rBbtD","orion-fusion-theme":"ExampleTemplate-module__orion-fusion-theme___GzA23",template:"ExampleTemplate-module__template___a4uPk",header:"ExampleTemplate-module__header___iFXV3",content:"ExampleTemplate-module__content___48m4Q",description:"ExampleTemplate-module__description___NwBJo",footer:"ExampleTemplate-module__footer___GpSoG","button-container":"ExampleTemplate-module__button-container___rAD11",css:"ExampleTemplate-module__css___+jtk1",code:"ExampleTemplate-module__code___7rC6C","css-toggle":"ExampleTemplate-module__css-toggle___chHK7","code-toggle":"ExampleTemplate-module__code-toggle___TGlE-","is-selected":"ExampleTemplate-module__is-selected___0BYwS",item:"ExampleTemplate-module__item___8FTQq",chevron:"ExampleTemplate-module__chevron___VbY7N",title:"ExampleTemplate-module__title___r+nbJ","dynamic-content":"ExampleTemplate-module__dynamic-content___k+1H7"}},49558:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=r(n(96540)),i=r(n(25365));function r(t){return t&&t.__esModule?t:{default:t}}function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function o(e){var t=e.components,n=m(e,d);return(0,r.mdx)("wrapper",i({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttSimpleConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttSimpleConfig"));\nvar _loadTracks = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/loadTracks"));\nvar _taskDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset1"));\nvar _taskDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset2"));\nvar _taskDataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset3"));\nvar _taskDataset4 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset4"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttSimpleConfig.default)(\'#simpleGantt\'));\nvar tasksData = [_utils.default.deepClone(_taskDataset.default), _utils.default.deepClone(_taskDataset2.default), _utils.default.deepClone(_taskDataset3.default), _utils.default.deepClone(_taskDataset4.default)];\nvar dataset = (0, _loadTracks.default)(tasksData, [], [], [], 4);\nvar SimpleGanttExample = function SimpleGanttExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simpleGantt"\n });\n};\nvar _default = exports.default = SimpleGanttExample;\n')))}o.isMDXComponent=!0;var u=n(201),s=n(42929),x=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(u.A,{title:t||"Simple Gantt",description:n,example:a.createElement(l.A,null),exampleCssSrc:a.createElement(s.A,null),exampleSrc:a.createElement(o,null),isExpanded:r})},N=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b={},h="wrapper";function f(e){var t=e.components,n=c(e,N);return(0,r.mdx)(h,g({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar getGanttSimpleConfig = function getGanttSimpleConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2018, 1, 1, 12).toISOString(),\n upperLimit: new Date(2019, 1, 1, 12).toISOString(),\n rangeRounding: true // If set to false, we don't extend the domain\n }\n },\n clickPassThrough: {\n task: false,\n activity: false,\n event: false,\n action: false,\n dateline: false\n },\n dateline: [{\n showDatelineIndicator: true,\n label: {\n display: 'DST Start'\n },\n color: '#405978',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.DIAMOND,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2018, 2, 10).toISOString()\n }, {\n showDatelineIndicator: true,\n label: {\n display: 'Current Date'\n },\n color: '#C97318',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2018, 8, 5).toISOString()\n }, {\n showDatelineIndicator: true,\n label: {\n display: 'DST End'\n },\n color: '#405978',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.DIAMOND,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2018, 10, 3).toISOString()\n }]\n };\n};\nvar _default = exports.default = getGanttSimpleConfig;\n")))}f.isMDXComponent=!0;var y=n(7927),C=n(72892),k=n(74581),v=n(3650),D=n(99925),S=["components"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var j={},P="wrapper";function T(e){var t=e.components,n=w(e,S);return(0,r.mdx)(P,O({},j,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"gantt-chart"},"Gantt Chart"),(0,r.mdx)("p",null,"A native Gantt Chart using D3 based on standard design patterns."),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#getting-started"},"Getting Started")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#usage"},"Usage")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-structure"},"Config Structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#configuration-properties"},"Config properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#axis"},"axis")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#actionlegend"},"actionLegend")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#clickpassthrough"},"clickPassThrough")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#legendpadding"},"legendPadding")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-structure"},"Dataset Structure")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dataset-properties"},"Dataset Properties"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#actions"},"actions")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#activities"},"activities")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#dimension"},"dimension")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#events"},"events")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#tasks"},"tasks")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#tracklabel"},"trackLabel")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#layering"},"Layering")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#constraints"},"Constraints")))),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("a",{parentName:"li",href:"#example"},"Example"))),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n\nvar ganttInstance = Carbon.api.gantt(/* config object*/);\nganttInstance.loadContent(/* data */);\n")),(0,r.mdx)("h2",{id:"configuration-structure"},"Configuration Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"const ganttConfig = {\n axis: {\n x: {\n lowerLimit: or ,\n upperLimit: or ,\n rangeRounding: ,\n show: ,\n ticks: \n }\n y: {\n lowerLimit: ,\n upperLimit: ,\n show: \n }\n },\n bindTo: ,\n actionLegend: {\n key: ,\n color: ,\n label: {\n display: \n },\n shape: \n },\n bindLegendTo: ,\n clickPassThrough:{\n actions: ,\n activities: ,\n events: ,\n datelines: ,\n tasks: \n }\n dateline: [],\n legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n locale: ,\n padding: {\n top: ,\n bottom: ,\n left: ,\n right: \n },\n pan: {\n enabled: \n },\n removeContainerPadding: ,\n showActionLegend: \n}\n")),(0,r.mdx)("h2",{id:"configuration-properties"},"Configuration Properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"axis"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#axis"},"axis"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bindTo"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"DOM ID to bind the graph container to.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"actionLegend"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"[ ]")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#actionlegend"},"actionLegend"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bindLegendTo"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"null")),(0,r.mdx)("td",{parentName:"tr",align:null},"ID of custom container to bind legend to (Example: ",(0,r.mdx)("inlineCode",{parentName:"td"},'"#legendContainer"'),").")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"clickPassThrough"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"null")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#clickpassthrough"},"clickpassthrough")," .")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"dateline"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"[ ]")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Dateline"},"Dateline"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"legendPadding"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ top: 4, bottom: 4, left: 8, right: 8 }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#legendpadding"},"legendPadding"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"locale"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"LOCALE.en_US")),(0,r.mdx)("td",{parentName:"tr",align:null},"Locale object for X-Axis tick values. See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Locale"},"Locale"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"padding"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ top: 10, bottom: 10, left: 30, right: 50 }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Padding"},"Padding"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"pan"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{enabled: false}")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Panning"},"Panning"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"removeContainerPadding"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"false"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to remove top and bottom padding of the container for the graph.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"showActionLegend"),(0,r.mdx)("td",{parentName:"tr",align:null},"boolean"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"true"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle to show graph legend .")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"axis"},(0,r.mdx)("inlineCode",{parentName:"h3"},"axis")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"}," The ",(0,r.mdx)("inlineCode",{parentName:"p"},"axis")," property contains two objects in the following structure:"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"},"axis: {\n x: {\n lowerLimit: or ,\n upperLimit: or ,\n rangeRounding: ,\n show: ,\n ticks: \n }\n y: {\n lowerLimit: ,\n upperLimit: ,\n show: \n }\n}\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"lowerLimit"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Lower bound for the axis (",(0,r.mdx)("inlineCode",{parentName:"td"},"x")," or ",(0,r.mdx)("inlineCode",{parentName:"td"},"y"),") This is inclusive.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"upperLimit"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"Upper bound for the axis (",(0,r.mdx)("inlineCode",{parentName:"td"},"x")," or ",(0,r.mdx)("inlineCode",{parentName:"td"},"y"),") This is inclusive.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"rangeRounding"),(0,r.mdx)("td",{parentName:"tr",align:null},"bool"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle for range rounding (x-axis only).")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"show"),(0,r.mdx)("td",{parentName:"tr",align:null},"bool"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"Toggle for showing the axis.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"ticks"),(0,r.mdx)("td",{parentName:"tr",align:null},"objects"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"../core-configuration/documentation/Ticks"},"Ticks")," (x-axis only).")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"actionlegend"},(0,r.mdx)("inlineCode",{parentName:"h3"},"actionLegend")),(0,r.mdx)("p",{parentName:"li"},"Loads the legend for ",(0,r.mdx)("inlineCode",{parentName:"p"},"actions"),". See ",(0,r.mdx)("a",{parentName:"p",href:"#actions"},"actions")," for more information."),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"Hovering over the legend item will blur other actions within the graph."),(0,r.mdx)("li",{parentName:"ul"},"Clicking on the legend item will remove the action from the graph.")),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," actionLegend: {\n key: \n color: ,\n label: {\n display: \n }\n shape: \n }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Unique id which represents the actions within the tracks.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLACK")),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the data point ",(0,r.mdx)("inlineCode",{parentName:"td"},"action"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},"Structure: ",(0,r.mdx)("inlineCode",{parentName:"td"},"{ display: }"),". String to display as the label for the ",(0,r.mdx)("inlineCode",{parentName:"td"},"action")," dataset.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"shape"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"SHAPES.DARK.CIRCLE")),(0,r.mdx)("td",{parentName:"tr",align:null},"Shape for representing the data points.")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"clickpassthrough"},(0,r.mdx)("inlineCode",{parentName:"h3"},"clickPassThrough")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"}," Toggle for various parts of the Gantt chart for allowing click events to elements below. It has the following structure. The default value for each item in the ",(0,r.mdx)("inlineCode",{parentName:"p"},"clickPassThrough")," object is ",(0,r.mdx)("inlineCode",{parentName:"p"},"false"),"."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," clickPassThrough: {\n actions: ,\n activities: ,\n events: ,\n datelines: \n tasks: ,\n }\n")),(0,r.mdx)("p",{parentName:"li"}," The following is a table of how ",(0,r.mdx)("inlineCode",{parentName:"p"},"clickPassThrough")," works with the ",(0,r.mdx)("inlineCode",{parentName:"p"},"onClick")," property."),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"th"},"clickPassThrough")," item Value"),(0,r.mdx)("th",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"th"},"onClick")," function"),(0,r.mdx)("th",{parentName:"tr",align:null},"Result"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"true")),(0,r.mdx)("td",{parentName:"tr",align:null},"defined"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"onClick")," function is executed and cursor pointer is visible top of the element.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"true")),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"The element beneath it is clickable. If the bottom element is selectable, then the cursor pointer is also visible.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"false")),(0,r.mdx)("td",{parentName:"tr",align:null},"defined"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"onClick")," function is executed and cursor pointer is visible top of the element.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"false")),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"No interaction upon mouse events.")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"legendpadding"},(0,r.mdx)("inlineCode",{parentName:"h3"},"legendPadding")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"}," Sets the legend padding and removes the carbon default margin of ",(0,r.mdx)("inlineCode",{parentName:"p"},"8px")," around legend."),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," legendPadding: {\n top: ,\n bottom: ,\n left: ,\n right: \n }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"top"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Top padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"bottom"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"4")),(0,r.mdx)("td",{parentName:"tr",align:null},"Bottom padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"left"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"8")),(0,r.mdx)("td",{parentName:"tr",align:null},"Left padding of legend container.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"right"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"8")),(0,r.mdx)("td",{parentName:"tr",align:null},"Right padding of legend container.")))))),(0,r.mdx)("h2",{id:"dataset-structure"},"Dataset Structure"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"const track = {\n key: ,\n trackLabel: {\n display: ,\n onClick: \n },\n action: {\n key: ,\n values: [],\n onClick: \n }\n activities: {\n key: ,\n startDate: ,\n endDate: ,\n color: ,\n duration: ,\n label: {\n display: \n },\n style: {\n isHashed: \n },\n },\n dimension: {\n trackHeight: \n },\n events: [\n {\n key: ,\n values: [],\n shape: ,\n color: ,\n duration: ,\n label: {\n display: \n },\n onClick: ,\n }\n ],\n tasks: [\n {\n key: ,\n startDate: ,\n endDate: ,\n color: ,\n duration: ,\n label: {\n display: \n },\n onClick: ,\n percentage: ,\n style: {\n isDotted: ,\n isHollow: ,\n isHashed: \n },\n }\n ]\n}\n")),(0,r.mdx)("h2",{id:"dataset-properties"},"Dataset Properties"),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"A unique ",(0,r.mdx)("inlineCode",{parentName:"td"},"id")," to identify the track.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"trackLabel"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#trackLabel"},"trackLabel"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"actions"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"[ ]")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#actions"},"actions"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"activities"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"[ ]")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#activities"},"activities"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"dimension"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#dimension"},"dimension"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"events"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#events"},"events"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking a datapoint, such as, to display a popup.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"loadAtIndex"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"null")),(0,r.mdx)("td",{parentName:"tr",align:null},"Index where the track needs to be loaded.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"tasks"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"[ ]")),(0,r.mdx)("td",{parentName:"tr",align:null},"See ",(0,r.mdx)("a",{parentName:"td",href:"#tasks"},"tasks"),".")))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"actions"},(0,r.mdx)("inlineCode",{parentName:"h3"},"actions")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," array"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"},"action: {\n key: ,\n values: [],\n onClick: \n}\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Unique id which needs to be same as ",(0,r.mdx)("inlineCode",{parentName:"td"},"key")," in ",(0,r.mdx)("inlineCode",{parentName:"td"},"actionLegend"))),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"values"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"List of string (ISO8601) where a data point ",(0,r.mdx)("inlineCode",{parentName:"td"},"action")," needs to be placed")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"conditionally required"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking a datapoint, such as, to display a popup.")))),(0,r.mdx)("p",{parentName:"li"},"If ",(0,r.mdx)("inlineCode",{parentName:"p"},"clickPassThrough.actions")," is ",(0,r.mdx)("inlineCode",{parentName:"p"},"true"),", ",(0,r.mdx)("inlineCode",{parentName:"p"},"onClick")," parameter would be required for any non-pass through operations."))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"activities"},(0,r.mdx)("inlineCode",{parentName:"h3"},"activities")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"},"An activity is a ",(0,r.mdx)("inlineCode",{parentName:"p"},"background-bar")," along the track. This represents the overall background process which may encapsulate one or more tasks."),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"An ",(0,r.mdx)("inlineCode",{parentName:"li"},"activity")," needs a start and end date."),(0,r.mdx)("li",{parentName:"ul"},"An ",(0,r.mdx)("inlineCode",{parentName:"li"},"activity")," will not be selectable."),(0,r.mdx)("li",{parentName:"ul"},"If start date is not provided, a ",(0,r.mdx)("inlineCode",{parentName:"li"},"duration")," needs to be provided."),(0,r.mdx)("li",{parentName:"ul"},"If end date is not provided, a ",(0,r.mdx)("inlineCode",{parentName:"li"},"duration")," needs to be provided."),(0,r.mdx)("li",{parentName:"ul"},"If start and end date are same then a fixed width ",(0,r.mdx)("inlineCode",{parentName:"li"},"chunk")," is created."),(0,r.mdx)("li",{parentName:"ul"},"Start and End date does not encapsulate the underlying tasks.")),(0,r.mdx)("p",{parentName:"li"},"An activity can be styled as follows:"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"A ",(0,r.mdx)("inlineCode",{parentName:"li"},"bar")," can be ",(0,r.mdx)("inlineCode",{parentName:"li"},"Hashed"),".")),(0,r.mdx)("p",{parentName:"li"},"The structure of an activity object is as follows:"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," activities: [\n {\n key: ,\n startDate: ,\n endDate: ,\n color: ,\n duration: ,\n label: {\n display: \n },\n style: {\n isHashed: \n },\n }\n ]\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Unique id which represents the activity.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"startDate"),(0,r.mdx)("td",{parentName:"tr",align:null},"Date"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Task start date or ",(0,r.mdx)("inlineCode",{parentName:"td"},"duration"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"endDate"),(0,r.mdx)("td",{parentName:"tr",align:null},"Date"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Task end date or ",(0,r.mdx)("inlineCode",{parentName:"td"},"duration"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLUE")),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the bar.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"duration"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function that returns a number that is relative to start or end date.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},"Structure: ",(0,r.mdx)("inlineCode",{parentName:"td"},"{ display: }"),". String to display as the label for the ",(0,r.mdx)("inlineCode",{parentName:"td"},"action")," dataset.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"style"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{isHashed: true}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Styling for the bar. Has a ",(0,r.mdx)("inlineCode",{parentName:"td"},"isHashed")," property that can be set to true or false.")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"dimension"},(0,r.mdx)("inlineCode",{parentName:"h3"},"dimension")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," dimension: {\n trackHeight: \n }\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"trackHeight"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"41")," (px)"),(0,r.mdx)("td",{parentName:"tr",align:null},"Sets the height for the gantt track content.")))))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"events"},(0,r.mdx)("inlineCode",{parentName:"h3"},"events")),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"},"events: [\n {\n key: ,\n values: [],\n shape: ,\n color: ,\n duration: ,\n label: {\n display: \n },\n onClick: ,\n }\n ]\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Unique id which represents the event.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"values"),(0,r.mdx)("td",{parentName:"tr",align:null},"array"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Array of string(ISO8601) where a data point ",(0,r.mdx)("inlineCode",{parentName:"td"},"event")," needs to be placed.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"shape"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"svg represented as json, which got transpiled from ",(0,r.mdx)("inlineCode",{parentName:"td"},"@cerner/svg-to-carbon"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLUE")),(0,r.mdx)("td",{parentName:"tr",align:null},"color of the data point.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},"To address a group of events.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"Function"),(0,r.mdx)("td",{parentName:"tr",align:null},"conditionally required"),(0,r.mdx)("td",{parentName:"tr",align:null},"undefined"),(0,r.mdx)("td",{parentName:"tr",align:null},"Any event that can be performed when clicking on the data point")))),(0,r.mdx)("p",{parentName:"li"},"If ",(0,r.mdx)("inlineCode",{parentName:"p"},"clickPassThrough.events")," is provided, ",(0,r.mdx)("inlineCode",{parentName:"p"},"onClick")," parameter would be required for any non-pass through operations."))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"tasks"},(0,r.mdx)("inlineCode",{parentName:"h3"},"tasks")),(0,r.mdx)("p",{parentName:"li"},(0,r.mdx)("strong",{parentName:"p"},"type:")," object"),(0,r.mdx)("p",{parentName:"li"},"A Task is a ",(0,r.mdx)("inlineCode",{parentName:"p"},"foreground-bar")," along the track. This represents a unit of work."),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"A ",(0,r.mdx)("inlineCode",{parentName:"li"},"task")," needs a start and end date."),(0,r.mdx)("li",{parentName:"ul"},"If start date is not provided, a ",(0,r.mdx)("inlineCode",{parentName:"li"},"duration")," needs to be provided."),(0,r.mdx)("li",{parentName:"ul"},"If end date is not provided, a ",(0,r.mdx)("inlineCode",{parentName:"li"},"duration")," needs to be provided."),(0,r.mdx)("li",{parentName:"ul"},"Providing a ",(0,r.mdx)("inlineCode",{parentName:"li"},"percentage")," transforms a ",(0,r.mdx)("inlineCode",{parentName:"li"},"bar")," into a Percentage Bar."),(0,r.mdx)("li",{parentName:"ul"},"If start and end date are same then a fixed width ",(0,r.mdx)("inlineCode",{parentName:"li"},"chunk")," is created.")),(0,r.mdx)("p",{parentName:"li"},"A task can be styled as follows:"),(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},"A ",(0,r.mdx)("inlineCode",{parentName:"li"},"bar")," can be ",(0,r.mdx)("inlineCode",{parentName:"li"},"Hollow"),"."),(0,r.mdx)("li",{parentName:"ul"},"A ",(0,r.mdx)("inlineCode",{parentName:"li"},"bar")," can be ",(0,r.mdx)("inlineCode",{parentName:"li"},"Dotted"),"."),(0,r.mdx)("li",{parentName:"ul"},"A ",(0,r.mdx)("inlineCode",{parentName:"li"},"bar")," can be ",(0,r.mdx)("inlineCode",{parentName:"li"},"Hashed"),".")),(0,r.mdx)("p",{parentName:"li"},"The structure of a task object is as follows:"),(0,r.mdx)("pre",{parentName:"li"},(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," tasks: [\n {\n key: ,\n startDate: ,\n endDate: ,\n color: ,\n duration: ,\n label: {\n display: \n },\n onClick: ,\n percentage: ,\n style: {\n isDotted: ,\n isHollow: ,\n isHashed: \n },\n }\n ]\n")),(0,r.mdx)("table",{parentName:"li"},(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"key"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Unique id which represents the task.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"startDate"),(0,r.mdx)("td",{parentName:"tr",align:null},"Date"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Task start date or ",(0,r.mdx)("inlineCode",{parentName:"td"},"duration"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"endDate"),(0,r.mdx)("td",{parentName:"tr",align:null},"Date"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Task end date or ",(0,r.mdx)("inlineCode",{parentName:"td"},"duration"),".")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"color"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"COLORS.BLUE")),(0,r.mdx)("td",{parentName:"tr",align:null},"Color for the bar.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"duration"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function that returns a number that is relative to start or end date.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"label"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{ }")),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"display")," property needs to be provided for label.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"conditionally required"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Any action that can be performed when clicking on the task")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"percentage"),(0,r.mdx)("td",{parentName:"tr",align:null},"number"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"null")),(0,r.mdx)("td",{parentName:"tr",align:null},"Transforms ",(0,r.mdx)("inlineCode",{parentName:"td"},"bar")," into Percentage bar and fill the bar with color opted for in ",(0,r.mdx)("inlineCode",{parentName:"td"},"color")," property.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"style"),(0,r.mdx)("td",{parentName:"tr",align:null},"object"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"{isDotted: true, isHollow: true, isHashed: true}")),(0,r.mdx)("td",{parentName:"tr",align:null},"Styling for ",(0,r.mdx)("inlineCode",{parentName:"td"},"bar"),". Has 3 bool props: ",(0,r.mdx)("inlineCode",{parentName:"td"},"isDotted"),", ",(0,r.mdx)("inlineCode",{parentName:"td"},"isHollow"),", ",(0,r.mdx)("inlineCode",{parentName:"td"},"isHashed"),".")))),(0,r.mdx)("p",{parentName:"li"},"If ",(0,r.mdx)("inlineCode",{parentName:"p"},"clickPassThrough.tasks")," is ",(0,r.mdx)("inlineCode",{parentName:"p"},"true"),", ",(0,r.mdx)("inlineCode",{parentName:"p"},"onClick")," parameter would be required for any non-pass through operations."))),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("h3",{parentName:"li",id:"tracklabel"},(0,r.mdx)("inlineCode",{parentName:"h3"},"trackLabel")),(0,r.mdx)("strong",{parentName:"li"},"type:")," object")),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-json"}," trackLabel: {\n display: ,\n onClick: \n }\n")),(0,r.mdx)("table",null,(0,r.mdx)("thead",{parentName:"table"},(0,r.mdx)("tr",{parentName:"thead"},(0,r.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,r.mdx)("th",{parentName:"tr",align:null},"Type"),(0,r.mdx)("th",{parentName:"tr",align:null},"Required"),(0,r.mdx)("th",{parentName:"tr",align:null},"Default"),(0,r.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,r.mdx)("tbody",{parentName:"table"},(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"display"),(0,r.mdx)("td",{parentName:"tr",align:null},"string"),(0,r.mdx)("td",{parentName:"tr",align:null},"yes"),(0,r.mdx)("td",{parentName:"tr",align:null},"-"),(0,r.mdx)("td",{parentName:"tr",align:null},"Track Label which forms the Gantt chart content.")),(0,r.mdx)("tr",{parentName:"tbody"},(0,r.mdx)("td",{parentName:"tr",align:null},"onClick"),(0,r.mdx)("td",{parentName:"tr",align:null},"function"),(0,r.mdx)("td",{parentName:"tr",align:null},"no"),(0,r.mdx)("td",{parentName:"tr",align:null},(0,r.mdx)("inlineCode",{parentName:"td"},"undefined")),(0,r.mdx)("td",{parentName:"tr",align:null},"Function to execute upon clicking the track label, such as to display a popup.")))),(0,r.mdx)("h3",{id:"layering"},"Layering"),(0,r.mdx)("p",null,"From top to bottom, this is how the layers of a Gantt Chart will be ordered:"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"Actions")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"Events")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"Tasks")),(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"Activities"))),(0,r.mdx)("h3",{id:"constraints"},"Constraints"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"If ganttContent's ",(0,r.mdx)("inlineCode",{parentName:"li"},"loadAtIndex")," is below ",(0,r.mdx)("inlineCode",{parentName:"li"},"0"),", an error is thrown"),(0,r.mdx)("li",{parentName:"ul"},"If ganttContent's ",(0,r.mdx)("inlineCode",{parentName:"li"},"loadAtIndex")," is equal to ",(0,r.mdx)("inlineCode",{parentName:"li"},"trackLength")," or exceeds ",(0,r.mdx)("inlineCode",{parentName:"li"},"trackLength")," it is inserted at the end."),(0,r.mdx)("li",{parentName:"ul"},"If ganttContent's ",(0,r.mdx)("inlineCode",{parentName:"li"},"loadAtIndex")," is in between ",(0,r.mdx)("inlineCode",{parentName:"li"},"0")," and ",(0,r.mdx)("inlineCode",{parentName:"li"},"trackLength"),", it is inserted in the middle.")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(x,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(f,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"task-dataset-1"},"Task Dataset 1"),(0,r.mdx)(y.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"task-dataset-2"},"Task Dataset 2"),(0,r.mdx)(C.A,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"task-dataset-3"},"Task Dataset 3"),(0,r.mdx)(k.A,{mdxType:"DataObject3"}),(0,r.mdx)("h4",{id:"task-dataset-4"},"Task Dataset 4"),(0,r.mdx)(v.A,{mdxType:"DataObject4"}),(0,r.mdx)("h3",{id:"load-track"},"Load Track"),(0,r.mdx)(D.A,{mdxType:"LoadTracks"})))}T.isMDXComponent=!0},7927:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},m="wrapper";function p(e){var t=e.components,n=d(e,r);return(0,a.mdx)(m,l({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar taskDataset1 = [{\n key: 'task1',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 3, 10).toISOString()\n}, {\n key: 'task2',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Broccoli'\n },\n startDate: new Date(2018, 8, 1).toISOString(),\n endDate: new Date(2018, 9, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset1;\n")))}p.isMDXComponent=!0},72892:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},m="wrapper";function p(e){var t=e.components,n=d(e,r);return(0,a.mdx)(m,l({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar taskDataset2 = [{\n key: \'task3\',\n onClick: _popup.loadTaskPopup,\n label: {\n display: \'Story Apex\'\n },\n startDate: new Date(2018, 3, 1).toISOString(),\n endDate: new Date(2018, 7, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset2;\n')))}p.isMDXComponent=!0},74581:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},m="wrapper";function p(e){var t=e.components,n=d(e,r);return(0,a.mdx)(m,l({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar taskDataset3 = [{\n key: 'task4',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Charming'\n },\n startDate: new Date(2018, 6, 1).toISOString(),\n endDate: new Date(2018, 7, 10).toISOString()\n}, {\n key: 'task5',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Broccoli'\n },\n startDate: new Date(2018, 10, 1).toISOString(),\n endDate: new Date(2018, 10, 1).toISOString()\n}];\nvar _default = exports.default = taskDataset3;\n")))}p.isMDXComponent=!0},3650:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},m="wrapper";function p(e){var t=e.components,n=d(e,r);return(0,a.mdx)(m,l({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar taskDataset4 = [{\n key: \'task6\',\n onClick: _popup.loadTaskPopup,\n label: {\n display: \'Story Apex\'\n },\n startDate: new Date(2018, 6, 1).toISOString(),\n endDate: new Date(2018, 9, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset4;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/34516-194aa88b863704e3e03f.js b/34516-194aa88b863704e3e03f.js new file mode 100644 index 000000000..ba34d0a11 --- /dev/null +++ b/34516-194aa88b863704e3e03f.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[34516],{80563:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r={key:"track 1",trackLabel:{display:"Project A",onClick:a.loadXAndYAxisLabelPopup},tasks:[{key:"task1",onClick:a.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,1,2,9).toISOString(),endDate:new Date(2018,1,2,19).toISOString()}]};t.default=r},50733:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=[new Date(2018,1,2,6).toISOString(),new Date(2018,1,2,12).toISOString(),new Date(2018,1,2,18).toISOString()],a=[new Date(2018,1,2,3).toISOString(),new Date(2018,1,2,9).toISOString(),new Date(2018,1,2,15).toISOString(),new Date(2018,1,2,21).toISOString()],r=[new Date(2018,1,2,0).toISOString(),new Date(2018,1,2,24).toISOString()];t.default=function(e){return{bindTo:e,axis:{x:{show:!0,lowerLimit:new Date(2018,1,1,23).toISOString(),upperLimit:new Date(2018,1,3,1).toISOString(),rangeRounding:!0,ticks:{format:"%H",lowerStepTickValues:n,midpointTickValues:a,upperStepTickValues:r}}},dateline:[]}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=c(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function c(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(c=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},s=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var c=[];o.forEach((function(e){c.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",c)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",u)}if(l&&l.length>0){var s=[];l.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",s)}},t.loadTaskPopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.label,i=a.display,l=a.y,p=a.startDate,c=a.endDate,s=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",u(p)),f(r,"End Date",u(c)),s&&f(r,"Percentage",s)},t.loadDatelinePopup=function(e,t){v();var n=g(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var i={id:o.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},7104:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),i=a(n(45839));n(40415);var l=a(n(29683)),p=a(n(50733)),c=a(n(80563)),u=i.default.deepClone((0,p.default)("#ganttDatetimeBucket")),s=[i.default.deepClone(c.default)];t.A=function(){return r.default.useEffect((function(){var e=o.default.api.gantt(u);s.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(l.default,{id:"ganttDatetimeBucket"})}},34516:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return T}});var a=n(96540),r=n(36665),o=n(7104),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c={};function u(e){var t=e.components,n=p(e,i);return(0,r.mdx)("wrapper",l({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttDatetimeBucketConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttDatetimeBucketConfig"));\nvar _dateTimeBucketData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/dateTimeBucketData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttDatetimeBucketConfig.default)(\'#ganttDatetimeBucket\'));\nvar dataset = [_utils.default.deepClone(_dateTimeBucketData.default)];\nvar GanttDatetimeBucketExample = function GanttDatetimeBucketExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "ganttDatetimeBucket"\n });\n};\nvar _default = exports.default = GanttDatetimeBucketExample;\n')))}u.isMDXComponent=!0;var s=n(201),d=n(42929),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(s.A,{title:t||"Datetime Bucket",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var y={},b="wrapper";function h(e){var t=e.components,n=v(e,m);return(0,r.mdx)(b,g({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar lowerStepTickValues = [new Date(2018, 1, 2, 6).toISOString(), new Date(2018, 1, 2, 12).toISOString(), new Date(2018, 1, 2, 18).toISOString()];\nvar midpointTickValues = [new Date(2018, 1, 2, 3).toISOString(), new Date(2018, 1, 2, 9).toISOString(), new Date(2018, 1, 2, 15).toISOString(), new Date(2018, 1, 2, 21).toISOString()];\nvar upperStepTickValues = [new Date(2018, 1, 2, 0).toISOString(), new Date(2018, 1, 2, 24).toISOString()];\nvar getGanttDatetimeBucketConfig = function getGanttDatetimeBucketConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2018, 1, 1, 23).toISOString(),\n upperLimit: new Date(2018, 1, 3, 1).toISOString(),\n rangeRounding: true,\n // If set to false, we don\'t extend the domain\n ticks: {\n format: \'%H\',\n lowerStepTickValues: lowerStepTickValues,\n midpointTickValues: midpointTickValues,\n upperStepTickValues: upperStepTickValues\n }\n }\n },\n dateline: []\n };\n};\nvar _default = exports.default = getGanttDatetimeBucketConfig;\n')))}h.isMDXComponent=!0;var x=["components"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var k={},w="wrapper";function S(e){var t=e.components,n=D(e,x);return(0,r.mdx)(w,O({},k,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar dateTimeBucketData = {\n key: 'track 1',\n trackLabel: {\n display: 'Project A',\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: [{\n key: 'task1',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 1, 2, 9).toISOString(),\n endDate: new Date(2018, 1, 2, 19).toISOString()\n }]\n};\nvar _default = exports.default = dateTimeBucketData;\n")))}S.isMDXComponent=!0;var j=["components"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var E={},C="wrapper";function T(e){var t=e.components,n=_(e,j);return(0,r.mdx)(C,P({},E,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-gantt"},"Simple Gantt"),(0,r.mdx)("p",null,"This is a simple Gantt chart with datetime formatted bucket."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(h,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(S,{mdxType:"DataObject"})))}T.isMDXComponent=!0},42929:function(e,t,n){"use strict";n.d(t,{A:function(){return c}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function c(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../colors.module';\n@import '../Variables.module';\n\n.carbon-y-axis-track-label {\n .tick > text {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n }\n}\n\n.carbon-data-task {\n cursor: pointer;\n\n &[aria-disabled='true'] {\n cursor: default;\n }\n}\n\n.carbon-data-track-group {\n .carbon-selected-data-point {\n @include terra-graph-selected-indicator-styles();\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n }\n}\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-track-selected-bar {\n display: block;\n fill-opacity: 0;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-selected='true'] {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n }\n}\n\n")))}c.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},40415:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/36557-d2666434bd3e38331dda.css b/36557-d2666434bd3e38331dda.css new file mode 100644 index 000000000..7a9d9a86c --- /dev/null +++ b/36557-d2666434bd3e38331dda.css @@ -0,0 +1,3 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/36557-d2666434bd3e38331dda.js b/36557-d2666434bd3e38331dda.js new file mode 100644 index 000000000..6926e0372 --- /dev/null +++ b/36557-d2666434bd3e38331dda.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[36557,47397,5170,82789],{43765:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(86006),i=a(n(61770)),l={key:"bubble_dynamic_panning_data",label:{display:"Bubble set A"},onClick:r.loadBubblePopup,color:i.default.helpers.COLORS.PINK,values:[{x:new Date(2016,0,1,12,0).toISOString(),y:70},{x:new Date(2016,0,1,15,45).toISOString(),y:120},{x:new Date(2016,0,1,10,30).toISOString(),y:160},{x:new Date(2016,0,1,18,0).toISOString(),y:180}],yAxis:"y",showShapes:!1};t.default=l},45836:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(86006),i=a(n(61770)),l={key:"bubble_dynamic_panning_data",label:{display:"Bubble set A"},onClick:r.loadBubblePopup,color:i.default.helpers.COLORS.PINK,values:[{x:new Date(2016,0,1,12,0).toISOString(),y:20},{x:new Date(2016,0,1,15,45).toISOString(),y:40},{x:new Date(2016,0,1,10,30).toISOString(),y:50},{x:new Date(2016,0,1,18,0).toISOString(),y:60}],yAxis:"y",showShapes:!1};t.default=l},72516:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Bubble",lowerLimit:10,upperLimit:250}},pan:{enabled:!0}}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var i=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var o=i?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(a,l,o):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),o=a(n(22639)),p=a(n(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var c=function(e){return new Date(e).toLocaleString()},s=function(e){return e?d(e)?c(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},b=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=p[o],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,i.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},o=0,p=Object.values(n);o0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),b(a,"Tasks",p)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),b(a,"Activities",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),b(a,"Events",c)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),b(a,"Actions",s)}},t.loadTaskPopup=function(e,t,n,a){g();var r=m(e).append("g"),i=a.label,l=a.display,o=a.y,p=a.startDate,u=a.endDate,s=a.percentage;i&&f(r,"Task Name",l),f(r,"Track",o),f(r,"Start Date",c(p)),f(r,"End Date",c(u)),s&&f(r,"Percentage",s)},t.loadDatelinePopup=function(e,t){g();var n=m(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",c(r))},t.loadTimelinePopup=function(e,t,n,a){g();var r=m(e).append("g"),i=a.x,l=(a.y,a.label),o=a.content;f(r,"X axis","".concat(d(i)?c(i):i)),f(r,"".concat(l.display),o)},t.loadPiePopup=function(e,t,n,a){g();var r=m(e).append("g"),i=a.label,l=a.value;f(r,i.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),i=a(n(5556));n(16939);var l={id:i.default.string.isRequired},o=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};o.propTypes=l;t.default=o},54298:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r,i=a(n(85715)),l=a(n(96540)),o=a(n(23986)),p=a(n(61770)),u=a(n(45839)),c=a(n(29683)),s=a(n(72516)),d=a(n(43765)),f=a(n(45836)),b={initial:0,factor:3},m=u.default.deepClone(d.default),g=u.default.deepClone((0,s.default)("#BubbleDynamicDataPanning"));t.A=function(){l.default.useEffect((function(){(r=p.default.api.graph(g)).loadContent(p.default.api.bubbleSingleDataset(m))}),[]);var e=l.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),b),t=(0,i.default)(e,2),n=t[0],a=t[1];return l.default.useLayoutEffect((function(){if(r){var e={panData:[f.default]};r.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),r.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString(),r.reflowMultipleDatasets(e)}}),[n.initial]),l.default.createElement(l.default.Fragment,null,l.default.createElement(o.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),l.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),l.default.createElement(c.default,{id:"BubbleDynamicDataPanning"}))}},32406:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return P}});var a=n(96540),r=n(36665),i=n(54298),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u={};function c(e){var t=e.components,n=p(e,l);return(0,r.mdx)("wrapper",o({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _simplePanningAxisData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bubble/simplePanningAxisData"));\nvar _bubbleDynamicPanningData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bubble/bubbleDynamicPanningData1.js"));\nvar _bubbleDynamicPanningData2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bubble/bubbleDynamicPanningData2.js"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar state = {\n initial: 0,\n factor: 3\n};\nvar dataset = _utils.default.deepClone(_bubbleDynamicPanningData.default);\nvar graphConfig = _utils.default.deepClone((0, _simplePanningAxisData.default)(\'#BubbleDynamicDataPanning\'));\nvar graph;\nvar BubblePanningExample = function BubblePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bubbleSingleDataset(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n var newDataset = {\n panData: [_bubbleDynamicPanningData2.default]\n };\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "BubbleDynamicDataPanning"\n }));\n};\nvar _default = exports.default = BubblePanningExample;\n')))}c.isMDXComponent=!0;var s=n(201),d=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(s.A,{title:t||"Dynamic Data",description:n,example:a.createElement(i.A,null),exampleSrc:a.createElement(c,null),isExpanded:r})},f=n(58594),b=["components"];function m(){return m=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var y={},v="wrapper";function h(e){var t=e.components,n=g(e,b);return(0,r.mdx)(v,m({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup.js");\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar bubbleDynamicPanningData = {\n key: \'bubble_dynamic_panning_data\',\n label: {\n display: \'Bubble set A\'\n },\n onClick: _popup.loadBubblePopup,\n color: _carbonGraphs.default.helpers.COLORS.PINK,\n values: [{\n x: new Date(2016, 0, 1, 12, 0).toISOString(),\n y: 70\n }, {\n x: new Date(2016, 0, 1, 15, 45).toISOString(),\n y: 120\n }, {\n x: new Date(2016, 0, 1, 10, 30).toISOString(),\n y: 160\n }, {\n x: new Date(2016, 0, 1, 18, 0).toISOString(),\n y: 180\n }],\n yAxis: \'y\',\n showShapes: false\n};\nvar _default = exports.default = bubbleDynamicPanningData;\n')))}h.isMDXComponent=!0;var x=["components"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var O={},S="wrapper";function P(e){var t=e.components,n=_(e,x);return(0,r.mdx)(S,D({},O,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"bubble-graph-panning---dynamic-data"},"Bubble Graph Panning - Dynamic data"),(0,r.mdx)("p",null,"This is a Bubble graph example that implements panning with dynamic data."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(d,{mdxType:"BubbleSingleDatasetExample"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(f.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"initial-dataset"},"Initial Dataset"),(0,r.mdx)(h,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"updated-dataset"},"Updated Dataset"),(0,r.mdx)(h,{mdxType:"DataObject2"})))}P.isMDXComponent=!0},58594:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},p="wrapper";function u(e){var t=e.components,n=l(e,r);return(0,a.mdx)(p,i({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getSimpleAxisData = function getSimpleAxisData(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Bubble\',\n lowerLimit: 10,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n }\n };\n};\nvar _default = exports.default = getSimpleAxisData;\n')))}u.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/36635-b8b055380efc94e2277a.js b/36635-b8b055380efc94e2277a.js new file mode 100644 index 000000000..a5c465359 --- /dev/null +++ b/36635-b8b055380efc94e2277a.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[36635],{44602:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),i=a(86006),l=a(74013),o={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:i.loadPopup,values:(0,l.createGraphValuesWithSin)({length:20,initialX:85,xModifier:10,yModifier:Math.PI})};o.values[1].isCritical=!0,o.values[11].isCritical=!0;t.default=o},76184:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),i=a(86006),l=a(74013),o={key:"uid_3",label:{display:"Data Label 3"},shape:r.default.helpers.SHAPES.DARK.X,color:r.default.helpers.COLORS.GREEN,onClick:i.loadPopup,values:(0,l.createGraphValuesWithSin)({length:8,initialX:85,xModifier:25,yModifier:4*Math.PI})};o.values[2].isCritical=!0,o.values[6].isCritical=!0;t.default=o},24881:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(61770)),i=a(86006),l={key:"uid_4",label:{display:"Data Label 4"},shape:r.default.helpers.SHAPES.DARK.CROSS,color:r.default.helpers.COLORS.LIGHT_PURPLE,onClick:i.loadPopup,values:new Array(15).fill("").map((function(e,t){return{y:Math.sin(t)*Math.PI*4,x:85+10*t,region:{start:Math.sin(t)*Math.PI*4-Math.PI,end:Math.sin(t)*Math.PI*4+Math.PI}}}))};l.values[4].isCritical=!0,l.values[8].isCritical=!0;t.default=l},74013:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGraphValuesWithSin=t.createGraphValuesWithCos=void 0;t.createGraphValuesWithSin=function(e){var t=e.length,a=e.initialX,n=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.sin(t)*r,x:a+t*n}}))},t.createGraphValuesWithCos=function(e){var t=e.length,a=e.initialX,n=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.cos(t)*r,x:a+t*n}}))}},32213:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,t,a){"use strict";var n=a(24994),r=a(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var i=n(a(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var a=u(t);if(a&&a.has(e))return a.get(e);var n={__proto__:null},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var o=i?Object.getOwnPropertyDescriptor(e,l):null;o&&(o.get||o.set)?Object.defineProperty(n,l,o):n[l]=e[l]}return n.default=e,a&&a.set(e,n),n}(a(37332)),o=n(a(22639)),p=n(a(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,a=new WeakMap;return(u=function(e){return e?a:t})(e)}var s=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?s(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,a){var n=e.append("g").classed("popup-item",!0);n.append("label").classed("popup-label",!0).text(t),n.append("g").classed("popup-text",!0).text(a)},m=function(e,t,a){var n=e.append("g").classed("popup-item",!0);n.append("label").classed("popup-label",!0).text(t);for(var r=n.append("g").classed("section",!0),l=function(){var e=p[o],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var a=(0,i.default)(e,2),n=a[0],r=a[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(n.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},o=0,p=Object.values(a);o0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(n,"Tasks",p)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(n,"Activities",u)}if(l&&l.length>0){var s=[];l.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),m(n,"Events",s)}if(o&&o.length>0){var c=[];o.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),m(n,"Actions",c)}},t.loadTaskPopup=function(e,t,a,n){v();var r=h(e).append("g"),i=n.label,l=n.display,o=n.y,p=n.startDate,u=n.endDate,c=n.percentage;i&&f(r,"Task Name",l),f(r,"Track",o),f(r,"Start Date",s(p)),f(r,"End Date",s(u)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){v();var a=h(e).append("g"),n=t.label,r=t.value;n&&f(a,"Milestone",n.display),f(a,"Date",s(r))},t.loadTimelinePopup=function(e,t,a,n){v();var r=h(e).append("g"),i=n.x,l=(n.y,n.label),o=n.content;f(r,"X axis","".concat(d(i)?s(i):i)),f(r,"".concat(l.display),o)},t.loadPiePopup=function(e,t,a,n){v();var r=h(e).append("g"),i=n.label,l=n.value;f(r,i.display,l)}},29683:function(e,t,a){"use strict";var n=a(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(a(96540)),i=n(a(5556));a(16939);var l={id:i.default.string.isRequired},o=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};o.propTypes=l;t.default=o},33054:function(e,t,a){"use strict";var n=a(24994);t.A=void 0;var r=n(a(96540)),i=n(a(61770)),l=n(a(45839));a(45633);var o=n(a(29683)),p=n(a(32213)),u=n(a(44602)),s=n(a(76184)),c=n(a(24881)),d=l.default.deepClone((0,p.default)("#criticalityMultiLine")),f=[l.default.deepClone(u.default),l.default.deepClone(s.default),l.default.deepClone(c.default)];t.A=function(){return r.default.useEffect((function(){var e=i.default.api.graph(d);f.forEach((function(t){e.loadContent(i.default.api.line(t))}))}),[]),r.default.createElement(o.default,{id:"criticalityMultiLine"})}},44809:function(e,t,a){"use strict";var n=a(24994);t.A=void 0;var r=n(a(96540)),i=n(a(61770)),l=n(a(45839));a(45633);var o=n(a(29683)),p=n(a(32213)),u=n(a(44602)),s=l.default.deepClone((0,p.default)("#criticalitySimpleLine")),c=l.default.deepClone(u.default);t.A=function(){return r.default.useEffect((function(){i.default.api.graph(s).loadContent(i.default.api.line(c))}),[]),r.default.createElement(o.default,{id:"criticalitySimpleLine"})}},36635:function(e,t,a){"use strict";a.r(t),a.d(t,{default:function(){return U}});var n=a(96540),r=a(36665),i=a(44809),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var u={};function s(e){var t=e.components,a=p(e,l);return(0,r.mdx)("wrapper",o({},u,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _dataset1critical = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset1critical"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#criticalitySimpleLine\'));\nvar dataset = _utils.default.deepClone(_dataset1critical.default);\nvar CriticalitySimpleLineExample = function CriticalitySimpleLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "criticalitySimpleLine"\n });\n};\nvar _default = exports.default = CriticalitySimpleLineExample;\n')))}s.isMDXComponent=!0;var c=a(201),d=a(79679),f=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(c.A,{title:t||"Simple Line",description:a,example:n.createElement(i.A,null),exampleCssSrc:n.createElement(d.A,null),exampleSrc:n.createElement(s,null),isExpanded:r})},m=a(49462),h=["components"];function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var y={},g="wrapper";function x(e){var t=e.components,a=b(e,h);return(0,r.mdx)(g,v({},y,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithSin)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI\n })\n};\ndata.values[1].isCritical = true;\ndata.values[11].isCritical = true;\nvar _default = exports.default = data;\n')))}x.isMDXComponent=!0;var O=a(33054),_=["components"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var L={};function P(e){var t=e.components,a=C(e,_);return(0,r.mdx)("wrapper",j({},L,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _dataset1critical = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset1critical"));\nvar _dataset3critical = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset3critical"));\nvar _dataset4critical = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset4critical"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#criticalityMultiLine\'));\nvar dataset = [_utils.default.deepClone(_dataset1critical.default), _utils.default.deepClone(_dataset3critical.default), _utils.default.deepClone(_dataset4critical.default)];\nvar CriticalityMultiLineExample = function CriticalityMultiLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.line(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "criticalityMultiLine"\n });\n};\nvar _default = exports.default = CriticalityMultiLineExample;\n')))}P.isMDXComponent=!0;var D=function(e){var t=e.title,a=e.description,r=e.isExpanded;return n.createElement(c.A,{title:t||"Multi Line",description:a,example:n.createElement(O.A,null),exampleCssSrc:n.createElement(d.A,null),exampleSrc:n.createElement(P,null),isExpanded:r})},w=["components"];function M(){return M=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var S={},q="wrapper";function G(e){var t=e.components,a=E(e,w);return(0,r.mdx)(q,M({},S,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_3\',\n label: {\n display: \'Data Label 3\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.X,\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithSin)({\n length: 8,\n initialX: 85,\n xModifier: 25,\n yModifier: Math.PI * 4\n })\n};\ndata.values[2].isCritical = true;\ndata.values[6].isCritical = true;\nvar _default = exports.default = data;\n')))}G.isMDXComponent=!0;var k=["components"];function A(){return A=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var T={},N="wrapper";function X(e){var t=e.components,a=R(e,k);return(0,r.mdx)(N,A({},T,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_4\',\n label: {\n display: \'Data Label 4\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CROSS,\n color: _carbonGraphs.default.helpers.COLORS.LIGHT_PURPLE,\n onClick: _popup.loadPopup,\n values: new Array(15).fill(\'\').map(function (_, i) {\n return {\n y: Math.sin(i) * Math.PI * 4,\n x: 85 + i * 10,\n region: {\n start: Math.sin(i) * Math.PI * 4 - Math.PI,\n end: Math.sin(i) * Math.PI * 4 + Math.PI\n }\n };\n })\n};\ndata.values[4].isCritical = true;\ndata.values[8].isCritical = true;\nvar _default = exports.default = data;\n')))}X.isMDXComponent=!0;var I=["components"];function V(){return V=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}a(27647);var B={},W="wrapper";function U(e){var t=e.components,a=H(e,I);return(0,r.mdx)(W,V({},B,a,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"criticality"},"Criticality"),(0,r.mdx)("p",null,"Criticality consists of line graph examples with simple and multi critical points(highlighted with red circles)."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"SimpleCriticalLineGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data used for simple criticality")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"SimpleCriticalGraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x,{mdxType:"SimpleCriticalDataObject"})),(0,r.mdx)("br",null),(0,r.mdx)("br",null),(0,r.mdx)("br",null),(0,r.mdx)(D,{mdxType:"MultiCriticalityLineGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data used for multiple criticality")),(0,r.mdx)("h3",{id:"graph-config-object-1"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"MultiCriticalityGraphConfig"}),(0,r.mdx)("h3",{id:"data-object-1"},"Data object"),(0,r.mdx)("h4",{id:"dataset-1"},"Dataset 1"),(0,r.mdx)(x,{mdxType:"MultiCriticalityDataObject1"}),(0,r.mdx)("h4",{id:"dataset-2"},"Dataset 2"),(0,r.mdx)(G,{mdxType:"MultiCriticalityDataObject2"}),(0,r.mdx)("h4",{id:"dataset-3"},"Dataset 3"),(0,r.mdx)(X,{mdxType:"MultiCriticalityDataObject3"})))}U.isMDXComponent=!0},49462:function(e,t,a){"use strict";a.d(t,{A:function(){return u}});a(96540);var n=a(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o={},p="wrapper";function u(e){var t=e.components,a=l(e,r);return(0,n.mdx)(p,i({},o,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}u.isMDXComponent=!0},79679:function(e,t,a){"use strict";a.d(t,{A:function(){return u}});a(96540);var n=a(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var o={},p="wrapper";function u(e){var t=e.components,a=l(e,r);return(0,n.mdx)(p,i({},o,a,{components:t,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}u.isMDXComponent=!0},27647:function(e,t,a){var n,r;void 0===(r="function"==typeof(n=function(){var e="details",t="summary";function a(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function n(){var a=document.createElement(e);if(!("open"in a))return!1;a.innerHTML="<"+t+">ab",document.body.appendChild(a);var n=a.offsetHeight;a.open=!0;var r=n!=a.offsetHeight;return document.body.removeChild(a),r}function r(e,t){if(!document.getElementById(e)){var a=document.createElement("style");a.id=e,a.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(a)}}n()||(document.documentElement.className+=" no-details",window.addEventListener("click",a),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?n.call(t,a,t,e):n)||(e.exports=r)},16939:function(e,t,a){"use strict";a.r(t),t.default={}},45633:function(e,t,a){"use strict";a.r(t),t.default={}}}]); \ No newline at end of file diff --git a/37043-82d62370d100bb15a121.js b/37043-82d62370d100bb15a121.js new file mode 100644 index 000000000..1d724e597 --- /dev/null +++ b/37043-82d62370d100bb15a121.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[37043],{78373:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),o=t(86006),i=t(74013),l={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:o.loadPopup,values:(0,i.createGraphValuesWithSin)({length:20,initialX:85,xModifier:10,yModifier:Math.PI})};n.default=l},97596:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),o=t(86006),i=t(74013),l={key:"uid_2",label:{display:"Data Label 2"},shape:r.default.helpers.SHAPES.DARK.TRIANGLE,color:r.default.helpers.COLORS.BLUE,style:{strokeDashArray:"2,2"},onClick:o.loadPopup,values:(0,i.createGraphValuesWithSin)({length:18,initialX:85,xModifier:10,yModifier:2*Math.PI}),legendOptions:{showLine:!0,showShape:!1,style:{strokeDashArray:"2,2"}},showShapes:!1};n.default=l},18883:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),o=t(86006),i=t(74013),l={key:"uid_3",label:{display:"Data Label 3"},shape:r.default.helpers.SHAPES.DARK.X,color:r.default.helpers.COLORS.GREEN,onClick:o.loadPopup,values:(0,i.createGraphValuesWithSin)({length:12,initialX:85,xModifier:25,yModifier:4*Math.PI})};n.default=l},74013:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createGraphValuesWithSin=n.createGraphValuesWithCos=void 0;n.createGraphValuesWithSin=function(e){var n=e.length,t=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(n).fill("").map((function(e,n){return{y:Math.sin(n)*r,x:t+n*a}}))},n.createGraphValuesWithCos=function(e){var n=e.length,t=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(n).fill("").map((function(e,n){return{y:Math.cos(n)*r,x:t+n*a}}))}},86006:function(e,n,t){"use strict";var a=t(24994),r=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var o=a(t(85715)),i=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var t=s(n);if(t&&t.has(e))return t.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,t&&t.set(e,a),a}(t(37332)),l=a(t(22639)),p=a(t(45839));function s(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(s=function(e){return e?t:n})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n),a.append("g").classed("popup-text",!0).text(t)},y=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[l],n=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],i=n.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(t);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",s)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",c)}},n.loadTaskPopup=function(e,n,t,a){g();var r=v(e).append("g"),o=a.label,i=a.display,l=a.y,p=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},n.loadDatelinePopup=function(e,n){g();var t=v(e).append("g"),a=n.label,r=n.value;a&&f(t,"Milestone",a.display),f(t,"Date",u(r))},n.loadTimelinePopup=function(e,n,t,a){g();var r=v(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(i.display),l)},n.loadPiePopup=function(e,n,t,a){g();var r=v(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},21312:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l={},p="wrapper";function s(e){var n=e.components,t=i(e,r);return(0,a.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = [{\n key: 'uid_1',\n label: {\n display: 'Data Label 1'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CIRCLE,\n onClick: _popup.loadPopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 5,\n isCritical: false\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 11\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 9\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 11\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 28\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 13\n }, {\n x: new Date(2016, 0, 1, 21, 15).toISOString(),\n y: 14\n }],\n yAxis: 'y'\n}, {\n key: 'uid_3',\n label: {\n display: 'Data Label 3'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CIRCLE,\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 15\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 21\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: null\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 19\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 28\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 22\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 23\n }],\n yAxis: 'y'\n}];\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0},15423:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l={},p="wrapper";function s(e){var n=e.components,t=i(e,r);return(0,a.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesConfig = function getLineTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesConfig;\n')))}s.isMDXComponent=!0},79679:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var l={},p="wrapper";function s(e){var n=e.components,t=i(e,r);return(0,a.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,n,t){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function a(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var a=t.offsetHeight;t.open=!0;var r=a!=t.offsetHeight;return document.body.removeChild(t),r}function r(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?a.call(n,t,n,e):a)||(e.exports=r)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},45633:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/38150-da86330af61b58034bd2.js b/38150-da86330af61b58034bd2.js new file mode 100644 index 000000000..8865c1ec8 --- /dev/null +++ b/38150-da86330af61b58034bd2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[38150],{68959:function(e,r,t){var n=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t(61770)),l=t(86006),i=t(74013),o={key:"uid_1",label:{display:"Data Label 1"},color:a.default.helpers.COLORS.BLACK,onClick:l.loadPopup,values:(0,i.createGraphValuesWithSin)({length:20,initialX:85,xModifier:10,yModifier:Math.PI})};r.default=o},64481:function(e,r,t){var n=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t(61770)),l=t(86006),i=t(74013),o={key:"uid_3",label:{display:"Data Label 3"},shape:a.default.helpers.SHAPES.DARK.X,color:a.default.helpers.COLORS.GREEN,onClick:l.loadPopup,values:(0,i.createGraphValuesWithSin)({length:12,initialX:85,xModifier:17,yModifier:4*Math.PI})};r.default=o},93140:function(e,r,t){var n=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t(61770)),l=t(86006),i={key:"uid_4",label:{display:"Data Label 4"},shape:a.default.helpers.SHAPES.DARK.CROSS,color:a.default.helpers.COLORS.LIGHT_PURPLE,onClick:l.loadPopup,values:new Array(15).fill("").map((function(e,r){return{y:Math.sin(r)*Math.PI*4,x:85+10*r,region:{start:Math.sin(r)*Math.PI*4-Math.PI,end:Math.sin(r)*Math.PI*4+Math.PI}}}))};r.default=i},66491:function(e,r,t){var n=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t(61770)),l=t(86006),i=t(74013),o={key:"uid_5",label:{display:"Data Label 5"},shape:a.default.helpers.SHAPES.DARK.SQUARE,color:a.default.helpers.COLORS.ORANGE,onClick:l.loadPopup,values:(0,i.createGraphValuesWithCos)({length:20,initialX:85,xModifier:10,yModifier:5*Math.PI}),legendOptions:{showLine:!0,showShape:!0}};r.default=o},81342:function(e,r,t){var n=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var a=n(t(61770)),l=t(86006),i=t(74013),o={key:"uid_6",label:{display:"Dataset 6"},color:a.default.helpers.COLORS.GREY,onClick:l.loadPopup,shape:a.default.helpers.SHAPES.DARK.TRIANGLE_DOWN,values:(0,i.createGraphValuesWithCos)({length:18,initialX:85,xModifier:10,yModifier:7*Math.PI})};r.default=o},32213:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},54787:function(e,r,t){var n=t(24994);r.A=void 0;var a=n(t(96540)),l=n(t(61770)),i=n(t(45839));t(45633);var o=n(t(29683)),u=n(t(32213)),p=n(t(68959)),s=n(t(10578)),d=n(t(64481)),c=n(t(93140)),f=n(t(66491)),h=n(t(81342)),m=i.default.deepClone((0,u.default)("#multiLine")),b=[i.default.deepClone(p.default),i.default.deepClone(s.default),i.default.deepClone(d.default),i.default.deepClone(c.default),i.default.deepClone(f.default),i.default.deepClone(h.default)],v=[0,750,1500,2250,3e3,3750,4500];r.A=function(){return a.default.useEffect((function(){var e=l.default.api.graph(m);b.forEach((function(r,t){setTimeout((function(){return e.graphContainer?e.loadContent(l.default.api.line(r)):""}),v[t])}))}),[]),a.default.createElement(o.default,{id:"multiLine"})}},38150:function(e,r,t){t.r(r),t.d(r,{default:function(){return k}});var n=t(96540),a=t(36665),l=t(54787),i=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p={};function s(e){var r=e.components,t=u(e,i);return(0,a.mdx)("wrapper",o({},p,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset1"));\nvar _dataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset2"));\nvar _dataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset3"));\nvar _dataset4 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset4"));\nvar _dataset5 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset5"));\nvar _dataset6 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset6"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#multiLine\'));\nvar dataset = [_utils.default.deepClone(_dataset.default), _utils.default.deepClone(_dataset2.default), _utils.default.deepClone(_dataset3.default), _utils.default.deepClone(_dataset4.default), _utils.default.deepClone(_dataset5.default), _utils.default.deepClone(_dataset6.default)];\nvar timeout = [0, 750, 750 * 2, 750 * 3, 750 * 4, 750 * 5, 750 * 6];\nvar MultiLineExample = function MultiLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data, index) {\n setTimeout(function () {\n return graph.graphContainer ? graph.loadContent(_carbonGraphs.default.api.line(data)) : \'\';\n }, timeout[index]);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "multiLine"\n });\n};\nvar _default = exports.default = MultiLineExample;\n')))}s.isMDXComponent=!0;var d=t(201),c=t(79679),f=function(e){var r=e.title,t=e.description,a=e.isExpanded;return n.createElement(d.A,{title:r||"Simple",description:t,example:n.createElement(l.A,null),exampleCssSrc:n.createElement(c.A,null),exampleSrc:n.createElement(s,null),isExpanded:a})},h=t(49462),m=t(99792),b=t(23947),v=["components"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var g={},x="wrapper";function _(e){var r=e.components,t=O(e,v);return(0,a.mdx)(x,y({},g,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_3\',\n label: {\n display: \'Data Label 3\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.X,\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithSin)({\n length: 12,\n initialX: 85,\n xModifier: 17,\n yModifier: Math.PI * 4\n })\n};\nvar _default = exports.default = data;\n')))}_.isMDXComponent=!0;var j=t(83797),D=["components"];function P(){return P=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var M={},C="wrapper";function w(e){var r=e.components,t=L(e,D);return(0,a.mdx)(C,P({},M,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_5\',\n label: {\n display: \'Data Label 5\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n color: _carbonGraphs.default.helpers.COLORS.ORANGE,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithCos)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI * 5\n }),\n legendOptions: {\n showLine: true,\n showShape: true\n }\n};\nvar _default = exports.default = data;\n')))}w.isMDXComponent=!0;var S=t(17143),R=["components"];function q(){return q=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(27647);var E={},A="wrapper";function k(e){var r=e.components,t=G(e,R);return(0,a.mdx)(A,q({},E,t,{components:r,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"simple-multiline"},"Simple Multiline"),(0,a.mdx)("p",null,"This is simple multiline graph generated by providing timeouts for each line present in the graph."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(f,{mdxType:"LineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(h.A,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(m.A,{mdxType:"DataObject1"}),(0,a.mdx)(b.A,{mdxType:"DataObject2"}),(0,a.mdx)(_,{mdxType:"DataObject3"}),(0,a.mdx)(j.A,{mdxType:"DataObject4"}),(0,a.mdx)(w,{mdxType:"DataObject5"}),(0,a.mdx)(S.A,{mdxType:"DataObject6"})))}k.isMDXComponent=!0},99792:function(e,r,t){t.d(r,{A:function(){return p}});t(96540);var n=t(36665),a=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={},u="wrapper";function p(e){var r=e.components,t=i(e,a);return(0,n.mdx)(u,l({},o,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithSin)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI\n })\n};\nvar _default = exports.default = data;\n')))}p.isMDXComponent=!0},83797:function(e,r,t){t.d(r,{A:function(){return p}});t(96540);var n=t(36665),a=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={},u="wrapper";function p(e){var r=e.components,t=i(e,a);return(0,n.mdx)(u,l({},o,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'uid_4\',\n label: {\n display: \'Data Label 4\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CROSS,\n color: _carbonGraphs.default.helpers.COLORS.LIGHT_PURPLE,\n onClick: _popup.loadPopup,\n values: new Array(15).fill(\'\').map(function (_, i) {\n return {\n y: Math.sin(i) * Math.PI * 4,\n x: 85 + i * 10,\n region: {\n start: Math.sin(i) * Math.PI * 4 - Math.PI,\n end: Math.sin(i) * Math.PI * 4 + Math.PI\n }\n };\n })\n};\nvar _default = exports.default = data;\n')))}p.isMDXComponent=!0},17143:function(e,r,t){t.d(r,{A:function(){return p}});t(96540);var n=t(36665),a=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={},u="wrapper";function p(e){var r=e.components,t=i(e,a);return(0,n.mdx)(u,l({},o,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_6\',\n label: {\n display: \'Dataset 6\'\n },\n color: _carbonGraphs.default.helpers.COLORS.GREY,\n onClick: _popup.loadPopup,\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.TRIANGLE_DOWN,\n values: (0, _createGraphValues.createGraphValuesWithCos)({\n length: 18,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI * 7\n })\n};\nvar _default = exports.default = data;\n')))}p.isMDXComponent=!0},49462:function(e,r,t){t.d(r,{A:function(){return p}});t(96540);var n=t(36665),a=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(a[t]=e[t]);return a}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var o={},u="wrapper";function p(e){var r=e.components,t=i(e,a);return(0,n.mdx)(u,l({},o,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/38966-91b02b6e570f94f5b923.js b/38966-91b02b6e570f94f5b923.js new file mode 100644 index 000000000..a00308f17 --- /dev/null +++ b/38966-91b02b6e570f94f5b923.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[38966],{87325:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"stacked_bar_2",label:{display:"Dataset 2"},group:"stacked_bar_1",color:r.default.helpers.COLORS.LIGHT_PURPLE,onClick:o.loadBarPopup,values:[{x:1,y:30},{x:2,y:5},{x:3,y:8},{x:4,y:10},{x:5,y:10},{x:6,y:10}]};t.default=l},77406:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),l={key:"stacked_bar_3",label:{display:"Dataset 3"},group:"stacked_bar_1",color:r.default.helpers.COLORS.BLUE,onClick:o.loadBarPopup,values:[{x:1,y:30},{x:2,y:8},{x:3,y:9},{x:4,y:10},{x:5,y:7}]};t.default=l},87539:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:0,upperLimit:8,ticks:{values:[1,2,3,4,5,6,7],format:".0f"}},y:{show:!0,label:"Bar Set A",lowerLimit:0,upperLimit:35},y2:{show:!1,label:"Bar Set B",lowerLimit:0,upperLimit:30}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!1,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var p=o?Object.getOwnPropertyDescriptor(e,l):null;p&&(p.get||p.set)?Object.defineProperty(a,l,p):a[l]=e[l]}return a.default=e,n&&n.set(e,a),a}(n(37332)),p=a(n(22639)),i=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},y=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),l=function(){var e=i[p],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],l=t.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},p=0,i=Object.values(n);p0){var i=[];i.forEach((function(e){i.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",i)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",s)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",u)}if(p&&p.length>0){var c=[];p.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.label,l=a.display,p=a.y,i=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",p),f(r,"Start Date",u(i)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){m();var n=v(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.x,l=(a.y,a.label),p=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(l.display),p)},t.loadPiePopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var l={id:o.default.string.isRequired},p=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};p.propTypes=l;t.default=p},85870:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'stacked_bar_2\',\n label: {\n display: \'Dataset 2\'\n },\n group: \'stacked_bar_1\',\n color: _carbonGraphs.default.helpers.COLORS.LIGHT_PURPLE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 5\n }, {\n x: 3,\n y: 8\n }, {\n x: 4,\n y: 10\n }, {\n x: 5,\n y: 10\n }, {\n x: 6,\n y: 10\n }]\n};\nvar _default = exports.default = data;\n')))}s.isMDXComponent=!0},54308:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getbarConfig = function getbarConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 8,\n ticks: {\n values: [1, 2, 3, 4, 5, 6, 7],\n format: '.0f'\n }\n },\n y: {\n show: true,\n label: 'Bar Set A',\n lowerLimit: 0,\n upperLimit: 35\n },\n y2: {\n show: false,\n label: 'Bar Set B',\n lowerLimit: 0,\n upperLimit: 30\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: false,\n showHGrid: true\n };\n};\nvar _default = exports.default = getbarConfig;\n")))}s.isMDXComponent=!0},18241:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={},i="wrapper";function s(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},11719:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/3914-ed4130c9e22fc90d089f.js b/3914-ed4130c9e22fc90d089f.js new file mode 100644 index 000000000..06b5c1e8b --- /dev/null +++ b/3914-ed4130c9e22fc90d089f.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[3914],{17193:function(e,t,n){var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0).toISOString(),upperLimit:new Date(2016,0,2,0).toISOString(),ticks:{}},y:{label:"Paired Set A",lowerLimit:0,upperLimit:200},y2:{show:!1,label:"Paired Set B",lowerLimit:100,upperLimit:350}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},1026:function(e,t,n){var r=n(24994);t.A=void 0;var a=r(n(85715)),i=r(n(96540)),l=r(n(23986)),u=r(n(61770)),o=r(n(45839));n(63841);var p,s=r(n(29683)),c=r(n(17193)),d=r(n(13720)),f=o.default.deepClone((0,c.default)("#simplePairedResultPanning")),m=[o.default.deepClone(d.default)],g={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){p=u.default.api.graph(f),m.forEach((function(e){p.loadContent(u.default.api.pairedResult(e))}))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),g),t=(0,a.default)(e,2),n=t[0],r=t[1];return i.default.useLayoutEffect((function(){p&&(p.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString(),p.reflowMultipleDatasets())}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return r({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return r({type:"panRight"})}}),i.default.createElement(s.default,{id:"simplePairedResultPanning"}))}},3914:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var r=n(96540),a=n(36665),i=n(1026),l=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p={};function s(e){var t=e.components,n=o(e,l);return(0,a.mdx)("wrapper",u({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultPanning"));\nvar _pairedResultSimplePanningData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultSimplePanningData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultPanning.default)(\'#simplePairedResultPanning\'));\nvar dataset = [_utils.default.deepClone(_pairedResultSimplePanningData.default)];\nvar state = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar SimplePairedResultPanningExample = function SimplePairedResultPanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets();\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simplePairedResultPanning"\n }));\n};\nvar _default = exports.default = SimplePairedResultPanningExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(88703),f=function(e){var t=e.title,n=e.description,a=e.isExpanded;return r.createElement(c.A,{title:t||"Simple Panning",description:n,example:r.createElement(i.A,null),exampleCssSrc:r.createElement(d.A,null),exampleSrc:r.createElement(s,null),isExpanded:a})},m=n(18250),g=n(76188),h=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n(27647);var _={},v="wrapper";function y(e){var t=e.components,n=x(e,h);return(0,a.mdx)(v,b({},_,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"simple-paired-result-graph-panning"},"Simple Paired Result graph panning"),(0,a.mdx)("p",null,"This is a paired result graph example that implements panning."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(f,{mdxType:"PairedResultGraphPanning"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(m.A,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(g.A,{mdxType:"DataObject"})))}y.isMDXComponent=!0},18250:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var r=n(36665),a=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var u={},o="wrapper";function p(e){var t=e.components,n=l(e,a);return(0,r.mdx)(o,i({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getPairedResultTimeseriesPanningConfig = function getPairedResultTimeseriesPanningConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 2, 0).toISOString(),\n ticks: {}\n },\n y: {\n label: \'Paired Set A\',\n lowerLimit: 0,\n upperLimit: 200\n },\n y2: {\n show: false,\n label: \'Paired Set B\',\n lowerLimit: 100,\n upperLimit: 350\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultTimeseriesPanningConfig;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/40240-eda1af035e575be44290.js b/40240-eda1af035e575be44290.js new file mode 100644 index 000000000..23be133a9 --- /dev/null +++ b/40240-eda1af035e575be44290.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[40240],{80210:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),o=t(86006),l={key:"simple_paired_result_data",label:{high:{display:"High"},mid:{display:"Median"},low:{display:"Low"}},shape:{high:r.default.helpers.SHAPES.DARK.TEAR_ALT,mid:r.default.helpers.SHAPES.DARK.RHOMBUS,low:r.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:r.default.helpers.COLORS.BLACK,mid:r.default.helpers.COLORS.PURPLE,low:r.default.helpers.COLORS.BLACK},onClick:o.loadPopup,regions:{high:[{axis:"y",start:140,end:220,color:"#c8cacb"}],low:[{axis:"y",start:20,end:70}]},values:[{high:{x:20,y:150},mid:{x:20,y:40},low:{x:20,y:10}},{high:{x:80,y:100},mid:{x:80,y:75},low:{x:80,y:50}},{high:{x:150,y:110},mid:{x:150,y:70},low:{x:150,y:30}},{high:{x:175,y:160},mid:{x:175,y:120},low:{x:175,y:100}},{high:{x:300,y:190},mid:{x:300,y:90},low:{x:300,y:60}},{high:{x:560,y:150},mid:{x:560,y:40},low:{x:560,y:10}},{high:{x:800,y:180},mid:{x:800,y:100},low:{x:800,y:100}}]};n.default=l},57893:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,axis:{x:{label:"Data",lowerLimit:0,upperLimit:1e3},y:{label:"Paired",lowerLimit:0,upperLimit:200}},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,n,t){"use strict";var a=t(24994),r=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var o=a(t(85715)),l=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var t=s(n);if(t&&t.has(e))return t.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=o?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,t&&t.set(e,a),a}(t(37332)),i=a(t(22639)),p=a(t(45839));function s(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(s=function(e){return e?t:n})(e)}var d=function(e){return new Date(e).toLocaleString()},u=function(e){return e?c(e)?d(e):e:null},c=function(e){return e instanceof Date},f=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n),a.append("g").classed("popup-text",!0).text(t)},m=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n);for(var r=a.append("g").classed("section",!0),l=function(){var e=p[i],n=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,o.default)(e,2),a=t[0],r=t[1],l=n.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(r)}))},i=0,p=Object.values(t);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",s)}if(l&&l.length>0){var d=[];l.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",d)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",u)}},n.loadTaskPopup=function(e,n,t,a){y();var r=h(e).append("g"),o=a.label,l=a.display,i=a.y,p=a.startDate,s=a.endDate,u=a.percentage;o&&f(r,"Task Name",l),f(r,"Track",i),f(r,"Start Date",d(p)),f(r,"End Date",d(s)),u&&f(r,"Percentage",u)},n.loadDatelinePopup=function(e,n){y();var t=h(e).append("g"),a=n.label,r=n.value;a&&f(t,"Milestone",a.display),f(t,"Date",d(r))},n.loadTimelinePopup=function(e,n,t,a){y();var r=h(e).append("g"),o=a.x,l=(a.y,a.label),i=a.content;f(r,"X axis","".concat(c(o)?d(o):o)),f(r,"".concat(l.display),i)},n.loadPiePopup=function(e,n,t,a){y();var r=h(e).append("g"),o=a.label,l=a.value;f(r,o.display,l)}},29683:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(96540)),o=a(t(5556));t(16939);var l={id:o.default.string.isRequired},i=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;n.default=i},95439:function(e,n,t){"use strict";var a=t(24994);n.A=void 0;var r=a(t(96540)),o=a(t(61770)),l=a(t(45839));t(63841);var i=a(t(29683)),p=a(t(57893)),s=a(t(80210)),d=l.default.deepClone((0,p.default)("#simplePairedResultGraph")),u=[l.default.deepClone(s.default)];n.A=function(){return r.default.useEffect((function(){var e=o.default.api.graph(d);u.forEach((function(n){e.loadContent(o.default.api.pairedResult(n))}))}),[]),r.default.createElement(i.default,{id:"simplePairedResultGraph"})}},40240:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return j}});var a=t(96540),r=t(36665),o=t(95439),l=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var s={};function d(e){var n=e.components,t=p(e,l);return(0,r.mdx)("wrapper",i({},s,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultDefault"));\nvar _pairedResultSimpleRegionDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultSimpleRegionDataset"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultDefault.default)(\'#simplePairedResultGraph\'));\nvar dataset = [_utils.default.deepClone(_pairedResultSimpleRegionDataset.default)];\nvar SimpleRegionPairedResultExample = function SimpleRegionPairedResultExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "simplePairedResultGraph"\n });\n};\nvar _default = exports.default = SimpleRegionPairedResultExample;\n')))}d.isMDXComponent=!0;var u=t(201),c=t(88703),f=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(u.A,{title:n||"Simple",description:t,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(d,null),isExpanded:r})},m=t(89510),h=["components"];function y(){return y=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var v={},b="wrapper";function x(e){var n=e.components,t=g(e,h);return(0,r.mdx)(b,y({},v,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'simple_paired_result_data',\n label: {\n high: {\n display: 'High'\n },\n mid: {\n display: 'Median'\n },\n low: {\n display: 'Low'\n }\n },\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.PURPLE,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n regions: {\n high: [{\n axis: 'y',\n start: 140,\n end: 220,\n color: '#c8cacb'\n }],\n low: [{\n axis: 'y',\n start: 20,\n end: 70\n }]\n },\n values: [{\n high: {\n x: 20,\n y: 150\n },\n mid: {\n x: 20,\n y: 40\n },\n low: {\n x: 20,\n y: 10\n }\n }, {\n high: {\n x: 80,\n y: 100\n },\n mid: {\n x: 80,\n y: 75\n },\n low: {\n x: 80,\n y: 50\n }\n }, {\n high: {\n x: 150,\n y: 110\n },\n mid: {\n x: 150,\n y: 70\n },\n low: {\n x: 150,\n y: 30\n }\n }, {\n high: {\n x: 175,\n y: 160\n },\n mid: {\n x: 175,\n y: 120\n },\n low: {\n x: 175,\n y: 100\n }\n }, {\n high: {\n x: 300,\n y: 190\n },\n mid: {\n x: 300,\n y: 90\n },\n low: {\n x: 300,\n y: 60\n }\n }, {\n high: {\n x: 560,\n y: 150\n },\n mid: {\n x: 560,\n y: 40\n },\n low: {\n x: 560,\n y: 10\n }\n }, {\n high: {\n x: 800,\n y: 180\n },\n mid: {\n x: 800,\n y: 100\n },\n low: {\n x: 800,\n y: 100\n }\n }]\n};\nvar _default = exports.default = data;\n")))}x.isMDXComponent=!0;var O=["components"];function w(){return w=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var _={},R="wrapper";function j(e){var n=e.components,t=P(e,O);return(0,r.mdx)(R,w({},_,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-region-paired-result-graph"},"Simple Region Paired Result Graph"),(0,r.mdx)("p",null,"This is a simple paired result graph associated with regions(for high and low datapoints)."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"PairedResultGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x,{mdxType:"DataObject"})))}j.isMDXComponent=!0},89510:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,r);return(0,a.mdx)(p,o({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getPairedResultConfig = function getPairedResultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n label: 'Data',\n lowerLimit: 0,\n upperLimit: 1000\n },\n y: {\n label: 'Paired',\n lowerLimit: 0,\n upperLimit: 200\n }\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultConfig;\n")))}s.isMDXComponent=!0},88703:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,r);return(0,a.mdx)(p,o({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n@import '../colors.module';\n\n/*\nWe are forcing display of the hidden item for data points,\nthis is only applicable when legend toggle is applied\nand one of the data point is selected.\n*/\n.carbon-data-pair--selected {\n @include terra-graph-opacity-show(); //!important;\n}\n\n.carbon-paired-point {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-paired-line {\n fill: none;\n stroke: var(--terra-graphs-dark);\n stroke-width: 1px;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,n,t){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function a(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var a=t.offsetHeight;t.open=!0;var r=a!=t.offsetHeight;return document.body.removeChild(t),r}function r(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?a.call(n,t,n,e):a)||(e.exports=r)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},63841:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/40405-a262f314ffcea37b95b2.js b/40405-a262f314ffcea37b95b2.js new file mode 100644 index 000000000..16b784d7b --- /dev/null +++ b/40405-a262f314ffcea37b95b2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[40405],{40405:function(n,a,e){e.r(a),e.d(a,{default:function(){return u}});e(96540);var t=e(36665),r=["components"];function m(){return m=Object.assign?Object.assign.bind():function(n){for(var a=1;a=0||(r[e]=n[e]);return r}(n,a);if(Object.getOwnPropertySymbols){var m=Object.getOwnPropertySymbols(n);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(n,e)&&(r[e]=n[e])}return r}var d={},o="wrapper";function u(n){var a=n.components,e=l(n,r);return(0,t.mdx)(o,m({},d,e,{components:a,mdxType:"MDXLayout"}),(0,t.mdx)("h1",{id:"locale"},"Locale"),(0,t.mdx)("ul",null,(0,t.mdx)("li",{parentName:"ul"},(0,t.mdx)("a",{parentName:"li",href:"#languages"},"Languages")),(0,t.mdx)("li",{parentName:"ul"},(0,t.mdx)("a",{parentName:"li",href:"#format"},"Format")),(0,t.mdx)("li",{parentName:"ul"},(0,t.mdx)("a",{parentName:"li",href:"#resources"},"Resources"))),(0,t.mdx)("h2",{id:"languages"},"Languages"),(0,t.mdx)("table",null,(0,t.mdx)("thead",{parentName:"table"},(0,t.mdx)("tr",{parentName:"thead"},(0,t.mdx)("th",{parentName:"tr",align:null},"Language"),(0,t.mdx)("th",{parentName:"tr",align:null},"Value"))),(0,t.mdx)("tbody",{parentName:"table"},(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"Dutch"),(0,t.mdx)("td",{parentName:"tr",align:null},"nl_NL")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"English (Australia)"),(0,t.mdx)("td",{parentName:"tr",align:null},"en_AU")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"English (Canada)"),(0,t.mdx)("td",{parentName:"tr",align:null},"en_CA")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"English (UK)"),(0,t.mdx)("td",{parentName:"tr",align:null},"en_GB")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"English (US)"),(0,t.mdx)("td",{parentName:"tr",align:null},"en_US")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"French"),(0,t.mdx)("td",{parentName:"tr",align:null},"fr_FR")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"German"),(0,t.mdx)("td",{parentName:"tr",align:null},"de_DE")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"Japanese"),(0,t.mdx)("td",{parentName:"tr",align:null},"ja_JP")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"Portuguese (Brazilian)"),(0,t.mdx)("td",{parentName:"tr",align:null},"pt_BR")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"Spanish"),(0,t.mdx)("td",{parentName:"tr",align:null},"es_ES")),(0,t.mdx)("tr",{parentName:"tbody"},(0,t.mdx)("td",{parentName:"tr",align:null},"Swedish"),(0,t.mdx)("td",{parentName:"tr",align:null},"sv_SE")))),(0,t.mdx)("h2",{id:"format"},"Format"),(0,t.mdx)("p",null,"Consumers can provide a JSON for any locale, the format needs to be:"),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-javascript"},'const locale_custom = {\n decimal: ",",\n thousands: ".",\n grouping: [3],\n currency: ["", " €"],\n dateTime: "%A, der %e. %B %Y, %X",\n date: "%d.%m.%Y",\n time: "%H:%M:%S",\n days: [\n "Sonntag",\n "Montag",\n "Dienstag",\n "Mittwoch",\n "Donnerstag",\n "Freitag",\n "Samstag"\n ],\n shortDays: ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"],\n months: [\n "Januar",\n "Februar",\n "März",\n "April",\n "Mai",\n "Juni",\n "Juli",\n "August",\n "September",\n "Oktober",\n "November",\n "Dezember"\n ],\n shortMonths: [\n "Jan",\n "Feb",\n "Mrz",\n "Apr",\n "Mai",\n "Jun",\n "Jul",\n "Aug",\n "Sep",\n "Okt",\n "Nov",\n "Dez"\n ],\n noData: "No Data"\n};\n')),(0,t.mdx)("h2",{id:"resources"},"Resources"),(0,t.mdx)("p",null,"Resources on locale based tick formatting:"),(0,t.mdx)("ul",null,(0,t.mdx)("li",{parentName:"ul"},(0,t.mdx)("a",{parentName:"li",href:"https://github.com/d3/d3-time-format/blob/master/README.md#locale_format"},"Number formatting")),(0,t.mdx)("li",{parentName:"ul"},(0,t.mdx)("a",{parentName:"li",href:"https://github.com/d3/d3-time-format/blob/master/README.md#timeFormatLocale"},"Datetime formatting"))))}u.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/41492-5db6fe632edfa5efab37.js b/41492-5db6fe632edfa5efab37.js new file mode 100644 index 000000000..5e0b79ea8 --- /dev/null +++ b/41492-5db6fe632edfa5efab37.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[41492],{15116:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(61770)),o=t(86006),i=t(74013),l={key:"uid_3",label:{display:"Data Label 3"},shape:a.default.helpers.SHAPES.DARK.SQUARE,color:a.default.helpers.COLORS.ORANGE,onClick:o.loadPopup,values:(0,i.createGraphValuesWithCos)({length:20,initialX:85,xModifier:10,yModifier:Math.PI}),legendOptions:{showLine:!0,showShape:!0},regions:[{end:10}]};n.default=l},13081:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(61770)),o=t(86006),i=t(74013),l={key:"uid_4",label:{display:"Data Label 4"},shape:a.default.helpers.SHAPES.DARK.SQUARE,color:a.default.helpers.COLORS.ORANGE,onClick:o.loadPopup,values:(0,i.createGraphValuesWithCos)({length:20,initialX:85,xModifier:10,yModifier:5*Math.PI}),legendOptions:{showLine:!0,showShape:!0},regions:[{start:2}]};n.default=l},74013:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.createGraphValuesWithSin=n.createGraphValuesWithCos=void 0;n.createGraphValuesWithSin=function(e){var n=e.length,t=e.initialX,r=e.xModifier,a=e.yModifier;return new Array(n).fill("").map((function(e,n){return{y:Math.sin(n)*a,x:t+n*r}}))},n.createGraphValuesWithCos=function(e){var n=e.length,t=e.initialX,r=e.xModifier,a=e.yModifier;return new Array(n).fill("").map((function(e,n){return{y:Math.cos(n)*a,x:t+n*r}}))}},32213:function(e,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,n,t){"use strict";var r=t(24994),a=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var o=r(t(85715)),i=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=a(e)&&"function"!=typeof e)return{default:e};var t=u(n);if(t&&t.has(e))return t.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(r,i,l):r[i]=e[i]}return r.default=e,t&&t.set(e,r),r}(t(37332)),l=r(t(22639)),p=r(t(45839));function u(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(u=function(e){return e?t:n})(e)}var s=function(e){return new Date(e).toLocaleString()},d=function(e){return e?c(e)?s(e):e:null},c=function(e){return e instanceof Date},f=function(e,n,t){var r=e.append("g").classed("popup-item",!0);r.append("label").classed("popup-label",!0).text(n),r.append("g").classed("popup-text",!0).text(t)},m=function(e,n,t){var r=e.append("g").classed("popup-item",!0);r.append("label").classed("popup-label",!0).text(n);for(var a=r.append("g").classed("section",!0),i=function(){var e=p[l],n=a.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,o.default)(e,2),r=t[0],a=t[1],i=n.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(r.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(a)}))},l=0,p=Object.values(t);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(r,"Tasks",p)}if(o&&o.length>0){var u=[];o.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(r,"Activities",u)}if(i&&i.length>0){var s=[];i.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),m(r,"Events",s)}if(l&&l.length>0){var d=[];l.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),m(r,"Actions",d)}},n.loadTaskPopup=function(e,n,t,r){g();var a=h(e).append("g"),o=r.label,i=r.display,l=r.y,p=r.startDate,u=r.endDate,d=r.percentage;o&&f(a,"Task Name",i),f(a,"Track",l),f(a,"Start Date",s(p)),f(a,"End Date",s(u)),d&&f(a,"Percentage",d)},n.loadDatelinePopup=function(e,n){g();var t=h(e).append("g"),r=n.label,a=n.value;r&&f(t,"Milestone",r.display),f(t,"Date",s(a))},n.loadTimelinePopup=function(e,n,t,r){g();var a=h(e).append("g"),o=r.x,i=(r.y,r.label),l=r.content;f(a,"X axis","".concat(c(o)?s(o):o)),f(a,"".concat(i.display),l)},n.loadPiePopup=function(e,n,t,r){g();var a=h(e).append("g"),o=r.label,i=r.value;f(a,o.display,i)}},29683:function(e,n,t){"use strict";var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(96540)),o=r(t(5556));t(16939);var i={id:o.default.string.isRequired},l=function(e){return a.default.createElement(a.default.Fragment,null,a.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),a.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;n.default=l},32472:function(e,n,t){"use strict";var r=t(24994);n.A=void 0;var a=r(t(96540)),o=r(t(61770)),i=r(t(45839));t(45633);var l=r(t(29683)),p=r(t(32213)),u=r(t(15116)),s=i.default.deepClone((0,p.default)("#noLowerBound")),d=i.default.deepClone(u.default);n.A=function(){return a.default.useEffect((function(){o.default.api.graph(s).loadContent(o.default.api.line(d))}),[]),a.default.createElement(l.default,{id:"noLowerBound"})}},55883:function(e,n,t){"use strict";var r=t(24994);n.A=void 0;var a=r(t(96540)),o=r(t(61770)),i=r(t(45839));t(45633);var l=r(t(29683)),p=r(t(32213)),u=r(t(13081)),s=i.default.deepClone((0,p.default)("#noUpperBound")),d=i.default.deepClone(u.default);n.A=function(){return a.default.useEffect((function(){o.default.api.graph(s).loadContent(o.default.api.line(d))}),[]),a.default.createElement(l.default,{id:"noUpperBound"})}},41492:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return M}});var r=t(96540),a=t(36665),o=t(32472),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var u={};function s(e){var n=e.components,t=p(e,i);return(0,a.mdx)("wrapper",l({},u,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _datasetRegions = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions3"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#noLowerBound\'));\nvar dataset = _utils.default.deepClone(_datasetRegions.default);\nvar NoLowerBoundLineExample = function NoLowerBoundLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "noLowerBound"\n });\n};\nvar _default = exports.default = NoLowerBoundLineExample;\n')))}s.isMDXComponent=!0;var d=t(201),c=t(79679),f=function(e){var n=e.title,t=e.description,a=e.isExpanded;return r.createElement(d.A,{title:n||"No Lower Bound",description:t,example:r.createElement(o.A,null),exampleCssSrc:r.createElement(c.A,null),exampleSrc:r.createElement(s,null),isExpanded:a})},m=t(49462),h=t(13437),g=t(55883),v=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var x={};function O(e){var n=e.components,t=y(e,v);return(0,a.mdx)("wrapper",b({},x,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _datasetRegions = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions4"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#noUpperBound\'));\nvar dataset = _utils.default.deepClone(_datasetRegions.default);\nvar NoUpperBoundLineExample = function NoUpperBoundLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "noUpperBound"\n });\n};\nvar _default = exports.default = NoUpperBoundLineExample;\n')))}O.isMDXComponent=!0;var _=function(e){var n=e.title,t=e.description,a=e.isExpanded;return r.createElement(d.A,{title:n||"No Upper Bound",description:t,example:r.createElement(g.A,null),exampleCssSrc:r.createElement(c.A,null),exampleSrc:r.createElement(O,null),isExpanded:a})},w=["components"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var D={},E="wrapper";function P(e){var n=e.components,t=L(e,w);return(0,a.mdx)(E,j({},D,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_4\',\n label: {\n display: \'Data Label 4\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n color: _carbonGraphs.default.helpers.COLORS.ORANGE,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithCos)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI * 5\n }),\n legendOptions: {\n showLine: true,\n showShape: true\n },\n regions: [{\n start: 2\n }]\n};\nvar _default = exports.default = data;\n')))}P.isMDXComponent=!0;var C=["components"];function R(){return R=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(27647);var S={},G="wrapper";function M(e){var n=e.components,t=A(e,C);return(0,a.mdx)(G,R({},S,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"no-region-bound"},"No Region bound"),(0,a.mdx)("p",null,"No region bound consists of line graph examples with region having no lower bound and region with no upper bound."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"examples"},"Examples"),(0,a.mdx)(f,{mdxType:"NoLowerRegionBoundLineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for no lower bound")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(m.A,{mdxType:"NoLowerRegionBoundGraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(h.A,{mdxType:"NoLowerRegionBoundDataObject"})),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)("br",null),(0,a.mdx)(_,{mdxType:"NoUpperRegionBoundLineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data used for no upper bound")),(0,a.mdx)("h3",{id:"graph-config-object-1"},"Graph Config object"),(0,a.mdx)(m.A,{mdxType:"NoUpperRegionBoundGraphConfig"}),(0,a.mdx)("h3",{id:"data-object-1"},"Data object"),(0,a.mdx)(P,{mdxType:"NoUpperRegionBoundDataObject"})))}M.isMDXComponent=!0},13437:function(e,n,t){"use strict";t.d(n,{A:function(){return u}});t(96540);var r=t(36665),a=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l={},p="wrapper";function u(e){var n=e.components,t=i(e,a);return(0,r.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar _createGraphValues = require("../createGraphValues");\nvar data = {\n key: \'uid_3\',\n label: {\n display: \'Data Label 3\'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n color: _carbonGraphs.default.helpers.COLORS.ORANGE,\n onClick: _popup.loadPopup,\n values: (0, _createGraphValues.createGraphValuesWithCos)({\n length: 20,\n initialX: 85,\n xModifier: 10,\n yModifier: Math.PI\n }),\n legendOptions: {\n showLine: true,\n showShape: true\n },\n regions: [{\n end: 10\n }]\n};\nvar _default = exports.default = data;\n')))}u.isMDXComponent=!0},49462:function(e,n,t){"use strict";t.d(n,{A:function(){return u}});t(96540);var r=t(36665),a=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l={},p="wrapper";function u(e){var n=e.components,t=i(e,a);return(0,r.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}u.isMDXComponent=!0},79679:function(e,n,t){"use strict";t.d(n,{A:function(){return u}});t(96540);var r=t(36665),a=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var l={},p="wrapper";function u(e){var n=e.components,t=i(e,a);return(0,r.mdx)(p,o({},l,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}u.isMDXComponent=!0},27647:function(e,n,t){var r,a;void 0===(a="function"==typeof(r=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function r(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var r=t.offsetHeight;t.open=!0;var a=r!=t.offsetHeight;return document.body.removeChild(t),a}function a(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}r()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),a("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?r.call(n,t,n,e):r)||(e.exports=a)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},45633:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/4193-56e0f5fb31af164d1379.js b/4193-56e0f5fb31af164d1379.js new file mode 100644 index 000000000..a8aa8d652 --- /dev/null +++ b/4193-56e0f5fb31af164d1379.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[4193],{42826:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),i=n(74013),l={key:"uid_5",label:{display:"Data Label 5"},shape:r.default.helpers.SHAPES.DARK.SQUARE,color:r.default.helpers.COLORS.ORANGE,onClick:o.loadPopup,values:(0,i.createGraphValuesWithCos)({length:20,initialX:85,xModifier:10,yModifier:5*Math.PI}),legendOptions:{showLine:!0,showShape:!0},regions:[{axis:"y",start:2,end:10,color:"#f4f4f4"},{axis:"y",start:12,end:18,color:"#c8cacb"}]};t.default=l},74013:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createGraphValuesWithSin=t.createGraphValuesWithCos=void 0;t.createGraphValuesWithSin=function(e){var t=e.length,n=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.sin(t)*r,x:n+t*a}}))},t.createGraphValuesWithCos=function(e){var t=e.length,n=e.initialX,a=e.xModifier,r=e.yModifier;return new Array(t).fill("").map((function(e,t){return{y:Math.cos(t)*r,x:n+t*a}}))}},32213:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var u=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?u(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",s)}if(i&&i.length>0){var u=[];i.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",u)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.label,i=a.display,l=a.y,p=a.startDate,s=a.endDate,c=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",u(p)),f(r,"End Date",u(s)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){v();var n=g(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",u(r))},t.loadTimelinePopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?u(o):o)),f(r,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var i={id:o.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},97275:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),i=a(n(45839));n(45633);var l=a(n(29683)),p=a(n(32213)),s=a(n(42826)),u=i.default.deepClone((0,p.default)("#multipleRegions")),c=i.default.deepClone(s.default);t.A=function(){return r.default.useEffect((function(){o.default.api.graph(u).loadContent(o.default.api.line(c))}),[]),r.default.createElement(l.default,{id:"multipleRegions"})}},4193:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return w}});var a=n(96540),r=n(36665),o=n(97275),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={};function u(e){var t=e.components,n=p(e,i);return(0,r.mdx)("wrapper",l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _datasetRegions = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetRegions5"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#multipleRegions\'));\nvar dataset = _utils.default.deepClone(_datasetRegions.default);\nvar MultipleRegionsLineExample = function MultipleRegionsLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "multipleRegions"\n });\n};\nvar _default = exports.default = MultipleRegionsLineExample;\n')))}u.isMDXComponent=!0;var c=n(201),d=n(79679),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(c.A,{title:t||"Multiple Regions",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})};n(49462);var m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var h=function(e){return function(t){return console.warn("Component "+e+" was not imported, exported, or provided by MDXProvider as global scope"),(0,r.mdx)("div",t)}},y=h("GraphConfig"),b=h("DataObject"),x={},O="wrapper";function w(e){var t=e.components,n=v(e,m);return(0,r.mdx)(O,g({},x,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"multiple-regions"},"Multiple regions"),(0,r.mdx)("p",null,"This is line graph associated with multiple regions."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraph"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(y,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(b,{mdxType:"DataObject"})))}w.isMDXComponent=!0},49462:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}s.isMDXComponent=!0},79679:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n:root {\n --line-transition-duration: 0.3s;\n}\n\n.carbon-line path {\n /* To counteract the opacity change when blur is used on a line */\n @include terra-graph-basic-transition(\n opacity,\n var(--line-transition-duration),\n var(--default-transition-timing)\n );\n\n fill: none;\n stroke-width: 1px;\n\n &.carbon-highlight {\n @include terra-graph-transform-transition(\n stroke,\n var(--default-transition-duration),\n var(--default-transition-timing)\n );\n stroke-width: 2px;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},45633:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/42116-349516e5c009646cb925.js b/42116-349516e5c009646cb925.js new file mode 100644 index 000000000..950a9ede0 --- /dev/null +++ b/42116-349516e5c009646cb925.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[42116],{42116:function(t,e,a){a.r(e),a.d(e,{default:function(){return p}});a(96540);var n=a(36665),d=["components"];function r(){return r=Object.assign?Object.assign.bind():function(t){for(var e=1;e=0||(d[a]=t[a]);return d}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(d[a]=t[a])}return d}var m={},i="wrapper";function p(t){var e=t.components,a=l(t,d);return(0,n.mdx)(i,r({},m,a,{components:e,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"colors"},"Colors"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#dark-colors"},"Dark Colors")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#light-colors"},"Light Colors")),(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("a",{parentName:"li",href:"#common-colors"},"Common Colors"))),(0,n.mdx)("h2",{id:"dark-colors"},"Dark Colors"),(0,n.mdx)("table",null,(0,n.mdx)("thead",{parentName:"table"},(0,n.mdx)("tr",{parentName:"thead"},(0,n.mdx)("th",{parentName:"tr",align:null},"Constant"),(0,n.mdx)("th",{parentName:"tr",align:null},"Value"))),(0,n.mdx)("tbody",{parentName:"table"},(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"BLUE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/176ba0/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#176ba0"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"GREEN"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/076e00/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#076e00"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"ORANGE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/b54900/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#b54900"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"PINK"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/ae0868/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#ae0868"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"PURPLE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/9c19a3/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#9c19a3"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"YELLOW"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/ffc20a/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#ffc20a"))))),(0,n.mdx)("h2",{id:"light-colors"},"Light Colors"),(0,n.mdx)("table",null,(0,n.mdx)("thead",{parentName:"table"},(0,n.mdx)("tr",{parentName:"thead"},(0,n.mdx)("th",{parentName:"tr",align:null},"Constant"),(0,n.mdx)("th",{parentName:"tr",align:null},"Value"))),(0,n.mdx)("tbody",{parentName:"table"},(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LIGHT_BLUE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/008fe0/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#008fe0"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LIGHT_GREEN"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/4b9b1c/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#4b9b1c"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LIGHT_ORANGE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/e46511/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#e46511"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LIGHT_PINK"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/e16092/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#e16092"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LIGHT_PURPLE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/bc70c7/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#bc70c7"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LIGHT_YELLOW"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/ffda6c/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#ffda6c"))))),(0,n.mdx)("h2",{id:"common-colors"},"Common Colors"),(0,n.mdx)("table",null,(0,n.mdx)("thead",{parentName:"table"},(0,n.mdx)("tr",{parentName:"thead"},(0,n.mdx)("th",{parentName:"tr",align:null},"Constant"),(0,n.mdx)("th",{parentName:"tr",align:null},"Value"))),(0,n.mdx)("tbody",{parentName:"table"},(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"BLACK"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/1c1f21/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#1c1f21"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"GREY"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/a7aaab/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#a7aaab"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"LAVENDER"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/8374c2/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#8374c2"))),(0,n.mdx)("tr",{parentName:"tbody"},(0,n.mdx)("td",{parentName:"tr",align:null},"WHITE"),(0,n.mdx)("td",{parentName:"tr",align:null},(0,n.mdx)("img",{width:"16px",height:"16px",src:"https://placehold.it/15/ffffff/000000?text=+"})," ",(0,n.mdx)("inlineCode",{parentName:"td"},"#ffffff"))))),(0,n.mdx)("p",null,(0,n.mdx)("strong",{parentName:"p"},"Note:")),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"In accordance with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.w3.org/WAI/WCAG21/Understanding/non-text-contrast.html"},"accessibility guidelines"),", Carbon colors must meet a contrast ratio of 3:1. Therefore, ",(0,n.mdx)("inlineCode",{parentName:"li"},"COLORS.YELLOW")," and ",(0,n.mdx)("inlineCode",{parentName:"li"},"COLORS.LIGHT_YELLOW")," will eventually be removed from the color palette in a future major release."),(0,n.mdx)("li",{parentName:"ul"},"If you are currently using ",(0,n.mdx)("inlineCode",{parentName:"li"},"COLORS.YELLOW")," or ",(0,n.mdx)("inlineCode",{parentName:"li"},"COLORS.LIGHT_YELLOW"),", please switch to a different color.")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/42242-91e0430a57185be0c03f.js b/42242-91e0430a57185be0c03f.js new file mode 100644 index 000000000..fe90119fd --- /dev/null +++ b/42242-91e0430a57185be0c03f.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[42242],{70646:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t(61770)),r=t(86006),l={key:"timeseries_paired_result_data",label:{high:{display:"High"},mid:{display:"Median"},low:{display:"Low"}},shape:{high:o.default.helpers.SHAPES.DARK.TEAR_ALT,mid:o.default.helpers.SHAPES.DARK.RHOMBUS,low:o.default.helpers.SHAPES.DARK.TEAR_DROP},color:{high:o.default.helpers.COLORS.BLACK,mid:o.default.helpers.COLORS.BLUE,low:o.default.helpers.COLORS.BLACK},onClick:r.loadPopup,values:[{high:{x:"2016-05-01T12:00:00Z",y:150,isCritical:!1},mid:{x:"2016-05-01T12:00:00Z",y:40},low:{x:"2016-05-01T12:00:00Z",y:10,isCritical:!1}},{high:{x:"2016-08-17T12:00:00Z",y:110},mid:{x:"2016-08-17T12:00:00Z",y:70},low:{x:"2016-08-17T12:00:00Z",y:30}},{high:{x:"2016-10-17T12:00:00Z",y:160},mid:{x:"2016-10-17T12:00:00Z",y:120},low:{x:"2016-10-17T12:00:00Z",y:100}},{high:{x:"2017-03-17T12:00:00Z",y:190},mid:{x:"2017-03-17T12:00:00Z",y:90},low:{x:"2017-03-17T12:00:00Z",y:60}},{low:{x:"2017-07-17T12:00:00Z",y:10}},{high:{x:"2018-02-17T12:00:00Z",y:180}}]};n.default=l},86006:function(e,n,t){"use strict";var a=t(24994),o=t(73738);Object.defineProperty(n,"__esModule",{value:!0}),n.loadY2AxisLabelPopup=n.loadXAndYAxisLabelPopup=n.loadTrackPopup=n.loadTimelinePopup=n.loadTextLabelPopup=n.loadTaskPopup=n.loadPopup=n.loadPiePopup=n.loadDatelinePopup=n.loadBubblePopup=n.loadBarPopup=void 0;var r=a(t(85715)),l=function(e,n){if(!n&&e&&e.__esModule)return e;if(null===e||"object"!=o(e)&&"function"!=typeof e)return{default:e};var t=s(n);if(t&&t.has(e))return t.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var l in e)if("default"!==l&&{}.hasOwnProperty.call(e,l)){var i=r?Object.getOwnPropertyDescriptor(e,l):null;i&&(i.get||i.set)?Object.defineProperty(a,l,i):a[l]=e[l]}return a.default=e,t&&t.set(e,a),a}(t(37332)),i=a(t(22639)),p=a(t(45839));function s(e){if("function"!=typeof WeakMap)return null;var n=new WeakMap,t=new WeakMap;return(s=function(e){return e?t:n})(e)}var c=function(e){return new Date(e).toLocaleString()},d=function(e){return e?u(e)?c(e):e:null},u=function(e){return e instanceof Date},f=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n),a.append("g").classed("popup-text",!0).text(t)},y=function(e,n,t){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(n);for(var o=a.append("g").classed("section",!0),l=function(){var e=p[i],n=o.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var t=(0,r.default)(e,2),a=t[0],o=t[1],l=n.append("g").classed("popup-item",!0);l.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),l.append("g").classed("popup-text",!0).text(o)}))},i=0,p=Object.values(t);i0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",p)}if(r&&r.length>0){var s=[];r.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",s)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",c)}if(i&&i.length>0){var d=[];i.forEach((function(e){d.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",d)}},n.loadTaskPopup=function(e,n,t,a){m();var o=h(e).append("g"),r=a.label,l=a.display,i=a.y,p=a.startDate,s=a.endDate,d=a.percentage;r&&f(o,"Task Name",l),f(o,"Track",i),f(o,"Start Date",c(p)),f(o,"End Date",c(s)),d&&f(o,"Percentage",d)},n.loadDatelinePopup=function(e,n){m();var t=h(e).append("g"),a=n.label,o=n.value;a&&f(t,"Milestone",a.display),f(t,"Date",c(o))},n.loadTimelinePopup=function(e,n,t,a){m();var o=h(e).append("g"),r=a.x,l=(a.y,a.label),i=a.content;f(o,"X axis","".concat(u(r)?c(r):r)),f(o,"".concat(l.display),i)},n.loadPiePopup=function(e,n,t,a){m();var o=h(e).append("g"),r=a.label,l=a.value;f(o,r.display,l)}},29683:function(e,n,t){"use strict";var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t(96540)),r=a(t(5556));t(16939);var l={id:r.default.string.isRequired},i=function(e){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),o.default.createElement("div",{id:e.id,className:"example-graph-container"}))};i.propTypes=l;n.default=i},47391:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),o=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,o);return(0,a.mdx)(p,r({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'timeseries_paired_result_data',\n label: {\n high: {\n display: 'High'\n },\n mid: {\n display: 'Median'\n },\n low: {\n display: 'Low'\n }\n },\n shape: {\n high: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_ALT,\n mid: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n low: _carbonGraphs.default.helpers.SHAPES.DARK.TEAR_DROP\n },\n color: {\n high: _carbonGraphs.default.helpers.COLORS.BLACK,\n mid: _carbonGraphs.default.helpers.COLORS.BLUE,\n low: _carbonGraphs.default.helpers.COLORS.BLACK\n },\n onClick: _popup.loadPopup,\n values: [{\n high: {\n x: '2016-05-01T12:00:00Z',\n y: 150,\n isCritical: false\n },\n mid: {\n x: '2016-05-01T12:00:00Z',\n y: 40\n },\n low: {\n x: '2016-05-01T12:00:00Z',\n y: 10,\n isCritical: false\n }\n }, {\n high: {\n x: '2016-08-17T12:00:00Z',\n y: 110\n },\n mid: {\n x: '2016-08-17T12:00:00Z',\n y: 70\n },\n low: {\n x: '2016-08-17T12:00:00Z',\n y: 30\n }\n }, {\n high: {\n x: '2016-10-17T12:00:00Z',\n y: 160\n },\n mid: {\n x: '2016-10-17T12:00:00Z',\n y: 120\n },\n low: {\n x: '2016-10-17T12:00:00Z',\n y: 100\n }\n }, {\n high: {\n x: '2017-03-17T12:00:00Z',\n y: 190\n },\n mid: {\n x: '2017-03-17T12:00:00Z',\n y: 90\n },\n low: {\n x: '2017-03-17T12:00:00Z',\n y: 60\n }\n }, {\n low: {\n x: '2017-07-17T12:00:00Z',\n y: 10\n }\n }, {\n high: {\n x: '2018-02-17T12:00:00Z',\n y: 180\n }\n }]\n};\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0},88703:function(e,n,t){"use strict";t.d(n,{A:function(){return s}});t(96540);var a=t(36665),o=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(o[t]=e[t]);return o}(e,n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}var i={},p="wrapper";function s(e){var n=e.components,t=l(e,o);return(0,a.mdx)(p,r({},i,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n@import '../colors.module';\n\n/*\nWe are forcing display of the hidden item for data points,\nthis is only applicable when legend toggle is applied\nand one of the data point is selected.\n*/\n.carbon-data-pair--selected {\n @include terra-graph-opacity-show(); //!important;\n}\n\n.carbon-paired-point {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-paired-line {\n fill: none;\n stroke: var(--terra-graphs-dark);\n stroke-width: 1px;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,n,t){var a,o;void 0===(o="function"==typeof(a=function(){var e="details",n="summary";function t(e){if("summary"===e.target.nodeName.toLowerCase()){var n=e.target.parentNode;if(!n)return;n.getAttribute("open")?(n.open=!1,n.removeAttribute("open")):(n.open=!0,n.setAttribute("open","open"))}}function a(){var t=document.createElement(e);if(!("open"in t))return!1;t.innerHTML="<"+n+">ab",document.body.appendChild(t);var a=t.offsetHeight;t.open=!0;var o=a!=t.offsetHeight;return document.body.removeChild(t),o}function o(e,n){if(!document.getElementById(e)){var t=document.createElement("style");t.id=e,t.innerHTML=n,document.getElementsByTagName("head")[0].appendChild(t)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",t),o("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+n+") { display: none; }\nhtml.no-details "+e+" > "+n+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+n+':before { content: "▼"; }'))})?a.call(n,t,n,e):a)||(e.exports=o)},16939:function(e,n,t){"use strict";t.r(n),n.default={}},63841:function(e,n,t){"use strict";t.r(n),n.default={}}}]); \ No newline at end of file diff --git a/42649-570ba6be7d72012a27e7.js b/42649-570ba6be7d72012a27e7.js new file mode 100644 index 000000000..79caaceb9 --- /dev/null +++ b/42649-570ba6be7d72012a27e7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[42649],{85275:function(e,n,t){var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770));n.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0).toISOString(),upperLimit:new Date(2016,0,2,0).toISOString(),ticks:{}},y:{label:"Paired Set A",lowerLimit:0,upperLimit:200},y2:{show:!1,label:"Paired Set B",lowerLimit:100,upperLimit:350}},eventline:[{color:r.default.helpers.COLORS.GREY,style:{strokeDashArray:"4,4"},value:new Date(2016,0,1,8).toISOString()}],pan:{enabled:!0},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},72896:function(e,n,t){var a=t(24994);n.A=void 0;var r=a(t(85715)),i=a(t(96540)),l=a(t(23986)),u=a(t(61770)),o=a(t(45839));t(63841);var p,s=a(t(29683)),c=a(t(85275)),d=a(t(13720)),f=o.default.deepClone((0,c.default)("#PairedResultDynamicEventline")),m=[o.default.deepClone(d.default)],h={initial:0,factor:3};n.A=function(){i.default.useEffect((function(){p=u.default.api.graph(f),m.forEach((function(e){p.loadContent(u.default.api.pairedResult(e))}))}),[]);var e=i.default.useReducer((function(e,n){var t;switch(n.type){case"panLeft":t=e.initial-e.factor;break;case"panRight":t=e.initial+e.factor;break;default:return e}return{initial:t,factor:e.factor}}),h),n=(0,r.default)(e,2),t=n[0],a=n[1];return i.default.useLayoutEffect((function(){if(p){p.config.axis.x.lowerLimit=new Date(2016,0,1,t.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,t.initial).toISOString();var e=[{color:u.default.helpers.COLORS.BLACK,style:{strokeDashArray:"2,2"},value:new Date(2016,0,1,12).toISOString()}],n={panData:[o.default.deepClone(d.default)],eventline:e};p.reflowMultipleDatasets(n)}}),[t.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(s.default,{id:"PairedResultDynamicEventline"}))}},42649:function(e,n,t){t.r(n),t.d(n,{default:function(){return D}});var a=t(96540),r=t(36665),i=t(72896),l=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p={};function s(e){var n=e.components,t=o(e,l);return(0,r.mdx)("wrapper",u({},p,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _pairedResultPanningWithEventline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/PairedResult/pairedResultPanningWithEventline"));\nvar _pairedResultSimplePanningData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/PairedResult/pairedResultSimplePanningData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\nvar graphConfig = _utils.default.deepClone((0, _pairedResultPanningWithEventline.default)(\'#PairedResultDynamicEventline\'));\nvar dataset = [_utils.default.deepClone(_pairedResultSimplePanningData.default)];\nvar state = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar PairedResultDynamicEventlinePanningExample = function PairedResultDynamicEventlinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.pairedResult(data));\n });\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newEventline = [{\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n style: {\n strokeDashArray: \'2,2\'\n },\n value: new Date(2016, 0, 1, 12).toISOString()\n }];\n var newDataset = {\n panData: [_utils.default.deepClone(_pairedResultSimplePanningData.default)],\n eventline: newEventline\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "PairedResultDynamicEventline"\n }));\n};\nvar _default = exports.default = PairedResultDynamicEventlinePanningExample;\n')))}s.isMDXComponent=!0;var c=t(201),d=t(88703),f=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(c.A,{title:n||"Dynamic Eventline",description:t,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var b={},v="wrapper";function y(e){var n=e.components,t=g(e,m);return(0,r.mdx)(v,h({},b,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getPairedResultTimeseriesPanningConfig = function getPairedResultTimeseriesPanningConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: new Date(2016, 0, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 2, 0).toISOString(),\n ticks: {}\n },\n y: {\n label: 'Paired Set A',\n lowerLimit: 0,\n upperLimit: 200\n },\n y2: {\n show: false,\n label: 'Paired Set B',\n lowerLimit: 100,\n upperLimit: 350\n }\n },\n eventline: [{\n color: _carbonGraphs.default.helpers.COLORS.GREY,\n style: {\n strokeDashArray: '4,4'\n },\n value: new Date(2016, 0, 1, 8).toISOString()\n }],\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultTimeseriesPanningConfig;\n")))}y.isMDXComponent=!0;var x=t(76188),_=["components"];function R(){return R=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var O={},w="wrapper";function D(e){var n=e.components,t=S(e,_);return(0,r.mdx)(w,R({},O,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"paired-result-graph-panning---dynamic-eventline"},"Paired Result graph panning - dynamic eventline"),(0,r.mdx)("p",null,"This is a paired result graph example that implements panning with a dynamic eventline."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"PairedResultGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(y,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x.A,{mdxType:"DataObject"})))}D.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/42801-521f077fe8ebf8746a75.js b/42801-521f077fe8ebf8746a75.js new file mode 100644 index 000000000..05038bac6 --- /dev/null +++ b/42801-521f077fe8ebf8746a75.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[42801],{84219:function(e,n,t){var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770)),i=t(86006),l={key:"uid_1",label:{display:"Data Label 1"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};n.default=l},16597:function(e,n,t){var a=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var r=a(t(61770));n.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},2712:function(e,n,t){var a=t(24994);n.A=void 0;var r=a(t(85715)),i=a(t(96540)),l=a(t(23986)),o=a(t(61770)),u=a(t(45839));t(45633);var p,s=a(t(29683)),c=a(t(16597)),d=a(t(84219)),f=u.default.deepClone((0,c.default)("#linePanningExample")),m=u.default.deepClone(d.default),g={initial:0,factor:3};n.A=function(){i.default.useEffect((function(){(p=o.default.api.graph(f)).loadContent(o.default.api.line(m))}),[]);var e=i.default.useReducer((function(e,n){var t;switch(n.type){case"panLeft":t=e.initial-e.factor;break;case"panRight":t=e.initial+e.factor;break;default:return e}return{initial:t,factor:e.factor}}),g),n=(0,r.default)(e,2),t=n[0],a=n[1];return i.default.useLayoutEffect((function(){p&&(p.config.axis.x.lowerLimit=new Date(2016,0,1,t.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,t.initial).toISOString(),p.reflowMultipleDatasets())}),[t.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(s.default,{id:"linePanningExample"}))}},42801:function(e,n,t){t.r(n),t.d(n,{default:function(){return _}});var a=t(96540),r=t(36665),i=t(2712),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var p={};function s(e){var n=e.components,t=u(e,l);return(0,r.mdx)("wrapper",o({},p,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseriesPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseriesPanning"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseriesPanning.default)(\'#linePanningExample\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar state = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar SimpleLinePanningExample = function SimpleLinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets();\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "linePanningExample"\n }));\n};\nvar _default = exports.default = SimpleLinePanningExample;\n')))}s.isMDXComponent=!0;var c=t(201),d=t(79679),f=function(e){var n=e.title,t=e.description,r=e.isExpanded;return a.createElement(c.A,{title:n||"Simple Panning",description:t,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=t(33366),g=t(55020),h=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}t(27647);var S={},y="wrapper";function _(e){var n=e.components,t=x(e,h);return(0,r.mdx)(y,b({},S,t,{components:n,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"line-graph---panning"},"Line Graph - panning"),(0,r.mdx)("p",null,"This is a line graph example that implements panning. Click on the panning buttons to pan the graph."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(g.A,{mdxType:"DataObject"})))}_.isMDXComponent=!0},33366:function(e,n,t){t.d(n,{A:function(){return p}});t(96540);var a=t(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(r[t]=e[t]);return r}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(r[t]=e[t])}return r}var o={},u="wrapper";function p(e){var n=e.components,t=l(e,r);return(0,a.mdx)(u,i({},o,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesPanningConfig = function getLineTimeseriesPanningConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesPanningConfig;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/42998-260c8db06b054176b3a2.js b/42998-260c8db06b054176b3a2.js new file mode 100644 index 000000000..edd944635 --- /dev/null +++ b/42998-260c8db06b054176b3a2.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[42998],{24225:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),l=[{key:"uid_event_1",label:{display:"Defect A"},onClick:n(86006).loadPopup,shape:{path:[{id:"calendar",d:"M31 5V1.8c0-1-.8-1.8-1.8-1.8h-1.5c-1 0-1.8.8-1.8 1.8V5H11V1.8c0-1-.8-1.8-1.8-1.8H7.8C6.8 0 6 .8 6 1.8V5H2v33h19.1c-.1-.7-.1-1.3-.1-2v-1H5V17h27v4.6c1-.3 2-.4 3-.5V5h-4z"},{id:"circle",fill:"#78C346",d:"M36 24c6.6 0 12 5.4 12 12s-5.4 12-12 12-12-5.4-12-12 5.4-12 12-12z"},{id:"check",fill:"#FFF",d:"M34.1 42.4l-6.5-6.5 2.1-2.1 4.4 4.3 8.2-8.1 2.1 2.1-10.3 10.3z"}],options:{x:-7,y:-7,scale:.4}},color:r.default.helpers.COLORS.BLACK,values:[new Date(2018,2,5).toISOString()]},{key:"uid_event_2",label:{display:"Defect B"},shape:{path:[{id:"clock",d:"M25.3 25.9l-5.2-5.2v-8.5c.1-.7-.4-1.3-1-1.4-.7-.1-1.3.4-1.4 1V21c0 .5.2.9.5 1.2l5.3 5.3c.5.5 1.2.6 1.8.2.5-.4.6-1.1.3-1.6-.1 0-.2-.1-.3-.2zm7.2-15l1.7-1.7c.6-.6.6-1.7 0-2.3l-1.1-1.1c-.6-.6-1.7-.6-2.3 0L29 7.6c-1.5-1.1-3.3-2-5.1-2.6-.9-.3-1.8-.5-2.7-.6V1.6c0-.9-.7-1.6-1.6-1.6h-1.5c-.9 0-1.6.7-1.6 1.6v2.7C7.2 5.7.9 14.4 2.3 23.7 3.6 32 10.7 38.1 19 38.1c1 0 1.9-.1 2.9-.3l-1.4-1.4c-.2-.2-.4-.5-.5-.8-.3 0-.7.1-1 .1-8.1 0-14.6-6.5-14.6-14.6S10.9 6.5 19 6.5c1.5 0 2.9.2 4.3.7 5.9 1.8 9.9 7.1 10.2 13.2.7-.5 1.6-.6 2.4-.2-.2-3.4-1.4-6.6-3.4-9.3z"},{id:"diamond",fill:"#E50000",d:"M47.6 34.1s0-.1 0 0L35.7 22.2c-.2-.2-.5-.4-.8-.4s-.6.1-.8.3l-12 12c-.5.4-.5 1.2-.1 1.6 0 0 0 .1.1.1L34 47.6c.5.4 1.1.4 1.6 0l11.9-11.9c.5-.4.5-1.2.1-1.6z"},{id:"exclamation",fill:"#FFF",d:"M34 39h2v2h-2v-2zm0-11h2v9h-2v-9z"}],options:{x:-7,y:-7,scale:.35}},color:r.default.helpers.COLORS.WHITE,values:[new Date(2018,5,4).toISOString()]},{key:"uid_event_3",label:{display:"Defect C"},shape:{path:[{id:"triangle",fill:"#E50000",d:"M1.2 45c-1.1 0-1.6-.8-1-1.7L23 3.7c.5-1 1.4-1 2 0l22.8 39.6c.5 1 .1 1.7-1 1.7H1.2z"},{id:"exclamation",fill:"#FFF",d:"M21.5 36.7h5V42h-5v-5.3zm0-22.7h5v17.3h-5V14z"}],options:{x:-6.5,y:-7.5,scale:.35}},values:[new Date(2018,3,30).toISOString()]}];t.default=l},39355:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=[{key:"task3",onClick:n(86006).loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,3,1).toISOString(),endDate:new Date(2018,7,10).toISOString()}];t.default=a},60345:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,axis:{x:{show:!0,lowerLimit:new Date(2018,1,1,12).toISOString(),upperLimit:new Date(2019,1,1,12).toISOString(),rangeRounding:!0}}}}},14134:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(96540)),l=a(n(61770)),o=a(n(45839));n(40415);var i=a(n(29683)),s=a(n(60345)),c=a(n(65236)),p=a(n(39355)),u=a(n(24225)),d=o.default.deepClone((0,s.default)("#ganttEvents"));d.showActionLegend=!1,d.dateline=[];var f=(0,c.default)([p.default],[],[u.default],[],1);t.A=function(){return r.default.useEffect((function(){var e=l.default.api.gantt(d);f.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(i.default,{id:"ganttEvents"})}},42998:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}});var a=n(96540),r=n(36665),l=n(14134),o=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var c={};function p(e){var t=e.components,n=s(e,o);return(0,r.mdx)("wrapper",i({},c,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttDefaultConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttDefaultConfig"));\nvar _loadTracks = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/loadTracks"));\nvar _taskDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset2"));\nvar _eventDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/eventDataset1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttDefaultConfig.default)(\'#ganttEvents\'));\ngraphConfig.showActionLegend = false;\ngraphConfig.dateline = [];\nvar dataset = (0, _loadTracks.default)([_taskDataset.default], [], [_eventDataset.default], [], 1);\nvar GanttEventsExample = function GanttEventsExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "ganttEvents"\n });\n};\nvar _default = exports.default = GanttEventsExample;\n')))}p.isMDXComponent=!0;var u=n(201),d=n(42929),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(u.A,{title:t||"Events",description:n,example:a.createElement(l.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(p,null),isExpanded:r})},m=n(86010),v=n(72892),h=n(99925),g=["components"];function b(){return b=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var y={},O="wrapper";function _(e){var t=e.components,n=x(e,g);return(0,r.mdx)(O,b({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar scheduled = {\n path: [{\n id: 'calendar',\n d: 'M31 5V1.8c0-1-.8-1.8-1.8-1.8h-1.5c-1 0-1.8.8-1.8 1.8V5H11V1.8c0-1-.8-1.8-1.8-1.8H7.8C6.8' + ' 0 6 .8 6 1.8V5H2v33h19.1c-.1-.7-.1-1.3-.1-2v-1H5V17h27v4.6c1-.3 2-.4 3-.5V5h-4z'\n }, {\n id: 'circle',\n fill: '#78C346',\n d: 'M36 24c6.6 0 12 5.4 12 12s-5.4 12-12 12-12-5.4-12-12 5.4-12 12-12z'\n }, {\n id: 'check',\n fill: '#FFF',\n d: 'M34.1 42.4l-6.5-6.5 2.1-2.1 4.4 4.3 8.2-8.1 2.1 2.1-10.3 10.3z'\n }],\n options: {\n x: -7,\n y: -7,\n scale: 0.4\n }\n};\nvar dueSoon = {\n path: [{\n id: 'clock',\n d: 'M25.3 25.9l-5.2-5.2v-8.5c.1-.7-.4-1.3-1-1.4-.7-.1-1.3.4-1.4 1V21c0 .5.2.9.5 ' + '1.2l5.3 5.3c.5.5 1.2.6 1.8.2.5-.4.6-1.1.3-1.6-.1 0-.2-.1-.3-.2zm7.2-15l1.7-1.7c.6-.6.6-1.7 ' + '0-2.3l-1.1-1.1c-.6-.6-1.7-.6-2.3 0L29 7.6c-1.5-1.1-3.3-2-5.1-2.6-.9-.3-1.8-.5-2.7-.6V1.6c0-.9-.7-' + '1.6-1.6-1.6h-1.5c-.9 0-1.6.7-1.6 1.6v2.7C7.2 5.7.9 14.4 2.3 23.7 3.6 32 10.7 38.1 19 38.1c1 0 1.9-.1 2.9' + '-.3l-1.4-1.4c-.2-.2-.4-.5-.5-.8-.3 0-.7.1-1 .1-8.1 0-14.6-6.5-14.6-14.6S10.9 6.5 19 6.5c1.5 0 2.9.2 4.3.7 ' + '5.9 1.8 9.9 7.1 10.2 13.2.7-.5 1.6-.6 2.4-.2-.2-3.4-1.4-6.6-3.4-9.3z'\n }, {\n id: 'diamond',\n fill: '#E50000',\n d: 'M47.6 34.1s0-.1 0 0L35.7 22.2c-.2-.2-.5-.4-.8-.4s-.6.1-.8.3l-12 12c-.5.4-.5 1.2-.1 1.6 0 0 0 ' + '.1.1.1L34 47.6c.5.4 1.1.4 1.6 0l11.9-11.9c.5-.4.5-1.2.1-1.6z'\n }, {\n id: 'exclamation',\n fill: '#FFF',\n d: 'M34 39h2v2h-2v-2zm0-11h2v9h-2v-9z'\n }],\n options: {\n x: -7,\n y: -7,\n scale: 0.35\n }\n};\nvar alert = {\n path: [{\n id: 'triangle',\n fill: '#E50000',\n d: 'M1.2 45c-1.1 0-1.6-.8-1-1.7L23 3.7c.5-1 1.4-1 2 0l22.8 39.6c.5 1 .1 1.7-1 1.7H1.2z'\n }, {\n id: 'exclamation',\n fill: '#FFF',\n d: 'M21.5 36.7h5V42h-5v-5.3zm0-22.7h5v17.3h-5V14z'\n }],\n options: {\n x: -6.5,\n y: -7.5,\n scale: 0.35\n }\n};\nvar eventDataset1 = [{\n key: 'uid_event_1',\n label: {\n display: 'Defect A'\n },\n onClick: _popup.loadPopup,\n shape: scheduled,\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n values: [new Date(2018, 2, 5).toISOString()]\n}, {\n key: 'uid_event_2',\n label: {\n display: 'Defect B'\n },\n shape: dueSoon,\n color: _carbonGraphs.default.helpers.COLORS.WHITE,\n values: [new Date(2018, 5, 4).toISOString()]\n}, {\n key: 'uid_event_3',\n label: {\n display: 'Defect C'\n },\n shape: alert,\n values: [new Date(2018, 3, 30).toISOString()]\n}];\nvar _default = exports.default = eventDataset1;\n")))}_.isMDXComponent=!0;var D=["components"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var C={},w="wrapper";function k(e){var t=e.components,n=S(e,D);return(0,r.mdx)(w,j({},C,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-gantt"},"Simple Gantt"),(0,r.mdx)("p",null,"This is a simple Gantt chart with Events."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"task-dataset"},"Task Dataset"),(0,r.mdx)(v.A,{mdxType:"TasksDataObject"}),(0,r.mdx)("h4",{id:"events-dataset"},"Events Dataset"),(0,r.mdx)(_,{mdxType:"EventsDataObject"}),(0,r.mdx)("h3",{id:"load-track"},"Load Track"),(0,r.mdx)(h.A,{mdxType:"LoadTracks"})))}k.isMDXComponent=!0},72892:function(e,t,n){n.d(t,{A:function(){return c}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},s="wrapper";function c(e){var t=e.components,n=o(e,r);return(0,a.mdx)(s,l({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar taskDataset2 = [{\n key: \'task3\',\n onClick: _popup.loadTaskPopup,\n label: {\n display: \'Story Apex\'\n },\n startDate: new Date(2018, 3, 1).toISOString(),\n endDate: new Date(2018, 7, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset2;\n')))}c.isMDXComponent=!0},86010:function(e,t,n){n.d(t,{A:function(){return c}});n(96540);var a=n(36665),r=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var i={},s="wrapper";function c(e){var t=e.components,n=o(e,r);return(0,a.mdx)(s,l({},i,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar getGanttDefaultConfig = function getGanttDefaultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2018, 1, 1, 12).toISOString(),\n upperLimit: new Date(2019, 1, 1, 12).toISOString(),\n rangeRounding: true // If set to false, we don\'t extend the domain\n }\n }\n };\n};\nvar _default = exports.default = getGanttDefaultConfig;\n')))}c.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/43074-da47746193777099a84c.js b/43074-da47746193777099a84c.js new file mode 100644 index 000000000..2e190a960 --- /dev/null +++ b/43074-da47746193777099a84c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[43074],{80734:function(e,n,t){var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(61770)),i=t(86006),o={key:"uid_2",label:{display:"Data Label 2"},shape:a.default.helpers.SHAPES.DARK.RHOMBUS,color:a.default.helpers.COLORS.BLUE,onClick:i.loadPopup,yAxis:"y2",values:[{x:new Date(2016,0,1,1,5).toISOString(),y:0},{x:new Date(2016,0,1,2,15).toISOString(),y:50},{x:new Date(2016,0,1,3,15).toISOString(),y:60},{x:new Date(2016,0,1,4,15).toISOString(),y:80},{x:new Date(2016,0,1,5,15).toISOString(),y:120},{x:new Date(2016,0,1,6,15).toISOString(),y:130},{x:new Date(2016,0,1,7,0).toISOString(),y:180},{x:new Date(2016,0,1,8,15).toISOString(),y:185},{x:new Date(2016,0,1,9,45).toISOString(),y:200},{x:new Date(2016,0,1,12,15).toISOString(),y:220}]};n.default=o},11701:function(e,n,t){var r=t(24994);Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a=r(t(61770));n.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!0,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},21347:function(e,n,t){var r=t(24994);n.A=void 0;var a=r(t(85715)),i=r(t(96540)),o=r(t(23986)),l=r(t(61770)),u=r(t(45839));t(45633);var p,s=r(t(29683)),c=r(t(11701)),d=r(t(80734)),f=u.default.deepClone((0,c.default)("#linePanningExample")),m=u.default.deepClone(d.default),g={initial:0,factor:3};n.A=function(){i.default.useEffect((function(){(p=l.default.api.graph(f)).loadContent(l.default.api.line(m))}),[]);var e=i.default.useReducer((function(e,n){var t;switch(n.type){case"panLeft":t=e.initial-e.factor;break;case"panRight":t=e.initial+e.factor;break;default:return e}return{initial:t,factor:e.factor}}),g),n=(0,a.default)(e,2),t=n[0],r=n[1];return i.default.useLayoutEffect((function(){p&&(p.config.axis.x.lowerLimit=new Date(2016,0,1,t.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,t.initial).toISOString(),p.reflowMultipleDatasets())}),[t.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(o.default,{className:"button-pan-left",text:"<",onClick:function(){return r({type:"panLeft"})}}),i.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return r({type:"panRight"})}}),i.default.createElement(s.default,{id:"linePanningExample"}))}},43074:function(e,n,t){t.r(n),t.d(n,{default:function(){return P}});var r=t(96540),a=t(36665),i=t(21347),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var p={};function s(e){var n=e.components,t=u(e,o);return(0,a.mdx)("wrapper",l({},p,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseriesPanningY = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseriesPanningY2"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseriesPanningY.default)(\'#linePanningExample\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar state = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar Y2AxisLinePanningExample = function Y2AxisLinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, state),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n graph.reflowMultipleDatasets();\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "linePanningExample"\n }));\n};\nvar _default = exports.default = Y2AxisLinePanningExample;\n')))}s.isMDXComponent=!0;var c=t(201),d=t(79679),f=function(e){var n=e.title,t=e.description,a=e.isExpanded;return r.createElement(c.A,{title:n||"Y 2 Panning",description:t,example:r.createElement(i.A,null),exampleCssSrc:r.createElement(d.A,null),exampleSrc:r.createElement(s,null),isExpanded:a})},m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var h={},S="wrapper";function y(e){var n=e.components,t=x(e,m);return(0,a.mdx)(S,g({},h,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getConfigLineTimeseriesPanning = function getConfigLineTimeseriesPanning(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: true,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getConfigLineTimeseriesPanning;\n')))}y.isMDXComponent=!0;var b=["components"];function O(){return O=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}var v={},w="wrapper";function D(e){var n=e.components,t=_(e,b);return(0,a.mdx)(w,O({},v,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = [{\n key: 'uid_1',\n label: {\n display: 'Data Label 1'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.CIRCLE,\n onClick: _popup.loadPopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 5,\n isCritical: false\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 11\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 9\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 11\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 16\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 17\n }, {\n x: new Date(2016, 0, 1, 13, 15).toISOString(),\n y: 28\n }, {\n x: new Date(2016, 0, 1, 14, 15).toISOString(),\n y: 12\n }, {\n x: new Date(2016, 0, 1, 19, 45).toISOString(),\n y: 13\n }, {\n x: new Date(2016, 0, 1, 21, 15).toISOString(),\n y: 14\n }],\n yAxis: 'y'\n}, {\n key: 'uid_2',\n label: {\n display: 'Data Label 2'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadPopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 5).toISOString(),\n y: 0\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n y: 50\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n y: 60\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n y: 80\n }, {\n x: new Date(2016, 0, 1, 5, 15).toISOString(),\n y: 120\n }, {\n x: new Date(2016, 0, 1, 6, 15).toISOString(),\n y: 130\n }, {\n x: new Date(2016, 0, 1, 7, 0).toISOString(),\n y: 180\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n y: 185\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n y: 200\n }, {\n x: new Date(2016, 0, 1, 12, 15).toISOString(),\n y: 220\n }],\n yAxis: 'y2'\n}];\nvar _default = exports.default = data;\n")))}D.isMDXComponent=!0;t(55020),t(12134);var I=["components"];function L(){return L=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[t]=e[t]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(a[t]=e[t])}return a}t(27647);var j={},R="wrapper";function P(e){var n=e.components,t=E(e,I);return(0,a.mdx)(R,L({},j,t,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"line-graph---panning"},"Line Graph - panning"),(0,a.mdx)("p",null,"This is a line graph example that implements panning with dynamically updating data. Click on the panning buttons to pan the graph."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(f,{mdxType:"LineGraphPanning"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(y,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(D,{mdxType:"DataObject"})))}P.isMDXComponent=!0},12134:function(e,n,t){t(96540),t(36665)}}]); \ No newline at end of file diff --git a/43420-25d31c5c9d9ecef04adc.js b/43420-25d31c5c9d9ecef04adc.js new file mode 100644 index 000000000..05b6a42dd --- /dev/null +++ b/43420-25d31c5c9d9ecef04adc.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[43420],{11237:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),o="Just use the old one inch brush. It is so important to do something every day that will make you happy.I sincerely wish for you every possible joy life could bring. Water is like me. It iss laaazy ... Boy, it always looks for the easiest way to do things\n\nWe are trying to teach you a technique here and how to use it. The least little bit can do so much. There we go.\n\nNo worries. No cares. Just float and wait for the wind to blow you around.These trees are so much fun. I get started on them and I have a hard time stopping. We wll make some happy little bushes here. Absolutely no pressure. You are just a whisper floating across a mountain. There are no limits in this world.A thin paint will stick to a thick paint.\n",l={key:"uid_1",label:{display:"Timeline A"},color:r.default.helpers.COLORS.BLUE,onClick:i.loadTimelinePopup,values:[{x:new Date(2016,0,1,1,30).toISOString(),content:o,isCritical:!0},{x:new Date(2016,0,1,2,15).toISOString(),content:o,isCritical:!0},{x:new Date(2016,0,1,3,15).toISOString(),content:o},{x:new Date(2016,0,1,4,15).toISOString(),content:o,isCritical:!0},{x:new Date(2016,0,1,8,15).toISOString(),content:o}]};t.default=l},81500:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),o={key:"uid_2",label:{display:"Timeline B"},shape:r.default.helpers.SHAPES.DARK.RHOMBUS,color:r.default.helpers.COLORS.GREEN,onClick:i.loadTimelinePopup,values:[{x:new Date(2016,0,1,7,15).toISOString(),content:"This is custom value of another unit",isCritical:!0},{x:new Date(2016,0,1,9,45).toISOString(),content:"This is custom value of another unit"},{x:new Date(2016,0,1,15).toISOString(),content:"This is custom value of another unit"}]};t.default=o},82551:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,15,59).toISOString()}},showLabel:!0,showLegend:!0,pan:{enabled:!0}}}},65095:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),o=a(n(23986)),l=a(n(61770)),u=a(n(45839));n(3929);var s,c=a(n(29683)),p=a(n(82551)),d=a(n(28369)),f=a(n(53688)),m=a(n(11237)),h=a(n(81500)),g=u.default.deepClone((0,p.default)("#TimelinePanningDynamicExample")),b=[u.default.deepClone(d.default),u.default.deepClone(f.default)],y={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){s=l.default.api.timeline(g),b.forEach((function(e){s.loadContent(e)}))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),y),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){if(s){s.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),s.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={panData:[u.default.deepClone(m.default),u.default.deepClone(h.default)]};s.reflowMultipleDatasets(e)}}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(o.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(o.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(c.default,{id:"TimelinePanningDynamicExample"}))}},43420:function(e,t,n){n.r(t),n.d(t,{default:function(){return w}});var a=n(96540),r=n(36665),i=n(65095),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={};function c(e){var t=e.components,n=u(e,o);return(0,r.mdx)("wrapper",l({},s,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Timeline/Timeline.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timelinePanningConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Timeline/timelinePanningConfig"));\nvar _defaultDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/defaultDataset1"));\nvar _defaultDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/defaultDataset2"));\nvar _criticalDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/criticalDataset1"));\nvar _criticalDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Timeline/criticalDataset2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timelinePanningConfig.default)(\'#TimelinePanningDynamicExample\'));\nvar dataset = [_utils.default.deepClone(_defaultDataset.default), _utils.default.deepClone(_defaultDataset2.default)];\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar TimelinePanningDynamicDataExample = function TimelinePanningDynamicDataExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.timeline(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newDataset = {\n panData: [_utils.default.deepClone(_criticalDataset.default), _utils.default.deepClone(_criticalDataset2.default)]\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "TimelinePanningDynamicExample"\n }));\n};\nvar _default = exports.default = TimelinePanningDynamicDataExample;\n')))}c.isMDXComponent=!0;var p=n(201),d=n(94597),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(p.A,{title:t||"Dynamic Data",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(c,null),isExpanded:r})},m=n(20782),h=n(3685),g=n(33721),b=n(64054),y=n(12349),x=["components"];function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var D={},_="wrapper";function w(e){var t=e.components,n=O(e,x);return(0,r.mdx)(_,v({},D,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"timeline-graph-dynamic-data"},"Timeline graph Dynamic Data"),(0,r.mdx)("p",null,"This is a basic timeline graph with Dynamic Data."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"DynamicData"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"initial-data"},"Initial Data"),(0,r.mdx)("h5",{id:"timeline-a-dataset"},"Timeline A Dataset"),(0,r.mdx)(h.A,{mdxType:"DataObject1"}),(0,r.mdx)("h5",{id:"timeline-b-dataset"},"Timeline B Dataset"),(0,r.mdx)(g.A,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"updated-data"},"Updated Data"),(0,r.mdx)("h5",{id:"timeline-a-dataset-1"},"Timeline A Dataset"),(0,r.mdx)(b.A,{mdxType:"DynamicDataObject1"}),(0,r.mdx)("h5",{id:"timeline-b-dataset-1"},"Timeline B Dataset"),(0,r.mdx)(y.A,{mdxType:"DynamicDataObject2"})))}w.isMDXComponent=!0},64054:function(e,t,n){n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function s(e){var t=e.components,n=o(e,r);return(0,a.mdx)(u,i({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar bobRossIpsum = 'Just use the old one inch brush. It is so important to do something every day that will make you happy.' + 'I sincerely wish for you every possible joy life could bring. Water is like me. It iss laaazy ... Boy, it ' + 'always looks for the easiest way to do things\\n\\nWe are trying to teach you a technique here and how to use it. ' + 'The least little bit can do so much. There we go.\\n\\nNo worries. No cares. Just float and wait for the wind to blow you around.' + 'These trees are so much fun. I get started on them and I have a hard time stopping. We wll make some happy little bushes here. ' + 'Absolutely no pressure. You are just a whisper floating across a mountain. There are no limits in this world.' + 'A thin paint will stick to a thick paint.\\n';\nvar data = {\n key: 'uid_1',\n label: {\n display: 'Timeline A'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadTimelinePopup,\n values: [{\n x: new Date(2016, 0, 1, 1, 30).toISOString(),\n content: bobRossIpsum,\n isCritical: true\n }, {\n x: new Date(2016, 0, 1, 2, 15).toISOString(),\n content: bobRossIpsum,\n isCritical: true\n }, {\n x: new Date(2016, 0, 1, 3, 15).toISOString(),\n content: bobRossIpsum\n }, {\n x: new Date(2016, 0, 1, 4, 15).toISOString(),\n content: bobRossIpsum,\n isCritical: true\n }, {\n x: new Date(2016, 0, 1, 8, 15).toISOString(),\n content: bobRossIpsum\n }]\n};\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0},12349:function(e,t,n){n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function s(e){var t=e.components,n=o(e,r);return(0,a.mdx)(u,i({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar data = {\n key: 'uid_2',\n label: {\n display: 'Timeline B'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.RHOMBUS,\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadTimelinePopup,\n values: [{\n x: new Date(2016, 0, 1, 7, 15).toISOString(),\n content: 'This is custom value of another unit',\n isCritical: true\n }, {\n x: new Date(2016, 0, 1, 9, 45).toISOString(),\n content: 'This is custom value of another unit'\n }, {\n x: new Date(2016, 0, 1, 15).toISOString(),\n content: 'This is custom value of another unit'\n }]\n};\nvar _default = exports.default = data;\n")))}s.isMDXComponent=!0},20782:function(e,t,n){n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function s(e){var t=e.components,n=o(e,r);return(0,a.mdx)(u,i({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar getTimelinePanningConfig = function getTimelinePanningConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 15, 59).toISOString()\n }\n },\n showLabel: true,\n showLegend: true,\n pan: {\n enabled: true\n }\n };\n};\nvar _default = exports.default = getTimelinePanningConfig;\n')))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/44656-8573c7efeb5753f2b603.js b/44656-8573c7efeb5753f2b603.js new file mode 100644 index 000000000..3765ed438 --- /dev/null +++ b/44656-8573c7efeb5753f2b603.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[44656],{75476:function(e,r,a){var t=a(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=t(a(61770)),l=a(86006),o={key:"stacked_bar_1",label:{display:"Dataset 1"},color:n.default.helpers.COLORS.GREEN,onClick:l.loadBarPopup,values:[{x:1,y:30},{x:2,y:10},{x:3,y:13},{x:4,y:15},{x:5,y:18}]};r.default=o},84042:function(e,r,a){var t=a(24994);r.A=void 0;var n=t(a(96540)),l=t(a(61770)),o=t(a(45839));a(11719);var p=t(a(29683)),u=t(a(87539)),s=t(a(75476)),i=t(a(87325)),d=t(a(77406)),c=o.default.deepClone((0,u.default)("#stackedBarGraph")),f=[o.default.deepClone(s.default),o.default.deepClone(i.default),o.default.deepClone(d.default)];r.A=function(){return n.default.useEffect((function(){var e=l.default.api.graph(c);f.forEach((function(r){e.loadContent(l.default.api.bar(r))}))}),[]),n.default.createElement(p.default,{id:"stackedBarGraph"})}},44656:function(e,r,a){a.r(r),a.d(r,{default:function(){return P}});var t=a(96540),n=a(36665),l=a(84042),o=["components"];function p(){return p=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[a]=e[a]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var s={};function i(e){var r=e.components,a=u(e,o);return(0,n.mdx)("wrapper",p({},s,a,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Bar/BarGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _barDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bar/barDefault"));\nvar _stackedBarData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/stackedBarData1"));\nvar _stackedBarData2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/stackedBarData2"));\nvar _stackedBarData3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/stackedBarData3"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _barDefault.default)(\'#stackedBarGraph\'));\nvar dataset = [_utils.default.deepClone(_stackedBarData.default), _utils.default.deepClone(_stackedBarData2.default), _utils.default.deepClone(_stackedBarData3.default)];\nvar _default = exports.default = function _default() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(_carbonGraphs.default.api.bar(data));\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "stackedBarGraph"\n });\n};\n')))}i.isMDXComponent=!0;var d=a(201),c=a(18241),f=function(e){var r=e.title,a=e.description,n=e.isExpanded;return t.createElement(d.A,{title:r||"Stacked Bars",description:a,example:t.createElement(l.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(i,null),isExpanded:n})},m=a(54308),b=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[a]=e[a]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var v={},y="wrapper";function g(e){var r=e.components,a=x(e,b);return(0,n.mdx)(y,h({},v,a,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'stacked_bar_1\',\n label: {\n display: \'Dataset 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.GREEN,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 10\n }, {\n x: 3,\n y: 13\n }, {\n x: 4,\n y: 15\n }, {\n x: 5,\n y: 18\n }]\n};\nvar _default = exports.default = data;\n')))}g.isMDXComponent=!0;var _=a(85870),O=["components"];function j(){return j=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[a]=e[a]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var k={},C="wrapper";function q(e){var r=e.components,a=D(e,O);return(0,n.mdx)(C,j({},k,a,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'stacked_bar_3\',\n label: {\n display: \'Dataset 3\'\n },\n group: \'stacked_bar_1\',\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: 1,\n y: 30\n }, {\n x: 2,\n y: 8\n }, {\n x: 3,\n y: 9\n }, {\n x: 4,\n y: 10\n }, {\n x: 5,\n y: 7\n }]\n};\nvar _default = exports.default = data;\n')))}q.isMDXComponent=!0;var E=["components"];function B(){return B=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[a]=e[a]);return n}(e,r);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}a(27647);var G={},R="wrapper";function P(e){var r=e.components,a=w(e,E);return(0,n.mdx)(R,B({},G,a,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"stacked-bar-graph"},"Stacked Bar Graph"),(0,n.mdx)("p",null,"This is graph with multiple datasets stacked up."),(0,n.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"Install with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,n.mdx)("h2",{id:"usage"},"Usage"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,n.mdx)("h2",{id:"examples"},"Examples"),(0,n.mdx)(f,{mdxType:"BarGraph"}),(0,n.mdx)("details",null,(0,n.mdx)("summary",{style:{fontSize:24}},(0,n.mdx)("b",null,"Data")),(0,n.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,n.mdx)(m.A,{mdxType:"GraphConfig"}),(0,n.mdx)("h3",{id:"data-objects"},"Data objects"),(0,n.mdx)("h4",{id:"dataset-1"},"Dataset 1"),(0,n.mdx)(g,{mdxType:"DataObject1"}),(0,n.mdx)("h4",{id:"dataset-2"},"Dataset 2"),(0,n.mdx)(_.A,{mdxType:"DataObject2"}),(0,n.mdx)("h4",{id:"dataset-3"},"Dataset 3"),(0,n.mdx)(q,{mdxType:"DataObject3"})))}P.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/45268-cce33d16e064a12b461c.js b/45268-cce33d16e064a12b461c.js new file mode 100644 index 000000000..64ca80fee --- /dev/null +++ b/45268-cce33d16e064a12b461c.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[45268],{65236:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006);function r(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return o(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,r=function(){};return{s:r,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,l=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){c=!0,i=e},f:function(){try{l||null==n.return||n.return()}finally{if(c)throw i}}}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],l=arguments.length>5&&void 0!==arguments[5]&&arguments[5],c=[],s=r(Array(arguments.length>4&&void 0!==arguments[4]?arguments[4]:1).keys());try{for(s.s();!(e=s.n()).done;){var p=e.value,u={key:"track ".concat(p),onClick:l?a.loadTrackPopup:void 0,trackLabel:{display:"Project ".concat(String.fromCharCode(65+p)),onClick:a.loadXAndYAxisLabelPopup},tasks:t[p]?t[p]:{},activities:n[p]?n[p]:{},events:o[p]?o[p]:{},actions:i[p]?i[p]:{}};c.push(u)}}catch(e){s.e(e)}finally{s.f()}return c}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),c=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var p=function(e){return new Date(e).toLocaleString()},u=function(e){return e?d(e)?p(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},y=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=c[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,c=Object.values(n);l0){var c=[];c.forEach((function(e){c.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Tasks",c)}if(o&&o.length>0){var s=[];o.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),y(a,"Activities",s)}if(i&&i.length>0){var p=[];i.forEach((function(e){p.push({name:e.key,values:e.values.join(", ")})})),y(a,"Events",p)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),y(a,"Actions",u)}},t.loadTaskPopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.label,i=a.display,l=a.y,c=a.startDate,s=a.endDate,u=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",p(c)),f(r,"End Date",p(s)),u&&f(r,"Percentage",u)},t.loadDatelinePopup=function(e,t){m();var n=v(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",p(r))},t.loadTimelinePopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?p(o):o)),f(r,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){m();var r=v(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var i={id:o.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},99925:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},c="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(c,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }\nvar loadTracks = function loadTracks() {\n var tasks = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n var activities = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : [];\n var events = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];\n var actions = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : [];\n var totalTracks = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 1;\n var isTrackSelectable = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : false;\n var dataObjects = [];\n // eslint-disable-next-line no-restricted-syntax\n var _iterator = _createForOfIteratorHelper(Array(totalTracks).keys()),\n _step;\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var each = _step.value;\n var data = {\n key: "track ".concat(each),\n onClick: isTrackSelectable ? _popup.loadTrackPopup : undefined,\n trackLabel: {\n display: "Project ".concat(String.fromCharCode(65 + each)),\n onClick: _popup.loadXAndYAxisLabelPopup\n },\n tasks: tasks[each] ? tasks[each] : {},\n activities: activities[each] ? activities[each] : {},\n events: events[each] ? events[each] : {},\n actions: actions[each] ? actions[each] : {}\n };\n dataObjects.push(data);\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n return dataObjects;\n /* gantt.unloadContent({\n key: "track 3",\n trackLabel: {\n display: "Project C"\n }\n }); */\n};\nvar _default = exports.default = loadTracks;\n')))}s.isMDXComponent=!0},42929:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},c="wrapper";function s(e){var t=e.components,n=i(e,r);return(0,a.mdx)(c,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../colors.module';\n@import '../Variables.module';\n\n.carbon-y-axis-track-label {\n .tick > text {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n }\n}\n\n.carbon-data-task {\n cursor: pointer;\n\n &[aria-disabled='true'] {\n cursor: default;\n }\n}\n\n.carbon-data-track-group {\n .carbon-selected-data-point {\n @include terra-graph-selected-indicator-styles();\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n }\n}\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-track-selected-bar {\n display: block;\n fill-opacity: 0;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-selected='true'] {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},40415:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/46395-a54eb9041aad759290be.js b/46395-a54eb9041aad759290be.js new file mode 100644 index 000000000..92da7aa0c --- /dev/null +++ b/46395-a54eb9041aad759290be.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[46395],{43872:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:o.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:"2016-03-02T12:00:00Z",upperLimit:"2018-12-10T12:00:00Z",ticks:{format:"%b %Y"}},y:{label:"Paired Set A",lowerLimit:0,upperLimit:200},y2:{show:!0,label:"Paired Set B",lowerLimit:100,upperLimit:350}},showLabel:!0,showLegend:!0,showVGrid:!0,showHGrid:!0}}},86006:function(e,t,n){"use strict";var a=n(24994),o=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var r=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=o(e)&&"function"!=typeof e)return{default:e};var n=s(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=r?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function s(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(s=function(e){return e?n:t})(e)}var c=function(e){return new Date(e).toLocaleString()},u=function(e){return e?d(e)?c(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var o=a.append("g").classed("section",!0),i=function(){var e=p[l],t=o.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,r.default)(e,2),a=n[0],o=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(o)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(r&&r.length>0){var s=[];r.forEach((function(e){s.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",s)}if(i&&i.length>0){var c=[];i.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",c)}if(l&&l.length>0){var u=[];l.forEach((function(e){u.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",u)}},t.loadTaskPopup=function(e,t,n,a){y();var o=v(e).append("g"),r=a.label,i=a.display,l=a.y,p=a.startDate,s=a.endDate,u=a.percentage;r&&f(o,"Task Name",i),f(o,"Track",l),f(o,"Start Date",c(p)),f(o,"End Date",c(s)),u&&f(o,"Percentage",u)},t.loadDatelinePopup=function(e,t){y();var n=v(e).append("g"),a=t.label,o=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",c(o))},t.loadTimelinePopup=function(e,t,n,a){y();var o=v(e).append("g"),r=a.x,i=(a.y,a.label),l=a.content;f(o,"X axis","".concat(d(r)?c(r):r)),f(o,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){y();var o=v(e).append("g"),r=a.label,i=a.value;f(o,r.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=a(n(96540)),r=a(n(5556));n(16939);var i={id:r.default.string.isRequired},l=function(e){return o.default.createElement(o.default.Fragment,null,o.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),o.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},33265:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),o=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,o);return(0,a.mdx)(p,r({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getPairedResultY2AxisTimeseriesConfig = function getPairedResultY2AxisTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: '2016-03-02T12:00:00Z',\n upperLimit: '2018-12-10T12:00:00Z',\n ticks: {\n format: '%b %Y'\n }\n },\n y: {\n label: 'Paired Set A',\n lowerLimit: 0,\n upperLimit: 200\n },\n y2: {\n show: true,\n label: 'Paired Set B',\n lowerLimit: 100,\n upperLimit: 350\n }\n },\n showLabel: true,\n showLegend: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getPairedResultY2AxisTimeseriesConfig;\n")))}s.isMDXComponent=!0},88703:function(e,t,n){"use strict";n.d(t,{A:function(){return s}});n(96540);var a=n(36665),o=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}var l={},p="wrapper";function s(e){var t=e.components,n=i(e,o);return(0,a.mdx)(p,r({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n@import '../colors.module';\n\n/*\nWe are forcing display of the hidden item for data points,\nthis is only applicable when legend toggle is applied\nand one of the data point is selected.\n*/\n.carbon-data-pair--selected {\n @include terra-graph-opacity-show(); //!important;\n}\n\n.carbon-paired-point {\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n.carbon-paired-line {\n fill: none;\n stroke: var(--terra-graphs-dark);\n stroke-width: 1px;\n\n &[aria-disabled='false'] {\n cursor: pointer;\n }\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}s.isMDXComponent=!0},27647:function(e,t,n){var a,o;void 0===(o="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var o=a!=n.offsetHeight;return document.body.removeChild(n),o}function o(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),o("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=o)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},63841:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/47397-0d08af3a2baecdd33eb7.css b/47397-0d08af3a2baecdd33eb7.css new file mode 100644 index 000000000..7a9d9a86c --- /dev/null +++ b/47397-0d08af3a2baecdd33eb7.css @@ -0,0 +1,3 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/4774-5528364da4ac40984599.js b/4774-5528364da4ac40984599.js new file mode 100644 index 000000000..f4ae4e9ca --- /dev/null +++ b/4774-5528364da4ac40984599.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[4774],{4774:function(e,t,n){n.r(t),n.d(t,{default:function(){return s}});n(96540);var a=n(36665),r=n.p+"cb846c5995363a0ef6cb3da3d336d6f3.png",d=n.p+"ceb0f1477985e1a70891cbc2f293027a.png",i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var d=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var m={},o="wrapper";function s(e){var t=e.components,n=p(e,i);return(0,a.mdx)(o,l({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"padding"},"Padding"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#container-padding"},"Container Padding")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#content-padding"},"Content Padding")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#structure"},"Structure")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#properties"},"Properties"))),(0,a.mdx)("p",null,"There are 2 kinds of padding that can be applied to graphs:"),(0,a.mdx)("ol",null,(0,a.mdx)("li",{parentName:"ol"},"Container Padding"),(0,a.mdx)("li",{parentName:"ol"},"Content Padding")),(0,a.mdx)("h2",{id:"container-padding"},"Container Padding"),(0,a.mdx)("p",null,"Consumer can add CSS padding/margin on the container of the graph whose ID is provided to Carbon's input (via JSON) for inserting the graph. Above properties applied will be used to position the graph's axis, grid, labels, legend etc."),(0,a.mdx)("p",null,(0,a.mdx)("strong",{parentName:"p"},"Example use case:")," Consumer has multiple graphs and they want to position/line-up all the graphs vertically."),(0,a.mdx)("img",{src:r,alt:"Container",style:{width:1200,height:400,paddingLeft:50}}),(0,a.mdx)("h2",{id:"content-padding"},"Content Padding"),(0,a.mdx)("p",null,"Consumer can use the input JSON's ",(0,a.mdx)("inlineCode",{parentName:"p"},"padding")," property to position the content of the graph in the container."),(0,a.mdx)("p",null,(0,a.mdx)("strong",{parentName:"p"},"WARNING:"),"\nUse of content-based ",(0,a.mdx)("inlineCode",{parentName:"p"},"padding")," property is strictly use-case specific. Flags such as ",(0,a.mdx)("inlineCode",{parentName:"p"},"showLabel")," and ",(0,a.mdx)("inlineCode",{parentName:"p"},"axis.x.show")," and ",(0,a.mdx)("inlineCode",{parentName:"p"},"axis.y.show")," needs to be hidden appropriately by the consumer."),(0,a.mdx)("p",null,(0,a.mdx)("strong",{parentName:"p"},"Example use case:")," Consumer has their own axis and labels and wants to only make use of the content and grid lines."),(0,a.mdx)("img",{src:d,alt:"Content",style:{width:1200,height:400,paddingLeft:50}}),(0,a.mdx)("h2",{id:"structure"},"Structure"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-javascript"},"var padding = {\n top: 10,\n bottom: 10,\n left: 30,\n right: 50\n};\n")),(0,a.mdx)("h2",{id:"properties"},"Properties"),(0,a.mdx)("table",null,(0,a.mdx)("thead",{parentName:"table"},(0,a.mdx)("tr",{parentName:"thead"},(0,a.mdx)("th",{parentName:"tr",align:null},"Property Name"),(0,a.mdx)("th",{parentName:"tr",align:null},"Expected"),(0,a.mdx)("th",{parentName:"tr",align:null},"Default"),(0,a.mdx)("th",{parentName:"tr",align:null},"Description"))),(0,a.mdx)("tbody",{parentName:"table"},(0,a.mdx)("tr",{parentName:"tbody"},(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"top")),(0,a.mdx)("td",{parentName:"tr",align:null},"number"),(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"10")),(0,a.mdx)("td",{parentName:"tr",align:null},"Customize the top-start point of the graph content")),(0,a.mdx)("tr",{parentName:"tbody"},(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"bottom")),(0,a.mdx)("td",{parentName:"tr",align:null},"number"),(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"10")),(0,a.mdx)("td",{parentName:"tr",align:null},"Customize the length from the bottom of content relative to bottom-end point of the graph content")),(0,a.mdx)("tr",{parentName:"tbody"},(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"left")),(0,a.mdx)("td",{parentName:"tr",align:null},"number"),(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"30")),(0,a.mdx)("td",{parentName:"tr",align:null},"Customize the left-start point of the graph content")),(0,a.mdx)("tr",{parentName:"tbody"},(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"right")),(0,a.mdx)("td",{parentName:"tr",align:null},"number"),(0,a.mdx)("td",{parentName:"tr",align:null},(0,a.mdx)("inlineCode",{parentName:"td"},"50")),(0,a.mdx)("td",{parentName:"tr",align:null},"Customize the right-end point of the graph content")))),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"For some graphs like Gantt, if top padding is not properly padded, the custom dateline indicators might get cut-off."),(0,a.mdx)("li",{parentName:"ul"},"Axes Labels can appear within the graph if not padded properly."),(0,a.mdx)("li",{parentName:"ul"},"Axes ticks and text might get cut-off when the padding being used is too low than the default padding values."),(0,a.mdx)("li",{parentName:"ul"},"Using negative values for padding is allowed, doing so, it shifts graph content more towards the padded side.")))}s.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/48108-6d5b00c513c1e1fd79b9.css b/48108-6d5b00c513c1e1fd79b9.css new file mode 100644 index 000000000..cf19cdb28 --- /dev/null +++ b/48108-6d5b00c513c1e1fd79b9.css @@ -0,0 +1,4 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +:root{--default-transition-timing: cubic-bezier(0.07, 0.95, 0, 1);--default-transition-duration: 1s}.carbon-data-selected-bar{fill:var(--terra-graphs-blue10);fill-opacity:.25;stroke:var(--terra-graphs-blue30);stroke-width:1px;shape-rendering:auto;display:block}.carbon-data-selected-bar[aria-hidden=true]{transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1);transition:opacity var(--default-transition-duration) var(--default-transition-timing),transform var(--default-transition-duration) var(--default-transition-timing);opacity:0;visibility:hidden}[dir] .carbon-data-selected-bar[aria-hidden=true]{-webkit-transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),-webkit-transform 1s cubic-bezier(0.07, 0.95, 0, 1);-webkit-transition:opacity var(--default-transition-duration) var(--default-transition-timing),-webkit-transform var(--default-transition-duration) var(--default-transition-timing)} +[dir] .example-graph-container, [dir] .legend-bindto-container{padding:2.17rem 0}.carbon-graph-container,.carbon-timeline-container,.legend-bindto-container{font-size:.75rem}.bindto-container{display:-ms-flexbox;display:flex;width:100%}.bindto-container .legend-bindto-container{width:20%}.bindto-container .legend-bindto-graph-container{width:80%}.tooltip{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);font-family:"Segoe UI",sans-serif;font-size:.866rem;font-weight:400;letter-spacing:.01071em;line-height:1.5;position:fixed;z-index:20}[dir] .tooltip{background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);padding:1rem}.tooltip .popup-item{display:block}.tooltip .section{display:block}[dir=ltr] .tooltip .section{padding-left:1rem}[dir=rtl] .tooltip .section{padding-right:1rem}.tooltip .content{display:block}[dir] .tooltip .content:last-child{padding-bottom:0}[dir] .tooltip .content:not(:last-child){padding-bottom:.5rem}.tooltip g{display:inline-block}.tooltip g .popup-label{color:#01579b}.tooltip g .popup-label::after{content:": "}.tooltip g .popup-text{color:#000}[dir] .tooltip g:not(:last-child){padding-bottom:.5rem}.overlay{height:100vh;position:fixed;top:0;width:100vw;z-index:1200}[dir] .overlay{cursor:pointer}[dir=ltr] .overlay{left:0}[dir=rtl] .overlay{right:0}.shape-container{width:100%}.panning-container{display:-ms-flexbox;display:flex}[dir] .panning-container{padding:1rem}.panning-container .nav-left,.panning-container .nav-right{display:-ms-flexbox;display:flex;font-size:inherit}[dir] .panning-container .nav-left, [dir] .panning-container .nav-right{background-color:#176ba0;border:.1rem solid #dedfe0;border-radius:.25rem;cursor:pointer;padding:.5rem}[dir=ltr] .panning-container .nav-left, [dir=ltr] .panning-container .nav-right{margin-right:.5rem}[dir=rtl] .panning-container .nav-left, [dir=rtl] .panning-container .nav-right{margin-left:.5rem}.custom-container-style{height:auto !important}[dir] .custom-container-style{border:1px dashed;padding:5rem 5rem 0}[dir] .custom-container-style .carbon-graph-container, [dir] .custom-container-style .legend-bindto-container{padding:0}[dir] .custom-container-legend-style .carbon-graph-container, [dir] .custom-container-legend-style .legend-bindto-container{padding:0}[dir] .background-color-class{background-color:#176ba0}.initial-tooltip{display:none}[dir] .button-pan-right{margin-top:15px}[dir] .button-pan-left{margin-top:15px}[dir=ltr] .button-pan-left{margin-left:18px;margin-right:10px}[dir=rtl] .button-pan-left{margin-right:18px;margin-left:10px} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/48192-fbfb5864385e54a137fb.js b/48192-fbfb5864385e54a137fb.js new file mode 100644 index 000000000..155e249b5 --- /dev/null +++ b/48192-fbfb5864385e54a137fb.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[48192],{32213:function(e,n){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;n.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},99572:function(e,n,r){var t=r(24994);n.A=void 0;var a=t(r(96540)),i=t(r(61770)),l=t(r(45839));r(45633);var o=t(r(29683)),u=t(r(32213)),p=t(r(10578)),s=l.default.deepClone((0,u.default)("#dashedLine")),d=l.default.deepClone(p.default);n.A=function(){return a.default.useEffect((function(){i.default.api.graph(s).loadContent(i.default.api.line(d))}),[]),a.default.createElement(o.default,{id:"dashedLine"})}},48192:function(e,n,r){r.r(n),r.d(n,{default:function(){return w}});var t=r(96540),a=r(36665),i=r(99572),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var p={};function s(e){var n=e.components,r=u(e,l);return(0,a.mdx)("wrapper",o({},p,r,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefault = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefault"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefault.default)(\'#dashedLine\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar DashedLineExample = function DashedLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "dashedLine"\n });\n};\nvar _default = exports.default = DashedLineExample;\n')))}s.isMDXComponent=!0;var d=r(201),c=r(79679),f=function(e){var n=e.title,r=e.description,a=e.isExpanded;return t.createElement(d.A,{title:n||"Dashed Line",description:r,example:t.createElement(i.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(s,null),isExpanded:a})},m=r(49462),h=r(23947),b=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}r(27647);var v={},y="wrapper";function w(e){var n=e.components,r=x(e,b);return(0,a.mdx)(y,g({},v,r,{components:n,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"dashed-line"},"Dashed Line"),(0,a.mdx)("p",null,"This is a graph with a dashed line dataset."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(f,{mdxType:"LineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(m.A,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(h.A,{mdxType:"DataObject"})))}w.isMDXComponent=!0},49462:function(e,n,r){r.d(n,{A:function(){return p}});r(96540);var t=r(36665),a=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0||(a[r]=e[r]);return a}(e,n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}var o={},u="wrapper";function p(e){var n=e.components,r=l(e,a);return(0,t.mdx)(u,i({},o,r,{components:n,mdxType:"MDXLayout"}),(0,t.mdx)("pre",null,(0,t.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar getLineDefaultConfig = function getLineDefaultConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n label: 'Data',\n lowerLimit: 80,\n upperLimit: 280\n },\n y: {\n show: true,\n label: 'Line Set A',\n lowerLimit: -18,\n upperLimit: 18\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineDefaultConfig;\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/48299-421a61fca8af36b197b7.js b/48299-421a61fca8af36b197b7.js new file mode 100644 index 000000000..29da99d53 --- /dev/null +++ b/48299-421a61fca8af36b197b7.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[48299],{26965:function(e,t,n){var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770)),i=n(86006),o={key:"uid_1",label:{display:"Data Label 1"},shape:a.default.helpers.SHAPES.DARK.CIRCLE,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};t.default=o},93811:function(e,t,n){var r=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:a.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,0,23,59).toISOString(),upperLimit:new Date(2016,0,2,1,0).toISOString(),ticks:{values:[new Date(2016,0,1,1,0).toISOString(),new Date(2016,0,1,5,0).toISOString(),new Date(2016,0,1,10,0).toISOString(),new Date(2016,0,1,15,0).toISOString(),new Date(2016,0,1,20,0).toISOString()],format:"%H",lowerStepTickValues:[new Date(2016,0,1,6).toISOString(),new Date(2016,0,1,12).toISOString(),new Date(2016,0,1,18).toISOString()],midpointTickValues:[new Date(2016,0,1,3).toISOString(),new Date(2016,0,1,9).toISOString(),new Date(2016,0,1,15).toISOString(),new Date(2016,0,1,21).toISOString()],upperStepTickValues:[new Date(2016,0,1,0).toISOString(),new Date(2016,0,1,24).toISOString()]}},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},86606:function(e,t,n){var r=n(24994);t.A=void 0;var a=r(n(96540)),i=r(n(61770)),o=r(n(45839));n(45633);var l=r(n(29683)),u=r(n(93811)),p=r(n(26965)),s=o.default.deepClone((0,u.default)("#datetimeBucket")),c=o.default.deepClone(p.default);t.A=function(){return a.default.useEffect((function(){i.default.api.graph(s).loadContent(i.default.api.line(c))}),[]),a.default.createElement(l.default,{id:"datetimeBucket"})}},48299:function(e,t,n){n.r(t),n.d(t,{default:function(){return _}});var r=n(96540),a=n(36665),i=n(86606),o=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var p={};function s(e){var t=e.components,n=u(e,o);return(0,a.mdx)("wrapper",l({},p,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _timeseriesConfigDateTimeBucket = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/General/timeseriesConfigDateTimeBucket"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/General/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _timeseriesConfigDateTimeBucket.default)(\'#datetimeBucket\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar DatetimeBucketGeneralExample = function DatetimeBucketGeneralExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "datetimeBucket"\n });\n};\nvar _default = exports.default = DatetimeBucketGeneralExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(79679),m=function(e){var t=e.title,n=e.description,a=e.isExpanded;return r.createElement(c.A,{title:t||"Datetime Bucket",description:n,example:r.createElement(i.A,null),exampleCssSrc:r.createElement(d.A,null),exampleSrc:r.createElement(s,null),isExpanded:a})},f=["components"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}var h={},O="wrapper";function b(e){var t=e.components,n=g(e,f);return(0,a.mdx)(O,S({},h,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getGraphConfig = function getGraphConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Datetime',\n lowerLimit: new Date(2016, 0, 0, 23, 59).toISOString(),\n upperLimit: new Date(2016, 0, 2, 1, 0).toISOString(),\n ticks: {\n values: [new Date(2016, 0, 1, 1, 0).toISOString(), new Date(2016, 0, 1, 5, 0).toISOString(), new Date(2016, 0, 1, 10, 0).toISOString(), new Date(2016, 0, 1, 15, 0).toISOString(), new Date(2016, 0, 1, 20, 0).toISOString()],\n format: '%H',\n lowerStepTickValues: [new Date(2016, 0, 1, 6).toISOString(), new Date(2016, 0, 1, 12).toISOString(), new Date(2016, 0, 1, 18).toISOString()],\n midpointTickValues: [new Date(2016, 0, 1, 3).toISOString(), new Date(2016, 0, 1, 9).toISOString(), new Date(2016, 0, 1, 15).toISOString(), new Date(2016, 0, 1, 21).toISOString()],\n upperStepTickValues: [new Date(2016, 0, 1, 0).toISOString(), new Date(2016, 0, 1, 24).toISOString()]\n }\n },\n y: {\n label: 'Line Set A',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getGraphConfig;\n")))}b.isMDXComponent=!0;var w=n(55020),x=["components"];function D(){return D=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}n(27647);var v={},I="wrapper";function _(e){var t=e.components,n=y(e,x);return(0,a.mdx)(I,D({},v,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"datetime-bucket"},"Datetime bucket"),(0,a.mdx)("p",null,"This is a timeseries line graph with datetime formatted bucket."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(m,{mdxType:"LineGraph"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(b,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(w.A,{mdxType:"DataObject"})))}_.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/48442-b8ba7511f8694f934c63.js b/48442-b8ba7511f8694f934c63.js new file mode 100644 index 000000000..9664f7406 --- /dev/null +++ b/48442-b8ba7511f8694f934c63.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[48442],{70702:function(e,r,t){var a=t(24994);Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n=a(t(61770)),i=t(86006);r.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,type:n.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Data",lowerLimit:new Date(2016,0,1,0).toISOString(),upperLimit:new Date(2016,0,2,0).toISOString(),ticks:{values:[new Date(2016,0,1,3).toISOString(),new Date(2016,0,1,6).toISOString(),new Date(2016,0,1,9).toISOString(),new Date(2016,0,1,12).toISOString(),new Date(2016,0,1,15).toISOString()],format:"%H"}},y:{show:!0,label:"Bar Set A",lowerLimit:0,upperLimit:20},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:20}},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!1,showHGrid:!0,dateline:[{showDatelineIndicator:!0,label:{display:"Action Date"},color:"#C97318",shape:n.default.helpers.SHAPES.SQUARE,onClick:i.loadDatelinePopup,value:new Date(2016,0,1,9).toISOString()}],clickPassThrough:{dateline:!1}}}},7163:function(e,r,t){var a=t(24994);r.A=void 0;var n=a(t(96540)),i=a(t(61770)),l=a(t(45839));t(11719);var o=a(t(29683)),s=a(t(70702)),p=a(t(2682)),u=l.default.deepClone((0,s.default)("#timeseriesBarWithDateline")),d=l.default.deepClone(p.default);r.A=function(){return n.default.useEffect((function(){i.default.api.graph(u).loadContent(i.default.api.bar(d))}),[]),n.default.createElement(o.default,{id:"timeseriesBarWithDateline"})}},48442:function(e,r,t){t.r(r),t.d(r,{default:function(){return O}});var a=t(96540),n=t(36665),i=t(7163),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}var p={};function u(e){var r=e.components,t=s(e,l);return(0,n.mdx)("wrapper",o({},p,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Bar/BarGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _barTimeseriesDateline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bar/barTimeseriesDateline"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _barTimeseriesDateline.default)(\'#timeseriesBarWithDateline\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar _default = exports.default = function _default() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bar(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "timeseriesBarWithDateline"\n });\n};\n')))}u.isMDXComponent=!0;var d=t(201),c=t(18241),m=function(e){var r=e.title,t=e.description,n=e.isExpanded;return a.createElement(d.A,{title:r||"Timeseries With Dateline",description:t,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:n})},f=t(24529),h=t(96499),b=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[t]=e[t]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(n[t]=e[t])}return n}t(27647);var v={},w="wrapper";function O(e){var r=e.components,t=x(e,b);return(0,n.mdx)(w,g({},v,t,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"timeseries-bar-graph-with-dateline"},"Timeseries Bar Graph With Dateline"),(0,n.mdx)("p",null,"This is a timeseries bar graph with a dateline."),(0,n.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"Install with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,n.mdx)("h2",{id:"usage"},"Usage"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,n.mdx)("h2",{id:"examples"},"Examples"),(0,n.mdx)(m,{mdxType:"BarGraph"}),(0,n.mdx)("details",null,(0,n.mdx)("summary",{style:{fontSize:24}},(0,n.mdx)("b",null,"Data")),(0,n.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,n.mdx)(f.A,{mdxType:"GraphConfig"}),(0,n.mdx)("h3",{id:"data-object"},"Data object"),(0,n.mdx)(h.A,{mdxType:"DataObject"})))}O.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/48962-fc8f50f0dba3c08b8fbf.js b/48962-fc8f50f0dba3c08b8fbf.js new file mode 100644 index 000000000..a0edf85da --- /dev/null +++ b/48962-fc8f50f0dba3c08b8fbf.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[48962],{59127:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),l={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}]};t.default=l},28129:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),l={key:"uid_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLACK,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:28},{x:new Date(2016,0,1,2,15).toISOString(),y:5},{x:new Date(2016,0,1,3,15).toISOString(),y:25},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:15},{x:new Date(2016,0,1,7,0).toISOString(),y:6},{x:new Date(2016,0,1,8,15).toISOString(),y:8},{x:new Date(2016,0,1,9,45).toISOString(),y:9},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:18},{x:new Date(2016,0,1,14,15).toISOString(),y:22},{x:new Date(2016,0,1,19,45).toISOString(),y:7},{x:new Date(2016,0,1,21,15).toISOString(),y:21}]};t.default=l},32603:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,0,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},89944:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),l=a(n(23986)),o=a(n(61770)),u=a(n(45839));n(63841);var p,s=a(n(29683)),c=a(n(32603)),d=a(n(59127)),f=a(n(28129)),m=u.default.deepClone((0,c.default)("#dynamicLineData")),g=u.default.deepClone(d.default),S={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){(p=o.default.api.graph(m)).loadContent(o.default.api.scatter(g))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),S),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){if(p){p.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={panData:[u.default.deepClone(u.default.deepClone(f.default))]};p.reflowMultipleDatasets(e)}}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(s.default,{id:"dynamicLineData"}))}},48962:function(e,t,n){n.r(t),n.d(t,{default:function(){return d}});n(96540);var a=n(36665),r=n(44147),i=n(59420),l=n(12712),o=["components"];function u(){return u=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var s={},c="wrapper";function d(e){var t=e.components,n=p(e,o);return(0,a.mdx)(c,u({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"scatter-graph---panning"},"Scatter Graph - Panning"),(0,a.mdx)("p",null,"This is a scatter graph example that implements panning."),(0,a.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},"Install with ",(0,a.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("inlineCode",{parentName:"li"},"npm install terra-graphs"))))),(0,a.mdx)("h2",{id:"usage"},"Usage"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,a.mdx)("h2",{id:"example"},"Example"),(0,a.mdx)(r.A,{mdxType:"ScatterGraphPanning"}),(0,a.mdx)("details",null,(0,a.mdx)("summary",{style:{fontSize:24}},(0,a.mdx)("b",null,"Example Data")),(0,a.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,a.mdx)(i.A,{mdxType:"GraphConfig"}),(0,a.mdx)("h3",{id:"data-object"},"Data object"),(0,a.mdx)(l.A,{mdxType:"DataObject"})))}d.isMDXComponent=!0},59420:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},u="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(u,i({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getScatterTimeseriesConfig = function getScatterTimeseriesConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 0, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getScatterTimeseriesConfig;\n')))}p.isMDXComponent=!0},44147:function(e,t,n){n.d(t,{A:function(){return f}});var a=n(96540),r=n(89944),i=n(36665),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function s(e){var t=e.components,n=u(e,l);return(0,i.mdx)("wrapper",o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,i.mdx)("pre",null,(0,i.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/PairedResult/PairedResultGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _scatterTimeseriesPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Scatter/scatterTimeseriesPanning"));\nvar _dataset1timeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1timeseries"));\nvar _dataset1timeseriesNewData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Scatter/dataset1timeseriesNewData"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _scatterTimeseriesPanning.default)(\'#dynamicLineData\'));\nvar dataset = _utils.default.deepClone(_dataset1timeseries.default);\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar DynamicLinePanningExample = function DynamicLinePanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.scatter(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newDataset = {\n panData: [_utils.default.deepClone(_utils.default.deepClone(_dataset1timeseriesNewData.default))]\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "dynamicLineData"\n }));\n};\nvar _default = exports.default = DynamicLinePanningExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(88703),f=function(e){var t=e.title,n=e.description,i=e.isExpanded;return a.createElement(c.A,{title:t||"Dynamic Data",description:n,example:a.createElement(r.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:i})}}}]); \ No newline at end of file diff --git a/50089-1b38b7d1d5bf6eb3cd5c.js b/50089-1b38b7d1d5bf6eb3cd5c.js new file mode 100644 index 000000000..684f802ac --- /dev/null +++ b/50089-1b38b7d1d5bf6eb3cd5c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[50089],{3649:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r=[{key:"uid_action_1",onClick:a.loadPopup,values:[new Date(2018,2,1,6,15).toISOString()]},{key:"uid_action_2",onClick:a.loadPopup,values:[new Date(2018,7,1,6,15).toISOString()]}];t.default=r},73512:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r=[{key:"uid_action_1",onClick:a.loadPopup,values:[new Date(2018,3,1,6,15).toISOString(),new Date(2018,4,1,7,15).toISOString()]},{key:"uid_action_2",onClick:a.loadPopup,values:[new Date(2018,5,1,9,15).toISOString()]}];t.default=r},36188:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006);t.default=function(e){return{bindTo:e,axis:{x:{show:!0,lowerLimit:new Date(2018,1,1,12).toISOString(),upperLimit:new Date(2019,1,1,12).toISOString(),rangeRounding:!0}},clickPassThrough:{task:!1,activity:!1,event:!1,action:!1,dateline:!1},actionLegend:[{key:"uid_action_1",label:{display:"Action A"}},{key:"uid_action_2",label:{display:"Action B"},shape:r.default.helpers.SHAPES.DARK.TRIANGLE,color:r.default.helpers.COLORS.GREEN}],dateline:[{showDatelineIndicator:!0,label:{display:"DST Start"},color:"#405978",shape:r.default.helpers.SHAPES.DARK.DIAMOND,onClick:o.loadDatelinePopup,value:new Date(2018,2,10).toISOString()},{showDatelineIndicator:!0,label:{display:"Current Date"},color:"#C97318",shape:r.default.helpers.SHAPES.DARK.SQUARE,onClick:o.loadDatelinePopup,value:new Date(2018,8,5).toISOString()},{showDatelineIndicator:!0,label:{display:"DST End"},color:"#405978",shape:r.default.helpers.SHAPES.DARK.DIAMOND,onClick:o.loadDatelinePopup,value:new Date(2018,10,3).toISOString()}]}}},26780:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),i=a(n(45839));n(40415);var l=a(n(29683)),u=a(n(36188)),p=a(n(65236)),s=a(n(3649)),c=a(n(73512)),d=i.default.deepClone((0,u.default)("#ganttActions"));d.showActionLegend=!0;var f=[i.default.deepClone(s.default),i.default.deepClone(c.default)],m=(0,p.default)([],[],[],f,2);t.A=function(){return r.default.useEffect((function(){var e=o.default.api.gantt(d);m.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(l.default,{id:"ganttActions"})}},50089:function(e,t,n){n.r(t),n.d(t,{default:function(){return x}});var a=n(96540),r=n(36665),o=n(26780),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function s(e){var t=e.components,n=u(e,i);return(0,r.mdx)("wrapper",l({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttActionConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttActionConfig"));\nvar _loadTracks = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/loadTracks"));\nvar _actionDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/actionDataset1"));\nvar _actionDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/actionDataset2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttActionConfig.default)(\'#ganttActions\'));\ngraphConfig.showActionLegend = true;\nvar actions = [_utils.default.deepClone(_actionDataset.default), _utils.default.deepClone(_actionDataset2.default)];\nvar dataset = (0, _loadTracks.default)([], [], [], actions, 2);\nvar GanttActionsExample = function GanttActionsExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "ganttActions"\n });\n};\nvar _default = exports.default = GanttActionsExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(42929),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(c.A,{title:t||"Actions",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=n(84442),g=n(36226),h=n(81225),b=(n(99925),["components"]);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var y={},D="wrapper";function x(e){var t=e.components,n=O(e,b);return(0,r.mdx)(D,v({},y,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"gantt-actions"},"Gantt Actions"),(0,r.mdx)("p",null,"This is a simple Gantt chart with actions."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"action-dataset-1"},"Action Dataset 1"),(0,r.mdx)(g.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"action-dataset-2"},"Action Dataset 2"),(0,r.mdx)(h.A,{mdxType:"DataObject2"})))}x.isMDXComponent=!0},36226:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function p(e){var t=e.components,n=i(e,r);return(0,a.mdx)(u,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar actionDataset1 = [{\n key: \'uid_action_1\',\n onClick: _popup.loadPopup,\n values: [new Date(2018, 2, 1, 6, 15).toISOString()]\n}, {\n key: \'uid_action_2\',\n onClick: _popup.loadPopup,\n values: [new Date(2018, 7, 1, 6, 15).toISOString()]\n}];\nvar _default = exports.default = actionDataset1;\n')))}p.isMDXComponent=!0},81225:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function p(e){var t=e.components,n=i(e,r);return(0,a.mdx)(u,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar actionDataset2 = [{\n key: \'uid_action_1\',\n onClick: _popup.loadPopup,\n values: [new Date(2018, 3, 1, 6, 15).toISOString(), new Date(2018, 4, 1, 7, 15).toISOString()]\n}, {\n key: \'uid_action_2\',\n onClick: _popup.loadPopup,\n values: [new Date(2018, 5, 1, 9, 15).toISOString()]\n}];\nvar _default = exports.default = actionDataset2;\n')))}p.isMDXComponent=!0},84442:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},u="wrapper";function p(e){var t=e.components,n=i(e,r);return(0,a.mdx)(u,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar getGanttActionDefaultConfig = function getGanttActionDefaultConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2018, 1, 1, 12).toISOString(),\n upperLimit: new Date(2019, 1, 1, 12).toISOString(),\n rangeRounding: true // If set to false, we don't extend the domain\n }\n },\n clickPassThrough: {\n task: false,\n activity: false,\n event: false,\n action: false,\n dateline: false\n },\n actionLegend: [{\n key: 'uid_action_1',\n label: {\n display: 'Action A'\n }\n }, {\n key: 'uid_action_2',\n label: {\n display: 'Action B'\n },\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.TRIANGLE,\n color: _carbonGraphs.default.helpers.COLORS.GREEN\n }],\n dateline: [{\n showDatelineIndicator: true,\n label: {\n display: 'DST Start'\n },\n color: '#405978',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.DIAMOND,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2018, 2, 10).toISOString()\n }, {\n showDatelineIndicator: true,\n label: {\n display: 'Current Date'\n },\n color: '#C97318',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.SQUARE,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2018, 8, 5).toISOString()\n }, {\n showDatelineIndicator: true,\n label: {\n display: 'DST End'\n },\n color: '#405978',\n shape: _carbonGraphs.default.helpers.SHAPES.DARK.DIAMOND,\n onClick: _popup.loadDatelinePopup,\n value: new Date(2018, 10, 3).toISOString()\n }]\n };\n};\nvar _default = exports.default = getGanttActionDefaultConfig;\n")))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/51008-0324635960a44d01040c.js b/51008-0324635960a44d01040c.js new file mode 100644 index 000000000..7269e8892 --- /dev/null +++ b/51008-0324635960a44d01040c.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[51008],{22136:function(e,r){Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;r.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,label:"Data",lowerLimit:80,upperLimit:280},y:{show:!0,label:"Line Set A",lowerLimit:-18,upperLimit:18},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},allowCalibration:!1,showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},41508:function(e,r,a){var t=a(24994);r.A=void 0;var n=t(a(96540)),i=t(a(61770)),l=t(a(45839));a(45633);var o=t(a(29683)),p=t(a(22136)),u=t(a(81342)),s=l.default.deepClone((0,p.default)("#disableCalibration")),d=l.default.deepClone(u.default);r.A=function(){return n.default.useEffect((function(){i.default.api.graph(s).loadContent(i.default.api.line(d))}),[]),n.default.createElement(o.default,{id:"disableCalibration"})}},51008:function(e,r,a){a.r(r),a.d(r,{default:function(){return y}});var t=a(96540),n=a(36665),i=a(41508),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[a]=e[a]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}var u={};function s(e){var r=e.components,a=p(e,l);return(0,n.mdx)("wrapper",o({},u,a,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineDefaultNoCalibration = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineDefaultNoCalibration"));\nvar _dataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/dataset6"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineDefaultNoCalibration.default)(\'#disableCalibration\'));\nvar dataset = _utils.default.deepClone(_dataset.default);\nvar DisableCalibrationLineExample = function DisableCalibrationLineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "disableCalibration"\n });\n};\nvar _default = exports.default = DisableCalibrationLineExample;\n')))}s.isMDXComponent=!0;var d=a(201),c=a(79679),m=function(e){var r=e.title,a=e.description,n=e.isExpanded;return t.createElement(d.A,{title:r||"Disable Calibration",description:a,example:t.createElement(i.A,null),exampleCssSrc:t.createElement(c.A,null),exampleSrc:t.createElement(s,null),isExpanded:n})},f=a(21913),b=a(17143),h=["components"];function x(){return x=Object.assign?Object.assign.bind():function(e){for(var r=1;r=0||(n[a]=e[a]);return n}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(t=0;t=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(n[a]=e[a])}return n}a(27647);var v={},C="wrapper";function y(e){var r=e.components,a=g(e,h);return(0,n.mdx)(C,x({},v,a,{components:r,mdxType:"MDXLayout"}),(0,n.mdx)("h1",{id:"disable-calibration"},"Disable Calibration"),(0,n.mdx)("p",null,"This is a simple line graph with calibration disabled."),(0,n.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,n.mdx)("ul",null,(0,n.mdx)("li",{parentName:"ul"},"Install with ",(0,n.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,n.mdx)("ul",{parentName:"li"},(0,n.mdx)("li",{parentName:"ul"},(0,n.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,n.mdx)("h2",{id:"usage"},"Usage"),(0,n.mdx)("pre",null,(0,n.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,n.mdx)("h2",{id:"example"},"Example"),(0,n.mdx)(m,{mdxType:"LineGraph"}),(0,n.mdx)("details",null,(0,n.mdx)("summary",{style:{fontSize:24}},(0,n.mdx)("b",null,"Data")),(0,n.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,n.mdx)(f.A,{mdxType:"GraphConfig"}),(0,n.mdx)("h3",{id:"data-object"},"Data object"),(0,n.mdx)(b.A,{mdxType:"DataObject"})))}y.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/51165-b9844465cab995900c06.js b/51165-b9844465cab995900c06.js new file mode 100644 index 000000000..df4f47477 --- /dev/null +++ b/51165-b9844465cab995900c06.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[51165],{28030:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r=[{key:"task1",onClick:a.loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,2,1).toISOString(),endDate:new Date(2018,3,10).toISOString()},{key:"task2",onClick:a.loadTaskPopup,label:{display:"Story Broccoli"},startDate:new Date(2018,8,1).toISOString(),endDate:new Date(2018,9,10).toISOString()}];t.default=r},39355:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=[{key:"task3",onClick:n(86006).loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,3,1).toISOString(),endDate:new Date(2018,7,10).toISOString()}];t.default=a},39828:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=n(86006),r=[{key:"task4",onClick:a.loadTaskPopup,label:{display:"Story Charming"},startDate:new Date(2018,6,1).toISOString(),endDate:new Date(2018,7,10).toISOString()},{key:"task5",onClick:a.loadTaskPopup,label:{display:"Story Broccoli"},startDate:new Date(2018,10,1).toISOString(),endDate:new Date(2018,10,1).toISOString()}];t.default=r},53697:function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=[{key:"task6",onClick:n(86006).loadTaskPopup,label:{display:"Story Apex"},startDate:new Date(2018,6,1).toISOString(),endDate:new Date(2018,9,10).toISOString()}];t.default=a},27590:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{show:!0,lowerLimit:new Date(2018,1,1,12).toISOString(),upperLimit:new Date(2019,1,1,12).toISOString(),rangeRounding:!0}},clickPassThrough:{task:!1,activity:!1,event:!1,action:!1,dateline:!1},eventline:[{color:r.default.helpers.COLORS.GREY,style:{strokeDashArray:"4,4"},value:new Date(2018,10,13).toISOString()},{color:r.default.helpers.COLORS.BLACK,style:{strokeDashArray:"2,2"},value:new Date(2018,10,20).toISOString()}]}}},40945:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(96540)),o=a(n(61770)),l=a(n(45839));n(40415);var s=a(n(29683)),i=a(n(27590)),p=a(n(65236)),u=a(n(28030)),d=a(n(39355)),c=a(n(39828)),f=a(n(53697)),m=l.default.deepClone((0,i.default)("#ganttEventline")),g=[l.default.deepClone(u.default),l.default.deepClone(d.default),l.default.deepClone(c.default),l.default.deepClone(f.default)],v=(0,p.default)(g,[],[],[],4);t.A=function(){return r.default.useEffect((function(){var e=o.default.api.gantt(m);v.forEach((function(t){e.loadContent(t)}))}),[]),r.default.createElement(s.default,{id:"ganttEventline"})}},51165:function(e,t,n){n.r(t),n.d(t,{default:function(){return E}});var a=n(96540),r=n(36665),o=n(40945),l=["components"];function s(){return s=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function u(e){var t=e.components,n=i(e,l);return(0,r.mdx)("wrapper",s({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _react = _interopRequireDefault(require("react"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Gantt/GanttChart.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _ganttEventlineConfig = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Gantt/ganttEventlineConfig"));\nvar _loadTracks = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/loadTracks"));\nvar _taskDataset = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset1"));\nvar _taskDataset2 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset2"));\nvar _taskDataset3 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset3"));\nvar _taskDataset4 = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Gantt/taskDataset4"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _ganttEventlineConfig.default)(\'#ganttEventline\'));\nvar tasksData = [_utils.default.deepClone(_taskDataset.default), _utils.default.deepClone(_taskDataset2.default), _utils.default.deepClone(_taskDataset3.default), _utils.default.deepClone(_taskDataset4.default)];\nvar dataset = (0, _loadTracks.default)(tasksData, [], [], [], 4);\nvar GanttEventlineExample = function GanttEventlineExample() {\n _react.default.useEffect(function () {\n var graph = _carbonGraphs.default.api.gantt(graphConfig);\n dataset.forEach(function (data) {\n graph.loadContent(data);\n });\n }, []);\n return /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "ganttEventline"\n });\n};\nvar _default = exports.default = GanttEventlineExample;\n')))}u.isMDXComponent=!0;var d=n(201),c=n(42929),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(d.A,{title:t||"Eventline",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(u,null),isExpanded:r})},m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b={},y="wrapper";function O(e){var t=e.components,n=v(e,m);return(0,r.mdx)(y,g({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getGanttEventlineConfig = function getGanttEventlineConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n show: true,\n lowerLimit: new Date(2018, 1, 1, 12).toISOString(),\n upperLimit: new Date(2019, 1, 1, 12).toISOString(),\n rangeRounding: true // If set to false, we don\'t extend the domain\n }\n },\n clickPassThrough: {\n task: false,\n activity: false,\n event: false,\n action: false,\n dateline: false\n },\n eventline: [{\n color: _carbonGraphs.default.helpers.COLORS.GREY,\n style: {\n strokeDashArray: \'4,4\'\n },\n value: new Date(2018, 10, 13).toISOString()\n }, {\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n style: {\n strokeDashArray: \'2,2\'\n },\n value: new Date(2018, 10, 20).toISOString()\n }]\n };\n};\nvar _default = exports.default = getGanttEventlineConfig;\n')))}O.isMDXComponent=!0;var x=n(7927),D=n(72892),h=n(74581),k=n(3650),S=n(99925),j=["components"];function _(){return _=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var C={},P="wrapper";function E(e){var t=e.components,n=w(e,j);return(0,r.mdx)(P,_({},C,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"simple-gantt"},"Simple Gantt"),(0,r.mdx)("p",null,"This is a simple Gantt chart with eventline."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"GanttChart"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(O,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"task-dataset-1"},"Task Dataset 1"),(0,r.mdx)(x.A,{mdxType:"DataObject1"}),(0,r.mdx)("h4",{id:"task-dataset-2"},"Task Dataset 2"),(0,r.mdx)(D.A,{mdxType:"DataObject2"}),(0,r.mdx)("h4",{id:"task-dataset-3"},"Task Dataset 3"),(0,r.mdx)(h.A,{mdxType:"DataObject3"}),(0,r.mdx)("h4",{id:"task-dataset-4"},"Task Dataset 4"),(0,r.mdx)(k.A,{mdxType:"DataObject4"}),(0,r.mdx)("h3",{id:"load-track"},"Load Track"),(0,r.mdx)(S.A,{mdxType:"LoadTracks"})))}E.isMDXComponent=!0},7927:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={},i="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar taskDataset1 = [{\n key: 'task1',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Apex'\n },\n startDate: new Date(2018, 2, 1).toISOString(),\n endDate: new Date(2018, 3, 10).toISOString()\n}, {\n key: 'task2',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Broccoli'\n },\n startDate: new Date(2018, 8, 1).toISOString(),\n endDate: new Date(2018, 9, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset1;\n")))}p.isMDXComponent=!0},72892:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={},i="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar taskDataset2 = [{\n key: \'task3\',\n onClick: _popup.loadTaskPopup,\n label: {\n display: \'Story Apex\'\n },\n startDate: new Date(2018, 3, 1).toISOString(),\n endDate: new Date(2018, 7, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset2;\n')))}p.isMDXComponent=!0},74581:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={},i="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require(\"@cerner/terra-graphs-docs/lib/example-datasets/popup\");\nvar taskDataset3 = [{\n key: 'task4',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Charming'\n },\n startDate: new Date(2018, 6, 1).toISOString(),\n endDate: new Date(2018, 7, 10).toISOString()\n}, {\n key: 'task5',\n onClick: _popup.loadTaskPopup,\n label: {\n display: 'Story Broccoli'\n },\n startDate: new Date(2018, 10, 1).toISOString(),\n endDate: new Date(2018, 10, 1).toISOString()\n}];\nvar _default = exports.default = taskDataset3;\n")))}p.isMDXComponent=!0},3650:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var s={},i="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(i,o({},s,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar taskDataset4 = [{\n key: \'task6\',\n onClick: _popup.loadTaskPopup,\n label: {\n display: \'Story Apex\'\n },\n startDate: new Date(2018, 6, 1).toISOString(),\n endDate: new Date(2018, 9, 10).toISOString()\n}];\nvar _default = exports.default = taskDataset4;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/5170-add9e44ff81fae7b8985.css b/5170-add9e44ff81fae7b8985.css new file mode 100644 index 000000000..9144845d5 --- /dev/null +++ b/5170-add9e44ff81fae7b8985.css @@ -0,0 +1,2 @@ +svg:not(:root){overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0)}.carbon-svg-icon{width:.625rem;height:.625rem;display:inline-block}.carbon-graph-container,.carbon-timeline-container{display:block;color:#1c1f21;width:100%}[dir] .carbon-graph-container, [dir] .carbon-timeline-container{padding-bottom:.8333rem;padding-top:.8333rem}.carbon-graph-canvas{display:block;overflow-x:hidden;overflow-y:auto;box-sizing:border-box;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.carbon-axis line,.carbon-axis path.domain{fill:none;stroke:#bcbfc0}.carbon-content-container,.carbon-grid line{shape-rendering:auto}.carbon-axis-info-row[aria-hidden=true],.carbon-axis-x[aria-hidden=true],.carbon-axis-y2[aria-hidden=true],.carbon-axis-y[aria-hidden=true]{display:none}.carbon-axis.carbon-axis-reference-line{stroke-width:2px;stroke:#bcbfc0}.carbon-grid>* .domain[stroke],.carbon-grid line{stroke:#e8e9ea}.carbon-lower-step-grid line{stroke:#9b9b9b;stroke-width:1px}.carbon-midpoint-grid line{stroke:#e8e9ea;stroke-width:1px}.carbon-upper-step-grid line{stroke:#bcbfc0;stroke-width:3px}.carbon-no-data-text{fill:#1c1f21}.carbon-legend{display:-ms-flexbox;display:flex;list-style-type:none;-ms-flex-pack:center;justify-content:center;-ms-flex-line-pack:center;align-content:center;-ms-flex-flow:row wrap;flex-flow:row wrap;-ms-flex:1 1 100%;flex:1 1 100%}[dir] .carbon-legend{margin:0;padding:0}.carbon-legend .carbon-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-legend-item{margin:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-btn{font-size:inherit;-ms-flex-item-align:start;align-self:flex-start;-ms-flex-line-pack:center;align-content:center;height:1.875rem;width:2.1875rem;-ms-flex-negative:0;flex-shrink:0}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{padding:0;border-radius:.25rem;border:0;background-color:#dedfe0}[dir=ltr] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-legend-item .carbon-legend-item-btn{margin-left:.5rem}.carbon-legend .carbon-legend-item .carbon-legend-item-text{word-wrap:break-word}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]{cursor:pointer}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false]:hover{background-color:#ebf6fd}[dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-btn, [dir] .carbon-legend .carbon-legend-item[aria-disabled=false] .carbon-legend-item-text{cursor:pointer}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn,.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{outline:none}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-btn{opacity:.35}.carbon-legend .carbon-legend-item[aria-disabled=true] .carbon-legend-item-text{color:#bcbfc0}.carbon-legend .carbon-legend-item .carbon-legend-item-icon{display:block;height:.857rem;width:.857rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-icon-with-line{display:block;height:.625rem;width:.625rem;stroke:#fff;stroke-width:5px}.carbon-legend .carbon-legend-item .carbon-legend-item-span{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center}.carbon-legend .carbon-legend-item .carbon-legend-item-line{height:5px;width:28px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{height:5px;width:18px}[dir] .carbon-legend .carbon-legend-item .carbon-legend-item-line-with-icon{padding-top:1px}.carbon-legend .carbon-legend-item .carbon-legend-white-line{stroke:#fff;stroke-width:6px}[dir] .carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-btn{background-color:#fff;border:1px solid #dedfe0}.carbon-legend .carbon-legend-item[aria-current=false] .carbon-legend-item-text{color:#6f7477}.carbon-blur{opacity:.2;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-point[aria-disabled=false]{cursor:pointer}.carbon-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point{display:block;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-selected-data-point path{stroke-width:1px}.carbon-criticality-inner[aria-hidden=true],.carbon-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px}.carbon-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px}.carbon-region{fill:#f4f4f4}.carbon-region.carbon-region-blur,.carbon-region[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-region.carbon-value-region{stroke:#f4f4f4;stroke-width:.625rem}.carbon-region.carbon-region-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-content-container{fill:none;stroke:#e8e9ea}.carbon-data-bar,.carbon-data-completion-bar{-webkit-user-select:none;-ms-user-select:none;user-select:none;shape-rendering:auto;stroke-width:0}[dir] .carbon-data-bar[aria-disabled=false], [dir] .carbon-data-completion-bar[aria-disabled=false]{cursor:pointer}.carbon-axis-info-row-item[aria-hidden=true],.carbon-data-bar[aria-hidden=true],.carbon-data-completion-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-axis-info-row-item[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline{stroke-width:3px;shape-rendering:auto;opacity:.3}[dir] .carbon-dateline-group .carbon-dateline-point[aria-disabled=false]{cursor:pointer}.carbon-dateline-group .carbon-dateline-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-eventline-group .carbon-eventline{stroke-width:2px;opacity:1;shape-rendering:auto}.carbon-no-data-label{font-size:1.25rem;text-anchor:middle;fill:#6f7477}.carbon-no-data-overlay{fill:#fff;opacity:.6}.carbon-label-popup-tooltip{position:absolute;font-family:Segoe UI,sans-serif;font-size:.866rem;font-weight:400;line-height:1.5;letter-spacing:.01071em;z-index:20;-moz-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}[dir] .carbon-label-popup-tooltip{padding:1rem;background-color:#fff;border-radius:4px;box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.carbon-label-popup-tooltip .popup-item{display:block}.carbon-label-popup-tooltip .section{display:block}[dir=ltr] .carbon-label-popup-tooltip .section{padding-left:1rem}[dir=rtl] .carbon-label-popup-tooltip .section{padding-right:1rem}.carbon-label-popup-tooltip .content{display:block}[dir] .carbon-label-popup-tooltip .content:last-child{padding-bottom:0}[dir] .carbon-label-popup-tooltip .content:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-tooltip g{display:inline-block}.carbon-label-popup-tooltip g .popup-label{color:#01579b}.carbon-label-popup-tooltip g .popup-label:after{content:": "}.carbon-label-popup-tooltip g .popup-text{color:#000}[dir] .carbon-label-popup-tooltip g:not(:last-child){padding-bottom:.5rem}.carbon-label-popup-overlay{position:fixed;width:100vw;height:100vh;top:0;z-index:1200}[dir] .carbon-label-popup-overlay{cursor:pointer}[dir=ltr] .carbon-label-popup-overlay{left:0}[dir=rtl] .carbon-label-popup-overlay{right:0}.carbon-line path{fill:none;stroke-width:1px;transition:opacity .3s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path.carbon-highlight{stroke-width:2px;transition:stroke 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-line path[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-pair--selected{opacity:1 !important;visibility:visible !important;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1) !important}[dir] .carbon-paired-point[aria-disabled=false]{cursor:pointer}.carbon-paired-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-paired-line{fill:none;stroke-width:1px;stroke:#1c1f21}[dir] .carbon-paired-line[aria-disabled=false]{cursor:pointer}.carbon-paired-line[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}[dir] .carbon-data-task, [dir] .carbon-y-axis-track-label .tick>text[aria-disabled=false]{cursor:pointer}[dir] .carbon-data-task[aria-disabled=true]{cursor:default}.carbon-data-track-group .carbon-selected-data-point{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25}.carbon-data-track-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-data-selected-bar{display:block;stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-data-selected-bar[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-track-selected-bar{display:block;fill-opacity:0}[dir] .carbon-track-selected-bar[aria-disabled=false]{cursor:pointer}.carbon-track-selected-bar[aria-selected=true]{stroke-width:1px;stroke:#a6d9f4;fill:#ebf6fd;fill-opacity:.25;shape-rendering:auto}.carbon-timeline-content-group .carbon-point[aria-hidden=true],.carbon-timeline-content-group .carbon-selected-data-point[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-outer{fill:#c00;stroke:#c00;stroke-width:24px;stroke-width:19px}.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner{fill:#fff;stroke:#fff;stroke-width:8px;stroke-width:7px}.carbon-timeline-criticality-inner[aria-hidden=true],.carbon-timeline-criticality-outer[aria-hidden=true]{opacity:0;visibility:hidden;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-timeline-criticality-inner.carbon-highlight,.carbon-timeline-criticality-outer.carbon-highlight{opacity:1;visibility:visible;transition:opacity 1s cubic-bezier(0.07, 0.95, 0, 1),transform 1s cubic-bezier(0.07, 0.95, 0, 1)}.carbon-pie-chart-canvas{display:block}[dir] .carbon-pie-chart-canvas{margin:0 auto}[dir] .carbon-data-pie-group[aria-disabled=false]{cursor:pointer}.carbon-legend .carbon-pie-legend-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;outline:0;-webkit-user-select:none;-ms-user-select:none;user-select:none}[dir] .carbon-legend .carbon-pie-legend-item{margin:.5rem}[dir] .carbon-legend .carbon-pie-legend-item.carbon-pie-legend-item-slice-hover{background-color:#ebf6fd}[dir=ltr] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-right:.5rem}[dir=rtl] .carbon-legend .carbon-pie-legend-item .carbon-pie-legend-item-icon{margin-left:.5rem} +.ExampleTemplate-module__clinical-lowlight-theme___rBbtD{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #505a5f;--terra-dev-site-example-template-selected-code-toggle-background-color: #3f474b;--terra-dev-site-example-template-hover-code-toggle-background-color: #373d41;--terra-dev-site-example-template-code-toggle-background-color: #2e3539;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #1d2427;--terra-dev-site-example-template-keyboard-focus-outline: #fff;--terra-dev-site-example-template-code-toggle-color: #b2b5b6;--terra-dev-site-example-template-footer-background-color: #262b2e;--terra-dev-site-example-template-header-background-color: #262b2e;--terra-dev-site-example-template-content-background-color: #1b2326}.ExampleTemplate-module__orion-fusion-theme___GzA23{--terra-dev-site-example-template-hover-selected-code-toggle-background-color: #424141;--terra-dev-site-example-template-selected-code-toggle-background-color: #666565;--terra-dev-site-example-template-hover-code-toggle-background-color: #b8b8b8;--terra-dev-site-example-template-code-toggle-background-color: #ddd;--terra-dev-site-example-template-selected-code-toggle-color: #ebebeb;--terra-dev-site-example-template-code-background-color: #f6f8fa;--terra-dev-site-example-template-keyboard-focus-outline: #000;--terra-dev-site-example-template-code-toggle-color: #000;--terra-dev-site-example-template-footer-background-color: #f4f4f4;--terra-dev-site-example-template-header-background-color: #f4f4f4;--terra-dev-site-example-template-template-content-background-color: #fff}.ExampleTemplate-module__template___a4uPk{overflow:hidden}[dir] .ExampleTemplate-module__template___a4uPk{border:1px solid #e8e8e8;border-radius:3px;margin-bottom:.9375rem}[dir] .ExampleTemplate-module__header___iFXV3{background-color:var(--terra-dev-site-example-template-header-background-color);border-bottom:1px solid #e8e8e8;padding:.625rem}[dir] .ExampleTemplate-module__content___48m4Q{background-color:var(--terra-dev-site-example-template-content-background-color);padding:.625rem}[dir] .ExampleTemplate-module__description___NwBJo{padding-bottom:.625rem}.ExampleTemplate-module__footer___GpSoG{overflow:hidden}[dir] .ExampleTemplate-module__footer___GpSoG{background-color:var(--terra-dev-site-example-template-footer-background-color)}.ExampleTemplate-module__button-container___rAD11{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.ExampleTemplate-module__css___\+jtk1,.ExampleTemplate-module__code___7rC6C{height:100%}[dir] .ExampleTemplate-module__css___\+jtk1, [dir] .ExampleTemplate-module__code___7rC6C{background-color:#f6f8fa;background-color:var(--terra-dev-site-example-template-code-background-color, #f6f8fa)}.ExampleTemplate-module__css-toggle___chHK7,.ExampleTemplate-module__code-toggle___TGlE-{-ms-flex-align:center;align-items:center;color:#000;color:var(--terra-dev-site-example-template-code-toggle-color, #000);display:-ms-flexbox;display:flex;outline:none}[dir] .ExampleTemplate-module__css-toggle___chHK7, [dir] .ExampleTemplate-module__code-toggle___TGlE-{background-color:#ddd;background-color:var(--terra-dev-site-example-template-code-toggle-background-color, #ddd);border:0;cursor:pointer;padding:.625rem}.ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS,.ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{color:#ebebeb;color:var(--terra-dev-site-example-template-selected-code-toggle-color, #ebebeb)}[dir] .ExampleTemplate-module__css-toggle___chHK7.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-.ExampleTemplate-module__is-selected___0BYwS{background-color:#666565;background-color:var(--terra-dev-site-example-template-selected-code-toggle-background-color, #666565)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover{background-color:#b8b8b8;background-color:var(--terra-dev-site-example-template-hover-code-toggle-background-color, #b8b8b8)}[dir] .ExampleTemplate-module__css-toggle___chHK7:hover.ExampleTemplate-module__is-selected___0BYwS, [dir] .ExampleTemplate-module__code-toggle___TGlE-:hover.ExampleTemplate-module__is-selected___0BYwS{background-color:#424141;background-color:var(--terra-dev-site-example-template-hover-selected-code-toggle-background-color, #424141)}.ExampleTemplate-module__item___8FTQq[data-focus-styles-enabled=true]:focus{outline:2px dashed #000;outline:2px dashed var(--terra-dev-site-example-template-keyboard-focus-outline, #000);outline-offset:-2px}.ExampleTemplate-module__chevron___VbY7N{display:inline-block;height:.875rem;width:.875rem}.ExampleTemplate-module__title___r\+nbJ{font-size:1rem;font-weight:500}[dir] .ExampleTemplate-module__title___r\+nbJ{margin:0;padding:0}[dir] .ExampleTemplate-module__dynamic-content___k\+1H7{background-color:rgba(0,0,0,0)} diff --git a/52169-f84bc563405a7ecd2156.js b/52169-f84bc563405a7ecd2156.js new file mode 100644 index 000000000..c9e02ecdc --- /dev/null +++ b/52169-f84bc563405a7ecd2156.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[52169],{84219:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),i=n(86006),l={key:"uid_1",label:{display:"Data Label 1"},shape:r.default.helpers.SHAPES.DARK.CIRCLE,onClick:i.loadPopup,values:[{x:new Date(2016,0,1,1,5).toISOString(),y:5},{x:new Date(2016,0,1,2,15).toISOString(),y:11},{x:new Date(2016,0,1,3,15).toISOString(),y:12},{x:new Date(2016,0,1,4,15).toISOString(),y:16},{x:new Date(2016,0,1,5,15).toISOString(),y:17},{x:new Date(2016,0,1,6,15).toISOString(),y:9},{x:new Date(2016,0,1,7,0).toISOString(),y:11},{x:new Date(2016,0,1,8,15).toISOString(),y:12},{x:new Date(2016,0,1,9,45).toISOString(),y:16},{x:new Date(2016,0,1,12,15).toISOString(),y:17},{x:new Date(2016,0,1,13,15).toISOString(),y:28},{x:new Date(2016,0,1,14,15).toISOString(),y:12},{x:new Date(2016,0,1,19,45).toISOString(),y:13},{x:new Date(2016,0,1,21,15).toISOString(),y:14}],yAxis:"y"};t.default=l},51383:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default={key:"uid_1",label:{display:"Data Label 1"},values:[]}},16597:function(e,t,n){var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,axis:{x:{type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Datetime",lowerLimit:new Date(2016,0,1,1,0).toISOString(),upperLimit:new Date(2016,0,1,23,59).toISOString()},y:{label:"Line Set A",lowerLimit:10,upperLimit:30},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:250}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!0,showHGrid:!0}}},64263:function(e,t,n){var a=n(24994);t.A=void 0;var r=a(n(85715)),i=a(n(96540)),l=a(n(23986)),o=a(n(61770)),u=a(n(45839));n(45633);var p,s=a(n(29683)),d=a(n(16597)),c=a(n(84219)),f=a(n(51383)),m=u.default.deepClone((0,d.default)("#DynamicLegendExample")),g=u.default.deepClone(c.default),h={initial:0,factor:3};t.A=function(){i.default.useEffect((function(){(p=o.default.api.graph(m)).loadContent(o.default.api.line(g))}),[]);var e=i.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return p.config.axis.x.lowerLimit=new Date(2016,0,1,n).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,n).toISOString(),{initial:n,factor:e.factor}}),h),t=(0,r.default)(e,2),n=t[0],a=t[1];return i.default.useLayoutEffect((function(){if(p){p.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),p.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={panData:[u.default.deepClone(f.default)]};p.reflowMultipleDatasets(e)}}),[n.initial]),i.default.createElement(i.default.Fragment,null,i.default.createElement(l.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),i.default.createElement(l.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),i.default.createElement(s.default,{id:"DynamicLegendExample"}))}},52169:function(e,t,n){n.r(t),n.d(t,{default:function(){return S}});var a=n(96540),r=n(36665),i=n(64263),l=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var p={};function s(e){var t=e.components,n=u(e,l);return(0,r.mdx)("wrapper",o({},p,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Line/LineGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _lineTimeseriesPanning = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Line/lineTimeseriesPanning"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1"));\nvar _datasetTimeseries1newData = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Line/datasetTimeseries1newData2"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _lineTimeseriesPanning.default)(\'#DynamicLegendExample\'));\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar graph;\nvar DynamicLegendPanningExample = function DynamicLegendPanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.line(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, hour).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, hour).toISOString();\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newDataset = {\n panData: [_utils.default.deepClone(_datasetTimeseries1newData.default)]\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "DynamicLegendExample"\n }));\n};\nvar _default = exports.default = DynamicLegendPanningExample;\n')))}s.isMDXComponent=!0;var d=n(201),c=n(79679),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(d.A,{title:t||"Dynamic Legend",description:n,example:a.createElement(i.A,null),exampleCssSrc:a.createElement(c.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=n(33366);n(55020);var g=["components"];function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var b={},y="wrapper";function S(e){var t=e.components,n=x(e,g);return(0,r.mdx)(y,h({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"line-graph---panning"},"Line Graph - panning"),(0,r.mdx)("p",null,"This is a line graph example with a dynamically updating legend. Click on the panning buttons to see the updated legend."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"example"},"Example"),(0,r.mdx)(f,{mdxType:"LineGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(m.A,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)("h4",{id:"initial-data"},"Initial data"),(0,r.mdx)("initialData",null),(0,r.mdx)("h4",{id:"updated-data"},"Updated data"),(0,r.mdx)("updatedData",null)))}S.isMDXComponent=!0},33366:function(e,t,n){n.d(t,{A:function(){return p}});n(96540);var a=n(36665),r=["components"];function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var o={},u="wrapper";function p(e){var t=e.components,n=l(e,r);return(0,a.mdx)(u,i({},o,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar getLineTimeseriesPanningConfig = function getLineTimeseriesPanningConfig(id) {\n return {\n bindTo: id,\n axis: {\n x: {\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: \'Datetime\',\n lowerLimit: new Date(2016, 0, 1, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 1, 23, 59).toISOString()\n },\n y: {\n label: \'Line Set A\',\n lowerLimit: 10,\n upperLimit: 30\n },\n y2: {\n show: false,\n label: \'Line Set B\',\n lowerLimit: 0,\n upperLimit: 250\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: true,\n showHGrid: true\n };\n};\nvar _default = exports.default = getLineTimeseriesPanningConfig;\n')))}p.isMDXComponent=!0}}]); \ No newline at end of file diff --git a/53736-e811370bb300dd937b67.js b/53736-e811370bb300dd937b67.js new file mode 100644 index 000000000..4dbff8e4d --- /dev/null +++ b/53736-e811370bb300dd937b67.js @@ -0,0 +1 @@ +(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[53736],{2682:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770)),o=n(86006),i={key:"dynamic_dataset_1",label:{display:"Data Label 1"},color:r.default.helpers.COLORS.BLUE,onClick:o.loadBarPopup,values:[{x:new Date(2016,0,1,3).toISOString(),y:15},{x:new Date(2016,0,1,6).toISOString(),y:19},{x:new Date(2016,0,1,9).toISOString(),y:10},{x:new Date(2016,0,1,12).toISOString(),y:13},{x:new Date(2016,0,1,15).toISOString(),y:15}]};t.default=i},49577:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(61770));t.default=function(e){return{bindTo:e,bindLegendTo:null,axis:{x:{show:!0,type:r.default.helpers.AXIS_TYPE.TIME_SERIES,label:"Data",lowerLimit:new Date(2016,0,1,0).toISOString(),upperLimit:new Date(2016,0,2,0).toISOString(),ticks:{values:[new Date(2016,0,1,3).toISOString(),new Date(2016,0,1,6).toISOString(),new Date(2016,0,1,9).toISOString(),new Date(2016,0,1,12).toISOString(),new Date(2016,0,1,15).toISOString()],format:"%H"}},y:{show:!0,label:"Bar Set A",lowerLimit:0,upperLimit:20},y2:{show:!1,label:"Line Set B",lowerLimit:0,upperLimit:20}},pan:{enabled:!0},showLabel:!0,showLegend:!0,showShapes:!0,showVGrid:!1,showHGrid:!0,eventline:[{color:r.default.helpers.COLORS.GREY,style:{strokeDashArray:"4,4"},value:new Date(2016,0,1,4,30).toISOString()}]}}},86006:function(e,t,n){"use strict";var a=n(24994),r=n(73738);Object.defineProperty(t,"__esModule",{value:!0}),t.loadY2AxisLabelPopup=t.loadXAndYAxisLabelPopup=t.loadTrackPopup=t.loadTimelinePopup=t.loadTextLabelPopup=t.loadTaskPopup=t.loadPopup=t.loadPiePopup=t.loadDatelinePopup=t.loadBubblePopup=t.loadBarPopup=void 0;var o=a(n(85715)),i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=r(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var a={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&{}.hasOwnProperty.call(e,i)){var l=o?Object.getOwnPropertyDescriptor(e,i):null;l&&(l.get||l.set)?Object.defineProperty(a,i,l):a[i]=e[i]}return a.default=e,n&&n.set(e,a),a}(n(37332)),l=a(n(22639)),p=a(n(45839));function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}var s=function(e){return new Date(e).toLocaleString()},c=function(e){return e?d(e)?s(e):e:null},d=function(e){return e instanceof Date},f=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t),a.append("g").classed("popup-text",!0).text(n)},m=function(e,t,n){var a=e.append("g").classed("popup-item",!0);a.append("label").classed("popup-label",!0).text(t);for(var r=a.append("g").classed("section",!0),i=function(){var e=p[l],t=r.append("g").classed("content",!0);Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),a=n[0],r=n[1],i=t.append("g").classed("popup-item",!0);i.append("label").classed("popup-label",!0).text(a.replace(/([a-z0-9])([A-Z])/g,"$1 $2").replace(/(\b[a-z](?!\s))/g,(function(e){return e.toUpperCase()}))),i.append("g").classed("popup-text",!0).text(r)}))},l=0,p=Object.values(n);l0){var p=[];p.forEach((function(e){p.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Tasks",p)}if(o&&o.length>0){var u=[];o.forEach((function(e){u.push({name:e.key,startDate:e.startDate,endDate:e.endDate})})),m(a,"Activities",u)}if(i&&i.length>0){var s=[];i.forEach((function(e){s.push({name:e.key,values:e.values.join(", ")})})),m(a,"Events",s)}if(l&&l.length>0){var c=[];l.forEach((function(e){c.push({name:e.key,values:e.values.join(", ")})})),m(a,"Actions",c)}},t.loadTaskPopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.label,i=a.display,l=a.y,p=a.startDate,u=a.endDate,c=a.percentage;o&&f(r,"Task Name",i),f(r,"Track",l),f(r,"Start Date",s(p)),f(r,"End Date",s(u)),c&&f(r,"Percentage",c)},t.loadDatelinePopup=function(e,t){v();var n=g(e).append("g"),a=t.label,r=t.value;a&&f(n,"Milestone",a.display),f(n,"Date",s(r))},t.loadTimelinePopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.x,i=(a.y,a.label),l=a.content;f(r,"X axis","".concat(d(o)?s(o):o)),f(r,"".concat(i.display),l)},t.loadPiePopup=function(e,t,n,a){v();var r=g(e).append("g"),o=a.label,i=a.value;f(r,o.display,i)}},29683:function(e,t,n){"use strict";var a=n(24994);Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n(96540)),o=a(n(5556));n(16939);var i={id:o.default.string.isRequired},l=function(e){return r.default.createElement(r.default.Fragment,null,r.default.createElement("div",{id:"tooltip",className:"initial-tooltip"}),r.default.createElement("div",{id:e.id,className:"example-graph-container"}))};l.propTypes=i;t.default=l},43353:function(e,t,n){"use strict";var a=n(24994);t.A=void 0;var r=a(n(85715)),o=a(n(96540)),i=a(n(23986)),l=a(n(61770)),p=a(n(45839));n(11719);var u,s=a(n(29683)),c=a(n(49577)),d=a(n(2682)),f=p.default.deepClone((0,c.default)("#barPanningDynamicEventline")),m={initial:0,factor:3},g=p.default.deepClone(d.default);t.A=function(){o.default.useEffect((function(){(u=l.default.api.graph(f)).loadContent(l.default.api.bar(g))}),[]);var e=o.default.useReducer((function(e,t){var n;switch(t.type){case"panLeft":n=e.initial-e.factor;break;case"panRight":n=e.initial+e.factor;break;default:return e}return{initial:n,factor:e.factor}}),m),t=(0,r.default)(e,2),n=t[0],a=t[1];return o.default.useLayoutEffect((function(){if(u){u.config.axis.x.lowerLimit=new Date(2016,0,1,n.initial).toISOString(),u.config.axis.x.upperLimit=new Date(2016,0,2,n.initial).toISOString();var e={eventline:[{color:l.default.helpers.COLORS.BLACK,style:{strokeDashArray:"2,2"},value:new Date(2016,0,1,7,30).toISOString()}]};u.reflowMultipleDatasets(e)}}),[n.initial]),o.default.createElement(o.default.Fragment,null,o.default.createElement(i.default,{className:"button-pan-left",text:"<",onClick:function(){return a({type:"panLeft"})}}),o.default.createElement(i.default,{className:"button-pan-right",text:">",onClick:function(){return a({type:"panRight"})}}),o.default.createElement(s.default,{id:"barPanningDynamicEventline"}))}},53736:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return E}});var a=n(96540),r=n(36665),o=n(43353),i=["components"];function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var u={};function s(e){var t=e.components,n=p(e,i);return(0,r.mdx)("wrapper",l({},u,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));\nvar _react = _interopRequireDefault(require("react"));\nvar _Button = _interopRequireDefault(require("terra-button/lib/Button"));\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _utils = _interopRequireDefault(require("@cerner/carbon-graphs/lib/js/helpers/utils"));\nrequire("@cerner/terra-graphs-docs/lib/terra-graphs-src/components/Bar/BarGraph.module.scss");\nvar _ExampleGraphContainer = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/terra-dev-site/ExampleGraphContainer/ExampleGraphContainer"));\nvar _barPanningEventline = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/graphConfigObjects/Bar/barPanningEventline"));\nvar _datasetTimeseries = _interopRequireDefault(require("@cerner/terra-graphs-docs/lib/example-datasets/dataObjects/Bar/datasetTimeseries1"));\n/*\nPlease refer to the documentation below to see the graphConfig and data objects\n*/\n\nvar graphConfig = _utils.default.deepClone((0, _barPanningEventline.default)(\'#barPanningDynamicEventline\'));\nvar initialState = {\n initial: 0,\n factor: 3\n};\nvar dataset = _utils.default.deepClone(_datasetTimeseries.default);\nvar graph;\nvar BarPanningExample = function BarPanningExample() {\n _react.default.useEffect(function () {\n graph = _carbonGraphs.default.api.graph(graphConfig);\n graph.loadContent(_carbonGraphs.default.api.bar(dataset));\n }, []);\n var reducer = function reducer(panState, action) {\n var hour;\n switch (action.type) {\n case \'panLeft\':\n hour = panState.initial - panState.factor;\n break;\n case \'panRight\':\n hour = panState.initial + panState.factor;\n break;\n default:\n return panState;\n }\n return {\n initial: hour,\n factor: panState.factor\n };\n };\n var _React$useReducer = _react.default.useReducer(reducer, initialState),\n _React$useReducer2 = (0, _slicedToArray2.default)(_React$useReducer, 2),\n panState = _React$useReducer2[0],\n dispatch = _React$useReducer2[1];\n _react.default.useLayoutEffect(function () {\n if (!graph) {\n return;\n }\n graph.config.axis.x.lowerLimit = new Date(2016, 0, 1, panState.initial).toISOString();\n graph.config.axis.x.upperLimit = new Date(2016, 0, 2, panState.initial).toISOString();\n var newEventline = [{\n color: _carbonGraphs.default.helpers.COLORS.BLACK,\n style: {\n strokeDashArray: \'2,2\'\n },\n value: new Date(2016, 0, 1, 7, 30).toISOString()\n }];\n var newDataset = {\n eventline: newEventline\n };\n graph.reflowMultipleDatasets(newDataset);\n }, [panState.initial]);\n return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-left",\n text: "<",\n onClick: function onClick() {\n return dispatch({\n type: \'panLeft\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_Button.default, {\n className: "button-pan-right",\n text: ">",\n onClick: function onClick() {\n return dispatch({\n type: \'panRight\'\n });\n }\n }), /*#__PURE__*/_react.default.createElement(_ExampleGraphContainer.default, {\n id: "barPanningDynamicEventline"\n }));\n};\nvar _default = exports.default = BarPanningExample;\n')))}s.isMDXComponent=!0;var c=n(201),d=n(18241),f=function(e){var t=e.title,n=e.description,r=e.isExpanded;return a.createElement(c.A,{title:t||"Dynamic Eventline",description:n,example:a.createElement(o.A,null),exampleCssSrc:a.createElement(d.A,null),exampleSrc:a.createElement(s,null),isExpanded:r})},m=["components"];function g(){return g=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var b={},y="wrapper";function h(e){var t=e.components,n=v(e,m);return(0,r.mdx)(y,g({},b,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-js"},"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require(\"@cerner/carbon-graphs\"));\nvar getbarConfig = function getbarConfig(id) {\n return {\n bindTo: id,\n bindLegendTo: null,\n axis: {\n x: {\n show: true,\n type: _carbonGraphs.default.helpers.AXIS_TYPE.TIME_SERIES,\n label: 'Data',\n lowerLimit: new Date(2016, 0, 1, 0).toISOString(),\n upperLimit: new Date(2016, 0, 2, 0).toISOString(),\n ticks: {\n values: [new Date(2016, 0, 1, 3).toISOString(), new Date(2016, 0, 1, 6).toISOString(), new Date(2016, 0, 1, 9).toISOString(), new Date(2016, 0, 1, 12).toISOString(), new Date(2016, 0, 1, 15).toISOString()],\n format: '%H'\n }\n },\n y: {\n show: true,\n label: 'Bar Set A',\n lowerLimit: 0,\n upperLimit: 20\n },\n y2: {\n show: false,\n label: 'Line Set B',\n lowerLimit: 0,\n upperLimit: 20\n }\n },\n pan: {\n enabled: true\n },\n showLabel: true,\n showLegend: true,\n showShapes: true,\n showVGrid: false,\n showHGrid: true,\n eventline: [{\n color: _carbonGraphs.default.helpers.COLORS.GREY,\n style: {\n strokeDashArray: '4,4'\n },\n value: new Date(2016, 0, 1, 4, 30).toISOString()\n }]\n };\n};\nvar _default = exports.default = getbarConfig;\n")))}h.isMDXComponent=!0;var x=n(96499),O=["components"];function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}n(27647);var _={},D="wrapper";function E(e){var t=e.components,n=w(e,O);return(0,r.mdx)(D,S({},_,n,{components:t,mdxType:"MDXLayout"}),(0,r.mdx)("h1",{id:"bar-graph-panning---dynamic-eventline"},"Bar graph panning - Dynamic eventline"),(0,r.mdx)("p",null,"This is a bar graph example that implements panning with a dynamic eventline."),(0,r.mdx)("h2",{id:"getting-started"},"Getting Started"),(0,r.mdx)("ul",null,(0,r.mdx)("li",{parentName:"ul"},"Install with ",(0,r.mdx)("a",{parentName:"li",href:"https://www.npmjs.com/"},"npmjs"),":",(0,r.mdx)("ul",{parentName:"li"},(0,r.mdx)("li",{parentName:"ul"},(0,r.mdx)("inlineCode",{parentName:"li"},"npm i @cerner/carbon-graphs --save-dev"))))),(0,r.mdx)("h2",{id:"usage"},"Usage"),(0,r.mdx)("pre",null,(0,r.mdx)("code",{parentName:"pre",className:"language-jsx"},"import Carbon from '@cerner/carbon-graphs';\nimport '@cerner/carbon-graphs/dist/css/carbon-graphs.css';\n")),(0,r.mdx)("h2",{id:"examples"},"Examples"),(0,r.mdx)(f,{mdxType:"BarGraphPanning"}),(0,r.mdx)("details",null,(0,r.mdx)("summary",{style:{fontSize:24}},(0,r.mdx)("b",null,"Data")),(0,r.mdx)("h3",{id:"graph-config-object"},"Graph Config object"),(0,r.mdx)(h,{mdxType:"GraphConfig"}),(0,r.mdx)("h3",{id:"data-object"},"Data object"),(0,r.mdx)(x.A,{mdxType:"DataObject"})))}E.isMDXComponent=!0},96499:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function u(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"},'"use strict";\n\nvar _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");\nObject.defineProperty(exports, "__esModule", {\n value: true\n});\nexports.default = void 0;\nvar _carbonGraphs = _interopRequireDefault(require("@cerner/carbon-graphs"));\nvar _popup = require("@cerner/terra-graphs-docs/lib/example-datasets/popup");\nvar data = {\n key: \'dynamic_dataset_1\',\n label: {\n display: \'Data Label 1\'\n },\n color: _carbonGraphs.default.helpers.COLORS.BLUE,\n onClick: _popup.loadBarPopup,\n values: [{\n x: new Date(2016, 0, 1, 3).toISOString(),\n y: 15\n }, {\n x: new Date(2016, 0, 1, 6).toISOString(),\n y: 19\n }, {\n x: new Date(2016, 0, 1, 9).toISOString(),\n y: 10\n }, {\n x: new Date(2016, 0, 1, 12).toISOString(),\n y: 13\n }, {\n x: new Date(2016, 0, 1, 15).toISOString(),\n y: 15\n }]\n};\nvar _default = exports.default = data;\n')))}u.isMDXComponent=!0},18241:function(e,t,n){"use strict";n.d(t,{A:function(){return u}});n(96540);var a=n(36665),r=["components"];function o(){return o=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}var l={},p="wrapper";function u(e){var t=e.components,n=i(e,r);return(0,a.mdx)(p,o({},l,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-scss"},"@import '../Variables.module';\n\n.carbon-data-selected-bar {\n @include terra-graph-selected-indicator-styles();\n @include terra-graph-carbon-shape-rendering();\n display: block;\n\n &[aria-hidden='true'] {\n @include terra-graph-opacity-hide();\n }\n}\n\n")))}u.isMDXComponent=!0},27647:function(e,t,n){var a,r;void 0===(r="function"==typeof(a=function(){var e="details",t="summary";function n(e){if("summary"===e.target.nodeName.toLowerCase()){var t=e.target.parentNode;if(!t)return;t.getAttribute("open")?(t.open=!1,t.removeAttribute("open")):(t.open=!0,t.setAttribute("open","open"))}}function a(){var n=document.createElement(e);if(!("open"in n))return!1;n.innerHTML="<"+t+">ab",document.body.appendChild(n);var a=n.offsetHeight;n.open=!0;var r=a!=n.offsetHeight;return document.body.removeChild(n),r}function r(e,t){if(!document.getElementById(e)){var n=document.createElement("style");n.id=e,n.innerHTML=t,document.getElementsByTagName("head")[0].appendChild(n)}}a()||(document.documentElement.className+=" no-details",window.addEventListener("click",n),r("details-polyfill-style","html.no-details "+e+" { display: block; }\nhtml.no-details "+e+":not([open]) > :not("+t+") { display: none; }\nhtml.no-details "+e+" > "+t+':before { content: "▶"; display: inline-block; font-size: .8em; width: 1.5em; }\nhtml.no-details '+e+"[open] > "+t+':before { content: "▼"; }'))})?a.call(t,n,t,e):a)||(e.exports=r)},16939:function(e,t,n){"use strict";n.r(t),t.default={}},11719:function(e,t,n){"use strict";n.r(t),t.default={}}}]); \ No newline at end of file diff --git a/56853-812cec5767b8386e3aed.js b/56853-812cec5767b8386e3aed.js new file mode 100644 index 000000000..e8d507cc5 --- /dev/null +++ b/56853-812cec5767b8386e3aed.js @@ -0,0 +1 @@ +"use strict";(self.webpackChunkterra_ui=self.webpackChunkterra_ui||[]).push([[56853],{56853:function(e,t,n){n.r(t),n.d(t,{default:function(){return p}});n(96540);var a=n(36665),l=["components"];function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0||(l[n]=e[n]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(a=0;a=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(l[n]=e[n])}return l}var m={},i="wrapper";function p(e){var t=e.components,n=d(e,l);return(0,a.mdx)(i,r({},m,n,{components:t,mdxType:"MDXLayout"}),(0,a.mdx)("h1",{id:"dateline"},"Dateline"),(0,a.mdx)("p",null,"If Dateline is provided then the ",(0,a.mdx)("inlineCode",{parentName:"p"},"value")," property is mandatory."),(0,a.mdx)("p",null,"When using dateline with graph then ",(0,a.mdx)("inlineCode",{parentName:"p"},"x axis type")," must be ",(0,a.mdx)("strong",{parentName:"p"},"timeseries")," it is mandatory."),(0,a.mdx)("ul",null,(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#structure"},"Structure")),(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#properties"},"Properties"),(0,a.mdx)("ul",{parentName:"li"},(0,a.mdx)("li",{parentName:"ul"},(0,a.mdx)("a",{parentName:"li",href:"#label"},"label"))))),(0,a.mdx)("h2",{id:"structure"},"Structure"),(0,a.mdx)("pre",null,(0,a.mdx)("code",{parentName:"pre",className:"language-js"}," dateline:[\n {\n color: ,\n shape: ,\n value: ,\n style: