@progress/kendo-charts 2.10.0-develop.1 → 2.10.0-develop.3
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/dist/cdn/js/kendo-charts.js +1 -1
- package/dist/cdn/main.js +1 -1
- package/dist/es/chart/animations/bar-chart-animation.js +8 -0
- package/dist/es/chart/animations/bubble-animation.js +4 -0
- package/dist/es/chart/animations/clip-animation.js +7 -0
- package/dist/es/chart/animations/easingMap.js +8 -0
- package/dist/es/chart/animations/fade-in-animation.js +4 -0
- package/dist/es/chart/animations/pie-animation.js +4 -0
- package/dist/es/chart/chart.js +102 -3
- package/dist/es/chart/plotarea/categorical-plotarea.js +15 -0
- package/dist/es/chart/theme/load-theme.js +56 -2
- package/dist/es2015/chart/animations/bar-chart-animation.js +8 -0
- package/dist/es2015/chart/animations/bubble-animation.js +4 -0
- package/dist/es2015/chart/animations/clip-animation.js +7 -0
- package/dist/es2015/chart/animations/easingMap.js +8 -0
- package/dist/es2015/chart/animations/fade-in-animation.js +4 -0
- package/dist/es2015/chart/animations/pie-animation.js +4 -0
- package/dist/es2015/chart/chart.js +102 -3
- package/dist/es2015/chart/plotarea/categorical-plotarea.js +15 -0
- package/dist/es2015/chart/theme/load-theme.js +56 -2
- package/dist/npm/main.js +209 -6
- package/dist/systemjs/kendo-charts.js +1 -1
- package/package.json +4 -5
|
@@ -51,6 +51,42 @@ const getSeriesColors = (element) => {
|
|
|
51
51
|
return result;
|
|
52
52
|
};
|
|
53
53
|
|
|
54
|
+
const parseToMS = (value) => {
|
|
55
|
+
// Handle CSS time values (e.g., "200ms", "0.5s", ".3s")
|
|
56
|
+
if (typeof value === 'string' && value.endsWith('ms')) {
|
|
57
|
+
return parseFloat(value);
|
|
58
|
+
} else if (typeof value === 'string' && value.endsWith('s')) {
|
|
59
|
+
return parseFloat(value) * 1000;
|
|
60
|
+
}
|
|
61
|
+
return parseFloat(value);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
function parseCubicBezier(input) {
|
|
65
|
+
const s = input.trim();
|
|
66
|
+
const m = s.match(
|
|
67
|
+
/cubic-bezier\s*\(\s*([+-]?\d*\.?\d+)\s*,\s*([+-]?\d*\.?\d+)\s*,\s*([+-]?\d*\.?\d+)\s*,\s*([+-]?\d*\.?\d+)\s*\)\s*/i
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
return m ? [Number(m[1]), Number(m[2]), Number(m[3]), Number(m[4])] : [0, 0, 1, 1];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function parseEasing(input) {
|
|
74
|
+
switch (input) {
|
|
75
|
+
case "linear":
|
|
76
|
+
return [0, 0, 1, 1];
|
|
77
|
+
case "ease":
|
|
78
|
+
return [0.25, 0.1, 0.25, 1];
|
|
79
|
+
case "ease-in":
|
|
80
|
+
return [0.42, 0, 1, 1];
|
|
81
|
+
case "ease-out":
|
|
82
|
+
return [0, 0, 0.58, 1];
|
|
83
|
+
case "ease-in-out":
|
|
84
|
+
return [0.42, 0, 0.58, 1];
|
|
85
|
+
default:
|
|
86
|
+
return input ? parseCubicBezier(input) : [0, 0, 1, 1];
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
54
90
|
// -----------------------------------------------------------------------------
|
|
55
91
|
// CSS Variable Groups (shared + component specific)
|
|
56
92
|
// -----------------------------------------------------------------------------
|
|
@@ -84,7 +120,11 @@ const chartVariables = {
|
|
|
84
120
|
notesBg: "--kendo-chart-notes-bg",
|
|
85
121
|
notesBorder: "--kendo-chart-notes-border",
|
|
86
122
|
notesLines: "--kendo-chart-notes-lines",
|
|
87
|
-
inactive: "--kendo-chart-inactive"
|
|
123
|
+
inactive: "--kendo-chart-inactive",
|
|
124
|
+
initialAnimationDuration: '--kendo-duration-steady',
|
|
125
|
+
fadeInAnimationDuration: '--kendo-duration-rapid',
|
|
126
|
+
elasticEasing: '--kendo-easing-elastic',
|
|
127
|
+
linearEasing: '--kendo-easing-linear',
|
|
88
128
|
};
|
|
89
129
|
|
|
90
130
|
// Sankey-specific variables (in addition to shared)
|
|
@@ -252,6 +292,13 @@ export const chartTheme = (element) => {
|
|
|
252
292
|
},
|
|
253
293
|
});
|
|
254
294
|
|
|
295
|
+
const motion = {
|
|
296
|
+
initialDuration: parseToMS(getProp(element, vars.initialAnimationDuration)),
|
|
297
|
+
fadeInDuration: parseToMS(getProp(element, vars.fadeInAnimationDuration)),
|
|
298
|
+
elasticEasing: parseEasing(getProp(element, vars.elasticEasing)),
|
|
299
|
+
linearEasing: parseEasing(getProp(element, vars.linearEasing)),
|
|
300
|
+
};
|
|
301
|
+
|
|
255
302
|
return {
|
|
256
303
|
axisDefaults: {
|
|
257
304
|
crosshair: {
|
|
@@ -276,6 +323,12 @@ export const chartTheme = (element) => {
|
|
|
276
323
|
font: defaultFont(element),
|
|
277
324
|
}
|
|
278
325
|
},
|
|
326
|
+
categoryAxis: {
|
|
327
|
+
highlight: {
|
|
328
|
+
color: "#8C9FD9",
|
|
329
|
+
opacity: 0.15
|
|
330
|
+
}
|
|
331
|
+
},
|
|
279
332
|
chartArea: {
|
|
280
333
|
background: chartBg,
|
|
281
334
|
},
|
|
@@ -329,6 +382,7 @@ export const chartTheme = (element) => {
|
|
|
329
382
|
title: {
|
|
330
383
|
font: paneTitleFont(element),
|
|
331
384
|
}
|
|
332
|
-
}
|
|
385
|
+
},
|
|
386
|
+
motion
|
|
333
387
|
};
|
|
334
388
|
};
|