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
var data1 = [ { time: 'Jan.', tem: 1000 }, { time: 'Feb.', tem: 2200 }, { time: 'Mar.', tem: 2000 }, { time: 'Apr.', tem: 2600 }, { time: 'May.', tem: 2000 }, { time: 'Jun.', tem: 2600 }, { time: 'Jul.', tem: 2800 }, { time: 'Aug.', tem: 2000 } ]; var data2 = [ { time: 'Jan.', tem: 0 }, { time: 'Feb.', tem: 0 }, { time: 'Mar.', tem: 0 }, { time: 'Apr.', tem: 0 }, { time: 'May.', tem: 0 }, { time: 'Jun.', tem: 0 }, { time: 'Jul.', tem: 0 }, { time: 'Aug.', tem: 0 } ]; var chart = new F2.Chart({ id: 'mountNode', // animate: false, pixelRatio: window.devicePixelRatio }); chart.source(data1); chart.tooltip({ showCrosshairs: true }); chart.scale({ time: { range: [ 0, 1 ] }, tem: { tickCount: 5, min: 0 } }); chart.axis('time', { label: function(text, index, total) { var textCfg = {}; if (index === 0) { textCfg.textAlign = 'left'; } else if (index === total - 1) { textCfg.textAlign = 'right'; } return textCfg; } }); // chart.axis(false) chart.area().position('time*tem').shape('smooth').color('l(0) 0:#1754FF 1:#00C9F3'); chart.line().position('time*tem').shape('smooth').color('l(0) 0:#1754FF 1:#00C9F3'); chart.render(); console.log(chart.get('coord')); $('#zero').click(() => { chart.changeData(data1); }); $('#notZero').click(() => { chart.changeData(data2); });
The text was updated successfully, but these errors were encountered:
5cf6e44
Merge pull request #419 from antvis/issue-389
16cfa74
fix: fix the gradient color bug. Closed #389.
simaQ
No branches or pull requests
The text was updated successfully, but these errors were encountered: