Skip to content

zhaoqy/zGraphWeb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zGraphWeb

Based on the HTML5 graphics library for web

How to Use

zGraph.circle

// zGraph.circle
var items = [
    ["demo01", 150, "#ff8899"],
    ["demo02", 100],
    ["demo03", 80],
    ["demo04", 60],
    ["demo05", 30],
    ["demo06", 20],
    ["demo07", 10],
    ["demo08", 10],
    ["demo09", 10],
    ["demo10", 10],
    ["demo11", 10],
    ["demo12", 10]
];
var params = {
  backgroundColor: "#eeffee",
  shadow: false,
  captionNum: false,
  startAngle: -45,
  otherCaption: "others"
};
var zg = new zGraph.circle("demo",{width:400,height:300}).appendTo(document.body);
zg.draw(items, params);

API

zGraph.circle

zGraph.circle(string, [object])

Arguments:

  • string: circle id.
  • object: Graphics of height and width,default width=400,heigth=300.(optional)

appendTo(element)

Arguments:

  • element: Added to the DOM node.

draw(object, [object])

Arguments:

  • object: data
  • object: params (optional)

    attribute					default			
------------------------------------------------------------
    backgroundColor, 			--null         				
    shadow, 					--true         				
    border, 					--false        				
    caption, 					--false        				
    captionNum, 				--true         				
    captionRate, 				--true         				
    fontSize, 					--"12px"       				
    fontFamily, 				--"Arial,sans-serif"        
    textShadow, 				--true         				
    captionColor, 				--"#ffffff"         		
    startAngle, 				---90         				
    legend, 					--true         				
    legendFontSize, 			--"12px"         			
    legendFontFamily, 			--"Arial,sans-serif"        
    legendColor, 				--"#000000"         		
    otherCaption, 				--"other"    
------------------------------------------------------------

About

Based on the HTML5 graphics library for web

Resources

Stars

Watchers

Forks

Packages

No packages published