chartist 1.1.3 → 1.2.1

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.
Files changed (40) hide show
  1. package/README.md +1 -1
  2. package/dist/_settings.scss +89 -0
  3. package/dist/charts/BarChart/BarChart.d.ts +4 -1
  4. package/dist/charts/BarChart/BarChart.d.ts.map +1 -1
  5. package/dist/charts/BarChart/BarChart.types.d.ts +25 -0
  6. package/dist/charts/BarChart/BarChart.types.d.ts.map +1 -1
  7. package/dist/charts/LineChart/LineChart.d.ts +6 -1
  8. package/dist/charts/LineChart/LineChart.d.ts.map +1 -1
  9. package/dist/charts/LineChart/LineChart.types.d.ts +30 -0
  10. package/dist/charts/LineChart/LineChart.types.d.ts.map +1 -1
  11. package/dist/charts/PieChart/PieChart.d.ts +10 -0
  12. package/dist/charts/PieChart/PieChart.d.ts.map +1 -1
  13. package/dist/charts/PieChart/PieChart.types.d.ts +39 -1
  14. package/dist/charts/PieChart/PieChart.types.d.ts.map +1 -1
  15. package/dist/core/types.d.ts +61 -0
  16. package/dist/core/types.d.ts.map +1 -1
  17. package/dist/index.cjs +61 -22
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.css +1 -1
  20. package/dist/index.css.map +1 -1
  21. package/dist/index.js +61 -23
  22. package/dist/index.js.map +1 -1
  23. package/dist/index.scss +204 -0
  24. package/dist/index.umd.js +1 -1
  25. package/dist/index.umd.js.map +1 -1
  26. package/dist/interpolation/cardinal.d.ts +2 -0
  27. package/dist/interpolation/cardinal.d.ts.map +1 -1
  28. package/dist/interpolation/monotoneCubic.d.ts +2 -0
  29. package/dist/interpolation/monotoneCubic.d.ts.map +1 -1
  30. package/dist/interpolation/none.d.ts +2 -0
  31. package/dist/interpolation/none.d.ts.map +1 -1
  32. package/dist/interpolation/simple.d.ts +2 -0
  33. package/dist/interpolation/simple.d.ts.map +1 -1
  34. package/dist/interpolation/step.d.ts +3 -1
  35. package/dist/interpolation/step.d.ts.map +1 -1
  36. package/dist/utils/functional.d.ts +3 -2
  37. package/dist/utils/functional.d.ts.map +1 -1
  38. package/dist/utils/utils.d.ts +4 -0
  39. package/dist/utils/utils.d.ts.map +1 -1
  40. package/package.json +1 -1
package/dist/index.css CHANGED
@@ -1,2 +1,2 @@
1
- .ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:block;display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-label.ct-vertical.ct-start{align-items:flex-end;justify-content:flex-end;text-align:right;text-anchor:end}.ct-label.ct-vertical.ct-end{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:center;text-align:center;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left;text-anchor:start}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{align-items:center;justify-content:flex-end;text-align:right;text-anchor:end}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{align-items:center;justify-content:flex-start;text-align:left;text-anchor:end}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-grid-background{fill:none}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{fill:none;stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#e6805e}.ct-series-i .ct-area,.ct-series-i .ct-slice-pie{fill:#e6805e}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{content:"";display:table;clear:both}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{content:"";display:table;clear:both}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{content:"";display:table;clear:both}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{content:"";display:table;clear:both}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{content:"";display:table;clear:both}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{content:"";display:table;clear:both}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{content:"";display:table;clear:both}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{content:"";display:table;clear:both}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{content:"";display:table;clear:both}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{content:"";display:table;clear:both}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{content:"";display:table;clear:both}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{content:"";display:table;clear:both}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{content:"";display:table;clear:both}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{content:"";display:table;clear:both}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{content:"";display:table;clear:both}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{content:"";display:table;clear:both}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{content:"";display:table;clear:both}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0}
1
+ .ct-label{fill:rgba(0,0,0,.4);color:rgba(0,0,0,.4);font-size:.75rem;line-height:1}.ct-chart-bar .ct-label,.ct-chart-line .ct-label{display:flex}.ct-chart-donut .ct-label,.ct-chart-pie .ct-label{dominant-baseline:central}.ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left}.ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left}.ct-label.ct-vertical.ct-start{align-items:flex-end;justify-content:flex-end;text-align:right}.ct-label.ct-vertical.ct-end{align-items:flex-end;justify-content:flex-start;text-align:left}.ct-chart-bar .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:center;text-align:center}.ct-chart-bar .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:center;text-align:center}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-start{align-items:flex-end;justify-content:flex-start;text-align:left}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-horizontal.ct-end{align-items:flex-start;justify-content:flex-start;text-align:left}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-start{align-items:center;justify-content:flex-end;text-align:right}.ct-chart-bar.ct-horizontal-bars .ct-label.ct-vertical.ct-end{align-items:center;justify-content:flex-start;text-align:left}.ct-grid{stroke:rgba(0,0,0,.2);stroke-width:1px;stroke-dasharray:2px}.ct-grid-background{fill:none}.ct-point{stroke-width:10px;stroke-linecap:round}.ct-line{fill:none;stroke-width:4px}.ct-area{stroke:none;fill-opacity:.1}.ct-bar{fill:none;stroke-width:10px}.ct-slice-donut{fill:none;stroke-width:60px}.ct-series-a .ct-bar,.ct-series-a .ct-line,.ct-series-a .ct-point,.ct-series-a .ct-slice-donut{stroke:#d70206}.ct-series-a .ct-area,.ct-series-a .ct-slice-pie{fill:#d70206}.ct-series-b .ct-bar,.ct-series-b .ct-line,.ct-series-b .ct-point,.ct-series-b .ct-slice-donut{stroke:#f05b4f}.ct-series-b .ct-area,.ct-series-b .ct-slice-pie{fill:#f05b4f}.ct-series-c .ct-bar,.ct-series-c .ct-line,.ct-series-c .ct-point,.ct-series-c .ct-slice-donut{stroke:#f4c63d}.ct-series-c .ct-area,.ct-series-c .ct-slice-pie{fill:#f4c63d}.ct-series-d .ct-bar,.ct-series-d .ct-line,.ct-series-d .ct-point,.ct-series-d .ct-slice-donut{stroke:#d17905}.ct-series-d .ct-area,.ct-series-d .ct-slice-pie{fill:#d17905}.ct-series-e .ct-bar,.ct-series-e .ct-line,.ct-series-e .ct-point,.ct-series-e .ct-slice-donut{stroke:#453d3f}.ct-series-e .ct-area,.ct-series-e .ct-slice-pie{fill:#453d3f}.ct-series-f .ct-bar,.ct-series-f .ct-line,.ct-series-f .ct-point,.ct-series-f .ct-slice-donut{stroke:#59922b}.ct-series-f .ct-area,.ct-series-f .ct-slice-pie{fill:#59922b}.ct-series-g .ct-bar,.ct-series-g .ct-line,.ct-series-g .ct-point,.ct-series-g .ct-slice-donut{stroke:#0544d3}.ct-series-g .ct-area,.ct-series-g .ct-slice-pie{fill:#0544d3}.ct-series-h .ct-bar,.ct-series-h .ct-line,.ct-series-h .ct-point,.ct-series-h .ct-slice-donut{stroke:#6b0392}.ct-series-h .ct-area,.ct-series-h .ct-slice-pie{fill:#6b0392}.ct-series-i .ct-bar,.ct-series-i .ct-line,.ct-series-i .ct-point,.ct-series-i .ct-slice-donut{stroke:#e6805e}.ct-series-i .ct-area,.ct-series-i .ct-slice-pie{fill:#e6805e}.ct-series-j .ct-bar,.ct-series-j .ct-line,.ct-series-j .ct-point,.ct-series-j .ct-slice-donut{stroke:#dda458}.ct-series-j .ct-area,.ct-series-j .ct-slice-pie{fill:#dda458}.ct-series-k .ct-bar,.ct-series-k .ct-line,.ct-series-k .ct-point,.ct-series-k .ct-slice-donut{stroke:#eacf7d}.ct-series-k .ct-area,.ct-series-k .ct-slice-pie{fill:#eacf7d}.ct-series-l .ct-bar,.ct-series-l .ct-line,.ct-series-l .ct-point,.ct-series-l .ct-slice-donut{stroke:#86797d}.ct-series-l .ct-area,.ct-series-l .ct-slice-pie{fill:#86797d}.ct-series-m .ct-bar,.ct-series-m .ct-line,.ct-series-m .ct-point,.ct-series-m .ct-slice-donut{stroke:#b2c326}.ct-series-m .ct-area,.ct-series-m .ct-slice-pie{fill:#b2c326}.ct-series-n .ct-bar,.ct-series-n .ct-line,.ct-series-n .ct-point,.ct-series-n .ct-slice-donut{stroke:#6188e2}.ct-series-n .ct-area,.ct-series-n .ct-slice-pie{fill:#6188e2}.ct-series-o .ct-bar,.ct-series-o .ct-line,.ct-series-o .ct-point,.ct-series-o .ct-slice-donut{stroke:#a748ca}.ct-series-o .ct-area,.ct-series-o .ct-slice-pie{fill:#a748ca}.ct-square{display:block;position:relative;width:100%}.ct-square:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:100%}.ct-square:after{content:"";display:table;clear:both}.ct-square>svg{display:block;position:absolute;top:0;left:0}.ct-minor-second{display:block;position:relative;width:100%}.ct-minor-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:93.75%}.ct-minor-second:after{content:"";display:table;clear:both}.ct-minor-second>svg{display:block;position:absolute;top:0;left:0}.ct-major-second{display:block;position:relative;width:100%}.ct-major-second:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:88.8888888889%}.ct-major-second:after{content:"";display:table;clear:both}.ct-major-second>svg{display:block;position:absolute;top:0;left:0}.ct-minor-third{display:block;position:relative;width:100%}.ct-minor-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:83.3333333333%}.ct-minor-third:after{content:"";display:table;clear:both}.ct-minor-third>svg{display:block;position:absolute;top:0;left:0}.ct-major-third{display:block;position:relative;width:100%}.ct-major-third:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:80%}.ct-major-third:after{content:"";display:table;clear:both}.ct-major-third>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fourth{display:block;position:relative;width:100%}.ct-perfect-fourth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:75%}.ct-perfect-fourth:after{content:"";display:table;clear:both}.ct-perfect-fourth>svg{display:block;position:absolute;top:0;left:0}.ct-perfect-fifth{display:block;position:relative;width:100%}.ct-perfect-fifth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:66.6666666667%}.ct-perfect-fifth:after{content:"";display:table;clear:both}.ct-perfect-fifth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-sixth{display:block;position:relative;width:100%}.ct-minor-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:62.5%}.ct-minor-sixth:after{content:"";display:table;clear:both}.ct-minor-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-golden-section{display:block;position:relative;width:100%}.ct-golden-section:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:61.804697157%}.ct-golden-section:after{content:"";display:table;clear:both}.ct-golden-section>svg{display:block;position:absolute;top:0;left:0}.ct-major-sixth{display:block;position:relative;width:100%}.ct-major-sixth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:60%}.ct-major-sixth:after{content:"";display:table;clear:both}.ct-major-sixth>svg{display:block;position:absolute;top:0;left:0}.ct-minor-seventh{display:block;position:relative;width:100%}.ct-minor-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:56.25%}.ct-minor-seventh:after{content:"";display:table;clear:both}.ct-minor-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-seventh{display:block;position:relative;width:100%}.ct-major-seventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:53.3333333333%}.ct-major-seventh:after{content:"";display:table;clear:both}.ct-major-seventh>svg{display:block;position:absolute;top:0;left:0}.ct-octave{display:block;position:relative;width:100%}.ct-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:50%}.ct-octave:after{content:"";display:table;clear:both}.ct-octave>svg{display:block;position:absolute;top:0;left:0}.ct-major-tenth{display:block;position:relative;width:100%}.ct-major-tenth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:40%}.ct-major-tenth:after{content:"";display:table;clear:both}.ct-major-tenth>svg{display:block;position:absolute;top:0;left:0}.ct-major-eleventh{display:block;position:relative;width:100%}.ct-major-eleventh:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:37.5%}.ct-major-eleventh:after{content:"";display:table;clear:both}.ct-major-eleventh>svg{display:block;position:absolute;top:0;left:0}.ct-major-twelfth{display:block;position:relative;width:100%}.ct-major-twelfth:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:33.3333333333%}.ct-major-twelfth:after{content:"";display:table;clear:both}.ct-major-twelfth>svg{display:block;position:absolute;top:0;left:0}.ct-double-octave{display:block;position:relative;width:100%}.ct-double-octave:before{display:block;float:left;content:"";width:0;height:0;padding-bottom:25%}.ct-double-octave:after{content:"";display:table;clear:both}.ct-double-octave>svg{display:block;position:absolute;top:0;left:0}
2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AA,CACA,QAAA,CACA,kBEwmBJ,CFrmBE,sBACE,UAAA,CACA,aAAA,CACA,UEumBJ,CFpmBE,oBACE,aAAA,CACA,iBAAA,CACA,KAAA,CACA,MEsmBJ,CFrZM,mBAxOJ,aAAA,CACA,iBAAA,CACA,UEioBF,CF/nBE,0BACE,aAAA,CACA,UAAA,CACA,UAAA,CACA,OAAA,CACA,QAAA,CACA,oBEioBJ,CF9nBE,yBACE,UAAA,CACA,aAAA,CACA,UEgoBJ,CF7nBE,uBACE,aAAA,CACA,iBAAA,CACA,KAAA,CACA,ME+nBJ,CF9aM,kBAxOJ,aAAA,CACA,iBAAA,CACA,UE0pBF,CFxpBE,yBACE,aAAA,CACA,UAAA,CACA,UAAA,CACA,OAAA,CACA,QAAA,CACA,6BE0pBJ,CFvpBE,wBACE,UAAA,CACA,aAAA,CACA,UEypBJ,CFtpBE,sBACE,aAAA,CACA,iBAAA,CACA,KAAA,CACA,MEwpBJ,CFvcM,kBAxOJ,aAAA,CACA,iBAAA,CACA,UEmrBF,CFjrBE,yBACE,aAAA,CACA,UAAA,CACA,UAAA,CACA,OAAA,CACA,QAAA,CACA,kBEmrBJ,CFhrBE,wBACE,UAAA,CACA,aAAA,CACA,UEkrBJ,CF/qBE,sBACE,aAAA,CACA,iBAAA,CACA,KAAA,CACA,MEirBJ","file":"index.css"}
1
+ {"version":3,"sources":["file:///src/styles/index.scss","file:///src/styles/_settings.scss","../src/styles/index.scss"],"names":[],"mappings":"AAoGE,UAxDA,mBCZc,CDad,oBCbc,CDcd,gBCba,CDcb,aE1CF,CFmGE,iDAEE,YEhGJ,CFmGE,kDAEE,yBEhGJ,CFmGE,iCAnFA,oBAoF4B,CAnF5B,0BAmFsC,CAhFpC,eEdJ,CFiGE,+BAvFA,sBAwF4B,CAvF5B,0BAuFwC,CApFtC,eERJ,CF+FE,+BA3FA,oBA4F4B,CA3F5B,wBA2FsC,CAtFpC,gBEJJ,CF6FE,6BA/FA,oBAgG4B,CA/F5B,0BA+F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A,UAAA,CACA,UAAA,CACA,OAAA,CACA,QAAA,CACA,kBEwmBJ,CFrmBE,wBACE,UAAA,CACA,aAAA,CACA,UEumBJ,CFpmBE,sBACE,aAAA,CACA,iBAAA,CACA,KAAA,CACA,MEsmBJ","file":"index.css"}
package/dist/index.js CHANGED
@@ -243,12 +243,13 @@ function extend() {
243
243
  * @return The same value that was provided to the n parameter
244
244
  */ const noop = (n)=>n
245
245
  ;
246
- /**
247
- * Functional style helper to produce array with given length initialized with undefined values
248
- */ const times = (length)=>Array.from({
246
+ function times(length, filler) {
247
+ return Array.from({
249
248
  length
250
- })
251
- ;
249
+ }, filler ? (_, i)=>filler(i)
250
+ : ()=>void 0
251
+ );
252
+ }
252
253
  /**
253
254
  * Sum helper to be used in reduce functions
254
255
  */ const sum = (previous, current)=>previous + (current ? current : 0)
@@ -258,7 +259,7 @@ function extend() {
258
259
  *
259
260
  * For example:
260
261
  * @example
261
- * ```javascript
262
+ * ```ts
262
263
  * const data = [[1, 2], [3], []];
263
264
  * serialMap(data, cb);
264
265
  *
@@ -267,7 +268,7 @@ function extend() {
267
268
  * // 2. call arguments: (2, undefined, undefined)
268
269
  * ```
269
270
  */ const serialMap = (array, callback)=>times(Math.max(...array.map((element)=>element.length
270
- ))).map((_inner, index)=>callback(...array.map((element)=>element[index]
271
+ )), (index)=>callback(...array.map((element)=>element[index]
271
272
  ))
272
273
  )
273
274
  ;
@@ -294,6 +295,14 @@ function getNumberOrUndefined(value) {
294
295
  }
295
296
  return data.every(Array.isArray);
296
297
  }
298
+ /**
299
+ * Loop over array.
300
+ */ function each(list, callback) {
301
+ let reverse = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
302
+ let index = 0;
303
+ list[reverse ? "reduceRight" : "reduce"]((_, item, itemIndex)=>callback(item, index++, itemIndex)
304
+ , void 0);
305
+ }
297
306
 
298
307
  /**
299
308
  * Get meta data of a specific value in a series.
@@ -398,22 +407,25 @@ function normalizeData(data) {
398
407
  let reverse = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, multi = arguments.length > 2 ? arguments[2] : void 0, distributed = arguments.length > 3 ? arguments[3] : void 0;
399
408
  let labelCount;
400
409
  const normalized = {
401
- labels: [],
410
+ labels: (data.labels || []).slice(),
402
411
  series: normalizeSeries(data.series, multi, distributed)
403
412
  };
413
+ const inputLabelCount = normalized.labels.length;
404
414
  // If all elements of the normalized data array are arrays we're dealing with
405
415
  // multi series data and we need to find the largest series if they are un-even
406
416
  if (isArrayOfArrays(normalized.series)) {
407
417
  // Getting the series with the the most elements
408
- labelCount = Math.max(...normalized.series.map((series)=>series.length
418
+ labelCount = Math.max(inputLabelCount, ...normalized.series.map((series)=>series.length
409
419
  ));
420
+ normalized.series.forEach((series)=>{
421
+ series.push(...times(Math.max(0, labelCount - series.length)));
422
+ });
410
423
  } else {
411
424
  // We're dealing with Pie data so we just take the normalized array length
412
425
  labelCount = normalized.series.length;
413
426
  }
414
- normalized.labels = (data.labels || []).slice();
415
427
  // Padding the labels to labelCount with empty strings
416
- normalized.labels.push(...times(Math.max(0, labelCount - normalized.labels.length)).map(()=>""
428
+ normalized.labels.push(...times(Math.max(0, labelCount - inputLabelCount), ()=>""
417
429
  ));
418
430
  if (reverse) {
419
431
  reverseData(normalized);
@@ -1608,7 +1620,7 @@ class SvgPath {
1608
1620
  * @return The current path object for easy call chaining.
1609
1621
  */ parse(path) {
1610
1622
  // Parsing the SVG path string into an array of arrays [['M', '10', '10'], ['L', '100', '100']]
1611
- const chunks = path.replace(/([A-Za-z])([0-9])/g, "$1 $2").replace(/([0-9])([A-Za-z])/g, "$1 $2").split(/[\s,]+/).reduce((result, pathElement)=>{
1623
+ const chunks = path.replace(/([A-Za-z])(-?[0-9])/g, "$1 $2").replace(/([0-9])([A-Za-z])/g, "$1 $2").split(/[\s,]+/).reduce((result, pathElement)=>{
1612
1624
  if (pathElement.match(/[A-Za-z]/)) {
1613
1625
  result.push([]);
1614
1626
  }
@@ -1740,6 +1752,7 @@ class SvgPath {
1740
1752
  * This interpolation function does not smooth the path and the result is only containing lines and no curves.
1741
1753
  *
1742
1754
  * @example
1755
+ * ```ts
1743
1756
  * const chart = new LineChart('.ct-chart', {
1744
1757
  * labels: [1, 2, 3, 4, 5],
1745
1758
  * series: [[1, 2, 8, 1, 7]]
@@ -1748,6 +1761,7 @@ class SvgPath {
1748
1761
  * fillHoles: false
1749
1762
  * })
1750
1763
  * });
1764
+ * ```
1751
1765
  */ function none(options) {
1752
1766
  const finalOptions = {
1753
1767
  fillHoles: false,
@@ -1783,6 +1797,7 @@ class SvgPath {
1783
1797
  * All smoothing functions within Chartist are factory functions that accept an options parameter. The simple interpolation function accepts one configuration parameter `divisor`, between 1 and ∞, which controls the smoothing characteristics.
1784
1798
  *
1785
1799
  * @example
1800
+ * ```ts
1786
1801
  * const chart = new LineChart('.ct-chart', {
1787
1802
  * labels: [1, 2, 3, 4, 5],
1788
1803
  * series: [[1, 2, 8, 1, 7]]
@@ -1792,6 +1807,7 @@ class SvgPath {
1792
1807
  * fillHoles: false
1793
1808
  * })
1794
1809
  * });
1810
+ * ```
1795
1811
  *
1796
1812
  * @param options The options of the simple interpolation factory function.
1797
1813
  */ function simple(options) {
@@ -1835,7 +1851,8 @@ class SvgPath {
1835
1851
  * All smoothing functions within Chartist are factory functions that accept an options parameter. The step interpolation function accepts one configuration parameter `postpone`, that can be `true` or `false`. The default value is `true` and will cause the step to occur where the value actually changes. If a different behaviour is needed where the step is shifted to the left and happens before the actual value, this option can be set to `false`.
1836
1852
  *
1837
1853
  * @example
1838
- * var chart = new Chartist.Line('.ct-chart', {
1854
+ * ```ts
1855
+ * const chart = new Chartist.Line('.ct-chart', {
1839
1856
  * labels: [1, 2, 3, 4, 5],
1840
1857
  * series: [[1, 2, 8, 1, 7]]
1841
1858
  * }, {
@@ -1844,6 +1861,7 @@ class SvgPath {
1844
1861
  * fillHoles: false
1845
1862
  * })
1846
1863
  * });
1864
+ * ```
1847
1865
  */ function step(options) {
1848
1866
  const finalOptions = {
1849
1867
  postpone: true,
@@ -1894,6 +1912,7 @@ class SvgPath {
1894
1912
  * All smoothing functions within Chartist are factory functions that accept an options parameter. The cardinal interpolation function accepts one configuration parameter `tension`, between 0 and 1, which controls the smoothing intensity.
1895
1913
  *
1896
1914
  * @example
1915
+ * ```ts
1897
1916
  * const chart = new LineChart('.ct-chart', {
1898
1917
  * labels: [1, 2, 3, 4, 5],
1899
1918
  * series: [[1, 2, 8, 1, 7]]
@@ -1903,6 +1922,7 @@ class SvgPath {
1903
1922
  * fillHoles: false
1904
1923
  * })
1905
1924
  * });
1925
+ * ```
1906
1926
  *
1907
1927
  * @param options The options of the cardinal factory function.
1908
1928
  */ function cardinal(options) {
@@ -1986,6 +2006,7 @@ class SvgPath {
1986
2006
  * All smoothing functions within Chartist are factory functions that accept an options parameter.
1987
2007
  *
1988
2008
  * @example
2009
+ * ```ts
1989
2010
  * const chart = new LineChart('.ct-chart', {
1990
2011
  * labels: [1, 2, 3, 4, 5],
1991
2012
  * series: [[1, 2, 8, 1, 7]]
@@ -1994,6 +2015,7 @@ class SvgPath {
1994
2015
  * fillHoles: false
1995
2016
  * })
1996
2017
  * });
2018
+ * ```
1997
2019
  *
1998
2020
  * @param options The options of the monotoneCubic factory function.
1999
2021
  */ function monotoneCubic(options) {
@@ -2377,7 +2399,7 @@ class FixedScaleAxis extends Axis {
2377
2399
  constructor(axisUnit, data, chartRect, options){
2378
2400
  const highLow = options.highLow || getHighLow(data, options, axisUnit.pos);
2379
2401
  const divisor = options.divisor || 1;
2380
- const ticks = (options.ticks || times(divisor).map((_value, index)=>highLow.low + (highLow.high - highLow.low) / divisor * index
2402
+ const ticks = (options.ticks || times(divisor, (index)=>highLow.low + (highLow.high - highLow.low) / divisor * index
2381
2403
  )).sort((a, b)=>Number(a) - Number(b)
2382
2404
  );
2383
2405
  const range = {
@@ -2551,7 +2573,7 @@ class LineChart extends BaseChart {
2551
2573
  createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
2552
2574
  }
2553
2575
  // Draw the series
2554
- data.series.forEach((series, seriesIndex)=>{
2576
+ each(data.series, (series, seriesIndex)=>{
2555
2577
  const seriesElement = seriesGroup.elem("g");
2556
2578
  const seriesName = safeHasProperty(series, "name") && series.name;
2557
2579
  const seriesClassName = safeHasProperty(series, "className") && series.className;
@@ -2711,7 +2733,7 @@ class LineChart extends BaseChart {
2711
2733
  });
2712
2734
  });
2713
2735
  }
2714
- });
2736
+ }, options.reverseData);
2715
2737
  this.eventEmitter.emit("created", {
2716
2738
  chartRect,
2717
2739
  axisX,
@@ -2729,6 +2751,7 @@ class LineChart extends BaseChart {
2729
2751
  * @return An object which exposes the API for the created chart
2730
2752
  *
2731
2753
  * @example
2754
+ * ```ts
2732
2755
  * // Create a simple line chart
2733
2756
  * const data = {
2734
2757
  * // A labels array that can contain any sort of values
@@ -2747,8 +2770,10 @@ class LineChart extends BaseChart {
2747
2770
  *
2748
2771
  * // In the global name space Chartist we call the Line function to initialize a line chart. As a first parameter we pass in a selector where we would like to get our chart created. Second parameter is the actual data object and as a third parameter we pass in our options
2749
2772
  * new LineChart('.ct-chart', data, options);
2773
+ * ```
2750
2774
  *
2751
2775
  * @example
2776
+ * ```ts
2752
2777
  * // Use specific interpolation function with configuration from the Chartist.Interpolation module
2753
2778
  *
2754
2779
  * const chart = new LineChart('.ct-chart', {
@@ -2761,8 +2786,10 @@ class LineChart extends BaseChart {
2761
2786
  * tension: 0.2
2762
2787
  * })
2763
2788
  * });
2789
+ * ```
2764
2790
  *
2765
2791
  * @example
2792
+ * ```ts
2766
2793
  * // Create a line chart with responsive options
2767
2794
  *
2768
2795
  * const data = {
@@ -2797,7 +2824,7 @@ class LineChart extends BaseChart {
2797
2824
  * ];
2798
2825
  *
2799
2826
  * new LineChart('.ct-chart', data, null, responsiveOptions);
2800
- *
2827
+ * ```
2801
2828
  */ constructor(query, data, options, responsiveOptions){
2802
2829
  super(query, data, defaultOptions$2, extend({}, defaultOptions$2, options), responsiveOptions);
2803
2830
  this.data = data;
@@ -3006,7 +3033,7 @@ class BarChart extends BaseChart {
3006
3033
  createGridBackground(gridGroup, chartRect, options.classNames.gridBackground, this.eventEmitter);
3007
3034
  }
3008
3035
  // Draw the series
3009
- data.series.forEach((series, seriesIndex)=>{
3036
+ each(data.series, (series, seriesIndex)=>{
3010
3037
  // Calculating bi-polar value of index for seriesOffset. For i = 0..4 biPol will be -1.5, -0.5, 0.5, 1.5 etc.
3011
3038
  const biPol = seriesIndex - (data.series.length - 1) / 2;
3012
3039
  // Half of the period width between vertical grid lines used to position bars
@@ -3138,7 +3165,7 @@ class BarChart extends BaseChart {
3138
3165
  ...positions
3139
3166
  });
3140
3167
  });
3141
- });
3168
+ }, options.reverseData);
3142
3169
  this.eventEmitter.emit("created", {
3143
3170
  chartRect,
3144
3171
  axisX,
@@ -3156,6 +3183,7 @@ class BarChart extends BaseChart {
3156
3183
  * @return An object which exposes the API for the created chart
3157
3184
  *
3158
3185
  * @example
3186
+ * ```ts
3159
3187
  * // Create a simple bar chart
3160
3188
  * const data = {
3161
3189
  * labels: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri'],
@@ -3166,8 +3194,10 @@ class BarChart extends BaseChart {
3166
3194
  *
3167
3195
  * // In the global name space Chartist we call the Bar function to initialize a bar chart. As a first parameter we pass in a selector where we would like to get our chart created and as a second parameter we pass our data object.
3168
3196
  * new BarChart('.ct-chart', data);
3197
+ * ```
3169
3198
  *
3170
3199
  * @example
3200
+ * ```ts
3171
3201
  * // This example creates a bipolar grouped bar chart where the boundaries are limitted to -10 and 10
3172
3202
  * new BarChart('.ct-chart', {
3173
3203
  * labels: [1, 2, 3, 4, 5, 6, 7],
@@ -3180,7 +3210,7 @@ class BarChart extends BaseChart {
3180
3210
  * low: -10,
3181
3211
  * high: 10
3182
3212
  * });
3183
- *
3213
+ * ```
3184
3214
  */ constructor(query, data, options, responsiveOptions){
3185
3215
  super(query, data, defaultOptions$1, extend({}, defaultOptions$1, options), responsiveOptions);
3186
3216
  this.data = data;
@@ -3224,8 +3254,6 @@ class BarChart extends BaseChart {
3224
3254
  labelInterpolationFnc: noop,
3225
3255
  // Label direction can be 'neutral', 'explode' or 'implode'. The labels anchor will be positioned based on those settings as well as the fact if the labels are on the right or left side of the center of the chart. Usually explode is useful when labels are positioned far away from the center.
3226
3256
  labelDirection: "neutral",
3227
- // If true the whole data is reversed including labels, the series order as well as the whole series data arrays.
3228
- reverseData: false,
3229
3257
  // If true empty values will be ignored to avoid drawing unnecessary slices and labels
3230
3258
  ignoreEmptyValues: false
3231
3259
  };
@@ -3431,20 +3459,25 @@ class PieChart extends BaseChart {
3431
3459
  * @param responsiveOptions Specify an array of responsive option arrays which are a media query and options object pair => [[mediaQueryString, optionsObject],[more...]]
3432
3460
  *
3433
3461
  * @example
3462
+ * ```ts
3434
3463
  * // Simple pie chart example with four series
3435
3464
  * new PieChart('.ct-chart', {
3436
3465
  * series: [10, 2, 4, 3]
3437
3466
  * });
3467
+ * ```
3438
3468
  *
3439
3469
  * @example
3470
+ * ```ts
3440
3471
  * // Drawing a donut chart
3441
3472
  * new PieChart('.ct-chart', {
3442
3473
  * series: [10, 2, 4, 3]
3443
3474
  * }, {
3444
3475
  * donut: true
3445
3476
  * });
3477
+ * ```
3446
3478
  *
3447
3479
  * @example
3480
+ * ```ts
3448
3481
  * // Using donut, startAngle and total to draw a gauge chart
3449
3482
  * new PieChart('.ct-chart', {
3450
3483
  * series: [20, 10, 30, 40]
@@ -3454,8 +3487,10 @@ class PieChart extends BaseChart {
3454
3487
  * startAngle: 270,
3455
3488
  * total: 200
3456
3489
  * });
3490
+ * ```
3457
3491
  *
3458
3492
  * @example
3493
+ * ```ts
3459
3494
  * // Drawing a pie chart with padding and labels that are outside the pie
3460
3495
  * new PieChart('.ct-chart', {
3461
3496
  * series: [20, 10, 30, 40]
@@ -3464,8 +3499,10 @@ class PieChart extends BaseChart {
3464
3499
  * labelOffset: 50,
3465
3500
  * labelDirection: 'explode'
3466
3501
  * });
3502
+ * ```
3467
3503
  *
3468
3504
  * @example
3505
+ * ```ts
3469
3506
  * // Overriding the class names for individual series as well as a name and meta data.
3470
3507
  * // The name will be written as ct:series-name attribute and the meta data will be serialized and written
3471
3508
  * // to a ct:meta attribute.
@@ -3487,11 +3524,12 @@ class PieChart extends BaseChart {
3487
3524
  * meta: 'Meta Three'
3488
3525
  * }]
3489
3526
  * });
3527
+ * ```
3490
3528
  */ constructor(query, data, options, responsiveOptions){
3491
3529
  super(query, data, defaultOptions, extend({}, defaultOptions, options), responsiveOptions);
3492
3530
  this.data = data;
3493
3531
  }
3494
3532
  }
3495
3533
 
3496
- export { AutoScaleAxis, Axis, BarChart, BaseChart, EPSILON, EventEmitter, FixedScaleAxis, index as Interpolation, LineChart, PieChart, StepAxis, Svg, SvgList, SvgPath, alphaNumerate, axisUnits, createChartRect, createGrid, createGridBackground, createLabel, createSvg, deserialize, determineAnchorPosition, easings, ensureUnit, escapingMap, extend, getBounds, getHighLow, getMetaData, getMultiValue, getNumberOrUndefined, getSeriesOption, isArrayOfArrays, isArrayOfSeries, isDataHoleValue, isFalseyButZero, isMultiValue, isNumeric, namespaces, noop, normalizeData, normalizePadding, optionsProvider, orderOfMagnitude, polarToCartesian, precision, projectLength, quantity, rho, roundWithPrecision, safeHasProperty, serialMap, serialize, splitIntoSegments, sum, times };
3534
+ export { AutoScaleAxis, Axis, BarChart, BaseChart, EPSILON, EventEmitter, FixedScaleAxis, index as Interpolation, LineChart, PieChart, StepAxis, Svg, SvgList, SvgPath, alphaNumerate, axisUnits, createChartRect, createGrid, createGridBackground, createLabel, createSvg, deserialize, determineAnchorPosition, each, easings, ensureUnit, escapingMap, extend, getBounds, getHighLow, getMetaData, getMultiValue, getNumberOrUndefined, getSeriesOption, isArrayOfArrays, isArrayOfSeries, isDataHoleValue, isFalseyButZero, isMultiValue, isNumeric, namespaces, noop, normalizeData, normalizePadding, optionsProvider, orderOfMagnitude, polarToCartesian, precision, projectLength, quantity, rho, roundWithPrecision, safeHasProperty, serialMap, serialize, splitIntoSegments, sum, times };
3497
3535
  //# sourceMappingURL=index.js.map