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
<html> <head> <meta charset="UTF-8"> <title>Netflix 公司市值增长</title> </head> <body> <div id="container" /> <script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.g2-3.5.11/dist/g2.min.js"></script> <script src="https://gw.alipayobjects.com/os/antv/pkg/_antv.data-set-0.10.2/dist/data-set.min.js"></script> <script> const data = [ { year: '南宁', value: 10 }, { year: '西安', value: 20 }, { year: '榆林', value: 50 }, { year: '汉中', value: 40 }, { year: '咸阳', value: 50 }, { year: '四川', value: 20 }, { year: '北京', value: 25 }, { year: '天津', value: 70 }, { year: '上海', value: 120 }, { year: '深圳', value: 140 }, { year: '香港', value: 80 }, { year: '澳门', value: 250 }, ]; const chart = new G2.Chart({ container: 'container', forceFit: true, height: 500, padding: [ 20, 20, 50, 60 ] }); //回归曲线数据设置 // const ds = new DataSet(); // const dv = ds.createView().source(data); // dv.transform({ // type: 'regression', // method: 'polynomial', // fields: [ 'year', 'value' ], // bandwidth: 0.1, // as: [ 'Year', 'Value' ] // }); chart.scale('year', { type: 'cat' }); const view1 = chart.view(); view1.source(data); view1.interval().position('year*value').opacity(1); //回归曲线视图 // const view2 = chart.view(); // view2.axis(false); // view2.source(dv); // view2.line().position('Year*Value').style({ // stroke: '#969696', // lineDash: [ 3, 3 ] // }) // .tooltip(false); chart.render(); </script> </body> </html>
The text was updated successfully, but these errors were encountered:
这个需要你理解一下回归曲线的含义。回归曲线必然是对一个指标趋势的拟合,那如果对于分类的 cat,回归拟合的含义是什么呢?
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: