We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.3.0
none
import { isMobile } from 'react-device-detect'; import type { IHistogramChartSpec } from '../../../../src/index'; // eslint-disable-next-line no-duplicate-imports import { default as VChart } from '../../../../src/index'; const run = () => { const values = [ { label: '200', value: 92 }, { label: '502', value: 8 } ]; const spec = { color: ['#207BFE', '#00CEFF', '#FC7703', '#5BCF78', '#2F4DE0', '#94D8FF', '#F5C040', '#39608C'], padding: 0, data: [ { values: [ // { // "label": "200", // "value": 92 // }, // { // "label": "502", // "value": 8 // } ] } ], categoryField: 'label', valueField: 'value', outerRadius: 0.9, innerRadius: 0.76, pie: { state: { hover: { outerRadius: 0.92 } } }, legends: { visible: true, orient: 'right', hover: false, padding: [2, 0, 0, 30], item: { width: 236, shape: { space: 4, style: { size: 8 } }, label: { style: { maxLineWidth: 162, fill: '#42464E' } }, value: { alignRight: true, style: { lineWidth: '20%', fontSize: '12px', fill: '#42464E' } } } }, tooltip: { mark: { content: [{}] } }, type: 'pie', region: [{}], series: [ { data: { values: [ // { // "label": "200", // "value": 92 // }, // { // "label": "502", // "value": 8 // } ] }, animationThreshold: 2000, outerRadius: 0.9, innerRadius: 0.76, type: 'pie', pie: { state: { hover: { outerRadius: 0.92 } } }, categoryField: 'label', valueField: 'value' } ] }; const cs2 = new VChart(spec, { dom: document.getElementById('chart') as HTMLElement, mode: isMobile ? 'mobile-browser' : 'desktop-browser' }); cs2.renderAsync(); // 不能正确更新 setTimeout(() => { console.log('updateSpec 1'); spec.data[0].values = values; spec.series[0].data.values = values; cs2.updateSpec(spec); }, 1000); // 可以正确更新 // setTimeout(() => { // console.log('updateSpec 2'); // delete spec.data; // spec.series[0].data.values = values; // cs2.updateSpec(spec); // }, 4000); }; run();
数据未正确更新
数据更新
- OS: - Browser: - Framework:
No response
The text was updated successfully, but these errors were encountered:
feat: fix issue about updateSpec not work with only data change, deta…
124e312
…ils in #912
5389407
07a64d7
0a71905
2cee243
xuefei1313
No branches or pull requests
Version
1.3.0
Link to Minimal Reproduction
none
Steps to Reproduce
Current Behavior
数据未正确更新
Expected Behavior
数据更新
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: