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.6.3
vscreen
let maxRadius = 0 let minRadius = 0 const spec = { type: 'pie', data: [ { id: 'id0', values: [ { type: 'oxygen', value: '46.60' }, { type: 'silicon', value: '27.72' }, { type: 'aluminum', value: '8.13' }, { type: 'iron', value: '5' }, { type: 'calcium', value: '3.63' }, { type: 'sodium', value: '2.83' }, { type: 'potassium', value: '2.59' }, { type: 'others', value: '3.5' } ] } ], innerRadius: 0.5, outerRadius: 0.8, valueField: 'value', categoryField: 'type', title: { visible: true, text: 'Statistics of Surface Element Content' }, legends: { visible: true, orient: 'left' }, label: { visible: true }, tooltip: { mark: { content: [ { key: datum => datum['type'], value: datum => datum['value'] + '%' } ] } }, extensionMark: [ { name: 'arc_inner_shadow', type: 'arc', dataId: 'id0', style: { interactive: false, innerRadius: 20, outerRadius: 30, fillOpacity: 0.3, fill: 'red', visible: true }, }, // { // name: 'arc_inner_shadow', // type: 'arc', // dataId: 'id0', // style: { // interactive: false, // innerRadius: (datum, ctx, elements, dataView) => { // console.log('datum', datum, ctx, ctx.getLayoutRadius()) // if (datum.outerRadius > maxRadius) maxRadius = datum.outerRadius // return datum.innerRadius - 10 // }, // outerRadius: datum => { // minRadius = datum.innerRadius // return datum.innerRadius // }, // fillOpacity: 0.3, // }, // }, // { // name: 'arc_inner', // type: 'symbol', // from: { // mark: 'pie', // }, // spec: { // interactive: false, // normal: { // size: datum => minRadius - 20, // fillOpacity: 0, // strokeWidth: 0.5, // strokeOpacity: 0.3, // strokeGradient: { // type: 'conical', // startAngle: 0, // endAngle: 359, // stops: [ // { // offset: 0, // color: '#FFF', // opacity: 0, // }, // { // offset: 1, // color: '#FFF', // opacity: 1, // }, // ], // }, // }, // }, // }, // { // name: 'arc_outer', // type: 'symbol', // from: { // mark: 'pie', // }, // spec: { // interactive: false, // normal: { // size: datum => maxRadius + 20, // fillOpacity: 0, // strokeWidth: 0.5, // strokeOpacity: 0.3, // rotate: 20, // strokeGradient: { // type: 'conical', // startAngle: 0, // endAngle: 359, // stops: [ // { // offset: 0, // color: '#FFF', // opacity: 1, // }, // { // offset: 1, // color: '#FFF', // opacity: 1, // }, // ], // }, // }, // }, // }, ] }; const vchart = new VChart(spec, { dom: CONTAINER_ID }); vchart.renderAsync(); // Just for the convenience of console debugging, DO NOT COPY! window['vchart'] = vchart;
- OS: - Browser: - Framework:
No response
The text was updated successfully, but these errors were encountered:
fix(pie): get center error. fix #1610
2943e3b
d9f1080
skie1997
Successfully merging a pull request may close this issue.
Version
1.6.3
Link to Minimal Reproduction
vscreen
Steps to Reproduce
Current Behavior
Expected Behavior
Environment
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: