UNPKG

juijs-chart

Version:

SVG-based JUI chart that can be used in the browser and Node.js. Support many types of charts. (Dashboard, Map, Topology, Full 3D)

51 lines 1.44 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Title</title> <script src="../dist/jui-chart.js"></script> <script> graph.ready([ "chart.builder" ], function(builder) { builder("#chart", { width: 400, height : 400, theme : "classic", axis : { data : [ { name : 2, value : 15, test : 0 }, { name : 15, value : 6, test : 0 }, { name : 8, value : 0, test : 0 }, { name : 0, value : 0, test : 0 } ], y : { domain : [ "week1", "week2", "week3", "week4" ], line : true }, x : { type : 'range', domain : [0, 100], format : function(value) { return value + "%" ;}, line : true } }, brush : { type : 'fullstackbar', target : ['name', 'value', 'test'], showText: true, activeEvent : "click", active : 1, size : 20 }, event: { click: function(obj, e) { console.log(obj); } } }); }); </script> </head> <body> <div id="chart"></div> </body> </html>