@pushwoosh/kit-charts 0.4.0 → 0.4.2
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/core/Chart/Chart.js
CHANGED
|
@@ -158,11 +158,13 @@ function ChartBody({
|
|
|
158
158
|
const identity = seriesIdentity(options);
|
|
159
159
|
// A different set of series is a different chart: start from its own options
|
|
160
160
|
// again rather than carrying the previous chart's switched-off indices over.
|
|
161
|
-
|
|
161
|
+
const identityDeps = [identity];
|
|
162
|
+
const [prevIdentityDeps, setPrevIdentityDeps] = useState(null);
|
|
163
|
+
if (prevIdentityDeps === null || identityDeps.some((dep, index) => dep !== prevIdentityDeps[index])) {
|
|
164
|
+
setPrevIdentityDeps(identityDeps);
|
|
162
165
|
setHidden(hiddenByOptions(options));
|
|
163
166
|
setZoom(null);
|
|
164
|
-
|
|
165
|
-
}, [identity]);
|
|
167
|
+
}
|
|
166
168
|
const toggle = useCallback(item => {
|
|
167
169
|
// A tooltip captured before the toggle would keep quoting what just went away.
|
|
168
170
|
setHover(null);
|
|
@@ -14,7 +14,7 @@ const getContext = () => {
|
|
|
14
14
|
};
|
|
15
15
|
export const DEFAULT_FONT_SIZE = FontSize.SMALL;
|
|
16
16
|
export const DEFAULT_FONT_FAMILY = FontFamily.MAIN;
|
|
17
|
-
export const DEFAULT_TITLE_FONT_SIZE = FontSize.
|
|
17
|
+
export const DEFAULT_TITLE_FONT_SIZE = FontSize.HEADING1;
|
|
18
18
|
export const DEFAULT_SUBTITLE_FONT_SIZE = FontSize.SMALL;
|
|
19
19
|
export const toCssFont = style => {
|
|
20
20
|
const weight = style?.fontWeight ?? 'normal';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pushwoosh/kit-charts",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Small React chart library on SVG, with a Highcharts-shaped configuration model",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -26,10 +26,11 @@
|
|
|
26
26
|
"directory": "dist"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@pushwoosh/kit-constants": "^
|
|
29
|
+
"@pushwoosh/kit-constants": "^3.0.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
|
-
"@pushwoosh/frontend-builder-engine": "^
|
|
32
|
+
"@pushwoosh/frontend-builder-engine": "^4.0.0",
|
|
33
|
+
"@pushwoosh/kit-typography": "^2.0.0",
|
|
33
34
|
"@testing-library/dom": "^10.4.2",
|
|
34
35
|
"@testing-library/jest-dom": "^6.9.1",
|
|
35
36
|
"@testing-library/react": "^16.3.0",
|