Home >Web Front-end >JS Tutorial >ymyang drawing example code_javascript skills

ymyang drawing example code_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:54:481324browse

Quotation method:
Copy code The code is as follows:

new gov. Graphic(par1,par2,par3);

par1 is the drawing data
Copy code The code is as follows:

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 is for drawing Container layer id
par3 is the drawing style parameter, optional parameter
Default value:
Copy code The code is as follows:

{
height:170, //Height of drawing area
maxHeight:50, //Highest value of y-axis
barDistance:26 , //X-axis coordinate spacing
topDistance:0, //Top padding
bottomDistance:0, //Bottom padding
leftDistance:20, //Left padding
pointWidth:5, // Coordinate point width
pointHeight:5, //Coordinate point height
pointColor:"#ff0000", //Coordinate point color
lineColor:"#ffd43a", //Connecting line color
valueWidth: 20, //y-axis value width
valueColor:"#000", //y-axis value color
timeWidth:20, //x-axis value width
timeColor:"#000", //x Axis value color
disvalue:true, //Whether to display the y-axis value
distime:true //Whether to display the x-axis value
}


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn