php - How to make border for container in ZingChart -
how make border around chart , title bar on in zingchart. tried plotarea border around graph not complete chart. want black border , title able make red border in image.
here code
{ "type":"bar", "plotarea":{ "border-color" : "#0ff", "border-width" : "2px" }, "series":[ { "values":[11,26,7,44,11] }, { "values":[42,13,21,15,33] } ]
}
accomplishing can achieved using border attributes specific sides of different objects. in case, setting borders right , left of chart, , bottom of title.
here example shows approach in action, key parts use in own code.
var myconfig = { type: "bar", borderright: "6px solid #000", borderleft: "6px solid #000", borderbottom: "6px solid #000", title: { text: "my title", height: 40, borderbottom: "6px solid #000" //needs added title or hidden underneath }, series : [ { values : [35,42,67,89,25,34,67,85] } ] }; zingchart.render({ id : 'mychart', data : myconfig, height: 400, width: 600 });
<html> <head> <script src= 'https://cdn.zingchart.com/zingchart.min.js'></script> <script> zingchart.modulesdir = 'https://cdn.zingchart.com/modules/'; zc.license = ['569d52cefae586f634c54f86dc99e6a9','ee6b7db5b51705a13dc2339db3edaf6d'];</script> </head> <body> <div id='mychart'></div> </body> </html>
i'm on zingchart team, please let me know if need additional clarification or if isn't quite looking for.
Comments
Post a Comment