chartist 1.1.2 → 1.2.0

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 (38) hide show
  1. package/README.md +1 -1
  2. package/dist/_settings.scss +89 -0
  3. package/dist/axes/Axis.d.ts.map +1 -1
  4. package/dist/charts/BarChart/BarChart.d.ts +4 -1
  5. package/dist/charts/BarChart/BarChart.d.ts.map +1 -1
  6. package/dist/charts/BarChart/BarChart.types.d.ts +25 -0
  7. package/dist/charts/BarChart/BarChart.types.d.ts.map +1 -1
  8. package/dist/charts/LineChart/LineChart.d.ts +6 -1
  9. package/dist/charts/LineChart/LineChart.d.ts.map +1 -1
  10. package/dist/charts/LineChart/LineChart.types.d.ts +30 -0
  11. package/dist/charts/LineChart/LineChart.types.d.ts.map +1 -1
  12. package/dist/charts/PieChart/PieChart.d.ts +10 -0
  13. package/dist/charts/PieChart/PieChart.d.ts.map +1 -1
  14. package/dist/charts/PieChart/PieChart.types.d.ts +42 -0
  15. package/dist/charts/PieChart/PieChart.types.d.ts.map +1 -1
  16. package/dist/core/types.d.ts +61 -0
  17. package/dist/core/types.d.ts.map +1 -1
  18. package/dist/index.cjs +34 -6
  19. package/dist/index.cjs.map +1 -1
  20. package/dist/index.css +1 -1
  21. package/dist/index.css.map +1 -1
  22. package/dist/index.js +34 -6
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.scss +204 -0
  25. package/dist/index.umd.js +1 -1
  26. package/dist/index.umd.js.map +1 -1
  27. package/dist/interpolation/cardinal.d.ts +2 -0
  28. package/dist/interpolation/cardinal.d.ts.map +1 -1
  29. package/dist/interpolation/monotoneCubic.d.ts +2 -0
  30. package/dist/interpolation/monotoneCubic.d.ts.map +1 -1
  31. package/dist/interpolation/none.d.ts +2 -0
  32. package/dist/interpolation/none.d.ts.map +1 -1
  33. package/dist/interpolation/simple.d.ts +2 -0
  34. package/dist/interpolation/simple.d.ts.map +1 -1
  35. package/dist/interpolation/step.d.ts +3 -1
  36. package/dist/interpolation/step.d.ts.map +1 -1
  37. package/dist/utils/functional.d.ts +1 -1
  38. package/package.json +1 -1
@@ -12,6 +12,7 @@ export interface CardinalInterpolationOptions {
12
12
  * 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.
13
13
  *
14
14
  * @example
15
+ * ```ts
15
16
  * const chart = new LineChart('.ct-chart', {
16
17
  * labels: [1, 2, 3, 4, 5],
17
18
  * series: [[1, 2, 8, 1, 7]]
@@ -21,6 +22,7 @@ export interface CardinalInterpolationOptions {
21
22
  * fillHoles: false
22
23
  * })
23
24
  * });
25
+ * ```
24
26
  *
25
27
  * @param options The options of the cardinal factory function.
26
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"cardinal.d.ts","sourceRoot":"","sources":["../../src/interpolation/cardinal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,qBAW1C,MAAM,EAAE,aACd,WAAW,EAAE,KACvB,OAAO,CAsFX"}
1
+ {"version":3,"file":"cardinal.d.ts","sourceRoot":"","sources":["../../src/interpolation/cardinal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,MAAM,WAAW,4BAA4B;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,QAAQ,CAAC,OAAO,CAAC,EAAE,4BAA4B,qBAW1C,MAAM,EAAE,aACd,WAAW,EAAE,KACvB,OAAO,CAsFX"}
@@ -13,6 +13,7 @@ export interface MonotoneCubicInterpolationOptions {
13
13
  * All smoothing functions within Chartist are factory functions that accept an options parameter.
14
14
  *
15
15
  * @example
16
+ * ```ts
16
17
  * const chart = new LineChart('.ct-chart', {
17
18
  * labels: [1, 2, 3, 4, 5],
18
19
  * series: [[1, 2, 8, 1, 7]]
@@ -21,6 +22,7 @@ export interface MonotoneCubicInterpolationOptions {
21
22
  * fillHoles: false
22
23
  * })
23
24
  * });
25
+ * ```
24
26
  *
25
27
  * @param options The options of the monotoneCubic factory function.
26
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"monotoneCubic.d.ts","sourceRoot":"","sources":["../../src/interpolation/monotoneCubic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,MAAM,WAAW,iCAAiC;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,iCAAiC,qBAOpD,MAAM,EAAE,aACd,WAAW,EAAE,KACvB,OAAO,CAgGX"}
1
+ {"version":3,"file":"monotoneCubic.d.ts","sourceRoot":"","sources":["../../src/interpolation/monotoneCubic.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAGjC,MAAM,WAAW,iCAAiC;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,aAAa,CAAC,OAAO,CAAC,EAAE,iCAAiC,qBAOpD,MAAM,EAAE,aACd,WAAW,EAAE,KACvB,OAAO,CAgGX"}
@@ -7,6 +7,7 @@ export interface NoneInterpolationOptions {
7
7
  * This interpolation function does not smooth the path and the result is only containing lines and no curves.
8
8
  *
9
9
  * @example
10
+ * ```ts
10
11
  * const chart = new LineChart('.ct-chart', {
11
12
  * labels: [1, 2, 3, 4, 5],
12
13
  * series: [[1, 2, 8, 1, 7]]
@@ -15,6 +16,7 @@ export interface NoneInterpolationOptions {
15
16
  * fillHoles: false
16
17
  * })
17
18
  * });
19
+ * ```
18
20
  */
19
21
  export declare function none(options?: NoneInterpolationOptions): (pathCoordinates: number[], valueData: SegmentData[]) => SvgPath;
20
22
  //# sourceMappingURL=none.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../src/interpolation/none.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,wBAAwB,qBAOlC,MAAM,EAAE,aACd,WAAW,EAAE,aAyB3B"}
1
+ {"version":3,"file":"none.d.ts","sourceRoot":"","sources":["../../src/interpolation/none.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,WAAW,wBAAwB;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,wBAAwB,qBAOlC,MAAM,EAAE,aACd,WAAW,EAAE,aAyB3B"}
@@ -12,6 +12,7 @@ export interface SimpleInteractionOptions {
12
12
  * 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.
13
13
  *
14
14
  * @example
15
+ * ```ts
15
16
  * const chart = new LineChart('.ct-chart', {
16
17
  * labels: [1, 2, 3, 4, 5],
17
18
  * series: [[1, 2, 8, 1, 7]]
@@ -21,6 +22,7 @@ export interface SimpleInteractionOptions {
21
22
  * fillHoles: false
22
23
  * })
23
24
  * });
25
+ * ```
24
26
  *
25
27
  * @param options The options of the simple interpolation factory function.
26
28
  */
@@ -1 +1 @@
1
- {"version":3,"file":"simple.d.ts","sourceRoot":"","sources":["../../src/interpolation/simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,wBAAwB,qBAUpC,MAAM,EAAE,aACd,WAAW,EAAE,aAwC3B"}
1
+ {"version":3,"file":"simple.d.ts","sourceRoot":"","sources":["../../src/interpolation/simple.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,WAAW,wBAAwB;IACvC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,MAAM,CAAC,OAAO,CAAC,EAAE,wBAAwB,qBAUpC,MAAM,EAAE,aACd,WAAW,EAAE,aAwC3B"}
@@ -10,7 +10,8 @@ export interface StepInterpolationOptions {
10
10
  * 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`.
11
11
  *
12
12
  * @example
13
- * var chart = new Chartist.Line('.ct-chart', {
13
+ * ```ts
14
+ * const chart = new Chartist.Line('.ct-chart', {
14
15
  * labels: [1, 2, 3, 4, 5],
15
16
  * series: [[1, 2, 8, 1, 7]]
16
17
  * }, {
@@ -19,6 +20,7 @@ export interface StepInterpolationOptions {
19
20
  * fillHoles: false
20
21
  * })
21
22
  * });
23
+ * ```
22
24
  */
23
25
  export declare function step(options?: StepInterpolationOptions): (pathCoordinates: number[], valueData: SegmentData[]) => SvgPath;
24
26
  //# sourceMappingURL=step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/interpolation/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,wBAAwB,qBAQlC,MAAM,EAAE,aACd,WAAW,EAAE,aAwC3B"}
1
+ {"version":3,"file":"step.d.ts","sourceRoot":"","sources":["../../src/interpolation/step.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAEjC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,IAAI,CAAC,OAAO,CAAC,EAAE,wBAAwB,qBAQlC,MAAM,EAAE,aACd,WAAW,EAAE,aAwC3B"}
@@ -17,7 +17,7 @@ export declare const sum: (previous: number, current: number) => number;
17
17
  *
18
18
  * For example:
19
19
  * @example
20
- * ```javascript
20
+ * ```ts
21
21
  * const data = [[1, 2], [3], []];
22
22
  * serialMap(data, cb);
23
23
  *
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "chartist",
3
3
  "type": "module",
4
- "version": "1.1.2",
4
+ "version": "1.2.0",
5
5
  "description": "Simple, responsive charts",
6
6
  "author": "Gion Kunz",
7
7
  "homepage": "https://chartist-js.github.io",