chartist 0.11.4 → 1.1.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 (124) hide show
  1. package/LICENSE-WTFPL +5 -5
  2. package/README.md +142 -32
  3. package/dist/axes/AutoScaleAxis.d.ts +12 -0
  4. package/dist/axes/AutoScaleAxis.d.ts.map +1 -0
  5. package/dist/axes/Axis.d.ts +40 -0
  6. package/dist/axes/Axis.d.ts.map +1 -0
  7. package/dist/axes/FixedScaleAxis.d.ts +11 -0
  8. package/dist/axes/FixedScaleAxis.d.ts.map +1 -0
  9. package/dist/axes/StepAxis.d.ts +9 -0
  10. package/dist/axes/StepAxis.d.ts.map +1 -0
  11. package/dist/axes/index.d.ts +6 -0
  12. package/dist/axes/index.d.ts.map +1 -0
  13. package/dist/axes/types.d.ts +5 -0
  14. package/dist/axes/types.d.ts.map +1 -0
  15. package/dist/charts/BarChart/BarChart.d.ts +47 -0
  16. package/dist/charts/BarChart/BarChart.d.ts.map +1 -0
  17. package/dist/charts/BarChart/BarChart.types.d.ts +40 -0
  18. package/dist/charts/BarChart/BarChart.types.d.ts.map +1 -0
  19. package/dist/charts/BarChart/index.d.ts +3 -0
  20. package/dist/charts/BarChart/index.d.ts.map +1 -0
  21. package/dist/charts/BaseChart.d.ts +47 -0
  22. package/dist/charts/BaseChart.d.ts.map +1 -0
  23. package/dist/charts/LineChart/LineChart.d.ts +92 -0
  24. package/dist/charts/LineChart/LineChart.d.ts.map +1 -0
  25. package/dist/charts/LineChart/LineChart.types.d.ts +53 -0
  26. package/dist/charts/LineChart/LineChart.types.d.ts.map +1 -0
  27. package/dist/charts/LineChart/index.d.ts +3 -0
  28. package/dist/charts/LineChart/index.d.ts.map +1 -0
  29. package/dist/charts/PieChart/PieChart.d.ts +83 -0
  30. package/dist/charts/PieChart/PieChart.d.ts.map +1 -0
  31. package/dist/charts/PieChart/PieChart.types.d.ts +53 -0
  32. package/dist/charts/PieChart/PieChart.types.d.ts.map +1 -0
  33. package/dist/charts/PieChart/index.d.ts +3 -0
  34. package/dist/charts/PieChart/index.d.ts.map +1 -0
  35. package/dist/charts/index.d.ts +6 -0
  36. package/dist/charts/index.d.ts.map +1 -0
  37. package/dist/charts/types.d.ts +11 -0
  38. package/dist/charts/types.d.ts.map +1 -0
  39. package/dist/core/constants.d.ts +13 -0
  40. package/dist/core/constants.d.ts.map +1 -0
  41. package/dist/core/creation.d.ts +61 -0
  42. package/dist/core/creation.d.ts.map +1 -0
  43. package/dist/core/data/bounds.d.ts +14 -0
  44. package/dist/core/data/bounds.d.ts.map +1 -0
  45. package/dist/core/data/data.d.ts +23 -0
  46. package/dist/core/data/data.d.ts.map +1 -0
  47. package/dist/core/data/highLow.d.ts +13 -0
  48. package/dist/core/data/highLow.d.ts.map +1 -0
  49. package/dist/core/data/index.d.ts +7 -0
  50. package/dist/core/data/index.d.ts.map +1 -0
  51. package/dist/core/data/normalize.d.ts +11 -0
  52. package/dist/core/data/normalize.d.ts.map +1 -0
  53. package/dist/core/data/segments.d.ts +29 -0
  54. package/dist/core/data/segments.d.ts.map +1 -0
  55. package/dist/core/data/serialize.d.ts +12 -0
  56. package/dist/core/data/serialize.d.ts.map +1 -0
  57. package/dist/core/index.d.ts +8 -0
  58. package/dist/core/index.d.ts.map +1 -0
  59. package/dist/core/lang.d.ts +23 -0
  60. package/dist/core/lang.d.ts.map +1 -0
  61. package/dist/core/math.d.ts +42 -0
  62. package/dist/core/math.d.ts.map +1 -0
  63. package/dist/core/optionsProvider.d.ts +15 -0
  64. package/dist/core/optionsProvider.d.ts.map +1 -0
  65. package/dist/core/types.d.ts +205 -0
  66. package/dist/core/types.d.ts.map +1 -0
  67. package/dist/event/EventEmitter.d.ts +27 -0
  68. package/dist/event/EventEmitter.d.ts.map +1 -0
  69. package/dist/event/index.d.ts +2 -0
  70. package/dist/event/index.d.ts.map +1 -0
  71. package/dist/index.cjs +3557 -0
  72. package/dist/index.cjs.map +1 -0
  73. package/dist/index.css +2 -0
  74. package/dist/index.css.map +1 -0
  75. package/dist/index.d.ts +8 -0
  76. package/dist/index.d.ts.map +1 -0
  77. package/dist/index.js +3497 -0
  78. package/dist/index.js.map +1 -0
  79. package/dist/index.umd.js +2 -0
  80. package/dist/index.umd.js.map +1 -0
  81. package/dist/interpolation/cardinal.d.ts +28 -0
  82. package/dist/interpolation/cardinal.d.ts.map +1 -0
  83. package/dist/interpolation/index.d.ts +6 -0
  84. package/dist/interpolation/index.d.ts.map +1 -0
  85. package/dist/interpolation/monotoneCubic.d.ts +28 -0
  86. package/dist/interpolation/monotoneCubic.d.ts.map +1 -0
  87. package/dist/interpolation/none.d.ts +20 -0
  88. package/dist/interpolation/none.d.ts.map +1 -0
  89. package/dist/interpolation/simple.d.ts +28 -0
  90. package/dist/interpolation/simple.d.ts.map +1 -0
  91. package/dist/interpolation/step.d.ts +24 -0
  92. package/dist/interpolation/step.d.ts.map +1 -0
  93. package/dist/svg/Svg.d.ts +201 -0
  94. package/dist/svg/Svg.d.ts.map +1 -0
  95. package/dist/svg/SvgList.d.ts +31 -0
  96. package/dist/svg/SvgList.d.ts.map +1 -0
  97. package/dist/svg/SvgPath.d.ts +125 -0
  98. package/dist/svg/SvgPath.d.ts.map +1 -0
  99. package/dist/svg/animation.d.ts +37 -0
  100. package/dist/svg/animation.d.ts.map +1 -0
  101. package/dist/svg/index.d.ts +6 -0
  102. package/dist/svg/index.d.ts.map +1 -0
  103. package/dist/svg/types.d.ts +54 -0
  104. package/dist/svg/types.d.ts.map +1 -0
  105. package/dist/utils/extend.d.ts +10 -0
  106. package/dist/utils/extend.d.ts.map +1 -0
  107. package/dist/utils/functional.d.ts +30 -0
  108. package/dist/utils/functional.d.ts.map +1 -0
  109. package/dist/utils/index.d.ts +5 -0
  110. package/dist/utils/index.d.ts.map +1 -0
  111. package/dist/utils/types.d.ts +7 -0
  112. package/dist/utils/types.d.ts.map +1 -0
  113. package/dist/utils/utils.d.ts +27 -0
  114. package/dist/utils/utils.d.ts.map +1 -0
  115. package/package.json +39 -76
  116. package/CHANGELOG.md +0 -232
  117. package/dist/chartist.css +0 -615
  118. package/dist/chartist.css.map +0 -10
  119. package/dist/chartist.js +0 -4516
  120. package/dist/chartist.min.css +0 -1
  121. package/dist/chartist.min.js +0 -10
  122. package/dist/chartist.min.js.map +0 -1
  123. package/dist/scss/chartist.scss +0 -241
  124. package/dist/scss/settings/_chartist-settings.scss +0 -88
@@ -0,0 +1,54 @@
1
+ import type { SegmentData } from '../core';
2
+ import type { easings } from './animation';
3
+ import type { Svg } from './Svg';
4
+ export interface BasePathParams {
5
+ x: number;
6
+ y: number;
7
+ }
8
+ export declare type MoveParams = BasePathParams;
9
+ export declare type LineParams = BasePathParams;
10
+ export interface CurveParams extends BasePathParams {
11
+ x1: number;
12
+ y1: number;
13
+ x2: number;
14
+ y2: number;
15
+ }
16
+ export interface ArcParams extends BasePathParams {
17
+ rx: number;
18
+ ry: number;
19
+ xAr: number;
20
+ lAf: number;
21
+ sf: number;
22
+ }
23
+ export declare type PathParams = MoveParams | LineParams | CurveParams | ArcParams;
24
+ export declare type PathCommand<T extends PathParams = PathParams> = {
25
+ command: string;
26
+ data?: SegmentData;
27
+ } & T;
28
+ export interface SvgPathOptions {
29
+ accuracy?: number;
30
+ }
31
+ export declare type Attributes = Record<string, number | string | undefined | null>;
32
+ export interface AnimationDefinition {
33
+ easing?: number[] | keyof typeof easings;
34
+ calcMode?: 'discrete' | 'linear' | 'paced' | 'spline';
35
+ restart?: 'always' | 'whenNotActive' | 'never';
36
+ repeatCount?: number | 'indefinite';
37
+ repeatDur?: string | 'indefinite';
38
+ keySplines?: string;
39
+ keyTimes?: string;
40
+ fill?: string;
41
+ min?: number | string;
42
+ max?: number | string;
43
+ begin?: number | string;
44
+ end?: number | string;
45
+ dur: number | string;
46
+ from: number | string;
47
+ to: number | string;
48
+ }
49
+ export interface AnimationEvent {
50
+ element: Svg;
51
+ animate: Element;
52
+ params: AnimationDefinition;
53
+ }
54
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/svg/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC,MAAM,WAAW,cAAc;IAC7B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,oBAAY,UAAU,GAAG,cAAc,CAAC;AAExC,oBAAY,UAAU,GAAG,cAAc,CAAC;AAExC,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,SAAU,SAAQ,cAAc;IAC/C,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,oBAAY,UAAU,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,GAAG,SAAS,CAAC;AAE3E,oBAAY,WAAW,CAAC,CAAC,SAAS,UAAU,GAAG,UAAU,IAAI;IAC3D,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,WAAW,CAAC;CACpB,GAAG,CAAC,CAAC;AAEN,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,oBAAY,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,IAAI,CAAC,CAAC;AAE5E,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,OAAO,OAAO,CAAC;IACzC,QAAQ,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAC;IACtD,OAAO,CAAC,EAAE,QAAQ,GAAG,eAAe,GAAG,OAAO,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,GAAG,MAAM,CAAC;IACtB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,GAAG,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,mBAAmB,CAAC;CAC7B"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Simple recursive object extend
3
+ * @param target Target object where the source will be merged into
4
+ * @param sources This object (objects) will be merged into target and then target is returned
5
+ * @return An object that has the same reference as target but is extended and merged with the properties of source
6
+ */
7
+ export declare function extend<T>(target: T): T;
8
+ export declare function extend<T, A>(target: T, a: A): T & A;
9
+ export declare function extend<T, A, B>(target: T, a: A, b: B): T & A & B;
10
+ //# sourceMappingURL=extend.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extend.d.ts","sourceRoot":"","sources":["../../src/utils/extend.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,wBAAgB,MAAM,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;AACxC,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACrD,wBAAgB,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Helps to simplify functional style code
3
+ * @param n This exact value will be returned by the noop function
4
+ * @return The same value that was provided to the n parameter
5
+ */
6
+ export declare const noop: <T>(n: T) => T;
7
+ /**
8
+ * Functional style helper to produce array with given length initialized with undefined values
9
+ */
10
+ export declare const times: <T = unknown>(length: number) => T[];
11
+ /**
12
+ * Sum helper to be used in reduce functions
13
+ */
14
+ export declare const sum: (previous: number, current: number) => number;
15
+ /**
16
+ * Map for multi dimensional arrays where their nested arrays will be mapped in serial. The output array will have the length of the largest nested array. The callback function is called with variable arguments where each argument is the nested array value (or undefined if there are no more values).
17
+ *
18
+ * For example:
19
+ * @example
20
+ * ```javascript
21
+ * const data = [[1, 2], [3], []];
22
+ * serialMap(data, cb);
23
+ *
24
+ * // where cb will be called 2 times
25
+ * // 1. call arguments: (1, 3, undefined)
26
+ * // 2. call arguments: (2, undefined, undefined)
27
+ * ```
28
+ */
29
+ export declare const serialMap: <T, K>(array: T[][], callback: (...args: T[]) => K) => K[];
30
+ //# sourceMappingURL=functional.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"functional.d.ts","sourceRoot":"","sources":["../../src/utils/functional.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,IAAI,gBAAiB,CAAC;AAEnC;;GAEG;AACH,eAAO,MAAM,KAAK,wBAAyB,MAAM,QACzB,CAAC;AAEzB;;GAEG;AACH,eAAO,MAAM,GAAG,aAAc,MAAM,WAAW,MAAM,WACjB,CAAC;AAErC;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,SAAS,4DAGnB,CAAC"}
@@ -0,0 +1,5 @@
1
+ export * from './types';
2
+ export * from './extend';
3
+ export * from './functional';
4
+ export * from './utils';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare type FilterByKey<T, K extends string> = T extends Record<K, unknown> ? T : T extends Partial<Record<K, unknown>> ? T & {
2
+ [key in K]: T[K];
3
+ } : never;
4
+ export declare type RequiredKeys<T, K extends keyof T, V extends keyof T = never> = T & Required<Pick<T, K | V>> & {
5
+ [key in V]: Required<T[V]>;
6
+ };
7
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/utils/types.ts"],"names":[],"mappings":"AAAA,oBAAY,WAAW,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,IAAI,CAAC,SAAS,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,GACvE,CAAC,GACD,CAAC,SAAS,OAAO,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,GACrC,CAAC,GAAG;KAAG,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAE,GACxB,KAAK,CAAC;AAEV,oBAAY,YAAY,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,GAAG,KAAK,IAAI,CAAC,GAC3E,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG;KAAG,GAAG,IAAI,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;CAAE,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { FilterByKey } from './types';
2
+ /**
3
+ * This function safely checks if an objects has an owned property.
4
+ * @param target The object where to check for a property
5
+ * @param property The property name
6
+ * @returns Returns true if the object owns the specified property
7
+ */
8
+ export declare function safeHasProperty<T, K extends string>(target: T, property: K): target is FilterByKey<T, K>;
9
+ /**
10
+ * Checks if a value can be safely coerced to a number. This includes all values except null which result in finite numbers when coerced. This excludes NaN, since it's not finite.
11
+ */
12
+ export declare function isNumeric(value: number): true;
13
+ export declare function isNumeric(value: unknown): boolean;
14
+ /**
15
+ * Returns true on all falsey values except the numeric value 0.
16
+ */
17
+ export declare function isFalseyButZero(value: unknown): value is undefined | null | false | '';
18
+ /**
19
+ * Returns a number if the passed parameter is a valid number or the function will return undefined. On all other values than a valid number, this function will return undefined.
20
+ */
21
+ export declare function getNumberOrUndefined(value: number): number;
22
+ export declare function getNumberOrUndefined(value: unknown): number | undefined;
23
+ /**
24
+ * Checks if value is array of arrays or not.
25
+ */
26
+ export declare function isArrayOfArrays(data: unknown): data is unknown[][];
27
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,EACjD,MAAM,EAAE,CAAC,EACT,QAAQ,EAAE,CAAC,GACV,MAAM,IAAI,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAS/B;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;AAC/C,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC;AAKnD;;GAEG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,OAAO,GACb,KAAK,IAAI,SAAS,GAAG,IAAI,GAAG,KAAK,GAAG,EAAE,CAExC;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;AAC5D,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAAC;AAKzE;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,OAAO,GAAG,IAAI,IAAI,OAAO,EAAE,EAAE,CAMlE"}
package/package.json CHANGED
@@ -1,16 +1,27 @@
1
1
  {
2
2
  "name": "chartist",
3
- "title": "Chartist.js",
3
+ "type": "module",
4
+ "version": "1.1.1",
4
5
  "description": "Simple, responsive charts",
5
- "version": "0.11.4",
6
6
  "author": "Gion Kunz",
7
- "homepage": "https://gionkunz.github.io/chartist-js",
7
+ "homepage": "https://chartist-js.github.io",
8
+ "license": "MIT OR WTFPL",
9
+ "licenses": [
10
+ {
11
+ "type": "WTFPL",
12
+ "url": "https://github.com/chartist-js/chartist/blob/main/LICENSE-WTFPL"
13
+ },
14
+ {
15
+ "type": "MIT",
16
+ "url": "https://github.com/chartist-js/chartist/blob/main/LICENSE-MIT"
17
+ }
18
+ ],
8
19
  "repository": {
9
20
  "type": "git",
10
- "url": "https://github.com/gionkunz/chartist-js.git"
21
+ "url": "https://github.com/chartist-js/chartist.git"
11
22
  },
12
23
  "bugs": {
13
- "url": "https://github.com/gionkunz/chartist-js/issues"
24
+ "url": "https://github.com/chartist-js/chartist/issues"
14
25
  },
15
26
  "keywords": [
16
27
  "chartist",
@@ -18,79 +29,31 @@
18
29
  "charts",
19
30
  "charting"
20
31
  ],
32
+ "engines": {
33
+ "node": ">=14"
34
+ },
35
+ "sideEffects": [
36
+ "*.css",
37
+ "*.scss"
38
+ ],
39
+ "types": "./dist/index.d.ts",
40
+ "style": "./dist/index.css",
41
+ "unpkg": "./dist/index.umd.js",
42
+ "jsdelivr": "./dist/index.umd.js",
43
+ "main": "./dist/index.cjs",
44
+ "publishConfig": {
45
+ "directory": "package"
46
+ },
21
47
  "files": [
22
48
  "dist",
23
49
  "LICENSE-WTFPL",
24
- "LICENSE-MIT",
25
- "package.json",
26
- "README.md",
27
- "rescue-campaign.js"
50
+ "LICENSE-MIT"
28
51
  ],
29
- "style": "dist/chartist.min.css",
30
- "main": "dist/chartist.js",
31
- "browser": "dist/chartist.js",
32
- "license": "MIT OR WTFPL",
33
- "licenses": [
34
- {
35
- "type": "WTFPL",
36
- "url": "https://github.com/gionkunz/chartist-js/blob/master/LICENSE-WTFPL"
37
- },
38
- {
39
- "type": "MIT",
40
- "url": "https://github.com/gionkunz/chartist-js/blob/master/LICENSE-MIT"
41
- }
42
- ],
43
- "dependencies": {},
44
- "devDependencies": {
45
- "assemble-dox": "0.0.2",
46
- "grunt": "^1.0.1",
47
- "grunt-assemble": "^0.4.0",
48
- "grunt-concurrent": "^2.3.0",
49
- "grunt-contrib-clean": "^1.0.0",
50
- "grunt-contrib-concat": "^1.0.1",
51
- "grunt-contrib-connect": "^1.0.2",
52
- "grunt-contrib-copy": "^1.0.0",
53
- "grunt-contrib-cssmin": "^1.0.1",
54
- "grunt-contrib-htmlmin": "^1.4.0",
55
- "grunt-contrib-imagemin": "^1.0.0",
56
- "grunt-contrib-jasmine": "^1.0.3",
57
- "grunt-contrib-jshint": "^1.0.0",
58
- "grunt-contrib-uglify": "^1.0.1",
59
- "grunt-contrib-watch": "^1.0.0",
60
- "grunt-critical": "^0.2.1",
61
- "grunt-newer": "^1.1.0",
62
- "grunt-sass": "^1.1.0",
63
- "grunt-svgmin": "^3.2.0",
64
- "grunt-template": "^0.2.3",
65
- "grunt-umd": "^2.3.1",
66
- "grunt-usemin": "^3.1.1",
67
- "handlebars-helpers": "^0.6.1",
68
- "jasmine-jquery": "^2.1.1",
69
- "jquery": "^3.0.0",
70
- "jshint-stylish": "^2.2.0",
71
- "load-grunt-config": "^0.19.2",
72
- "lodash": "^4.13.1",
73
- "seed-random": "^2.2.0",
74
- "time-grunt": "^1.0.0"
75
- },
76
- "engines": {
77
- "node": ">=4.6.0"
78
- },
79
- "scripts": {
80
- "start": "./node_modules/.bin/grunt",
81
- "test": "./node_modules/.bin/grunt test",
82
- "dev": "./node_modules/.bin/grunt dev",
83
- "build": "./node_modules/.bin/grunt build",
84
- "preview": "./node_modules/.bin/grunt preview",
85
- "public": "./node_modules/.bin/grunt public"
52
+ "readme": "",
53
+ "exports": {
54
+ "require": "./dist/index.cjs",
55
+ "import": "./dist/index.js"
86
56
  },
87
- "config": {
88
- "banner": "/* Chartist.js <%= pkg.version %>\n * Copyright © <%= year %> Gion Kunz\n * Free to use under either the WTFPL license or the MIT license.\n * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-WTFPL\n * https://raw.githubusercontent.com/gionkunz/chartist-js/master/LICENSE-MIT\n */\n",
89
- "src": "src",
90
- "dist": "dist",
91
- "site": "site",
92
- "tmp": ".tmp",
93
- "public": ".public",
94
- "test": "test"
95
- }
96
- }
57
+ "module": "./dist/index.js",
58
+ "scripts": {}
59
+ }
package/CHANGELOG.md DELETED
@@ -1,232 +0,0 @@
1
- v0.11.0 - 11 Apr 2017
2
- - Added CSP compatibility by using CSSOM instead of style attributes (Francisco Silva)
3
- - Added feature to render pie / donut chart as solid shape, allowing outlines (Sergey Kovalyov, Chris Carson)
4
- - Fixed XMLNS for foreignObjet content (Alfredo Matos)
5
-
6
- v0.10.0 - 23 Oct 2016
7
- ---------------------
8
-
9
- - Added dominant-baseline styles for pie and donut charts (Gion Kunz)
10
- - Added public getNode on SVG api (Gion Kunz)
11
- - Added support for bar charts to have auto narrowing on AutoScaleAxis by overriding referenceValue (Jonathan Dumaine)
12
- - Added amdModuleId for better integration into webpack (Chris)
13
- - Added grid background to line and bar chart (hansmaad)
14
- - Added new LTS node version and included NPM run scripts (Gion Kunz)
15
- - Added correct meta data emission in events (Gion Kunz)
16
- - Fixed rounding issues where raw value was added instead of rounded (Gion Kunz)
17
- - Fixed step axis issue with axis stretch and series count 0 (Gion Kunz)
18
- - Fixed label position of single series pie / donut charts to be centered (Gion Kunz)
19
- - Fixed order or drawing pie and donut slices (Gion Kunz)
20
- - Fixed calculations of stepLength to only stretch ticksLength if > 1 (Alexander van Eck)
21
- - Fixed better handling of axisOptions.position and fallback to 'end' position (Alexander van Eck)
22
- - Fixed handling of holes in interpolation for multi-value series (James Watmuff)
23
- - Fixed function StepAxis() returning NaN (Joao Milton)
24
- - Fixed NaN issues in SVG when rendering Pie chart with only 0s (Alexander van Eck)
25
- - Fixed infinite loop in getBounds with a more robust increment (hansmaad)
26
- - Fixed performance of Chartist.extend (cheese83)
27
- - Fixed license reference issues in package.json (Jacob Quant)
28
- - Cleanup of data normalization changes and allows Date objects and booleans as values (Gion Kunz)
29
- - Cleanup refactoring for data management and normalization (Gion Kunz)
30
-
31
- v0.9.8 - 22 Jun 2016
32
- --------------------
33
- - Added monotone cubic interpolation which is now the default interpolation for line charts (James Watmuff)
34
- - Update zoom plugin to 0.2.1 (hansmaad)
35
- - Bugfix: Prevent infinite loop in getBounds if bounds.valueRange is very small, fixes #643 (hansmaad)
36
- - Bugfix: Correct update events during media changes (Rory Hunter)
37
- - Bugfix: prevent negative value for foreignObject width attribute (Jose Ignacio)
38
- - Fixed example line chart in getting started documentation (Robin Edbom)
39
- - Updated development pipeline dependencies (Gion Kunz)
40
- - Updated chartist tooltip plugin and example styles (Gion Kunz)
41
- - Fixed WTFPL License issue (Gion Kunz)
42
-
43
- v0.9.7 - 23 Feb 2016
44
- --------------------
45
- - Fixed bug with label and grid rendering on axis, fixes #621
46
-
47
- v0.9.6 - 22 Feb 2016
48
- --------------------
49
- - Added dual licensing WTFPL and MIT, built new version (Gion Kunz)
50
- - Adding unminified CSS to dist output, fixes #506 (Gion Kunz)
51
- - Refactored namespaced attribute handling, fixes #584 (Gion Kunz)
52
- - Allow charts to be created without data and labels, fixes #598, fixes #588, fixes #537, fixes #425 (Gion Kunz> <Carlos Morales)
53
- - Removed onlyInteger setting from default bar chart settings, fixes #423 (Gion Kunz)
54
- - Removed serialization of values on line chart areas, fixes #424 (Gion Kunz)
55
- - Removed workaround and fallback for SVG element width and height calculations, fixes #592 (Gion Kunz)
56
- - Render 0 in ct:value attribute for line graphs (Paul Salaets)
57
- - Allow empty pie chart values to be ignored (Stephen)
58
- - Fix #527 Pie render issue with small angles. (hansmaad)
59
- - Small fix for stacked bars with 'holes' in the data (medzes)
60
-
61
- v0.9.5 - 14 Nov 2015
62
- --------------------
63
- - Added 'fillHoles' option for line graphs, which continues the line smoothly through data holes (Thanks to Joshua Warner !)
64
- - Added option to use relative donut width values (Thanks to hansmaad !)
65
- - Added stackMode for bar charts to create overlapping charts or bipolar stacked charts (Thanks to Douglas Mak !)
66
- - Fixed issue with unordered ticks in fixed scale axis, fixes #411 (Thanks Carlos !)
67
- - Fixed left navigation in examples was not using valid anchors, fixes #514 (Thanks Carlos !)
68
- - Internal refactoring and cleanup (Thanks to hansmaad !)
69
-
70
- v0.9.4 - 06 Aug 2015
71
- --------------------
72
- - Added axes to all events where they are available in context to provide better API convenience when developing plugins
73
- - Consider additional parameters of SVG elem when called with DOM node
74
-
75
- v0.9.3 - 05 Aug 2015
76
- --------------------
77
- - Added better check for undefined values in bar chart, fixes #400
78
- - Fixed issue with SVG feature check within Svg module (Thanks to Markus Gruber !)
79
-
80
- v0.9.2 - 02 Aug 2015
81
- --------------------
82
- - Enabled bar charts to use dynamic axes fixes #363, fixes #355
83
- - Added axis title plugin to plugins page (Thanks to @alexstanbury !)
84
- - Added a label group for Pie charts to prevent occlusion by slices (Thanks to Anthony Jimenez!)
85
- - Added better handling for multi values when writing custom attributes, fixes #379
86
-
87
- v0.9.1 - 24 Jun 2015
88
- --------------------
89
- - Fixed bug with areaBase narrowing process in area charts, fixes #364
90
- - Fixed bug on bar chart where wrong offset was used (axis offset), fixes #347 (Thanks to @amsardesai !)
91
- - Fixed bug with namespace attributes that caused duplication of SVG element on updates in old browsers (Thanks to @radist2s !)
92
-
93
- v0.9.0 - 10 Jun 2015
94
- --------------------
95
- - Major refactoring of axis and projection code, added possibility to configure axes when creating a chart
96
- - Added areaBase to series options override in line chart, fixes #342
97
- - Throwing up in infinite loop for edge cases and during development
98
- - Documentation: Added documentation for axis configuration and getting started guide for custom axes
99
-
100
- v0.8.3 - 07 Jun 2015
101
- --------------------
102
- - Greatly reduced CSS selector complexity and split slice into slice-pie and slice-donut
103
- - Added more robust detach mechanism that takes async initialization into account
104
- - Added better handling for area drawing with segmented paths, fixes #340
105
- - Documentation: Added getting started guide for styling charts
106
-
107
- v0.8.2 - 02 Jun 2015
108
- --------------------
109
- - Fixed broken release 0.8.1
110
-
111
- v0.8.1 - 02 Jun 2015 (BROKEN!)
112
- ------------------------------
113
- - Added new option labelPosition for Pie charts to have better control over label placement, fixes #315
114
- - Added default styles for alignment-baseline
115
- - Added better support for undefined values in bar charts
116
- - Refactored getHighLow to use recursion in order to enable more dynamic array structures and better edge case management
117
- - Fixed issue with Chartist.rho that caused endless loop when called with 1, fixes #318
118
-
119
- v0.8.0 - 10 May 2015
120
- --------------------
121
- - Added new option to bar charts to allow a series distribution and use a simple one dimensional array for data (#209)
122
- - Added option for label placement and refactored label positioning code (#302)
123
- - Added option to only use integer numbers in linear scale axis (#77)
124
- - Added possibility to add series configuration on line chart to override specific options on series level (#289, #168)
125
- - Added functionality to handle holes in line charts (#294)
126
- - Added step interpolation for line charts
127
- - Added default styles for bar and horizontal bar labels that make more sense (#303)
128
- - Added series data and meta information to events (#293)
129
- - Changed line chart behavior to draw points from interpolated values (#295)
130
- - Removed restriction to SVGElements so Chartist.Svg can be used for HTML DOM elements (#261)
131
- - Refactored and simplified axis creation, also includes updated CSS label handling
132
- - Refactored getDataArray for simplification and fixed type conversion issue with data arrays for pie charts
133
- - Centralized high/low calculations in getHighLow() method and added support for empty charts. Thanks @scthi !
134
- - Fixed bug in pie chart where meta was only added when series name was specified
135
- - Fixed bug where special condition to check single value should also include object value notation (#265)
136
- - Fixed bug with Chartist.extend when null property is extended
137
- - Fixed bug with Firefox dying with a DOM exception when calling getBBox() on an invisible node. Thanks @scthi !
138
- - Switched from object literal accessor definition to regular function (#278)
139
-
140
- v0.7.4 - 19 Apr 2015
141
- --------------------
142
- - Enhanced documentation site (Accessibility plugin, live example eval, fixed path to Sass settings, better HTML example of how to include Chartist, example how to include multiple charts on one page)
143
- - Added Arc to Chartist.Svg.Path
144
- - Refactored Chartist.Pie to make use of Svg.Path and expose path in events
145
- - Closing path of Pie if not a donut for correct strokes
146
- - Exposing axis objects in created event
147
- - Changed grid event to use axis object instead of string
148
-
149
- v0.7.3 - 27 Feb 2015
150
- --------------------
151
- - Fixed bugs in the chart.update method
152
- - Fixed rounding precision issues in order of magnitude calculation
153
- - Fixed bug in Chartist.extend which caused merge problems from object properties into non-objects
154
- - Added possibility to use chartPadding with a padding object that contains top, right, bottom and left properties
155
-
156
- v0.7.2 - 12 Feb 2015
157
- --------------------
158
- - Added new line smoothing / interpolation module for configurable line smoothing
159
- - Added simple line smoothing. Thanks @danieldiekmeier !
160
- - Removed some unused internal code
161
-
162
- v0.7.1 - 02 Feb 2015
163
- --------------------
164
- - Bug fix where some files where not included in dist version of Chartist which made v0.7.0 unusable.
165
-
166
- v0.7.0 - 01 Feb 2015
167
- --------------------
168
- - This version introduces a new option in the bar charts to draw them horizontally
169
- - Underlying changes for axis model that allows flexible value projection and removes code duplication
170
- - Added SVG Path API for manipulating SVG paths. This can be used in animations or to transform the output by Chartist further.
171
- - The fullWidth and centerBars options were removed from the bar chart
172
- - Updating chart after options update enables the use of 'print' media query in responsive options to have a quick redraw before printing. This only works in Chrome 40 so far
173
- - Fixed issues with 0 values in series object data notation
174
-
175
- v0.6.1 - 23 Jan 2015
176
- --------------------
177
- - Fixed bug that prevented data events to be captured
178
- - Fixed bug with update function called in the same call stack as chart constructor
179
-
180
- v0.6.0 - 17 Jan 2015
181
- --------------------
182
- - Added 14 default colors for colored series
183
- - Added data event that allows you to transform the data before it gets rendered in Chartist. This is also useful for plugin authors that would like to create plugins which modify data.
184
- - Possibility to specify meta data in the data object passed to Chartist that will be written to custom attributes into the DOM.
185
- - Possibility to specify options when calling chart.update in order to override the current options with new ones
186
- - Fixed some missing entries in the bower ignore section to exclude the documentation site as well as the grunt tasks
187
- - Fixed issue when Chartist is initialized in a container that already contains SVG
188
-
189
- v0.5.0 - 14 Dec 2014
190
- --------------------
191
- - Added new option for line and bar chart to use full width of the chart area by skipping the last grid line
192
- - Added new option for bar chart to create stacked bar charts
193
- - All chart update functions now accepts an optional data parameter that allows to update an existing chart with new data
194
- - Fix for an error when charts get re-constructed on the same element and in the same call stack
195
-
196
- v0.4.4 - 11 Dec 2014
197
- --------------------
198
- - Fixed NS_ERROR_FAILURE error in Firefox and added graceful handling of unsupported SMIL animations (i.e. in foreignObjects)
199
-
200
- v0.4.3 - 27 Nov 2014
201
- --------------------
202
- - Updated plugin architecture for convenience reasons and better support for modularization
203
-
204
- v0.4.2 - 27 Nov 2014
205
- --------------------
206
-
207
- - Included first version of Chartist.js Plugin mechanism
208
- - Major refactoring of development stack (thanks @Autarc !)
209
- - Removed unused functions in Chartist.Core
210
-
211
- v0.4.1 - 21 Nov 2014
212
- --------------------
213
-
214
- - Added more functionality to Chartist.Svg: select child elements, parent, root as well as a Svg list wrapper with delegation functions
215
- - Fixed bug in strip unit
216
- - Added classes to the label and grid gorups
217
- - Added this as return value so calls to chart can be chained up easily
218
-
219
-
220
- v0.4.0 - 17 Nov 2014
221
- --------------------
222
-
223
- - Added new animation API for SMIL animations
224
- - Added possibility to add event handlers with asterisk that will be triggerd on all events including the event name in the cb function
225
- - Added possibility to pass DOM node to SVG constructor so you can wrap existing SVG nodes into a Chartist.Svg element
226
- - Fixed svg recycling on re-creation
227
- - Fixed resize listener detach that wasn't working properly
228
- - Refactored Chartist.Svg to use Chartist.Class
229
- - Including event when line and area is drawn
230
- - Changed default scaleMinSpace to 20 to be more mobile friendly
231
- - Fixed bug with line area base
232
-