@carbon/charts 0.30.17 → 0.30.21
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 +32 -0
- package/build/demo/data/create-codesandbox.d.ts +37 -0
- package/build/demo/data/index.d.ts +6 -0
- package/build/demo/data/line.d.ts +21 -0
- package/build/demo/data/radar.d.ts +42 -0
- package/build/src/charts/index.d.ts +1 -0
- package/build/src/charts/radar.d.ts +6 -0
- package/build/src/components/axes/grid.d.ts +0 -4
- package/build/src/components/axes/ruler.d.ts +17 -0
- package/build/src/components/essentials/tooltip-radar.d.ts +4 -0
- package/build/src/components/graphs/radar.d.ts +22 -0
- package/build/src/components/index.d.ts +2 -0
- package/build/src/configuration.d.ts +2 -1
- package/build/src/interfaces/charts.d.ts +22 -0
- package/build/src/interfaces/enums.d.ts +16 -0
- package/build/src/interfaces/events.d.ts +9 -0
- package/build/src/services/angle-utils.d.ts +205 -0
- package/build/src/tools.d.ts +3 -0
- package/build/stories/tutorials/getting-started/angular.d.ts +1 -0
- package/build/stories/tutorials/getting-started/react.d.ts +1 -0
- package/build/stories/tutorials/getting-started/vanilla.d.ts +1 -0
- package/build/stories/tutorials/getting-started/vue.d.ts +1 -0
- package/build/stories/tutorials/index.d.ts +5 -0
- package/build/stories/tutorials/tabular-data-format.d.ts +1 -0
- package/bundle.js +1 -1
- package/charts/bubble.js +2 -1
- package/charts/bubble.js.map +1 -1
- package/charts/index.d.ts +1 -0
- package/charts/index.js +1 -0
- package/charts/index.js.map +1 -1
- package/charts/line.js +2 -1
- package/charts/line.js.map +1 -1
- package/charts/radar.d.ts +6 -0
- package/charts/radar.js +51 -0
- package/charts/radar.js.map +1 -0
- package/charts/scatter.js +2 -1
- package/charts/scatter.js.map +1 -1
- package/components/axes/grid.d.ts +0 -4
- package/components/axes/grid.js +0 -39
- package/components/axes/grid.js.map +1 -1
- package/components/axes/ruler.d.ts +17 -0
- package/components/axes/ruler.js +177 -0
- package/components/axes/ruler.js.map +1 -0
- package/components/essentials/tooltip-radar.d.ts +4 -0
- package/components/essentials/tooltip-radar.js +42 -0
- package/components/essentials/tooltip-radar.js.map +1 -0
- package/components/graphs/bubble.js +2 -0
- package/components/graphs/bubble.js.map +1 -1
- package/components/graphs/radar.d.ts +22 -0
- package/components/graphs/radar.js +397 -0
- package/components/graphs/radar.js.map +1 -0
- package/components/index.d.ts +2 -0
- package/components/index.js +2 -0
- package/components/index.js.map +1 -1
- package/configuration.d.ts +2 -1
- package/configuration.js +30 -2
- package/configuration.js.map +1 -1
- package/demo/data/bundle.js +1 -1
- package/demo/data/create-codesandbox.d.ts +29 -0
- package/demo/data/create-codesandbox.js +49 -0
- package/demo/data/create-codesandbox.js.map +1 -1
- package/demo/data/index.d.ts +6 -0
- package/demo/data/index.js +34 -1
- package/demo/data/index.js.map +1 -1
- package/demo/data/line.d.ts +21 -0
- package/demo/data/line.js +58 -0
- package/demo/data/line.js.map +1 -1
- package/demo/data/radar.d.ts +42 -0
- package/demo/data/radar.js +101 -0
- package/demo/data/radar.js.map +1 -0
- package/demo/styles.css +88 -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 +29 -15
- package/interfaces/charts.d.ts +22 -0
- package/interfaces/charts.js.map +1 -1
- package/interfaces/enums.d.ts +16 -0
- package/interfaces/enums.js +18 -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/package.json +1 -1
- package/services/angle-utils.d.ts +16 -0
- package/services/angle-utils.js +55 -0
- package/services/angle-utils.js.map +1 -0
- package/styles/components/_ruler.scss +21 -0
- package/styles/components/index.scss +1 -0
- package/styles/graphs/_radar.scss +22 -0
- package/styles/graphs/index.scss +1 -0
- package/styles-g10.css +24 -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 +24 -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 +24 -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 +24 -0
- package/styles.css.map +1 -1
- package/styles.min.css +1 -1
- package/styles.min.css.map +1 -1
- package/tools.d.ts +3 -0
- package/tools.js +4 -1
- package/tools.js.map +1 -1
- package/tsconfig.tsbuildinfo +136 -29
package/styles.css
CHANGED
|
@@ -28,6 +28,18 @@
|
|
|
28
28
|
stroke: #0062ff;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.bx--cc--ruler line.ruler-line {
|
|
32
|
+
stroke: #000000;
|
|
33
|
+
stroke-width: 1px;
|
|
34
|
+
stroke-dasharray: 2;
|
|
35
|
+
pointer-events: none;
|
|
36
|
+
}
|
|
37
|
+
.bx--cc--ruler text.axis-tooltip-text {
|
|
38
|
+
fill: #ffffff;
|
|
39
|
+
dominant-baseline: middle;
|
|
40
|
+
text-anchor: middle;
|
|
41
|
+
}
|
|
42
|
+
|
|
31
43
|
.bx--cc--zero-line line.domain {
|
|
32
44
|
stroke: #8c8c8c;
|
|
33
45
|
}
|
|
@@ -186,6 +198,18 @@ g.bx--cc--scatter g.lines path.line {
|
|
|
186
198
|
mix-blend-mode: multiply;
|
|
187
199
|
}
|
|
188
200
|
|
|
201
|
+
.bx--cc--radar .blobs path {
|
|
202
|
+
stroke-width: 1.5px;
|
|
203
|
+
}
|
|
204
|
+
.bx--cc--radar .y-axes path,
|
|
205
|
+
.bx--cc--radar .x-axes line {
|
|
206
|
+
stroke-width: 1px;
|
|
207
|
+
stroke: #dcdcdc;
|
|
208
|
+
}
|
|
209
|
+
.bx--cc--radar .x-axes line.hovered {
|
|
210
|
+
stroke: #000000;
|
|
211
|
+
}
|
|
212
|
+
|
|
189
213
|
svg.bx--cc--chart-svg {
|
|
190
214
|
font-family: 'IBM Plex Sans Condensed', 'Helvetica Neue', Arial, sans-serif;
|
|
191
215
|
}
|
package/styles.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/
|
|
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/_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/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;EACC,MCqCU;EDpCV;;AAGD;EACC;;AAGD;EACC,QCyBQ;;ACxCV;EACC,QD0CW;;;AE1CX;EAME,MF6Be;EE3BhB,QF8BQ;;AEzBR;AAAA;EACC;EACA;EACA,QFsBO;;AEnBR;AAAA;EACC;EACA,QF0CO;;;AG/DT;EAME,QCkRmB;ED/QpB;EACA;EACA;;AAGD;EACC,MC+WkB;ED9WlB;EACA;;;AElBF;EACC,QLuCS;;;AMxCV;EACC;;;ACDD;EACC;;AAGC;EACC;EACA;;AAEA;EACC,QPkCQ;EOjCR,MP0Bc;;AOvBf;EACC;;AAIF;EACC;EACA,QH2QiB;EG1QjB;;AAGD;EACC,MPWe;EOVf,QPUe;;AOPhB;EACC;EACA,MPYS;;AORX;EACC;;;AClCF;EACC,MRuCW;EQtCX;EACA;EACA;;;ACDD;EACC,kBTgCS;ES/BT;EACA;EC4CC;ED1CD;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;ECiCA;;AD7BD;EACC,OTkBU;;AShBV;EACC;EACA;EACA;EACA;;AAGD;EACC;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACC;EACA;;AAGD;EACC;;AAKH;EACC;;AACA;EACC;;AAIF;EACC;EACA;;AAEA;EACC;EACA;;AAEA;EAME;;AAOL;EACC;EACA;EACA;EACA;EACA;;AACA;EACC;;;AEhGF;EACC;EACA;ED+CA;;AC3CD;EACC,MX2BQ;;AWxBT;EACC;;;ACdF;EACC;EACA;EACA;;;ACAA;EACC;EACA;EH+CA;;AG3CD;EACC,Mb2BQ;Ea1BR;;AAGD;EACC;;;ACbD;EACC;;AAGD;AAAA;EAEC;EACA,Qd8BQ;;Ac3BT;EAME,QVuQmB;;;AWrRtB;EACC;;AAEA;EACC;EACA;EACA,MfiCU;;;AgB3CZ;EACC;EACA;EACA;EACA;EACA,kBhB+BiB;;;AiBjBlB;EACC","file":"styles.css"}
|
package/styles.min.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.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--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}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 g.lines path.line{mix-blend-mode:multiply}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.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--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}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 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 */
|
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/
|
|
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/_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/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,iCACC,KCqCU,QDpCV,2EAGD,iCACC,aAGD,iCACC,OCyBQ,QCxCV,8BACC,OD0CW,QE1CX,uCAME,KF6Be,KE3BhB,OF8BQ,QEzBR,sEACC,oBACA,iBACA,OFsBO,QEnBR,oFACC,qBACA,OF0CO,QG/DT,+BAME,OCkRmB,KD/QpB,iBACA,mBACA,oBAGD,sCACC,KC+WkB,KD9WlB,yBACA,mBElBF,+BACC,OLuCS,QMxCV,oCACC,iBCDD,iBACC,iBAGC,6CACC,iBACA,iBAEA,0DACC,OPkCQ,QOjCR,KP0Bc,KOvBf,kEACC,aAIF,iDACC,UACA,OH2QiB,QG1QjB,eAGD,gDACC,KPWe,KOVf,OPUe,KOPhB,oCACC,eACA,KPYS,QORX,+CACC,eClCF,0BACC,KRuCW,QQtCX,eACA,iEACA,gBCDD,iBACC,iBTgCS,KS/BT,oBACA,uBC4CC,2DD1CD,eACA,sCACA,kBACA,qBACA,aACA,2EAEA,wBACC,UACA,uBCiCA,2DD7BD,8BACC,MTkBU,QShBV,6CACC,iBACA,eACA,YACA,eAGD,0FACC,aACA,YACA,qBACA,WACA,eACA,2BACA,mBAEA,8FACC,mBACA,gBACA,uBACA,iBACA,eACA,qBACA,SACA,UACA,SAEA,0GACC,OACA,iBAGD,0GACC,WAKH,yCACC,gBACA,gDACC,gBAIF,+CACC,SACA,UAEA,kDACC,gBACA,kBAEA,mEAME,gCAOL,gCACC,kBACA,OACA,MACA,UACA,YACA,wCACC,gBEhGF,oCACC,eACA,mBD+CA,2DC3CD,qCACC,KX2BQ,QWxBT,mCACC,wBCdF,wBACC,oBACA,UACA,sDCCC,eACA,mBH+CA,2DG3CD,sCACC,Kb2BQ,Qa1BR,iBAGD,oCACC,wBCbD,2BACC,mBAGD,wDAEC,iBACA,Od8BQ,Qc3BT,oCAME,OVuQmB,KWrRtB,sBACC,2EAEA,2BACC,eACA,gBACA,KfiCU,QgB3CZ,kBACC,kBACA,cACA,WACA,YACA,iBhB+BiB,KiBjBlB,sBACC","file":"styles.min.css"}
|
package/tools.d.ts
CHANGED
|
@@ -5,6 +5,9 @@ export declare namespace Tools {
|
|
|
5
5
|
export const merge: any;
|
|
6
6
|
export const removeArrayDuplicates: any;
|
|
7
7
|
export const clamp: any;
|
|
8
|
+
export const isEqual: any;
|
|
9
|
+
export const flatMapDeep: any;
|
|
10
|
+
export const kebabCase: any;
|
|
8
11
|
/**
|
|
9
12
|
* Returns default chart options merged with provided options,
|
|
10
13
|
* with special cases for axes.
|
package/tools.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Internal imports
|
|
2
2
|
import { CartesianOrientations, ScaleTypes } from "./interfaces";
|
|
3
|
-
import { debounce as lodashDebounce, merge as lodashMerge, cloneDeep as lodashCloneDeep, uniq as lodashUnique, clamp as lodashClamp } from "lodash-es";
|
|
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 } from "lodash-es";
|
|
4
4
|
// Functions
|
|
5
5
|
export var Tools;
|
|
6
6
|
(function (Tools) {
|
|
@@ -10,6 +10,9 @@ export var Tools;
|
|
|
10
10
|
Tools.merge = lodashMerge;
|
|
11
11
|
Tools.removeArrayDuplicates = lodashUnique;
|
|
12
12
|
Tools.clamp = lodashClamp;
|
|
13
|
+
Tools.isEqual = lodashIsEqual;
|
|
14
|
+
Tools.flatMapDeep = lodashFlatMapDeep;
|
|
15
|
+
Tools.kebabCase = lodashKebabCase;
|
|
13
16
|
/**
|
|
14
17
|
* Returns default chart options merged with provided options,
|
|
15
18
|
* with special cases for axes.
|
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,EACV,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,EAIpB,MAAM,WAAW,CAAC;AAEnB,YAAY;AACZ,MAAM,KAAW,KAAK,CAoSrB;AApSD,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;IAEjC;;;;;;;;;OASG;IACH,SAAgB,wBAAwB,CAAC,cAAmB,EAAE,eAAoB;QACjF,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;QAC7C,IAAM,iBAAiB,GAAG,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC;QAElE,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC,EAAE;YACnC,OAAO,cAAc,CAAC,IAA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C,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3F,CAAC;IAFe,0CAAoC,uCAEnD,CAAA;AACF,CAAC,EApSgB,KAAK,KAAL,KAAK,QAoSrB","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\t// the imports below are needed because of typescript bug (error TS4029)\n\tCancelable,\n\tDebounceSettings\n} from \"lodash-es\";\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\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(defaultOptions: any, providedOptions: any) {\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 (providedAxisOptions[\"primary\"] || providedAxisOptions[\"secondary\"]) {\n\t\t\t\t\tconsole.warn(\"`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}\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(\n\t\t\tdefaultOptions,\n\t\t\tprovidedOptions\n\t\t);\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(el.style.width.replace(\"px\", \"\") || el.offsetWidth),\n\t\t\theight: parseFloat(el.style.height.replace(\"px\", \"\") || el.offsetHeight)\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\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.getAttribute(\"transform\").match(translateRegex);\n\t\t// check for the match\n\t\tif (transformStr[0]) {\n\t\t\tconst transforms = transformStr[0].replace(/translate\\(/, \"\").replace(/\\)/, \"\").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 = item / fullData.reduce((accum, val) => accum + val.value, 0) * 100;\n\t\t// if the value has any significant figures, keep 1\n\t\treturn percentage % 1 !== 0 ? parseFloat(percentage.toFixed(1)) : 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 (values.indexOf(value) !== -1 && duplicateValues.indexOf(value) === -1) {\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 = (verticalCoordinates: SVGPathCoordinates, orientation?: CartesianOrientations) => {\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 = (verticalCoordinates: SVGPathCoordinates, orientation?: CartesianOrientations) => {\n\t\tconst { x0, x1, y0, y1 } = flipSVGCoordinatesBasedOnOrientation(verticalCoordinates, orientation);\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>(domain: D, range: R, orientation?: CartesianOrientations): [D, R] | [R, D] {\n\t\treturn orientation === CartesianOrientations.VERTICAL ? [domain, range] : [range, domain];\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["tools.ts"],"names":[],"mappings":"AAAA,mBAAmB;AACnB,OAAO,EAEN,qBAAqB,EACrB,UAAU,EACV,MAAM,cAAc,CAAC;AAEtB,OAAO,EACN,QAAQ,IAAI,cAAc,EAC1B,KAAK,IAAI,W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OAAO,QAAQ,CAAC;SAChB;QAED,OAAO,IAAI,CAAC;IACb,CAAC,CAAC;IASW,0CAAoC,GAAG,UAAC,mBAAuC,EAAE,WAAmC;QAChI,IAAI,WAAW,KAAK,qBAAqB,CAAC,UAAU,EAAE;YACrD,OAAO;gBACN,EAAE,EAAE,mBAAmB,CAAC,EAAE;gBAC1B,EAAE,EAAE,mBAAmB,CAAC,EAAE;gBAC1B,EAAE,EAAE,mBAAmB,CAAC,EAAE;gBAC1B,EAAE,EAAE,mBAAmB,CAAC,EAAE;aAC1B,CAAC;SACF;QAED,OAAO,mBAAmB,CAAC;IAC5B,CAAC,CAAC;IAEW,2BAAqB,GAAG,UAAC,mBAAuC,EAAE,WAAmC;QAC3G,IAAA,iFAA2F,EAAzF,UAAE,EAAE,UAAE,EAAE,UAAE,EAAE,UAA6E,CAAC;QAElG,OAAO,MAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAE,SAAI,EAAI,CAAC;IACvE,CAAC,CAAC;IAEF,SAAgB,oCAAoC,CAAO,MAAS,EAAE,KAAQ,EAAE,WAAmC;QAClH,OAAO,WAAW,KAAK,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;IAC3F,CAAC;IAFe,0CAAoC,uCAEnD,CAAA;AACF,CAAC,EAvSgB,KAAK,KAAL,KAAK,QAuSrB","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\t// the imports below are needed because of typescript bug (error TS4029)\n\tCancelable,\n\tDebounceSettings\n} from \"lodash-es\";\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\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(defaultOptions: any, providedOptions: any) {\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 (providedAxisOptions[\"primary\"] || providedAxisOptions[\"secondary\"]) {\n\t\t\t\t\tconsole.warn(\"`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}\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(\n\t\t\tdefaultOptions,\n\t\t\tprovidedOptions\n\t\t);\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(el.style.width.replace(\"px\", \"\") || el.offsetWidth),\n\t\t\theight: parseFloat(el.style.height.replace(\"px\", \"\") || el.offsetHeight)\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\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.getAttribute(\"transform\").match(translateRegex);\n\t\t// check for the match\n\t\tif (transformStr[0]) {\n\t\t\tconst transforms = transformStr[0].replace(/translate\\(/, \"\").replace(/\\)/, \"\").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 = item / fullData.reduce((accum, val) => accum + val.value, 0) * 100;\n\t\t// if the value has any significant figures, keep 1\n\t\treturn percentage % 1 !== 0 ? parseFloat(percentage.toFixed(1)) : 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 (values.indexOf(value) !== -1 && duplicateValues.indexOf(value) === -1) {\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 = (verticalCoordinates: SVGPathCoordinates, orientation?: CartesianOrientations) => {\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 = (verticalCoordinates: SVGPathCoordinates, orientation?: CartesianOrientations) => {\n\t\tconst { x0, x1, y0, y1 } = flipSVGCoordinatesBasedOnOrientation(verticalCoordinates, orientation);\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>(domain: D, range: R, orientation?: CartesianOrientations): [D, R] | [R, D] {\n\t\treturn orientation === CartesianOrientations.VERTICAL ? [domain, range] : [range, domain];\n\t}\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": "9b4e5debb42991ed7563cec8528c5b894daa91ac4f98f001809d59d615092f7f",
|
|
122
|
+
"signature": "443087afe04f111f9687fa1111ee00d3f7ee0b050cbe239ff2e15a68b8594490"
|
|
123
123
|
},
|
|
124
124
|
"../src/interfaces/enums.ts": {
|
|
125
|
-
"version": "
|
|
126
|
-
"signature": "
|
|
125
|
+
"version": "e6886ca2c2fcd811077b84433b82cf7045e4610dd5a1e935dbac8b3a21ef1d2e",
|
|
126
|
+
"signature": "43c9c8dec027e8f65ace0ba47e0253f5833f19b8ceb3db32103f5cfefb121229"
|
|
127
127
|
},
|
|
128
128
|
"../../../node_modules/@types/d3-array/index.d.ts": {
|
|
129
129
|
"version": "f5b8f86da74b4bfb29f85a631b725a47c8a3ab6c4ce91537e5b176bbe0cd0a7a",
|
|
@@ -262,16 +262,16 @@
|
|
|
262
262
|
"signature": "c015ac2517d1f7555d773861f9caff86d5b564a24e21aae8596ab4d87cdf9c58"
|
|
263
263
|
},
|
|
264
264
|
"../src/tools.ts": {
|
|
265
|
-
"version": "
|
|
266
|
-
"signature": "
|
|
265
|
+
"version": "8ae7e3c9deddd276e521cf2c54556de7e3cbf841d9295cc5808b4fcb9bc966ec",
|
|
266
|
+
"signature": "afa0880db70ba4378d000e0d6925973fe200174fb2225d885d372e2ab2b6758e"
|
|
267
267
|
},
|
|
268
268
|
"../../../node_modules/date-fns/locale/en-US/index.d.ts": {
|
|
269
269
|
"version": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88",
|
|
270
270
|
"signature": "40479353a4fea9dd15e631f03b9bf3d724d627a49c7491ac3c3781275de9ba88"
|
|
271
271
|
},
|
|
272
272
|
"../src/configuration.ts": {
|
|
273
|
-
"version": "
|
|
274
|
-
"signature": "
|
|
273
|
+
"version": "0455cc825c086608c21484f903b9c68b0852bc8d2ffefb7174638c06409bbb66",
|
|
274
|
+
"signature": "303e1754f57cb2d37a616b8a837bdf741712ea43f57f1cd76dc85a246019a9e1"
|
|
275
275
|
},
|
|
276
276
|
"../src/services/colors.ts": {
|
|
277
277
|
"version": "876e70c314f9650ac7c738ed5b3cf43752b1d7f85fc4ab07344be8b495bb2076",
|
|
@@ -326,8 +326,8 @@
|
|
|
326
326
|
"signature": "2cb5092061e67b7abdab29d1156afef911427548ee24d11c530819389807dd0e"
|
|
327
327
|
},
|
|
328
328
|
"../src/interfaces/charts.ts": {
|
|
329
|
-
"version": "
|
|
330
|
-
"signature": "
|
|
329
|
+
"version": "7e7d2959b683bb504a3f2ffc8bb853d0ed70311dd061540046ad4765515c1a4c",
|
|
330
|
+
"signature": "1df738aac816c3dd66781fa1da1af0cbfe142ce40f1a9c2c5ff6ffa99d44f814"
|
|
331
331
|
},
|
|
332
332
|
"../src/interfaces/layout.ts": {
|
|
333
333
|
"version": "cddb4b977e4a5e8fec8a78753cddd9c0804617ad6e82caa1f33b35967d8c6a7b",
|
|
@@ -369,6 +369,10 @@
|
|
|
369
369
|
"version": "421245f86502f3e32665aeacb4a45f1d4d48469a0dcf43c6f6c4023b44f559d8",
|
|
370
370
|
"signature": "a6b4152563181d281714b37fdd8c77e2df008bed9335180db778ff14cb25dbad"
|
|
371
371
|
},
|
|
372
|
+
"../src/components/essentials/tooltip-radar.ts": {
|
|
373
|
+
"version": "f75d43a6dc8bc4ef38509ff6b745075737f9db05ee28193a21b7ce543b63f2f1",
|
|
374
|
+
"signature": "ea9e71af037b72cd8653a2d248aa50d57d0cd98e49d74b5ef599282da1a96391"
|
|
375
|
+
},
|
|
372
376
|
"../src/components/graphs/bar.ts": {
|
|
373
377
|
"version": "d31e1d3697f9bde8adf8da19506cdc9f317d072455712e08b79d5c2610468f6b",
|
|
374
378
|
"signature": "6aa2060d4da66c573181524a610c8d45546cfc9de450ced3e163c66f9a0373db"
|
|
@@ -390,7 +394,7 @@
|
|
|
390
394
|
"signature": "05a23d46dfec77a13197a6af1a111281d5bac89b8b785cd186f7ec382843c95d"
|
|
391
395
|
},
|
|
392
396
|
"../src/components/graphs/bubble.ts": {
|
|
393
|
-
"version": "
|
|
397
|
+
"version": "e0506780706b00c3fd70dfcf5cd36b89897b5913c2e1bc27fe18ac6933b3082b",
|
|
394
398
|
"signature": "fc6e340453242001867c0679049961ef5221c96d6acaf3189fb3b5f10fdddc18"
|
|
395
399
|
},
|
|
396
400
|
"../src/components/graphs/line.ts": {
|
|
@@ -426,16 +430,20 @@
|
|
|
426
430
|
"signature": "fa19d53832e7a2e867b5800a08f68e363e2ef58da4443cd420e8bf7b6b21a996"
|
|
427
431
|
},
|
|
428
432
|
"../src/components/axes/grid.ts": {
|
|
429
|
-
"version": "
|
|
430
|
-
"signature": "
|
|
433
|
+
"version": "aa904ce5f9e14d3eba87c1ac6d06f1dec919e939d74127d2f2e031818b504508",
|
|
434
|
+
"signature": "b0417fae3dae567a1fa68d2add62c84d58cb781e31130129ada96fab95f42998"
|
|
435
|
+
},
|
|
436
|
+
"../src/components/axes/ruler.ts": {
|
|
437
|
+
"version": "3e7e6fad1df7de9dd3b037aea372c4bf95641d753da1f71a4721b81dddaba205",
|
|
438
|
+
"signature": "0ada9c5cd1a9a470d26b681d1a30e28de6cb3eadd8893cfb88cc7ce1455cdd67"
|
|
431
439
|
},
|
|
432
440
|
"../src/components/axes/zero-line.ts": {
|
|
433
441
|
"version": "4cffdb48fc256d0534963401824cae3ace95750f0b5191f9905666a2e430dabf",
|
|
434
442
|
"signature": "7ffc020d2131b23cee59b12e51ee0368f668a817b5a9e11e76ae8d35f01baffa"
|
|
435
443
|
},
|
|
436
444
|
"../src/components/index.ts": {
|
|
437
|
-
"version": "
|
|
438
|
-
"signature": "
|
|
445
|
+
"version": "18d29586207dba9ba63c322c1f0b572618d34207d5ad14fbd492d4d58e21afed",
|
|
446
|
+
"signature": "533a453f93eb25b6238aecbe697a6aeffedfd7d2b08b7fc468105219e2e7b615"
|
|
439
447
|
},
|
|
440
448
|
"../src/chart.ts": {
|
|
441
449
|
"version": "c67a30ef83829feb15a35a3d06b455bf6d2d8f2e79d6ae0a0ff0a8625fc4c931",
|
|
@@ -458,15 +466,15 @@
|
|
|
458
466
|
"signature": "68c3d3657e17fe4193e1d39e3bc76576cb2d604ca22301be41a4faa469050ebd"
|
|
459
467
|
},
|
|
460
468
|
"../src/charts/bubble.ts": {
|
|
461
|
-
"version": "
|
|
469
|
+
"version": "24dd79746323f50650a5d9ae665efb25cb04c850a194d436fb1beb1f49606ee4",
|
|
462
470
|
"signature": "211e0d88f7dff198a592aea104940833a39c295b5a20d5bcd94dd7a9fc8d8ec5"
|
|
463
471
|
},
|
|
464
472
|
"../src/charts/line.ts": {
|
|
465
|
-
"version": "
|
|
473
|
+
"version": "6e2e4fdddf76c6c3c8a12976868ad4096e20fc1908f8020738b6b71a2e6615f0",
|
|
466
474
|
"signature": "ac2fc3b8a4ea00c3faf44a416750edef78dfe8a345e9b1919336369da5ad0802"
|
|
467
475
|
},
|
|
468
476
|
"../src/charts/scatter.ts": {
|
|
469
|
-
"version": "
|
|
477
|
+
"version": "319fc73fca1b95ee81043dc09ff7dc9c35e3400e92d804330499a3117d7bfdae",
|
|
470
478
|
"signature": "41a01fadab7f900eef70c7f60cb72f44b66c1df0a673f9180197d49fb58ac33b"
|
|
471
479
|
},
|
|
472
480
|
"../src/model-pie.ts": {
|
|
@@ -481,9 +489,21 @@
|
|
|
481
489
|
"version": "f1b148371b488946581f729921e476a1f849a57560d7fb6995bcff0ce0d60370",
|
|
482
490
|
"signature": "dac3c87dca1297656f125da85b22e4c52c161254ed7712d1b825d7e585ff2c68"
|
|
483
491
|
},
|
|
492
|
+
"../src/services/angle-utils.ts": {
|
|
493
|
+
"version": "89e011bedfad405a29e24b749c98ae5a6d7b9823bf83eda543ad41e0a4b9bc78",
|
|
494
|
+
"signature": "df623ef972a7583aabd350e7f68577159c87d69b7b2d5bba653e44dabe49f290"
|
|
495
|
+
},
|
|
496
|
+
"../src/components/graphs/radar.ts": {
|
|
497
|
+
"version": "d6f351bdeafd54e7f360333883c319750f07d992639dc3d085b7a68fe62719c2",
|
|
498
|
+
"signature": "4197837da004fd7e6cff1f39edcc4b11e51a596da186e80d51928d1adc1a39e4"
|
|
499
|
+
},
|
|
500
|
+
"../src/charts/radar.ts": {
|
|
501
|
+
"version": "47339254c49b9d21320c38cd81597101b2745f5029e1ad21033f7aba2d1db9ef",
|
|
502
|
+
"signature": "e6b6fd0301578f46d25f3d048a33640f318bdff6721e653ba5f96e8fc0b479d7"
|
|
503
|
+
},
|
|
484
504
|
"../src/charts/index.ts": {
|
|
485
|
-
"version": "
|
|
486
|
-
"signature": "
|
|
505
|
+
"version": "34b2210ca80439db30e45b119213749e1cb20c002926f88d877e0f0d218e865e",
|
|
506
|
+
"signature": "34b2210ca80439db30e45b119213749e1cb20c002926f88d877e0f0d218e865e"
|
|
487
507
|
},
|
|
488
508
|
"../src/index.ts": {
|
|
489
509
|
"version": "6642626013f984c0e934dcbb3a0ff3a1da1b5b1921ae0377777afc639d23b0a4",
|
|
@@ -1482,6 +1502,15 @@
|
|
|
1482
1502
|
"../node_modules/@types/node/util.d.ts",
|
|
1483
1503
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1484
1504
|
],
|
|
1505
|
+
"../src/components/essentials/tooltip-radar.ts": [
|
|
1506
|
+
"../src/components/essentials/tooltip.ts",
|
|
1507
|
+
"../src/tools.ts",
|
|
1508
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1509
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1510
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1511
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1512
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1513
|
+
],
|
|
1485
1514
|
"../src/components/graphs/bar.ts": [
|
|
1486
1515
|
"../src/components/component.ts",
|
|
1487
1516
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
@@ -1543,6 +1572,7 @@
|
|
|
1543
1572
|
"../src/components/graphs/bubble.ts": [
|
|
1544
1573
|
"../src/components/graphs/scatter.ts",
|
|
1545
1574
|
"../src/services/index.ts",
|
|
1575
|
+
"../src/interfaces/index.ts",
|
|
1546
1576
|
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1547
1577
|
"../../../node_modules/@types/d3-array/index.d.ts",
|
|
1548
1578
|
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
@@ -1665,6 +1695,18 @@
|
|
|
1665
1695
|
"../node_modules/@types/node/util.d.ts",
|
|
1666
1696
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1667
1697
|
],
|
|
1698
|
+
"../src/components/axes/ruler.ts": [
|
|
1699
|
+
"../src/components/component.ts",
|
|
1700
|
+
"../src/services/index.ts",
|
|
1701
|
+
"../src/interfaces/index.ts",
|
|
1702
|
+
"../src/tools.ts",
|
|
1703
|
+
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1704
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1705
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1706
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1707
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1708
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1709
|
+
],
|
|
1668
1710
|
"../src/components/axes/zero-line.ts": [
|
|
1669
1711
|
"../src/components/component.ts",
|
|
1670
1712
|
"../src/services/index.ts",
|
|
@@ -1683,6 +1725,7 @@
|
|
|
1683
1725
|
"../src/components/essentials/tooltip-bar.ts",
|
|
1684
1726
|
"../src/components/essentials/tooltip-pie.ts",
|
|
1685
1727
|
"../src/components/essentials/tooltip-scatter.ts",
|
|
1728
|
+
"../src/components/essentials/tooltip-radar.ts",
|
|
1686
1729
|
"../src/components/graphs/bar-simple.ts",
|
|
1687
1730
|
"../src/components/graphs/bar-grouped.ts",
|
|
1688
1731
|
"../src/components/graphs/bar-stacked.ts",
|
|
@@ -1696,6 +1739,7 @@
|
|
|
1696
1739
|
"../src/components/axes/two-dimensional-axes.ts",
|
|
1697
1740
|
"../src/components/axes/axis.ts",
|
|
1698
1741
|
"../src/components/axes/grid.ts",
|
|
1742
|
+
"../src/components/axes/ruler.ts",
|
|
1699
1743
|
"../src/components/axes/zero-line.ts",
|
|
1700
1744
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1701
1745
|
"../node_modules/@types/node/fs.d.ts",
|
|
@@ -1832,6 +1876,43 @@
|
|
|
1832
1876
|
"../node_modules/@types/node/util.d.ts",
|
|
1833
1877
|
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1834
1878
|
],
|
|
1879
|
+
"../src/services/angle-utils.ts": [
|
|
1880
|
+
"../src/interfaces/enums.ts",
|
|
1881
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1882
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1883
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1884
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1885
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1886
|
+
],
|
|
1887
|
+
"../src/components/graphs/radar.ts": [
|
|
1888
|
+
"../src/components/component.ts",
|
|
1889
|
+
"../src/services/index.ts",
|
|
1890
|
+
"../src/interfaces/index.ts",
|
|
1891
|
+
"../src/tools.ts",
|
|
1892
|
+
"../src/services/angle-utils.ts",
|
|
1893
|
+
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
1894
|
+
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
1895
|
+
"../../../node_modules/@types/d3-array/index.d.ts",
|
|
1896
|
+
"../../../node_modules/@types/d3-shape/index.d.ts",
|
|
1897
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1898
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1899
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1900
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1901
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1902
|
+
],
|
|
1903
|
+
"../src/charts/radar.ts": [
|
|
1904
|
+
"../src/chart.ts",
|
|
1905
|
+
"../src/configuration.ts",
|
|
1906
|
+
"../src/interfaces/index.ts",
|
|
1907
|
+
"../src/tools.ts",
|
|
1908
|
+
"../src/components/index.ts",
|
|
1909
|
+
"../src/components/graphs/radar.ts",
|
|
1910
|
+
"../../../node_modules/date-fns/typings.d.ts",
|
|
1911
|
+
"../node_modules/@types/node/fs.d.ts",
|
|
1912
|
+
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
1913
|
+
"../node_modules/@types/node/util.d.ts",
|
|
1914
|
+
"../node_modules/@types/node/ts3.2/util.d.ts"
|
|
1915
|
+
],
|
|
1835
1916
|
"../src/charts/index.ts": [
|
|
1836
1917
|
"../src/charts/bar-simple.ts",
|
|
1837
1918
|
"../src/charts/bar-grouped.ts",
|
|
@@ -1841,6 +1922,7 @@
|
|
|
1841
1922
|
"../src/charts/scatter.ts",
|
|
1842
1923
|
"../src/charts/pie.ts",
|
|
1843
1924
|
"../src/charts/donut.ts",
|
|
1925
|
+
"../src/charts/radar.ts",
|
|
1844
1926
|
"../../../node_modules/date-fns/typings.d.ts",
|
|
1845
1927
|
"../node_modules/@types/node/fs.d.ts",
|
|
1846
1928
|
"../node_modules/@types/node/ts3.2/fs.d.ts",
|
|
@@ -2494,9 +2576,9 @@
|
|
|
2494
2576
|
"../src/interfaces/index.ts",
|
|
2495
2577
|
"../src/services/colorPalettes.ts"
|
|
2496
2578
|
],
|
|
2497
|
-
"../src/charts/
|
|
2579
|
+
"../src/charts/radar.ts": [
|
|
2498
2580
|
"../src/interfaces/index.ts",
|
|
2499
|
-
"../src/
|
|
2581
|
+
"../src/chart.ts"
|
|
2500
2582
|
],
|
|
2501
2583
|
"../src/charts/index.ts": [
|
|
2502
2584
|
"../src/charts/bar-simple.ts",
|
|
@@ -2506,7 +2588,15 @@
|
|
|
2506
2588
|
"../src/charts/line.ts",
|
|
2507
2589
|
"../src/charts/scatter.ts",
|
|
2508
2590
|
"../src/charts/pie.ts",
|
|
2509
|
-
"../src/charts/donut.ts"
|
|
2591
|
+
"../src/charts/donut.ts",
|
|
2592
|
+
"../src/charts/radar.ts"
|
|
2593
|
+
],
|
|
2594
|
+
"../src/components/graphs/radar.ts": [
|
|
2595
|
+
"../src/components/component.ts"
|
|
2596
|
+
],
|
|
2597
|
+
"../src/charts/donut.ts": [
|
|
2598
|
+
"../src/interfaces/index.ts",
|
|
2599
|
+
"../src/charts/pie.ts"
|
|
2510
2600
|
],
|
|
2511
2601
|
"../src/charts/pie.ts": [
|
|
2512
2602
|
"../src/model-pie.ts",
|
|
@@ -2547,8 +2637,9 @@
|
|
|
2547
2637
|
"../src/model.ts",
|
|
2548
2638
|
"../src/interfaces/index.ts"
|
|
2549
2639
|
],
|
|
2550
|
-
"../src/components/axes/
|
|
2551
|
-
"../src/components/component.ts"
|
|
2640
|
+
"../src/components/axes/ruler.ts": [
|
|
2641
|
+
"../src/components/component.ts",
|
|
2642
|
+
"../../../node_modules/@types/d3-selection/index.d.ts"
|
|
2552
2643
|
],
|
|
2553
2644
|
"../src/components/index.ts": [
|
|
2554
2645
|
"../src/components/component.ts",
|
|
@@ -2558,6 +2649,7 @@
|
|
|
2558
2649
|
"../src/components/essentials/tooltip-bar.ts",
|
|
2559
2650
|
"../src/components/essentials/tooltip-pie.ts",
|
|
2560
2651
|
"../src/components/essentials/tooltip-scatter.ts",
|
|
2652
|
+
"../src/components/essentials/tooltip-radar.ts",
|
|
2561
2653
|
"../src/components/graphs/bar-simple.ts",
|
|
2562
2654
|
"../src/components/graphs/bar-grouped.ts",
|
|
2563
2655
|
"../src/components/graphs/bar-stacked.ts",
|
|
@@ -2571,8 +2663,12 @@
|
|
|
2571
2663
|
"../src/components/axes/two-dimensional-axes.ts",
|
|
2572
2664
|
"../src/components/axes/axis.ts",
|
|
2573
2665
|
"../src/components/axes/grid.ts",
|
|
2666
|
+
"../src/components/axes/ruler.ts",
|
|
2574
2667
|
"../src/components/axes/zero-line.ts"
|
|
2575
2668
|
],
|
|
2669
|
+
"../src/components/axes/grid.ts": [
|
|
2670
|
+
"../src/components/component.ts"
|
|
2671
|
+
],
|
|
2576
2672
|
"../src/components/axes/two-dimensional-axes.ts": [
|
|
2577
2673
|
"../src/components/component.ts"
|
|
2578
2674
|
],
|
|
@@ -2595,15 +2691,15 @@
|
|
|
2595
2691
|
"../src/components/graphs/line.ts": [
|
|
2596
2692
|
"../src/components/component.ts"
|
|
2597
2693
|
],
|
|
2598
|
-
"../src/components/graphs/scatter.ts": [
|
|
2599
|
-
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
2600
|
-
"../src/components/component.ts"
|
|
2601
|
-
],
|
|
2602
2694
|
"../src/components/graphs/bubble.ts": [
|
|
2603
2695
|
"../../../node_modules/@types/d3-scale/index.d.ts",
|
|
2604
2696
|
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
2605
2697
|
"../src/components/graphs/scatter.ts"
|
|
2606
2698
|
],
|
|
2699
|
+
"../src/components/graphs/scatter.ts": [
|
|
2700
|
+
"../../../node_modules/@types/d3-selection/index.d.ts",
|
|
2701
|
+
"../src/components/component.ts"
|
|
2702
|
+
],
|
|
2607
2703
|
"../src/components/graphs/bar-stacked.ts": [
|
|
2608
2704
|
"../src/components/graphs/bar.ts"
|
|
2609
2705
|
],
|
|
@@ -2632,6 +2728,9 @@
|
|
|
2632
2728
|
"../src/interfaces/index.ts",
|
|
2633
2729
|
"../src/components/component.ts"
|
|
2634
2730
|
],
|
|
2731
|
+
"../src/components/essentials/tooltip-radar.ts": [
|
|
2732
|
+
"../src/components/essentials/tooltip.ts"
|
|
2733
|
+
],
|
|
2635
2734
|
"../src/components/essentials/title.ts": [
|
|
2636
2735
|
"../src/components/component.ts"
|
|
2637
2736
|
],
|
|
@@ -2705,6 +2804,9 @@
|
|
|
2705
2804
|
"../src/interfaces/enums.ts": [
|
|
2706
2805
|
"../src/interfaces/events.ts"
|
|
2707
2806
|
],
|
|
2807
|
+
"../src/services/angle-utils.ts": [
|
|
2808
|
+
"../src/interfaces/enums.ts"
|
|
2809
|
+
],
|
|
2708
2810
|
"../src/interfaces/layout.ts": [
|
|
2709
2811
|
"../src/interfaces/enums.ts"
|
|
2710
2812
|
],
|
|
@@ -3488,6 +3590,7 @@
|
|
|
3488
3590
|
"../src/components/essentials/tooltip-bar.ts",
|
|
3489
3591
|
"../src/components/essentials/tooltip-pie.ts",
|
|
3490
3592
|
"../src/components/essentials/tooltip-scatter.ts",
|
|
3593
|
+
"../src/components/essentials/tooltip-radar.ts",
|
|
3491
3594
|
"../src/components/graphs/bar.ts",
|
|
3492
3595
|
"../src/components/graphs/bar-simple.ts",
|
|
3493
3596
|
"../src/components/graphs/bar-grouped.ts",
|
|
@@ -3503,6 +3606,7 @@
|
|
|
3503
3606
|
"../src/components/axes/axis.ts",
|
|
3504
3607
|
"../src/components/axes/two-dimensional-axes.ts",
|
|
3505
3608
|
"../src/components/axes/grid.ts",
|
|
3609
|
+
"../src/components/axes/ruler.ts",
|
|
3506
3610
|
"../src/components/axes/zero-line.ts",
|
|
3507
3611
|
"../src/components/index.ts",
|
|
3508
3612
|
"../src/chart.ts",
|
|
@@ -3516,6 +3620,9 @@
|
|
|
3516
3620
|
"../src/model-pie.ts",
|
|
3517
3621
|
"../src/charts/pie.ts",
|
|
3518
3622
|
"../src/charts/donut.ts",
|
|
3623
|
+
"../src/services/angle-utils.ts",
|
|
3624
|
+
"../src/components/graphs/radar.ts",
|
|
3625
|
+
"../src/charts/radar.ts",
|
|
3519
3626
|
"../src/charts/index.ts",
|
|
3520
3627
|
"../src/index.ts",
|
|
3521
3628
|
"../src/polyfills.ts",
|