Need to plot a zingchart that is completely responsive & visually accurate. To my knowledge, we need to provide the height and width in % (ex: 100% or 80%) for the div in which we are going to plot the zingchart. While writing the zingchart.render function we can omit the height and width property in that. The chart here is plotted with 100% width or the one that I am providing to the div.
The issue I face here: When a chart has a minimal amount of data and it is plotted on 100% width, it does not seem visually appealing(Looks gigantic). So Is there any way by which we can make the zingchart automatically plot the width based on the data that being fed.
Code Example(For above state scenraio):
HTML:
<div id='myChart'></div>
CSS:
html, body, #myChart {
height:100%;
width:100%;
}
JS:
var myConfig = {
type: "bar",
series: [
{
values:[20,40]
},
{
values:[5,30]
},
{
values:[30,20]
}
]
};
zingchart.render({
id : 'myChart',
data : myConfig,
});