@carbon/charts 0.32.8 → 0.32.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +35 -0
- package/build/demo/data/area.d.ts +17 -0
- package/build/demo/data/bar.d.ts +51 -0
- package/build/demo/data/gauge.d.ts +40 -0
- package/build/demo/data/index.d.ts +6 -0
- package/build/demo/data/line.d.ts +26 -0
- package/build/demo/data/scatter.d.ts +18 -0
- package/build/src/charts/gauge.d.ts +6 -0
- package/build/src/charts/index.d.ts +1 -0
- package/build/src/components/essentials/tooltip-bar.d.ts +2 -2
- package/build/src/components/essentials/tooltip-radar.d.ts +2 -1
- package/build/src/components/essentials/tooltip.d.ts +2 -2
- package/build/src/components/graphs/gauge.d.ts +26 -0
- package/build/src/components/index.d.ts +1 -0
- package/build/src/configuration.d.ts +2 -1
- package/build/src/interfaces/axis-scales.d.ts +2 -0
- package/build/src/interfaces/charts.d.ts +20 -0
- package/build/src/interfaces/components.d.ts +2 -0
- package/build/src/interfaces/enums.d.ts +31 -1
- package/build/src/interfaces/events.d.ts +9 -0
- package/build/src/interfaces/truncation.d.ts +17 -0
- package/build/src/tools.d.ts +9 -0
- package/bundle.js +1 -1
- package/chart.js +21 -22
- package/chart.js.map +1 -1
- package/charts/gauge.d.ts +6 -0
- package/charts/gauge.js +41 -0
- package/charts/gauge.js.map +1 -0
- package/charts/index.d.ts +1 -0
- package/charts/index.js +1 -0
- package/charts/index.js.map +1 -1
- package/components/axes/axis.js +61 -1
- package/components/axes/axis.js.map +1 -1
- package/components/essentials/legend.js +39 -6
- package/components/essentials/legend.js.map +1 -1
- package/components/essentials/tooltip-bar.d.ts +2 -2
- package/components/essentials/tooltip-bar.js +20 -7
- package/components/essentials/tooltip-bar.js.map +1 -1
- package/components/essentials/tooltip-pie.js +3 -0
- package/components/essentials/tooltip-pie.js.map +1 -1
- package/components/essentials/tooltip-radar.d.ts +2 -1
- package/components/essentials/tooltip-radar.js +1 -1
- package/components/essentials/tooltip-radar.js.map +1 -1
- package/components/essentials/tooltip-scatter.js +6 -0
- package/components/essentials/tooltip-scatter.js.map +1 -1
- package/components/essentials/tooltip.d.ts +2 -2
- package/components/essentials/tooltip.js +11 -6
- package/components/essentials/tooltip.js.map +1 -1
- package/components/graphs/area-stacked.js +7 -4
- package/components/graphs/area-stacked.js.map +1 -1
- package/components/graphs/gauge.d.ts +26 -0
- package/components/graphs/gauge.js +301 -0
- package/components/graphs/gauge.js.map +1 -0
- package/components/graphs/line.js +13 -7
- package/components/graphs/line.js.map +1 -1
- package/components/graphs/scatter-stacked.js +1 -1
- package/components/graphs/scatter-stacked.js.map +1 -1
- package/components/index.d.ts +1 -0
- package/components/index.js +1 -0
- package/components/index.js.map +1 -1
- package/configuration.d.ts +2 -1
- package/configuration.js +100 -65
- package/configuration.js.map +1 -1
- package/demo/data/area.d.ts +17 -0
- package/demo/data/area.js +45 -19
- package/demo/data/area.js.map +1 -1
- package/demo/data/bar.d.ts +51 -0
- package/demo/data/bar.js +52 -0
- package/demo/data/bar.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/donut.js +10 -10
- package/demo/data/donut.js.map +1 -1
- package/demo/data/gauge.d.ts +40 -0
- package/demo/data/gauge.js +41 -0
- package/demo/data/gauge.js.map +1 -0
- package/demo/data/index.d.ts +6 -0
- package/demo/data/index.js +163 -120
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +26 -0
- package/demo/data/line.js +37 -0
- package/demo/data/line.js.map +1 -1
- package/demo/data/scatter.d.ts +18 -0
- package/demo/data/scatter.js +35 -0
- package/demo/data/scatter.js.map +1 -1
- package/demo/styles.css +80 -0
- package/demo/styles.css.map +1 -1
- package/demo/styles.min.css +1 -1
- package/demo/styles.min.css.map +1 -1
- package/demo/tsconfig.tsbuildinfo +62 -23
- package/interfaces/axis-scales.d.ts +2 -0
- package/interfaces/axis-scales.js.map +1 -1
- package/interfaces/charts.d.ts +20 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/components.d.ts +2 -0
- package/interfaces/components.js.map +1 -1
- package/interfaces/enums.d.ts +31 -1
- package/interfaces/enums.js +34 -0
- package/interfaces/enums.js.map +1 -1
- package/interfaces/events.d.ts +9 -0
- package/interfaces/events.js +10 -0
- package/interfaces/events.js.map +1 -1
- package/interfaces/truncation.d.ts +17 -0
- package/interfaces/truncation.js +1 -0
- package/interfaces/truncation.js.map +1 -0
- package/model.js +15 -0
- package/model.js.map +1 -1
- package/package.json +1 -1
- package/styles/components/_tooltip.scss +2 -0
- package/styles/graphs/_gauge.scss +19 -0
- package/styles/graphs/index.scss +1 -0
- package/styles-g10.css +21 -0
- package/styles-g10.css.map +1 -1
- package/styles-g10.min.css +1 -1
- package/styles-g10.min.css.map +1 -1
- package/styles-g100.css +21 -0
- package/styles-g100.css.map +1 -1
- package/styles-g100.min.css +1 -1
- package/styles-g100.min.css.map +1 -1
- package/styles-g90.css +21 -0
- package/styles-g90.css.map +1 -1
- package/styles-g90.min.css +1 -1
- package/styles-g90.min.css.map +1 -1
- package/styles.css +21 -0
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tools.d.ts +9 -0
- package/tools.js +24 -1
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +106 -40
package/styles.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.bx--cc--axes g.axis g.ticks.invisible{visibility:hidden}.bx--cc--axes g.axis g.tick text{fill:#565656;font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif}.bx--cc--axes g.axis g.tick line{display:none}.bx--cc--axes g.axis path.domain{stroke:#8c8c8c}.bx--cc--chart-svg g.callouts{stroke:#565656}.bx--cc--grid rect.chart-grid-backdrop{fill:#fff;stroke:#dcdcdc}.bx--cc--grid g.x.grid g.tick line,.bx--cc--grid g.y.grid g.tick line{pointer-events:none;stroke-width:1px;stroke:#dcdcdc}.bx--cc--grid g.x.grid g.tick.active line,.bx--cc--grid g.y.grid g.tick.active line{stroke-dasharray:2px;stroke:#0062ff}.bx--cc--ruler line.ruler-line{stroke:#000;stroke-width:1px;stroke-dasharray:2;pointer-events:none}.bx--cc--ruler text.axis-tooltip-text{fill:#fff;dominant-baseline:middle;text-anchor:middle}.bx--cc--skeleton rect.chart-skeleton-backdrop{fill:#fff}.bx--cc--skeleton .shimmer-effect-lines{stroke-width:1px;stroke:url(#shimmer-lines)}.bx--cc--skeleton .empty-state-lines{stroke-width:1px;stroke:#dcdcdc}.bx--cc--skeleton #shimmer-lines .stop-bg-shimmer{stop-color:#dcdcdc}.bx--cc--skeleton #shimmer-lines .stop-shimmer{stop-color:#fff}.bx--cc--skeleton .shimmer-effect-areas{fill:url(#shimmer-areas)}.bx--cc--skeleton .empty-state-areas{fill:rgba(127,127,127,.1)}.bx--cc--skeleton #shimmer-areas .stop-bg-shimmer{stop-color:rgba(127,127,127,.1)}.bx--cc--skeleton #shimmer-areas .stop-shimmer{stop-color:rgba(255,255,255,.15)}.bx--cc--zero-line line.domain{stroke:#8c8c8c}.bx--cc--chart-svg svg.layout-child{overflow:visible}g.bx--cc--legend{user-select:none}g.bx--cc--legend g.legend-item rect.checkbox{stroke-width:1px;stroke-opacity:1}g.bx--cc--legend g.legend-item rect.checkbox:not(.active){stroke:#565656;fill:#fff}g.bx--cc--legend g.legend-item rect.checkbox:not(.active)~g.check{display:none}g.bx--cc--legend g.legend-item rect.hover-stroke{fill:none;stroke:#0f62fe;stroke-width:2}g.bx--cc--legend g.legend-item g.check>svg path{fill:#fff;stroke:#fff}g.bx--cc--legend g.legend-item text{font-size:12px;fill:#565656}g.bx--cc--legend.clickable g.legend-item:hover{cursor:pointer}.bx--cc--title text.title{fill:#171717;font-size:16px;font-family:'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;font-weight:600}.bx--cc--tooltip{background-color:#fff;pointer-events:none;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1);display:inline;box-shadow:0 1px 6px 0 rgba(0,0,0,.2);position:absolute;word-wrap:break-word;z-index:1059;font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif}.bx--cc--tooltip.hidden{opacity:0;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}.bx--cc--tooltip .content-box{color:#171717}.bx--cc--tooltip .content-box .title-tooltip{line-height:16px;font-size:12px;padding:4px;min-width:20px}.bx--cc--tooltip .content-box .datapoint-tooltip,.bx--cc--tooltip .content-box .total-val{display:flex;padding:4px;flex-flow:row nowrap;width:auto;min-width:20px;justify-content:flex-start;align-items:center}.bx--cc--tooltip .content-box .datapoint-tooltip p,.bx--cc--tooltip .content-box .total-val p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:16px;font-size:12px;display:inline-block;margin:0;padding:0;border:0}.bx--cc--tooltip .content-box .datapoint-tooltip p.label,.bx--cc--tooltip .content-box .total-val p.label{flex:1;margin-right:8px}.bx--cc--tooltip .content-box .datapoint-tooltip p.value,.bx--cc--tooltip .content-box .total-val p.value{width:auto}.bx--cc--tooltip .content-box .total-val{font-weight:600}.bx--cc--tooltip .content-box .total-val .label{margin-left:4px}.bx--cc--tooltip .content-box ul.multi-tooltip{margin:0;padding:0}.bx--cc--tooltip .content-box ul.multi-tooltip li{list-style:none;position:relative}.bx--cc--tooltip .content-box ul.multi-tooltip li:not(:last-child){border-bottom:1px solid #dcdcdc}.bx--cc--tooltip .tooltip-color{position:absolute;left:0;top:0;width:4px;height:100%}.bx--cc--tooltip .tooltip-color+p.label{margin-left:4px}.bx--cc--threshold line.threshold-line{stroke:#fa4d56;stroke-width:1;stroke-dasharray:4;cursor:pointer;pointer-events:none}.bx--cc--threshold.active line.threshold-line{stroke-width:2}.bx--cc--threshold rect.threshold-hoverable-area{height:20px;transform:translate(0, -10px);cursor:pointer;fill:transparent}.bx--cc--threshold rect.threshold-hoverable-area.rotate{transform:rotate(90deg) translate(0, -10px)}.bx--cc--threshold--label{background-color:#fa4d56;pointer-events:none;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1);display:inline;box-shadow:0 1px 6px 0 rgba(0,0,0,.2);position:absolute;word-wrap:break-word;z-index:1059;font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif;color:#171717;line-height:16px;font-size:12px;padding:4px;min-width:20px}.bx--cc--threshold--label.hidden{opacity:0;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}.bx--cc--area path.area,.bx--cc--area-stacked path.area{pointer-events:none}g.bx--cc--bubble circle.dot.hovered{fill-opacity:1;transition:all .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}g.bx--cc--bubble circle.dot.unfilled{fill:#f3f3f3}g.bx--cc--bubble g.lines path.line{mix-blend-mode:multiply}.bx--cc--line path.line{pointer-events:none;fill:none;stroke-width:1.5}g.bx--cc--scatter circle.dot.hovered{fill-opacity:1;transition:all .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}g.bx--cc--scatter circle.dot.unfilled{fill:#f3f3f3;stroke-width:1.5}g.bx--cc--scatter circle.dot.threshold-anomaly{stroke-width:3}g.bx--cc--scatter g.lines path.line{mix-blend-mode:multiply}.bx--cc--radar .blobs path{stroke-width:1.5px}.bx--cc--radar .y-axes path,.bx--cc--radar .x-axes line{stroke-width:1px;stroke:#dcdcdc}.bx--cc--radar .x-axes line.hovered{stroke:#000}svg.bx--cc--chart-svg{font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif}svg.bx--cc--chart-svg text{font-size:12px;font-weight:400;fill:#565656}.bx--chart-holder{position:relative;display:block;width:100%;height:100%;background-color:#fff}svg.bx--cc--chart-svg{overflow:visible}/*# sourceMappingURL=styles.min.css.map */
|
|
1
|
+
.bx--cc--axes g.axis g.ticks.invisible{visibility:hidden}.bx--cc--axes g.axis g.tick text{fill:#565656;font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif}.bx--cc--axes g.axis g.tick line{display:none}.bx--cc--axes g.axis path.domain{stroke:#8c8c8c}.bx--cc--chart-svg g.callouts{stroke:#565656}.bx--cc--grid rect.chart-grid-backdrop{fill:#fff;stroke:#dcdcdc}.bx--cc--grid g.x.grid g.tick line,.bx--cc--grid g.y.grid g.tick line{pointer-events:none;stroke-width:1px;stroke:#dcdcdc}.bx--cc--grid g.x.grid g.tick.active line,.bx--cc--grid g.y.grid g.tick.active line{stroke-dasharray:2px;stroke:#0062ff}.bx--cc--ruler line.ruler-line{stroke:#000;stroke-width:1px;stroke-dasharray:2;pointer-events:none}.bx--cc--ruler text.axis-tooltip-text{fill:#fff;dominant-baseline:middle;text-anchor:middle}.bx--cc--skeleton rect.chart-skeleton-backdrop{fill:#fff}.bx--cc--skeleton .shimmer-effect-lines{stroke-width:1px;stroke:url(#shimmer-lines)}.bx--cc--skeleton .empty-state-lines{stroke-width:1px;stroke:#dcdcdc}.bx--cc--skeleton #shimmer-lines .stop-bg-shimmer{stop-color:#dcdcdc}.bx--cc--skeleton #shimmer-lines .stop-shimmer{stop-color:#fff}.bx--cc--skeleton .shimmer-effect-areas{fill:url(#shimmer-areas)}.bx--cc--skeleton .empty-state-areas{fill:rgba(127,127,127,.1)}.bx--cc--skeleton #shimmer-areas .stop-bg-shimmer{stop-color:rgba(127,127,127,.1)}.bx--cc--skeleton #shimmer-areas .stop-shimmer{stop-color:rgba(255,255,255,.15)}.bx--cc--zero-line line.domain{stroke:#8c8c8c}.bx--cc--chart-svg svg.layout-child{overflow:visible}g.bx--cc--legend{user-select:none}g.bx--cc--legend g.legend-item rect.checkbox{stroke-width:1px;stroke-opacity:1}g.bx--cc--legend g.legend-item rect.checkbox:not(.active){stroke:#565656;fill:#fff}g.bx--cc--legend g.legend-item rect.checkbox:not(.active)~g.check{display:none}g.bx--cc--legend g.legend-item rect.hover-stroke{fill:none;stroke:#0f62fe;stroke-width:2}g.bx--cc--legend g.legend-item g.check>svg path{fill:#fff;stroke:#fff}g.bx--cc--legend g.legend-item text{font-size:12px;fill:#565656}g.bx--cc--legend.clickable g.legend-item:hover{cursor:pointer}.bx--cc--title text.title{fill:#171717;font-size:16px;font-family:'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;font-weight:600}.bx--cc--tooltip{background-color:#fff;pointer-events:none;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1);display:inline;box-shadow:0 1px 6px 0 rgba(0,0,0,.2);position:absolute;word-wrap:break-word;z-index:1059;font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif}.bx--cc--tooltip.hidden{opacity:0;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}.bx--cc--tooltip .content-box{color:#171717}.bx--cc--tooltip .content-box .title-tooltip{line-height:16px;font-size:12px;padding:4px;min-width:20px}.bx--cc--tooltip .content-box .datapoint-tooltip,.bx--cc--tooltip .content-box .legend-tooltip,.bx--cc--tooltip .content-box .axis-tooltip,.bx--cc--tooltip .content-box .total-val{display:flex;padding:4px;flex-flow:row nowrap;width:auto;min-width:20px;justify-content:flex-start;align-items:center}.bx--cc--tooltip .content-box .datapoint-tooltip p,.bx--cc--tooltip .content-box .legend-tooltip p,.bx--cc--tooltip .content-box .axis-tooltip p,.bx--cc--tooltip .content-box .total-val p{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:16px;font-size:12px;display:inline-block;margin:0;padding:0;border:0}.bx--cc--tooltip .content-box .datapoint-tooltip p.label,.bx--cc--tooltip .content-box .legend-tooltip p.label,.bx--cc--tooltip .content-box .axis-tooltip p.label,.bx--cc--tooltip .content-box .total-val p.label{flex:1;margin-right:8px}.bx--cc--tooltip .content-box .datapoint-tooltip p.value,.bx--cc--tooltip .content-box .legend-tooltip p.value,.bx--cc--tooltip .content-box .axis-tooltip p.value,.bx--cc--tooltip .content-box .total-val p.value{width:auto}.bx--cc--tooltip .content-box .total-val{font-weight:600}.bx--cc--tooltip .content-box .total-val .label{margin-left:4px}.bx--cc--tooltip .content-box ul.multi-tooltip{margin:0;padding:0}.bx--cc--tooltip .content-box ul.multi-tooltip li{list-style:none;position:relative}.bx--cc--tooltip .content-box ul.multi-tooltip li:not(:last-child){border-bottom:1px solid #dcdcdc}.bx--cc--tooltip .tooltip-color{position:absolute;left:0;top:0;width:4px;height:100%}.bx--cc--tooltip .tooltip-color+p.label{margin-left:4px}.bx--cc--threshold line.threshold-line{stroke:#fa4d56;stroke-width:1;stroke-dasharray:4;cursor:pointer;pointer-events:none}.bx--cc--threshold.active line.threshold-line{stroke-width:2}.bx--cc--threshold rect.threshold-hoverable-area{height:20px;transform:translate(0, -10px);cursor:pointer;fill:transparent}.bx--cc--threshold rect.threshold-hoverable-area.rotate{transform:rotate(90deg) translate(0, -10px)}.bx--cc--threshold--label{background-color:#fa4d56;pointer-events:none;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1);display:inline;box-shadow:0 1px 6px 0 rgba(0,0,0,.2);position:absolute;word-wrap:break-word;z-index:1059;font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif;color:#171717;line-height:16px;font-size:12px;padding:4px;min-width:20px}.bx--cc--threshold--label.hidden{opacity:0;transition:opacity .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}.bx--cc--area path.area,.bx--cc--area-stacked path.area{pointer-events:none}g.bx--cc--bubble circle.dot.hovered{fill-opacity:1;transition:all .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}g.bx--cc--bubble circle.dot.unfilled{fill:#f3f3f3}g.bx--cc--bubble g.lines path.line{mix-blend-mode:multiply}.bx--cc--line path.line{pointer-events:none;fill:none;stroke-width:1.5}g.bx--cc--scatter circle.dot.hovered{fill-opacity:1;transition:all .1s;transition-timing-function:cubic-bezier(0.4, 0.14, 0.3, 1)}g.bx--cc--scatter circle.dot.unfilled{fill:#f3f3f3;stroke-width:1.5}g.bx--cc--scatter circle.dot.threshold-anomaly{stroke-width:3}g.bx--cc--scatter g.lines path.line{mix-blend-mode:multiply}.bx--cc--radar .blobs path{stroke-width:1.5px}.bx--cc--radar .y-axes path,.bx--cc--radar .x-axes line{stroke-width:1px;stroke:#dcdcdc}.bx--cc--radar .x-axes line.hovered{stroke:#000}.bx--cc--gauge path.arc-background{fill:#f3f3f3}.bx--cc--gauge .gauge-delta-arrow.status--danger{fill:#da1e28}.bx--cc--gauge .gauge-delta-arrow.status--warning{fill:#fdd13a}.bx--cc--gauge .gauge-delta-arrow.status--success{fill:#24a148}svg.bx--cc--chart-svg{font-family:'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif}svg.bx--cc--chart-svg text{font-size:12px;font-weight:400;fill:#565656}.bx--chart-holder{position:relative;display:block;width:100%;height:100%;background-color:#fff}svg.bx--cc--chart-svg{overflow:visible}/*# sourceMappingURL=styles.min.css.map */
|
package/styles.min.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["styles/components/_axis.scss","styles/vendor/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/themes/_mixins.scss","styles/components/_callouts.scss","styles/components/_grid.scss","styles/components/_ruler.scss","styles/vendor/@carbon/colors/scss/mixins.scss","styles/components/_skeleton.scss","styles/components/_zero-line.scss","styles/components/_layout.scss","styles/components/_legend.scss","styles/components/_title.scss","styles/components/_tooltip.scss","styles/vendor/@carbon/motion/scss/motion.scss","styles/components/_threshold.scss","styles/graphs/_area.scss","styles/graphs/_bubble.scss","styles/graphs/_line.scss","styles/graphs/_scatter.scss","styles/graphs/_radar.scss","styles/_type.scss","styles/_chart-holder.scss","styles/styles.scss"],"names":[],"mappings":"AAKC,uCACC,kBAGD,iCACC,KCiCU,QDhCV,2EAGD,iCACC,aAGD,iCACC,OCqBQ,QCxCV,8BACC,OD0CW,QE1CX,uCAME,KF6Be,KE3BhB,OF8BQ,QEzBR,sEACC,oBACA,iBACA,OFsBO,QEnBR,oFACC,qBACA,OF0CO,QG/DT,+BASE,OC+QmB,KD5QpB,iBACA,mBACA,oBAGD,sCACC,KC4WkB,KD3WlB,yBACA,mBEdD,+CAME,KLuBe,KKnBjB,wCACC,iBACA,2BAGD,qCACC,iBACA,OLeQ,QKXR,kDACC,WLUO,QKPR,+CACC,WD8ViB,KCzVnB,wCACC,yBAGD,qCACC,KAzCe,qBA6Cf,kDACC,WA9Cc,qBAiDf,+CACC,WAjDmB,sBCHtB,+BACC,ONuCS,QOxCV,oCACC,iBCDD,iBACC,iBAGC,6CACC,iBACA,iBAEA,0DACC,ORkCQ,QQjCR,KR0Bc,KQvBf,kEACC,aAIF,iDACC,UACA,OJ2QiB,QI1QjB,eAGD,gDACC,KRWe,KQVf,ORUe,KQPhB,oCACC,eACA,KRYS,QQRX,+CACC,eClCF,0BACC,KTuCW,QStCX,eACA,iEACA,gBCDD,iBACC,iBVgCS,KU/BT,oBACA,uBC4CC,2DD1CD,eACA,sCACA,kBACA,qBACA,aACA,2EAEA,wBACC,UACA,uBCiCA,2DD7BD,8BACC,MVkBU,QUhBV,6CACC,iBACA,eACA,YACA,eAGD,
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["styles/components/_axis.scss","styles/vendor/carbon-components/scss/globals/scss/vendor/@carbon/elements/scss/themes/_mixins.scss","styles/components/_callouts.scss","styles/components/_grid.scss","styles/components/_ruler.scss","styles/vendor/@carbon/colors/scss/mixins.scss","styles/components/_skeleton.scss","styles/components/_zero-line.scss","styles/components/_layout.scss","styles/components/_legend.scss","styles/components/_title.scss","styles/components/_tooltip.scss","styles/vendor/@carbon/motion/scss/motion.scss","styles/components/_threshold.scss","styles/graphs/_area.scss","styles/graphs/_bubble.scss","styles/graphs/_line.scss","styles/graphs/_scatter.scss","styles/graphs/_radar.scss","styles/graphs/_gauge.scss","styles/_type.scss","styles/_chart-holder.scss","styles/styles.scss"],"names":[],"mappings":"AAKC,uCACC,kBAGD,iCACC,KCiCU,QDhCV,2EAGD,iCACC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qBACA,aACA,2EAEA,MZKW,QYJX,iBACA,eACA,YACA,eAEA,iCACC,UACA,uBDOA,2DEpDF,wDAEC,oBCCA,oCACC,eACA,mBH+CA,2DG3CD,qCACC,Kd2BQ,QcxBT,mCACC,wBCdF,wBACC,oBACA,UACA,sDCCC,eACA,mBL+CA,2DK3CD,sCACC,KhB2BQ,QgB1BR,iBAGD,+CACC,eAGD,oCACC,wBClBD,2BACC,mBAGD,wDAEC,iBACA,OjB+BQ,QiB5BT,oCASE,ObqQmB,KcxRrB,mCACC,KlBmCQ,QkB/BR,iDACC,KlBgDY,QkB7Cb,kDACC,KlB8CY,QkB3Cb,kDACC,KlByCY,QmBpDf,sBACC,2EAEA,2BACC,eACA,gBACA,KnBiCU,QoB3CZ,kBACC,kBACA,cACA,WACA,YACA,iBpB+BiB,KqBjBlB,sBACC","file":"styles.min.css"}
|
package/tools.d.ts
CHANGED
|
@@ -82,6 +82,15 @@ export declare namespace Tools {
|
|
|
82
82
|
* @returns The percentage in the form of a number (1 significant digit if necessary)
|
|
83
83
|
*/
|
|
84
84
|
export function convertValueToPercentage(item: any, fullData: any): number;
|
|
85
|
+
/**
|
|
86
|
+
* Truncate the labels
|
|
87
|
+
* @export
|
|
88
|
+
* @param {any} fullText
|
|
89
|
+
* @param {any} truncationType
|
|
90
|
+
* @param {any} numCharacter
|
|
91
|
+
* @returns Truncated text
|
|
92
|
+
*/
|
|
93
|
+
export function truncateLabel(fullText: any, truncationType: any, numCharacter: any): any;
|
|
85
94
|
/**************************************
|
|
86
95
|
* Object/array related checks *
|
|
87
96
|
*************************************/
|
package/tools.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// Internal imports
|
|
2
|
-
import { CartesianOrientations, ScaleTypes, } from "./interfaces";
|
|
2
|
+
import { CartesianOrientations, ScaleTypes, TruncationTypes } from "./interfaces";
|
|
3
3
|
import { debounce as lodashDebounce, merge as lodashMerge, cloneDeep as lodashCloneDeep, uniq as lodashUnique, clamp as lodashClamp, isEqual as lodashIsEqual, flatMapDeep as lodashFlatMapDeep, kebabCase as lodashKebabCase, fromPairs as lodashFromPairs, some as lodashSome, } from "lodash-es";
|
|
4
4
|
// Functions
|
|
5
5
|
export var Tools;
|
|
@@ -172,6 +172,29 @@ export var Tools;
|
|
|
172
172
|
: percentage;
|
|
173
173
|
}
|
|
174
174
|
Tools.convertValueToPercentage = convertValueToPercentage;
|
|
175
|
+
/**
|
|
176
|
+
* Truncate the labels
|
|
177
|
+
* @export
|
|
178
|
+
* @param {any} fullText
|
|
179
|
+
* @param {any} truncationType
|
|
180
|
+
* @param {any} numCharacter
|
|
181
|
+
* @returns Truncated text
|
|
182
|
+
*/
|
|
183
|
+
function truncateLabel(fullText, truncationType, numCharacter) {
|
|
184
|
+
if (numCharacter > fullText.length) {
|
|
185
|
+
return fullText;
|
|
186
|
+
}
|
|
187
|
+
if (truncationType === TruncationTypes.MID_LINE) {
|
|
188
|
+
return fullText.substr(0, numCharacter / 2) + "..." + fullText.substr(-numCharacter / 2);
|
|
189
|
+
}
|
|
190
|
+
else if (truncationType === TruncationTypes.FRONT_LINE) {
|
|
191
|
+
return "..." + fullText.substr(-numCharacter);
|
|
192
|
+
}
|
|
193
|
+
else if (truncationType === TruncationTypes.END_LINE) {
|
|
194
|
+
return fullText.substr(0, numCharacter) + "...";
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
Tools.truncateLabel = truncateLabel;
|
|
175
198
|
/**************************************
|
|
176
199
|
* Object/array related checks *
|
|
177
200
|
*************************************/
|
package/tools.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.js","sourceRoot":"","sources":["tools.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAEN,qBAAqB,EACrB,UAAU,GACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EACN,QAAQ,IAAI,cAAc,EAC1B,KAAK,IAAI,WAAW,EACpB,SAAS,IAAI,eAAe,EAC5B,IAAI,IAA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AvB,CAAuB,CAAC;AAC1B,CAAC,EAxVgB,KAAK,KAAL,KAAK,QAwVrB","sourcesContent":["// Internal imports\nimport {\n\tAxisChartOptions,\n\tCartesianOrientations,\n\tScaleTypes,\n} from \"./interfaces\";\n\nimport {\n\tdebounce as lodashDebounce,\n\tmerge as lodashMerge,\n\tcloneDeep as lodashCloneDeep,\n\tuniq as lodashUnique,\n\tclamp as lodashClamp,\n\tisEqual as lodashIsEqual,\n\tflatMapDeep as lodashFlatMapDeep,\n\tkebabCase as lodashKebabCase,\n\tfromPairs as lodashFromPairs,\n\tsome as lodashSome,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tCancelable,\n\tDebounceSettings,\n} from \"lodash-es\";\nimport { Numeric } from \"d3\";\n\n// Functions\nexport namespace Tools {\n\t// Export these functions from lodash\n\texport const debounce = lodashDebounce;\n\texport const clone = lodashCloneDeep;\n\texport const merge = lodashMerge;\n\texport const removeArrayDuplicates = lodashUnique;\n\texport const clamp = lodashClamp;\n\texport const isEqual = lodashIsEqual;\n\texport const flatMapDeep = lodashFlatMapDeep;\n\texport const kebabCase = lodashKebabCase;\n\texport const fromPairs = lodashFromPairs;\n\texport const some = lodashSome;\n\n\t/**\n\t * Returns default chart options merged with provided options,\n\t * with special cases for axes.\n\t * Axes object will not merge the not provided axes.\n\t *\n\t * @export\n\t * @param {AxisChartOptions} defaultOptions Configuration.options[chartType]\n\t * @param {AxisChartOptions} providedOptions user provided options\n\t * @returns merged options\n\t */\n\texport function mergeDefaultChartOptions(\n\t\tdefaultOptions: any,\n\t\tprovidedOptions: any\n\t) {\n\t\tdefaultOptions = Tools.clone(defaultOptions);\n\t\tconst providedAxesNames = Object.keys(providedOptions.axes || {});\n\n\t\tif (providedAxesNames.length === 0) {\n\t\t\tdelete defaultOptions.axes;\n\t\t}\n\n\t\t// Update deprecated options to work with the tabular data format\n\t\t// Similar to the functionality in model.transformToTabularData()\n\t\tfor (const axisName in defaultOptions.axes) {\n\t\t\tif (providedAxesNames.includes(axisName)) {\n\t\t\t\tconst providedAxisOptions = providedOptions.axes[axisName];\n\n\t\t\t\tif (\n\t\t\t\t\tprovidedAxisOptions[\"primary\"] ||\n\t\t\t\t\tprovidedAxisOptions[\"secondary\"]\n\t\t\t\t) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\"`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format\"\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst identifier = providedAxisOptions[\"mapsTo\"];\n\t\t\t\tif (identifier === undefined || identifier === null) {\n\t\t\t\t\tconst scaleType = providedAxisOptions[\"scaleType\"];\n\n\t\t\t\t\tif (scaleType === undefined || scaleType === null) {\n\t\t\t\t\t\tprovidedAxisOptions[\"mapsTo\"] = \"value\";\n\t\t\t\t\t} else if (scaleType === ScaleTypes.TIME) {\n\t\t\t\t\t\tprovidedAxisOptions[\"mapsTo\"] = \"date\";\n\t\t\t\t\t} else if (scaleType === ScaleTypes.LABELS) {\n\t\t\t\t\t\tprovidedAxisOptions[\"mapsTo\"] = \"key\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete defaultOptions.axes[axisName];\n\t\t\t}\n\t\t}\n\n\t\treturn Tools.merge(defaultOptions, providedOptions);\n\t}\n\n\t/**************************************\n\t * DOM-related operations *\n\t *************************************/\n\n\t/**\n\t * Get width & height of an element\n\t *\n\t * @export\n\t * @param {any} el element to get dimensions from\n\t * @returns an object containing the width and height of el\n\t */\n\texport function getDimensions(el) {\n\t\treturn {\n\t\t\twidth: parseFloat(\n\t\t\t\tel.style.width.replace(\"px\", \"\") || el.offsetWidth\n\t\t\t),\n\t\t\theight: parseFloat(\n\t\t\t\tel.style.height.replace(\"px\", \"\") || el.offsetHeight\n\t\t\t),\n\t\t};\n\t}\n\n\t/**\n\t * Gets elements's x and y translations from transform attribute or returns null\n\t *\n\t * @param {HTMLElement} element\n\t * @returns an object containing the translated x and y values or null\n\t */\n\texport function getTranslationValues(elementRef: HTMLElement) {\n\t\tif (!elementRef) {\n\t\t\treturn;\n\t\t}\n\n\t\t// regex to ONLY get values for translate (instead of all rotate, translate, skew, etc)\n\t\tconst translateRegex = /translate\\([0-9]+\\.?[0-9]*,[0-9]+\\.?[0-9]*\\)/;\n\n\t\tconst transformStr = elementRef\n\t\t\t.getAttribute(\"transform\")\n\t\t\t.match(translateRegex);\n\t\tif (!transformStr) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// check for the match\n\t\tif (transformStr[0]) {\n\t\t\tconst transforms = transformStr[0]\n\t\t\t\t.replace(/translate\\(/, \"\")\n\t\t\t\t.replace(/\\)/, \"\")\n\t\t\t\t.split(\",\");\n\n\t\t\treturn {\n\t\t\t\ttx: transforms[0],\n\t\t\t\tty: transforms[1],\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**************************************\n\t * Formatting & calculations *\n\t *************************************/\n\n\t/**\n\t * Gets x and y coordinates from HTML transform attribute\n\t *\n\t * @export\n\t * @param {any} string the transform attribute string ie. transform(x,y)\n\t * @returns Returns an object with x and y offsets of the transform\n\t */\n\texport function getTranformOffsets(string) {\n\t\tconst regExp = /\\(([^)]+)\\)/;\n\t\tconst match = regExp.exec(string)[1];\n\t\tconst xyString = match.split(\",\");\n\n\t\treturn {\n\t\t\tx: parseFloat(xyString[0]),\n\t\t\ty: parseFloat(xyString[1]),\n\t\t};\n\t}\n\n\t/**\n\t * Returns string value for height/width using pixels if there isn't a specified unit of measure\n\t *\n\t * @param value string or number value to be checked for unit of measure\n\t */\n\texport function formatWidthHeightValues(value) {\n\t\tconst stringValue = value.toString();\n\n\t\t// If the value provided contains any letters\n\t\t// Return it the same way\n\t\tif (stringValue.match(/[a-z]/i)) {\n\t\t\treturn stringValue;\n\t\t}\n\n\t\treturn stringValue + \"px\";\n\t}\n\n\t/**\n\t * Capitalizes first letter of a string\n\t *\n\t * @export\n\t * @param {any} string the input string to perform first letter capitalization with\n\t * @returns The transformed string after first letter is capitalized\n\t */\n\texport function capitalizeFirstLetter(string) {\n\t\treturn string[0].toUpperCase() + string.slice(1);\n\t}\n\n\t/**\n\t * Get the percentage of a datapoint compared to the entire dataset.\n\t * @export\n\t * @param {any} item\n\t * @param {any} fullData\n\t * @returns The percentage in the form of a number (1 significant digit if necessary)\n\t */\n\texport function convertValueToPercentage(item, fullData) {\n\t\tconst percentage =\n\t\t\t(item / fullData.reduce((accum, val) => accum + val.value, 0)) *\n\t\t\t100;\n\t\t// if the value has any significant figures, keep 1\n\t\treturn percentage % 1 !== 0\n\t\t\t? parseFloat(percentage.toFixed(1))\n\t\t\t: percentage;\n\t}\n\n\t/**************************************\n\t * Object/array related checks *\n\t *************************************/\n\n\t/**\n\t * Compares two arrays to return the difference between two arrays' items.\n\t *\n\t * @export\n\t * @param {any[]} oldArray the array to check for missing items\n\t * @param {any[]} newArray the array to check for newly added items\n\t * @returns An object containing items missing (existing in oldArray but not newArray)\n\t * and items added (existing in newArray but not in oldArray). Object is of the form { missing: [], added: [] }\n\t */\n\texport function arrayDifferences(oldArray: any[], newArray: any[]) {\n\t\tconst difference = {\n\t\t\tmissing: [],\n\t\t\tadded: [],\n\t\t};\n\n\t\toldArray.forEach((element) => {\n\t\t\tif (newArray.indexOf(element) === -1) {\n\t\t\t\tdifference.missing.push(element);\n\t\t\t}\n\t\t});\n\n\t\tnewArray.forEach((element) => {\n\t\t\tif (oldArray.indexOf(element) === -1) {\n\t\t\t\tdifference.added.push(element);\n\t\t\t}\n\t\t});\n\n\t\treturn difference;\n\t}\n\n\t/**\n\t * Gets the duplicated keys from an array of data\n\t *\n\t * @export\n\t * @param {*} data - array of data\n\t * @returns A list of the duplicated keys in data\n\t */\n\texport function getDuplicateValues(arr: any) {\n\t\tconst values = [];\n\t\tconst duplicateValues = [];\n\n\t\tarr.forEach((value) => {\n\t\t\tif (\n\t\t\t\tvalues.indexOf(value) !== -1 &&\n\t\t\t\tduplicateValues.indexOf(value) === -1\n\t\t\t) {\n\t\t\t\tduplicateValues.push(value);\n\t\t\t}\n\n\t\t\tvalues.push(value);\n\t\t});\n\n\t\treturn duplicateValues;\n\t}\n\n\t// ================================================================================\n\t// D3 Extensions\n\t// ================================================================================\n\n\t/**\n\t * In D3, moves an element to the front of the canvas\n\t *\n\t * @export\n\t * @param {any} element input element to moved in front\n\t * @returns The function to be used by D3 to push element to the top of the canvas\n\t */\n\texport function moveToFront(element) {\n\t\treturn element.each(function () {\n\t\t\tthis.parentNode.appendChild(this);\n\t\t});\n\t}\n\n\t// ================================================================================\n\t// Style Helpers\n\t// ================================================================================\n\n\t/**\n\t * Gets a speicified property from within an object.\n\t *\n\t * @param object the object containing the property to retrieve\n\t * @param propPath nested properties used to extract the final property from within the object\n\t * (i.e \"style\", \"color\" would retrieve the color property from within an object that has \"color\" nested within \"style\")\n\t */\n\texport const getProperty = (object, ...propPath) => {\n\t\tlet position = object;\n\t\tif (position) {\n\t\t\tfor (const prop of propPath) {\n\t\t\t\tif (position[prop] !== null && position[prop] !== undefined) {\n\t\t\t\t\tposition = position[prop];\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn position;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tinterface SVGPathCoordinates {\n\t\tx0: number;\n\t\tx1: number;\n\t\ty0: number;\n\t\ty1: number;\n\t}\n\n\texport const flipSVGCoordinatesBasedOnOrientation = (\n\t\tverticalCoordinates: SVGPathCoordinates,\n\t\torientation?: CartesianOrientations\n\t) => {\n\t\tif (orientation === CartesianOrientations.HORIZONTAL) {\n\t\t\treturn {\n\t\t\t\ty0: verticalCoordinates.x0,\n\t\t\t\ty1: verticalCoordinates.x1,\n\t\t\t\tx0: verticalCoordinates.y0,\n\t\t\t\tx1: verticalCoordinates.y1,\n\t\t\t};\n\t\t}\n\n\t\treturn verticalCoordinates;\n\t};\n\n\texport const generateSVGPathString = (\n\t\tverticalCoordinates: SVGPathCoordinates,\n\t\torientation?: CartesianOrientations\n\t) => {\n\t\tconst { x0, x1, y0, y1 } = flipSVGCoordinatesBasedOnOrientation(\n\t\t\tverticalCoordinates,\n\t\t\torientation\n\t\t);\n\n\t\treturn `M${x0},${y0}L${x0},${y1}L${x1},${y1}L${x1},${y0}L${x0},${y0}`;\n\t};\n\n\texport function flipDomainAndRangeBasedOnOrientation<D, R>(\n\t\tdomain: D,\n\t\trange: R,\n\t\torientation?: CartesianOrientations\n\t): [D, R] | [R, D] {\n\t\treturn orientation === CartesianOrientations.VERTICAL\n\t\t\t? [domain, range]\n\t\t\t: [range, domain];\n\t}\n\n\texport const compareNumeric = (a: Numeric, b: Numeric) =>\n\t\tNumber(a) === Number(b);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["tools.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAEN,qBAAqB,EACrB,UAAU,EACV,eAAe,EACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACN,QAAQ,IAAI,cAAc,EAC1B,KAAK,IAAI,WAAW,EACpB,SAAS,IAAI,eAAe,EAC5B,IAAI,IAAI,YAAY,EACpB,KAAK,IAAI,WAAW,EACpB,OAAO,IAAI,aAAa,EACxB,WAAW,IAAI,iBAAiB,EAChC,SAAS,IAAI,eAAe,EAC5B,SAAS,IAAI,eAAe,EAC5B,IAAI,IAAI,UAAU,GAIlB,MAAM,WAAW,CAAC;AAGnB,YAAY;AACZ,MAAM,KAAW,KAAK,CA6WrB;AA7WD,WAAiB,KAAK;IACrB,qCAAqC;IACxB,cAAQ,GAAG,cAAc,CAAC;IAC1B,WAAK,GAAG,eAAe,CAAC;IACxB,WAAK,GAAG,WAAW,CAAC;IACpB,2BAAqB,GAAG,YAAY,CAAC;IACrC,WAAK,GAAG,WAAW,CAAC;IACpB,aAAO,GAAG,aAAa,CAAC;IACxB,iBAAW,GAAG,iBAAiB,CAAC;IAChC,eAAS,GAAG,eAAe,CAAC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;IACpB,CAAC;IARe,0CAAoC,uCAQnD,CAAA;IAEY,oBAAc,GAAG,UAAC,CAAU,EAAE,CAAU;QACpD,OAAA,MAAM,CAAC,CAAC,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC;IAAvB,CAAuB,CAAC;AAC1B,CAAC,EA7WgB,KAAK,KAAL,KAAK,QA6WrB","sourcesContent":["// Internal imports\nimport {\n\tAxisChartOptions,\n\tCartesianOrientations,\n\tScaleTypes,\n\tTruncationTypes\n} from \"./interfaces\";\n\nimport {\n\tdebounce as lodashDebounce,\n\tmerge as lodashMerge,\n\tcloneDeep as lodashCloneDeep,\n\tuniq as lodashUnique,\n\tclamp as lodashClamp,\n\tisEqual as lodashIsEqual,\n\tflatMapDeep as lodashFlatMapDeep,\n\tkebabCase as lodashKebabCase,\n\tfromPairs as lodashFromPairs,\n\tsome as lodashSome,\n\t// the imports below are needed because of typescript bug (error TS4029)\n\tCancelable,\n\tDebounceSettings,\n} from \"lodash-es\";\nimport { Numeric } from \"d3\";\n\n// Functions\nexport namespace Tools {\n\t// Export these functions from lodash\n\texport const debounce = lodashDebounce;\n\texport const clone = lodashCloneDeep;\n\texport const merge = lodashMerge;\n\texport const removeArrayDuplicates = lodashUnique;\n\texport const clamp = lodashClamp;\n\texport const isEqual = lodashIsEqual;\n\texport const flatMapDeep = lodashFlatMapDeep;\n\texport const kebabCase = lodashKebabCase;\n\texport const fromPairs = lodashFromPairs;\n\texport const some = lodashSome;\n\n\t/**\n\t * Returns default chart options merged with provided options,\n\t * with special cases for axes.\n\t * Axes object will not merge the not provided axes.\n\t *\n\t * @export\n\t * @param {AxisChartOptions} defaultOptions Configuration.options[chartType]\n\t * @param {AxisChartOptions} providedOptions user provided options\n\t * @returns merged options\n\t */\n\texport function mergeDefaultChartOptions(\n\t\tdefaultOptions: any,\n\t\tprovidedOptions: any\n\t) {\n\t\tdefaultOptions = Tools.clone(defaultOptions);\n\t\tconst providedAxesNames = Object.keys(providedOptions.axes || {});\n\n\t\tif (providedAxesNames.length === 0) {\n\t\t\tdelete defaultOptions.axes;\n\t\t}\n\n\t\t// Update deprecated options to work with the tabular data format\n\t\t// Similar to the functionality in model.transformToTabularData()\n\t\tfor (const axisName in defaultOptions.axes) {\n\t\t\tif (providedAxesNames.includes(axisName)) {\n\t\t\t\tconst providedAxisOptions = providedOptions.axes[axisName];\n\n\t\t\t\tif (\n\t\t\t\t\tprovidedAxisOptions[\"primary\"] ||\n\t\t\t\t\tprovidedAxisOptions[\"secondary\"]\n\t\t\t\t) {\n\t\t\t\t\tconsole.warn(\n\t\t\t\t\t\t\"`primary` & `secondary` are no longer needed for axis configurations. Read more here https://carbon-design-system.github.io/carbon-charts/?path=/story/tutorials--tabular-data-format\"\n\t\t\t\t\t);\n\t\t\t\t}\n\n\t\t\t\tconst identifier = providedAxisOptions[\"mapsTo\"];\n\t\t\t\tif (identifier === undefined || identifier === null) {\n\t\t\t\t\tconst scaleType = providedAxisOptions[\"scaleType\"];\n\n\t\t\t\t\tif (scaleType === undefined || scaleType === null) {\n\t\t\t\t\t\tprovidedAxisOptions[\"mapsTo\"] = \"value\";\n\t\t\t\t\t} else if (scaleType === ScaleTypes.TIME) {\n\t\t\t\t\t\tprovidedAxisOptions[\"mapsTo\"] = \"date\";\n\t\t\t\t\t} else if (scaleType === ScaleTypes.LABELS) {\n\t\t\t\t\t\tprovidedAxisOptions[\"mapsTo\"] = \"key\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tdelete defaultOptions.axes[axisName];\n\t\t\t}\n\t\t}\n\n\t\treturn Tools.merge(defaultOptions, providedOptions);\n\t}\n\n\t/**************************************\n\t * DOM-related operations *\n\t *************************************/\n\n\t/**\n\t * Get width & height of an element\n\t *\n\t * @export\n\t * @param {any} el element to get dimensions from\n\t * @returns an object containing the width and height of el\n\t */\n\texport function getDimensions(el) {\n\t\treturn {\n\t\t\twidth: parseFloat(\n\t\t\t\tel.style.width.replace(\"px\", \"\") || el.offsetWidth\n\t\t\t),\n\t\t\theight: parseFloat(\n\t\t\t\tel.style.height.replace(\"px\", \"\") || el.offsetHeight\n\t\t\t),\n\t\t};\n\t}\n\n\t/**\n\t * Gets elements's x and y translations from transform attribute or returns null\n\t *\n\t * @param {HTMLElement} element\n\t * @returns an object containing the translated x and y values or null\n\t */\n\texport function getTranslationValues(elementRef: HTMLElement) {\n\t\tif (!elementRef) {\n\t\t\treturn;\n\t\t}\n\n\t\t// regex to ONLY get values for translate (instead of all rotate, translate, skew, etc)\n\t\tconst translateRegex = /translate\\([0-9]+\\.?[0-9]*,[0-9]+\\.?[0-9]*\\)/;\n\n\t\tconst transformStr = elementRef\n\t\t\t.getAttribute(\"transform\")\n\t\t\t.match(translateRegex);\n\t\tif (!transformStr) {\n\t\t\treturn null;\n\t\t}\n\n\t\t// check for the match\n\t\tif (transformStr[0]) {\n\t\t\tconst transforms = transformStr[0]\n\t\t\t\t.replace(/translate\\(/, \"\")\n\t\t\t\t.replace(/\\)/, \"\")\n\t\t\t\t.split(\",\");\n\n\t\t\treturn {\n\t\t\t\ttx: transforms[0],\n\t\t\t\tty: transforms[1],\n\t\t\t};\n\t\t}\n\t\treturn null;\n\t}\n\n\t/**************************************\n\t * Formatting & calculations *\n\t *************************************/\n\n\t/**\n\t * Gets x and y coordinates from HTML transform attribute\n\t *\n\t * @export\n\t * @param {any} string the transform attribute string ie. transform(x,y)\n\t * @returns Returns an object with x and y offsets of the transform\n\t */\n\texport function getTranformOffsets(string) {\n\t\tconst regExp = /\\(([^)]+)\\)/;\n\t\tconst match = regExp.exec(string)[1];\n\t\tconst xyString = match.split(\",\");\n\n\t\treturn {\n\t\t\tx: parseFloat(xyString[0]),\n\t\t\ty: parseFloat(xyString[1]),\n\t\t};\n\t}\n\n\t/**\n\t * Returns string value for height/width using pixels if there isn't a specified unit of measure\n\t *\n\t * @param value string or number value to be checked for unit of measure\n\t */\n\texport function formatWidthHeightValues(value) {\n\t\tconst stringValue = value.toString();\n\n\t\t// If the value provided contains any letters\n\t\t// Return it the same way\n\t\tif (stringValue.match(/[a-z]/i)) {\n\t\t\treturn stringValue;\n\t\t}\n\n\t\treturn stringValue + \"px\";\n\t}\n\n\t/**\n\t * Capitalizes first letter of a string\n\t *\n\t * @export\n\t * @param {any} string the input string to perform first letter capitalization with\n\t * @returns The transformed string after first letter is capitalized\n\t */\n\texport function capitalizeFirstLetter(string) {\n\t\treturn string[0].toUpperCase() + string.slice(1);\n\t}\n\n\t/**\n\t * Get the percentage of a datapoint compared to the entire dataset.\n\t * @export\n\t * @param {any} item\n\t * @param {any} fullData\n\t * @returns The percentage in the form of a number (1 significant digit if necessary)\n\t */\n\texport function convertValueToPercentage(item, fullData) {\n\t\tconst percentage =\n\t\t\t(item / fullData.reduce((accum, val) => accum + val.value, 0)) *\n\t\t\t100;\n\t\t// if the value has any significant figures, keep 1\n\t\treturn percentage % 1 !== 0\n\t\t\t? parseFloat(percentage.toFixed(1))\n\t\t\t: percentage;\n\t}\n\n\t\t/**\n\t * Truncate the labels\n\t * @export\n\t * @param {any} fullText\n\t * @param {any} truncationType\n\t * @param {any} numCharacter\n\t * @returns Truncated text\n\t */\n\texport function truncateLabel(fullText, truncationType, numCharacter) {\n\t\tif (numCharacter > fullText.length) {\n\t\t\treturn fullText;\n\t\t}\n\t\tif (truncationType === TruncationTypes.MID_LINE) {\n\t\t\treturn fullText.substr(0, numCharacter / 2) + \"...\" + fullText.substr(-numCharacter / 2);\n\t\t} else if (truncationType === TruncationTypes.FRONT_LINE) {\n\t\t\treturn \"...\" + fullText.substr(-numCharacter);\n\t\t} else if (truncationType === TruncationTypes.END_LINE) {\n\t\t\treturn fullText.substr(0, numCharacter) + \"...\";\n\t\t}\n\t}\n\n\t/**************************************\n\t * Object/array related checks *\n\t *************************************/\n\n\t/**\n\t * Compares two arrays to return the difference between two arrays' items.\n\t *\n\t * @export\n\t * @param {any[]} oldArray the array to check for missing items\n\t * @param {any[]} newArray the array to check for newly added items\n\t * @returns An object containing items missing (existing in oldArray but not newArray)\n\t * and items added (existing in newArray but not in oldArray). Object is of the form { missing: [], added: [] }\n\t */\n\texport function arrayDifferences(oldArray: any[], newArray: any[]) {\n\t\tconst difference = {\n\t\t\tmissing: [],\n\t\t\tadded: [],\n\t\t};\n\n\t\toldArray.forEach((element) => {\n\t\t\tif (newArray.indexOf(element) === -1) {\n\t\t\t\tdifference.missing.push(element);\n\t\t\t}\n\t\t});\n\n\t\tnewArray.forEach((element) => {\n\t\t\tif (oldArray.indexOf(element) === -1) {\n\t\t\t\tdifference.added.push(element);\n\t\t\t}\n\t\t});\n\n\t\treturn difference;\n\t}\n\n\t/**\n\t * Gets the duplicated keys from an array of data\n\t *\n\t * @export\n\t * @param {*} data - array of data\n\t * @returns A list of the duplicated keys in data\n\t */\n\texport function getDuplicateValues(arr: any) {\n\t\tconst values = [];\n\t\tconst duplicateValues = [];\n\n\t\tarr.forEach((value) => {\n\t\t\tif (\n\t\t\t\tvalues.indexOf(value) !== -1 &&\n\t\t\t\tduplicateValues.indexOf(value) === -1\n\t\t\t) {\n\t\t\t\tduplicateValues.push(value);\n\t\t\t}\n\n\t\t\tvalues.push(value);\n\t\t});\n\n\t\treturn duplicateValues;\n\t}\n\n\t// ================================================================================\n\t// D3 Extensions\n\t// ================================================================================\n\n\t/**\n\t * In D3, moves an element to the front of the canvas\n\t *\n\t * @export\n\t * @param {any} element input element to moved in front\n\t * @returns The function to be used by D3 to push element to the top of the canvas\n\t */\n\texport function moveToFront(element) {\n\t\treturn element.each(function () {\n\t\t\tthis.parentNode.appendChild(this);\n\t\t});\n\t}\n\n\t// ================================================================================\n\t// Style Helpers\n\t// ================================================================================\n\n\t/**\n\t * Gets a speicified property from within an object.\n\t *\n\t * @param object the object containing the property to retrieve\n\t * @param propPath nested properties used to extract the final property from within the object\n\t * (i.e \"style\", \"color\" would retrieve the color property from within an object that has \"color\" nested within \"style\")\n\t */\n\texport const getProperty = (object, ...propPath) => {\n\t\tlet position = object;\n\t\tif (position) {\n\t\t\tfor (const prop of propPath) {\n\t\t\t\tif (position[prop] !== null && position[prop] !== undefined) {\n\t\t\t\t\tposition = position[prop];\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn position;\n\t\t}\n\n\t\treturn null;\n\t};\n\n\tinterface SVGPathCoordinates {\n\t\tx0: number;\n\t\tx1: number;\n\t\ty0: number;\n\t\ty1: number;\n\t}\n\n\texport const flipSVGCoordinatesBasedOnOrientation = (\n\t\tverticalCoordinates: SVGPathCoordinates,\n\t\torientation?: CartesianOrientations\n\t) => {\n\t\tif (orientation === CartesianOrientations.HORIZONTAL) {\n\t\t\treturn {\n\t\t\t\ty0: verticalCoordinates.x0,\n\t\t\t\ty1: verticalCoordinates.x1,\n\t\t\t\tx0: verticalCoordinates.y0,\n\t\t\t\tx1: verticalCoordinates.y1,\n\t\t\t};\n\t\t}\n\n\t\treturn verticalCoordinates;\n\t};\n\n\texport const generateSVGPathString = (\n\t\tverticalCoordinates: SVGPathCoordinates,\n\t\torientation?: CartesianOrientations\n\t) => {\n\t\tconst { x0, x1, y0, y1 } = flipSVGCoordinatesBasedOnOrientation(\n\t\t\tverticalCoordinates,\n\t\t\torientation\n\t\t);\n\n\t\treturn `M${x0},${y0}L${x0},${y1}L${x1},${y1}L${x1},${y0}L${x0},${y0}`;\n\t};\n\n\texport function flipDomainAndRangeBasedOnOrientation<D, R>(\n\t\tdomain: D,\n\t\trange: R,\n\t\torientation?: CartesianOrientations\n\t): [D, R] | [R, D] {\n\t\treturn orientation === CartesianOrientations.VERTICAL\n\t\t\t? [domain, range]\n\t\t\t: [range, domain];\n\t}\n\n\texport const compareNumeric = (a: Numeric, b: Numeric) =>\n\t\tNumber(a) === Number(b);\n}\n"]}
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -118,12 +118,12 @@
|
|
|
118
118
|
"signature": "0d4aed71a8b1dfaf64b2bc13434c2f6b8e19670c16b0c4f090293a2efab8518b"
|
|
119
119
|
},
|
|
120
120
|
"../src/interfaces/events.ts": {
|
|
121
|
-
"version": "
|
|
122
|
-
"signature": "
|
|
121
|
+
"version": "56cc2d0768fcc02ba1ea13c94cef7c0e58fb3f19df05fdf46b932157a3ca2d3f",
|
|
122
|
+
"signature": "081c0488677e9ca915af5dcbb5c6d6e656032dce35836bc76f9aea9dd7781cb5"
|
|
123
123
|
},
|
|
124
124
|
"../src/interfaces/enums.ts": {
|
|
125
|
-
"version": "
|
|
126
|
-
"signature": "
|
|
125
|
+
"version": "e44e56dcf721c1b7ec2733595da22a77a7a435fcf961d935fa6f2b70dd5b8426",
|
|
126
|
+
"signature": "d550d9abf8402753e195d6168082eb0a1e857857ec0f27f37aee33223973894a"
|
|
127
127
|
},
|
|
128
128
|
"../../../node_modules/@types/d3-array/index.d.ts": {
|
|
129
129
|
"version": "f5b8f86da74b4bfb29f85a631b725a47c8a3ab6c4ce91537e5b176bbe0cd0a7a",
|
|
@@ -258,16 +258,16 @@
|
|
|
258
258
|
"signature": "0d1954e6a821396de9f72b8d2e8553096a755eb76ad99b63857da0b9a23723a0"
|
|
259
259
|
},
|
|
260
260
|
"../src/tools.ts": {
|
|
261
|
-
"version": "
|
|
262
|
-
"signature": "
|
|
261
|
+
"version": "be0a31eff318ff93a6107484690d21172d798221e1249bd599ee415a30056133",
|
|
262
|
+
"signature": "43d2e2dc6323d6f67c1a572b921e195d8dfb309fc7b1ccaf7e6f642f6562af81"
|
|
263
263
|
},
|
|
264
264
|
"../../../node_modules/date-fns/locale/en-US/index.d.ts": {
|
|
265
265
|
"version": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88",
|
|
266
266
|
"signature": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88"
|
|
267
267
|
},
|
|
268
268
|
"../src/configuration.ts": {
|
|
269
|
-
"version": "
|
|
270
|
-
"signature": "
|
|
269
|
+
"version": "5e198cdabd6700741081b4e73a0350742be38e6d692473a5dc7ea02a7cdda299",
|
|
270
|
+
"signature": "ee6826ad3eb94c5b6528068b8468d38181bc7554b567fb30a1d690ae8337d285"
|
|
271
271
|
},
|
|
272
272
|
"../src/services/colors.ts": {
|
|
273
273
|
"version": "e81b8eb71e3b57558d708a08c40b415e0d6e0ca57e78bca08c313feea20175a4",
|
|
@@ -278,7 +278,7 @@
|
|
|
278
278
|
"signature": "e4f5595f10b6565508dbd77a53decb500b0318494090c2b250b960855452cf1c"
|
|
279
279
|
},
|
|
280
280
|
"../src/model.ts": {
|
|
281
|
-
"version": "
|
|
281
|
+
"version": "f53687d4d2e526ec92013193247b4e24ef31e0b166335d28bb63898823769951",
|
|
282
282
|
"signature": "3dffcbdd5112386a0b0cf2de6d58d9a32b5c240fea4fd996ead7c2ed556d2363"
|
|
283
283
|
},
|
|
284
284
|
"../src/services/service.ts": {
|
|
@@ -317,17 +317,21 @@
|
|
|
317
317
|
"version": "00a0f68f7158ebe5a9ac0c0b24580ec35beded8c38eb085f6f7a2ff6f3d372b0",
|
|
318
318
|
"signature": "e26a591e02fc2b57848b7a548d747f5148aa51f2f223f4b598b944e7d084120d"
|
|
319
319
|
},
|
|
320
|
+
"../src/interfaces/truncation.ts": {
|
|
321
|
+
"version": "b72f59d6f33f38bf6c824a52753f3cf4579fdbcb8ac4c2b1efbd36d8bcf4e640",
|
|
322
|
+
"signature": "e13ca1760c1d894f0cbb054be895f12207ff8a8708be12a18944832c02dd7ab2"
|
|
323
|
+
},
|
|
320
324
|
"../src/interfaces/components.ts": {
|
|
321
|
-
"version": "
|
|
322
|
-
"signature": "
|
|
325
|
+
"version": "878e020dd2df110672b94d5b9312cbf6704d032d35419a30320ea5640e80170a",
|
|
326
|
+
"signature": "aaa3d5843260e4e2d8c40198baa194777db25aa5360406cc71ef55196d1b1fd8"
|
|
323
327
|
},
|
|
324
328
|
"../src/interfaces/axis-scales.ts": {
|
|
325
|
-
"version": "
|
|
326
|
-
"signature": "
|
|
329
|
+
"version": "a23629041340928f0ff76e1da78cb9a52b686680e080d1dde1b51ed757baf0f8",
|
|
330
|
+
"signature": "7d83049c1ac328d34f48b5e65bd05c1477181123a86ba46bc3a7bffe58673716"
|
|
327
331
|
},
|
|
328
332
|
"../src/interfaces/charts.ts": {
|
|
329
|
-
"version": "
|
|
330
|
-
"signature": "
|
|
333
|
+
"version": "07eba34b69493765b5a0a59ed9a2f0c1e704bfab92b819b512d4050eadf2e2b3",
|
|
334
|
+
"signature": "e7b7c31eaef3bcb7f93f1ca4d510efd849b6d145e4fa034b26231272fdf5c22d"
|
|
331
335
|
},
|
|
332
336
|
"../src/interfaces/layout.ts": {
|
|
333
337
|
"version": "cddb4b977e4a5e8fec8a78753cddd9c0804617ad6e82caa1f33b35967d8c6a7b",
|
|
@@ -342,7 +346,7 @@
|
|
|
342
346
|
"signature": "76155b4beaf0aa54eb99042bf954e56d47f803147ea42fefb4758e39f222b3d6"
|
|
343
347
|
},
|
|
344
348
|
"../src/components/essentials/legend.ts": {
|
|
345
|
-
"version": "
|
|
349
|
+
"version": "cd80faaf2b8583754f957d4966a7751cbfc0ecd7cdbc34d4a5dae4833a117a9d",
|
|
346
350
|
"signature": "a4ec5d6d6d48c4d07fa061b1def09bb49e2d30c76706b832ed86b47fb84839c2"
|
|
347
351
|
},
|
|
348
352
|
"../../../node_modules/@carbon/utils-position/index.d.ts": {
|
|
@@ -362,31 +366,31 @@
|
|
|
362
366
|
"signature": "b127786ca37062997d849d548fd2b650c537d291d0f1821e25af2aea88388833"
|
|
363
367
|
},
|
|
364
368
|
"../src/components/essentials/tooltip.ts": {
|
|
365
|
-
"version": "
|
|
366
|
-
"signature": "
|
|
369
|
+
"version": "0b597114f258b86542b0f6eadf6cf3ce7e2b2a45708a15ff1cc56ecd9b810360",
|
|
370
|
+
"signature": "2d93d7b280951b5c8bfff46f44b024239e593e1d20d5736279ad99ecaaa311a6"
|
|
367
371
|
},
|
|
368
372
|
"../src/components/essentials/tooltip-bar.ts": {
|
|
369
|
-
"version": "
|
|
370
|
-
"signature": "
|
|
373
|
+
"version": "72f9b89188ba2cee1f938a2f9427afc06937347e211fc84a28f1e179bde63558",
|
|
374
|
+
"signature": "f3522ea74fdfef79cdd9c0494f6605c77c9ae86f60b6eff7b08407ca7b217f76"
|
|
371
375
|
},
|
|
372
376
|
"../src/components/essentials/tooltip-pie.ts": {
|
|
373
|
-
"version": "
|
|
377
|
+
"version": "8e442a6c47c3b4035c8a1a3e8e3c9762a987615b22692c11932e25a33f57ab32",
|
|
374
378
|
"signature": "866c38648fc4a7615b123e5dc55b49e07bf2e186057c20408ddf6a4f88f8f4c7"
|
|
375
379
|
},
|
|
376
380
|
"../src/components/essentials/tooltip-scatter.ts": {
|
|
377
|
-
"version": "
|
|
381
|
+
"version": "d49d68947ba59a7df64d9d96b1e12d830e43d948dcc3fd8d66b62c7896a4d8e2",
|
|
378
382
|
"signature": "a6b4152563181d281714b37fdd8c77e2df008bed9335180db778ff14cb25dbad"
|
|
379
383
|
},
|
|
380
384
|
"../src/components/essentials/tooltip-radar.ts": {
|
|
381
|
-
"version": "
|
|
382
|
-
"signature": "
|
|
385
|
+
"version": "6d7f8aa9f5832109803c89d48f08ead469421d5ad7373f836397d1a93e33aa43",
|
|
386
|
+
"signature": "d07f7efb9eef8df1b8946d5c5abe9c984fdb797d9240f231e10a5b5b13263398"
|
|
383
387
|
},
|
|
384
388
|
"../src/components/graphs/area.ts": {
|
|
385
389
|
"version": "352c7233a92c0ba2da31437d9e7859632d948ce694e3a8f5c08b8ebab46698d8",
|
|
386
390
|
"signature": "161583362e0768526edd6c413b1709f1255bda7b59f856ae2e2d60721b26a586"
|
|
387
391
|
},
|
|
388
392
|
"../src/components/graphs/area-stacked.ts": {
|
|
389
|
-
"version": "
|
|
393
|
+
"version": "16d0277401b315c613e50791f789be9b6a500103f709bd1182b7daeb81fa42bc",
|
|
390
394
|
"signature": "0b3dd53202a8eac8cb68a56903d134523df211c3a3abbed03da8e65db50d7821"
|
|
391
395
|
},
|
|
392
396
|
"../src/components/graphs/bar.ts": {
|
|
@@ -414,17 +418,21 @@
|
|
|
414
418
|
"signature": "fc6e340453242001867c0679049961ef5221c96d6acaf3189fb3b5f10fdddc18"
|
|
415
419
|
},
|
|
416
420
|
"../src/components/graphs/line.ts": {
|
|
417
|
-
"version": "
|
|
421
|
+
"version": "48ebb697ca7182b9f19e436b2d787bad45db7b3a07bd33b3c191f1abe1c66264",
|
|
418
422
|
"signature": "1947c1c2b4c2d1f0fc4da8f8bd6e8895c28c6d0b0a5b96c314b063269fc9957d"
|
|
419
423
|
},
|
|
420
424
|
"../src/components/graphs/scatter-stacked.ts": {
|
|
421
|
-
"version": "
|
|
425
|
+
"version": "714cce50e4fc14ed9231a148fb01ff307bf45423bb215a8a84b3e1f19fe13377",
|
|
422
426
|
"signature": "08f1426be7052c08311d5b5bdc4cdc61e907df3ef24c9b6e119e23626288083c"
|
|
423
427
|
},
|
|
424
428
|
"../src/components/graphs/pie.ts": {
|
|
425
429
|
"version": "056370f9f0c00938701a4d894ca2a99524e775fbeff355055cba45d9d990cb61",
|
|
426
430
|
"signature": "95760988a47b9f66bc73f6a07f1fec61dc53069ce3ca7284024d038a04cbb3b5"
|
|
427
431
|
},
|
|
432
|
+
"../src/components/graphs/gauge.ts": {
|
|
433
|
+
"version": "ded03ea24ed75e74b9503ad4c119a190991fff36db7270626c0a7e6a12695daa",
|
|
434
|
+
"signature": "5177613a4f9596013e39a291d4767e7eb5fda164c4e9404d2a9354bb03b1d52d"
|
|
435
|
+
},
|
|
428
436
|
"../src/components/graphs/donut.ts": {
|
|
429
437
|
"version": "7d7e2961c4d7e9b0f1cf6d4e2fb8df11476355e681f9c555c86403ac38e541a9",
|
|
430
438
|
"signature": "82c7ff2a9e676b913390acdabd2254a93639d451164e4ef90c1eabe99086fdad"
|
|
@@ -442,7 +450,7 @@
|
|
|
442
450
|
"signature": "a05ec18c3100223e4e2b3dffad44b07bf81cf75c51aa541a08d43be4a0221ecd"
|
|
443
451
|
},
|
|
444
452
|
"../src/components/axes/axis.ts": {
|
|
445
|
-
"version": "
|
|
453
|
+
"version": "1865b040bbe08b5cc4422ab9fe8365f42a112ca6a9833ef936c2767d8b2ac66a",
|
|
446
454
|
"signature": "6e920fe25ab6cf2949ad73634ed80b7478b32081671b771f8a3be45f3634e58b"
|
|
447
455
|
},
|
|
448
456
|
"../src/components/axes/two-dimensional-axes.ts": {
|
|
@@ -462,11 +470,11 @@
|
|
|
462
470
|
"signature": "7ffc020d2131b23cee59b12e51ee0368f668a817b5a9e11e76ae8d35f01baffa"
|
|
463
471
|
},
|
|
464
472
|
"../src/components/index.ts": {
|
|
465
|
-
"version": "
|
|
466
|
-
"signature": "
|
|
473
|
+
"version": "46320f5cb3f27ee8d3104b0f7924478519edce04b5f4db949b546ab1967f4f06",
|
|
474
|
+
"signature": "5f980afe3c4d61037e926ffeb65a691665e2e55c2510144e948fac234a3dd56f"
|
|
467
475
|
},
|
|
468
476
|
"../src/chart.ts": {
|
|
469
|
-
"version": "
|
|
477
|
+
"version": "c60e00a29f941f4f5e48f41c1897f51437a1ef3146ec10edd0a41dc270e401c9",
|
|
470
478
|
"signature": "343882de5cba3e2b8b9d8f2504eaa9072214b563d0264b5c7604c47dd53785dd"
|
|
471
479
|
},
|
|
472
480
|
"../src/axis-chart.ts": {
|
|
@@ -529,9 +537,13 @@
|
|
|
529
537
|
"version": "3f8ef85f02cfe94f877af5468bc3f7c372a0067da62251634e73370e393d93db",
|
|
530
538
|
"signature": "e6b6fd0301578f46d25f3d048a33640f318bdff6721e653ba5f96e8fc0b479d7"
|
|
531
539
|
},
|
|
540
|
+
"../src/charts/gauge.ts": {
|
|
541
|
+
"version": "6e95bc6af41a4328aa8d09b6240829af731fe2061f55198a69ad310b4347e052",
|
|
542
|
+
"signature": "68ff3794ed5dabc1882a4625d89cb8aea5a49bab72b5557fa9359a6f166ee3f7"
|
|
543
|
+
},
|
|
532
544
|
"../src/charts/index.ts": {
|
|
533
|
-
"version": "
|
|
534
|
-
"signature": "
|
|
545
|
+
"version": "982f8ca1c8be8878527c97dfc80c357d8363e8bfd90109196222e018ee9ddaff",
|
|
546
|
+
"signature": "982f8ca1c8be8878527c97dfc80c357d8363e8bfd90109196222e018ee9ddaff"
|
|
535
547
|
},
|
|
536
548
|
"../src/index.ts": {
|
|
537
549
|
"version": "96fa7dcbf20ee3f353607d5b84a605d1912441e87531c57c8887953aa47a8b57",
|
|
@@ -1397,9 +1409,17 @@
|
|
|
1397
1409
|
"../node_modules/@types/node/util.d.ts",
|
|
1398
1410
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1399
1411
|
],
|
|
1412
|
+
"../src/interfaces/truncation.ts": [
|
|
1413
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1414
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1415
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1416
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1417
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1418
|
+
],
|
|
1400
1419
|
"../src/interfaces/components.ts": [
|
|
1401
1420
|
"../src/interfaces/enums.ts",
|
|
1402
1421
|
"../src/components/component.ts",
|
|
1422
|
+
"../src/interfaces/truncation.ts",
|
|
1403
1423
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1404
1424
|
"../node_modules/@types/node/fs.d.ts",
|
|
1405
1425
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1411,12 +1431,14 @@
|
|
|
1411
1431
|
"../../../node_modules/@types/d3/index.d.ts",
|
|
1412
1432
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1413
1433
|
"../src/interfaces/components.ts",
|
|
1434
|
+
"../src/interfaces/truncation.ts",
|
|
1414
1435
|
"../node_modules/@types/node/fs.d.ts",
|
|
1415
1436
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1416
1437
|
"../node_modules/@types/node/util.d.ts",
|
|
1417
1438
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1418
1439
|
],
|
|
1419
1440
|
"../src/interfaces/charts.ts": [
|
|
1441
|
+
"../src/interfaces/enums.ts",
|
|
1420
1442
|
"../src/interfaces/index.ts",
|
|
1421
1443
|
"../src/interfaces/components.ts",
|
|
1422
1444
|
"../src/interfaces/axis-scales.ts",
|
|
@@ -1561,6 +1583,7 @@
|
|
|
1561
1583
|
"../src/components/essentials/tooltip-radar.ts": [
|
|
1562
1584
|
"../src/components/essentials/tooltip.ts",
|
|
1563
1585
|
"../src/tools.ts",
|
|
1586
|
+
"../src/interfaces/index.ts",
|
|
1564
1587
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1565
1588
|
"../node_modules/@types/node/fs.d.ts",
|
|
1566
1589
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -1698,6 +1721,19 @@
|
|
|
1698
1721
|
"../node_modules/@types/node/util.d.ts",
|
|
1699
1722
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1700
1723
|
],
|
|
1724
|
+
"../src/components/graphs/gauge.ts": [
|
|
1725
|
+
"../src/components/component.ts",
|
|
1726
|
+
"../src/services/index.ts",
|
|
1727
|
+
"../src/interfaces/index.ts",
|
|
1728
|
+
"../src/tools.ts",
|
|
1729
|
+
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1730
|
+
"../../../node_modules/@types/d3-shape/index.d.ts",
|
|
1731
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1732
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1733
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1734
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1735
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1736
|
+
],
|
|
1701
1737
|
"../src/components/graphs/donut.ts": [
|
|
1702
1738
|
"../src/components/graphs/pie.ts",
|
|
1703
1739
|
"../src/services/index.ts",
|
|
@@ -1831,6 +1867,7 @@
|
|
|
1831
1867
|
"../src/components/graphs/scatter.ts",
|
|
1832
1868
|
"../src/components/graphs/scatter-stacked.ts",
|
|
1833
1869
|
"../src/components/graphs/pie.ts",
|
|
1870
|
+
"../src/components/graphs/gauge.ts",
|
|
1834
1871
|
"../src/components/graphs/donut.ts",
|
|
1835
1872
|
"../src/components/graphs/skeleton.ts",
|
|
1836
1873
|
"../src/components/layout/spacer.ts",
|
|
@@ -2044,6 +2081,18 @@
|
|
|
2044
2081
|
"../node_modules/@types/node/util.d.ts",
|
|
2045
2082
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
2046
2083
|
],
|
|
2084
|
+
"../src/charts/gauge.ts": [
|
|
2085
|
+
"../src/chart.ts",
|
|
2086
|
+
"../src/configuration.ts",
|
|
2087
|
+
"../src/interfaces/index.ts",
|
|
2088
|
+
"../src/tools.ts",
|
|
2089
|
+
"../src/components/index.ts",
|
|
2090
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
2091
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
2092
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
2093
|
+
"../node_modules/@types/node/util.d.ts",
|
|
2094
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
2095
|
+
],
|
|
2047
2096
|
"../src/charts/index.ts": [
|
|
2048
2097
|
"../src/charts/area.ts",
|
|
2049
2098
|
"../src/charts/area-stacked.ts",
|
|
@@ -2056,6 +2105,7 @@
|
|
|
2056
2105
|
"../src/charts/pie.ts",
|
|
2057
2106
|
"../src/charts/donut.ts",
|
|
2058
2107
|
"../src/charts/radar.ts",
|
|
2108
|
+
"../src/charts/gauge.ts",
|
|
2059
2109
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
2060
2110
|
"../node_modules/@types/node/fs.d.ts",
|
|
2061
2111
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -2709,7 +2759,7 @@
|
|
|
2709
2759
|
"../src/interfaces/index.ts",
|
|
2710
2760
|
"../src/services/colorPalettes.ts"
|
|
2711
2761
|
],
|
|
2712
|
-
"../src/charts/
|
|
2762
|
+
"../src/charts/gauge.ts": [
|
|
2713
2763
|
"../src/interfaces/index.ts",
|
|
2714
2764
|
"../src/chart.ts"
|
|
2715
2765
|
],
|
|
@@ -2724,7 +2774,12 @@
|
|
|
2724
2774
|
"../src/charts/scatter.ts",
|
|
2725
2775
|
"../src/charts/pie.ts",
|
|
2726
2776
|
"../src/charts/donut.ts",
|
|
2727
|
-
"../src/charts/radar.ts"
|
|
2777
|
+
"../src/charts/radar.ts",
|
|
2778
|
+
"../src/charts/gauge.ts"
|
|
2779
|
+
],
|
|
2780
|
+
"../src/charts/radar.ts": [
|
|
2781
|
+
"../src/interfaces/index.ts",
|
|
2782
|
+
"../src/chart.ts"
|
|
2728
2783
|
],
|
|
2729
2784
|
"../src/components/graphs/radar.ts": [
|
|
2730
2785
|
"../src/components/component.ts"
|
|
@@ -2804,6 +2859,7 @@
|
|
|
2804
2859
|
"../src/components/graphs/scatter.ts",
|
|
2805
2860
|
"../src/components/graphs/scatter-stacked.ts",
|
|
2806
2861
|
"../src/components/graphs/pie.ts",
|
|
2862
|
+
"../src/components/graphs/gauge.ts",
|
|
2807
2863
|
"../src/components/graphs/donut.ts",
|
|
2808
2864
|
"../src/components/graphs/skeleton.ts",
|
|
2809
2865
|
"../src/components/layout/spacer.ts",
|
|
@@ -2831,6 +2887,9 @@
|
|
|
2831
2887
|
"../src/model.ts",
|
|
2832
2888
|
"../src/components/component.ts"
|
|
2833
2889
|
],
|
|
2890
|
+
"../src/components/graphs/gauge.ts": [
|
|
2891
|
+
"../src/components/component.ts"
|
|
2892
|
+
],
|
|
2834
2893
|
"../src/components/graphs/pie.ts": [
|
|
2835
2894
|
"../src/components/component.ts"
|
|
2836
2895
|
],
|
|
@@ -2868,6 +2927,10 @@
|
|
|
2868
2927
|
"../src/components/graphs/area.ts": [
|
|
2869
2928
|
"../src/components/component.ts"
|
|
2870
2929
|
],
|
|
2930
|
+
"../src/components/essentials/tooltip-radar.ts": [
|
|
2931
|
+
"../src/interfaces/index.ts",
|
|
2932
|
+
"../src/components/essentials/tooltip.ts"
|
|
2933
|
+
],
|
|
2871
2934
|
"../src/components/essentials/tooltip-scatter.ts": [
|
|
2872
2935
|
"../src/interfaces/index.ts",
|
|
2873
2936
|
"../src/components/essentials/tooltip.ts"
|
|
@@ -2886,9 +2949,6 @@
|
|
|
2886
2949
|
"../src/interfaces/index.ts",
|
|
2887
2950
|
"../src/components/component.ts"
|
|
2888
2951
|
],
|
|
2889
|
-
"../src/components/essentials/tooltip-radar.ts": [
|
|
2890
|
-
"../src/components/essentials/tooltip.ts"
|
|
2891
|
-
],
|
|
2892
2952
|
"../src/components/essentials/title.ts": [
|
|
2893
2953
|
"../src/components/component.ts"
|
|
2894
2954
|
],
|
|
@@ -2903,7 +2963,8 @@
|
|
|
2903
2963
|
"../src/interfaces/charts.ts": [
|
|
2904
2964
|
"../src/interfaces/index.ts",
|
|
2905
2965
|
"../src/interfaces/axis-scales.ts",
|
|
2906
|
-
"../src/interfaces/components.ts"
|
|
2966
|
+
"../src/interfaces/components.ts",
|
|
2967
|
+
"../src/interfaces/enums.ts"
|
|
2907
2968
|
],
|
|
2908
2969
|
"../src/interfaces/model.ts": [
|
|
2909
2970
|
"../src/interfaces/charts.ts"
|
|
@@ -2936,12 +2997,14 @@
|
|
|
2936
2997
|
],
|
|
2937
2998
|
"../src/interfaces/components.ts": [
|
|
2938
2999
|
"../src/components/component.ts",
|
|
2939
|
-
"../src/interfaces/enums.ts"
|
|
3000
|
+
"../src/interfaces/enums.ts",
|
|
3001
|
+
"../src/interfaces/truncation.ts"
|
|
2940
3002
|
],
|
|
2941
3003
|
"../src/interfaces/axis-scales.ts": [
|
|
2942
3004
|
"../src/interfaces/enums.ts",
|
|
2943
3005
|
"../../../node_modules/@types/d3/index.d.ts",
|
|
2944
3006
|
"../src/interfaces/components.ts",
|
|
3007
|
+
"../src/interfaces/truncation.ts",
|
|
2945
3008
|
"../../../node_modules/date-fns/typings.d.ts"
|
|
2946
3009
|
],
|
|
2947
3010
|
"../src/services/time-series.ts": [
|
|
@@ -3746,6 +3809,7 @@
|
|
|
3746
3809
|
"../src/services/curves.ts",
|
|
3747
3810
|
"../src/services/index.ts",
|
|
3748
3811
|
"../src/components/component.ts",
|
|
3812
|
+
"../src/interfaces/truncation.ts",
|
|
3749
3813
|
"../src/interfaces/components.ts",
|
|
3750
3814
|
"../src/interfaces/axis-scales.ts",
|
|
3751
3815
|
"../src/interfaces/charts.ts",
|
|
@@ -3773,6 +3837,7 @@
|
|
|
3773
3837
|
"../src/components/graphs/line.ts",
|
|
3774
3838
|
"../src/components/graphs/scatter-stacked.ts",
|
|
3775
3839
|
"../src/components/graphs/pie.ts",
|
|
3840
|
+
"../src/components/graphs/gauge.ts",
|
|
3776
3841
|
"../src/components/graphs/donut.ts",
|
|
3777
3842
|
"../src/components/graphs/skeleton.ts",
|
|
3778
3843
|
"../src/components/layout/spacer.ts",
|
|
@@ -3799,6 +3864,7 @@
|
|
|
3799
3864
|
"../src/services/angle-utils.ts",
|
|
3800
3865
|
"../src/components/graphs/radar.ts",
|
|
3801
3866
|
"../src/charts/radar.ts",
|
|
3867
|
+
"../src/charts/gauge.ts",
|
|
3802
3868
|
"../src/charts/index.ts",
|
|
3803
3869
|
"../src/index.ts",
|
|
3804
3870
|
"../src/polyfills.ts",
|