@gravity-ui/chartkit 0.12.0 → 0.12.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.12.2](https://github.com/gravity-ui/chartkit/compare/v0.12.1...v0.12.2) (2022-11-30)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **ChartKit:** id not to be new on every render ([#76](https://github.com/gravity-ui/chartkit/issues/76)) ([230a992](https://github.com/gravity-ui/chartkit/commit/230a992fe99a176bbf85cbef363ccac45db7b3b4))
9
+
10
+ ## [0.12.1](https://github.com/gravity-ui/chartkit/compare/v0.12.0...v0.12.1) (2022-11-22)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * **Highcharts plugin:** remove style for chart background color ([#73](https://github.com/gravity-ui/chartkit/issues/73)) ([481b2f5](https://github.com/gravity-ui/chartkit/commit/481b2f5fe07d818f37ba220f70fbad14690b39ba))
16
+
3
17
  ## [0.12.0](https://github.com/gravity-ui/chartkit/compare/v0.11.1...v0.12.0) (2022-11-22)
4
18
 
5
19
 
@@ -11,7 +11,7 @@
11
11
  --highcarts-navigator-border: var(--yc-color-line-generic);
12
12
  --highcarts-navigator-track: var(--yc-color-base-generic);
13
13
  --highcarts-navigator-body: var(--yc-color-scroll-handle);
14
- --highcharts-chart-background: var(--yc-color-base-background);
14
+ --highcharts-series-border: var(--yc-color-base-background);
15
15
  --highcharts-grid-line: var(--yc-color-line-generic);
16
16
  --highcharts-axis-line: var(--yc-color-line-generic);
17
17
  --highcharts-tick: var(--yc-color-line-generic);
@@ -11,7 +11,9 @@ import './ChartKit.css';
11
11
  const b = block('chartkit');
12
12
  const ChartKitComponent = (props) => {
13
13
  const widgetRef = React.useRef();
14
- const { instanceRef, id = getRandomCKId(), type, data, onLoad, isMobile } = props, restProps = __rest(props, ["instanceRef", "id", "type", "data", "onLoad", "isMobile"]);
14
+ const { instanceRef, id: propsId, type, data, onLoad, isMobile } = props, restProps = __rest(props, ["instanceRef", "id", "type", "data", "onLoad", "isMobile"]);
15
+ const ckId = React.useMemo(() => getRandomCKId(), []);
16
+ const id = propsId || ckId;
15
17
  const lang = settings.get('lang');
16
18
  const plugins = settings.get('plugins');
17
19
  const plugin = plugins.find((iteratedPlugin) => iteratedPlugin.type === type);
@@ -94,7 +94,7 @@ const statesForLine = {
94
94
  const options = {
95
95
  chart: {
96
96
  zoomType: 'xy',
97
- backgroundColor: 'var(--highcharts-chart-background)',
97
+ backgroundColor: 'transparent',
98
98
  className: 'chartkit-highcharts',
99
99
  },
100
100
  title: {
@@ -164,7 +164,7 @@ const options = {
164
164
  },
165
165
  plotOptions: {
166
166
  series: {
167
- borderColor: 'var(--highcharts-chart-background)',
167
+ borderColor: 'var(--highcharts-series-border)',
168
168
  label: {
169
169
  enabled: false,
170
170
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/chartkit",
3
- "version": "0.12.0",
3
+ "version": "0.12.2",
4
4
  "description": "React component used to render charts based on any sources you need",
5
5
  "license": "MIT",
6
6
  "repository": "git@github.com:gravity-ui/ChartKit.git",