The Near Development lottery analysis website, needs to use JS to draw the analysis graph.
Refer to the drawing code on the Web, you encapsulate a drawing class, for everyone to do a reference.
Reference Method:
New Gov. Graphic (PAR1,PAR2,PAR3);
par1 for drawing data
var data=new period ([0,10,22,13,34,25,28,26,30,35,28,34,39,28,26,50,35,28,34,39,55],//y axis data [ 188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208]//x axis Data
);
PAR2 the container layer ID for the drawing
par3 for drawing style parameters, optional parameters
Default value:
{
height:170,//drawing area Height
MAXHEIGHT:50,//y axis maximum value
bardistance:26,//x axis coordinate spacing
topdistance:0,//Upper Fill
bottomdistance:0,//Bottom padding
LEFTDISTANCE:20,//left-part padding
Pointwidth:5,//Coordinate point width
Pointheight:5,//coordinate point height
Pointcolor: "#ff0000",//Coordinate point color
LineColor: "#ffd43a",//Cable color
VALUEWIDTH:20,//y axis value width
Valuecolor: "#000",//y axis numerical color
TIMEWIDTH:20,//x axis value width
Timecolor: "#000",//x axis numerical color
Disvalue:true,//whether to display y-axis values
Distime:true//whether to display X axis values
}
[Ctrl + A ALL SELECT hint: You can modify some of the code, and then run]