option = {
Timeline: {
Show:false,
Data: [
' Data analysis ',
],
Label: {
Formatter:function (s) {
Return S.slice (0, 4);
}
},
Autoplay:false,
Heigth:1,
Padding:1,
playinterval:1500
},
Options: [
{
Title: {
' Text ': The average price of advertising in each city, the analysis of sales rate increase (average price increase vs. Sales rate increase) ',
' Subtext ': '----data from the electronic scheduling system ',
' X ': ' Center ',
' TextStyle ': {fontFamily: ' Microsoft Jas Black '}
},
ToolTip: {
Trigger: ' Axis ',
showdelay:0,
Axispointer: {
Show:true,
Type: ' Cross ',
LineStyle: {
Type: ' Dashed ',
Width:1
}
}
},
Toolbox: {
' Show ': true,
Orient: ' Vertical ',
x: ' Right ',
Y: ' Center ',
' Feature ': {
' Restore ': {' show ': true},
' Saveasimage ': {' show ': true}
}
},
Grid: {' y ': y2 ': 100},
Xaxis: [{
' Type ': ' Value ',
' Name ': ' Average price increase (%) ',
}],
YAxis: [{
' Type ': ' Value ',
' Name ': ' Sales rate increase (%) ',
}],
Series: [
{
' Name ': ' Sales average price increase, sales rate increase ',
' type ': ' Scatter ',
Markline: {
Data: [
{type: ' Average ', name: ' Average sales increase ', ItemStyle: {normal: {bordercolor: ' Green '}},
{type: ' Average ', name: ' Sales rate increase average ', valueindex:0, ItemStyle: {normal: {bordercolor: ' Green '}}
]
},
Symbol: ' Pin ',
Symbolsize:5,
ItemStyle: {
Normal: {
Label: {
Show:true,
Formatter: ' {b} '
},
Color: ' #ff6633 '
}
},
' Data ': result.data//Format [{name: ' Beijing ', Value: [5]}, {name: ' Shanghai ', value: [17, 8]}
}
]
}
]
};
Myscatter.clear ();
myscatter.setoption (option);
}
Echart-scatter using scatter plots, with coordinates and project names