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
I want to plot a line chart with one Linear/Polynomial line series. But there is no proper documentation for using one Category axis.
import * as echarts from 'echarts';
import ecStat from 'echarts-stat';
var chartDom = document.getElementById('main'); var myChart = echarts.init(chartDom); var option;
// See https://github.com/ecomfe/echarts-stat echarts.registerTransform(ecStat.transform.regression); const data = [ { name: 'Mon', value: 150 }, { name: 'Tue', value: 230 }, { name: 'Wed', value: 224 }, { name: 'Thu', value: 218 }, { name: 'Fri', value: 135 }, { name: 'Sat', value: 147 }, { name: 'Sun', value: 260 } ]; option = { dataset: [ { source: data }, { transform: { type: 'ecStat:regression' } } ], xAxis: { type: 'category' }, yAxis: { type: 'value' }, series: [ { type: 'scatter' }, { name: 'line', type: 'line', datasetIndex: 1, symbolSize: 0.1, symbol: 'circle', label: { show: true, fontSize: 16 }, labelLayout: { dx: -20 }, encode: { label: 2, tooltip: 1 } } ] };
option && myChart.setOption(option);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to plot a line chart with one Linear/Polynomial line series. But there is no proper documentation for using one Category axis.
import * as echarts from 'echarts';
import ecStat from 'echarts-stat';
var chartDom = document.getElementById('main');
var myChart = echarts.init(chartDom);
var option;
// See https://github.com/ecomfe/echarts-stat
echarts.registerTransform(ecStat.transform.regression);
const data = [
{ name: 'Mon', value: 150 },
{ name: 'Tue', value: 230 },
{ name: 'Wed', value: 224 },
{ name: 'Thu', value: 218 },
{ name: 'Fri', value: 135 },
{ name: 'Sat', value: 147 },
{ name: 'Sun', value: 260 }
];
option = {
dataset: [
{
source: data
},
{
transform: {
type: 'ecStat:regression'
}
}
],
xAxis: {
type: 'category'
},
yAxis: {
type: 'value'
},
series: [
{
type: 'scatter'
},
{
name: 'line',
type: 'line',
datasetIndex: 1,
symbolSize: 0.1,
symbol: 'circle',
label: { show: true, fontSize: 16 },
labelLayout: { dx: -20 },
encode: { label: 2, tooltip: 1 }
}
]
};
option && myChart.setOption(option);
The text was updated successfully, but these errors were encountered: