<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZingSoft Demo</title>
<link rel='stylesheet' href='//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css'>
<script nonce="undefined" src='//code.jquery.com/jquery-2.1.4.min.js'></script>
<script nonce="undefined" src='//code.jquery.com/ui/1.11.4/jquery-ui.min.js'></script>
<script nonce="undefined" src="https://cdn.zingchart.com/zingchart.min.js"></script>
<style>
#myChart {
width: 100%;
height: 100%;
}
#resizable {
height: 200px;
width: 200px;
padding: 15px;
border: 2px dashed #AAA;
}
</style>
</head>
<body>
<div id="resizable">
<div id='myChart'></div>
</div>
<script>
ZC.LICENSE = ["569d52cefae586f634c54f86dc99e6a9", "b55b025e438fa8a98e32482b5f768ff5"];
var myConfig = {
"graphset": [{
"type": "bar",
"title": {
"text": "Weekly Fruit Sales",
"adjustLayout": true,
"mediaRules": [{
"maxWidth": 400,
"visible": false
},
{
"maxHeight": 300,
"visible": false
}
]
},
"scaleX": {
"labels": ["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"],
"label": {
"text": "Day Of The Week",
"fontSize": 18,
"mediaRules": [{
"maxWidth": 768,
"fontSize": 15
},
{
"maxWidth": 400,
"visible": false
},
{
"maxHeight": 300,
"visible": false
}
]
},
"item": {
"fontSize": 13,
"mediaRules": [{
"maxWidth": 400,
"fontSize": 10,
"angle": 45
}]
}
},
"scaleY": {
"label": {
"text": "Value",
"fontSize": 18,
"mediaRules": [{
"maxWidth": 768,
"fontSize": 15
},
{
"maxWidth": 400,
"visible": false
},
{
"maxHeight": 300,
"visible": false
}
]
},
"item": {
"fontSize": 13,
"mediaRules": [{
"maxWidth": 400,
"fontSize": 10
}]
},
"guide": {
"lineStyle": "dotted"
}
},
"plotarea": {
"margin": "dynamic"
},
"legend": {
"backgroundColor": "black",
"adjustLayout": true,
"mediaRules": [{
"maxWidth": 400,
"visible": false
},
{
"maxWidth": 768,
"layout": "float",
"align": "center"
}
]
},
"plot": {
"tooltip": {
"text": "%kl<br>%t: %v",
"borderRadius": "3px",
"textAlign": "left"
},
"aspect": "spline",
"marker": {
"size": 3,
"borderWidth": 0
}
},
"series": [{
"values": [40, 49, 15, 21, 70, 51, 69],
"text": "apples",
"backgroundColor": "#f44336",
"legendMarker": {
"backgroundFit": "xy",
"size": 8,
"backgroundImage": "https://demos.zingchart.com/view/9PWAYILS/Screen Shot 2017-04-11 at 10.46.49 AM.png"
}
},
{
"values": [31, 66, 35, 33, 59, 61, 55],
"text": "oranges",
"backgroundColor": "#ff9800",
"legendMarker": {
"backgroundFit": "xy",
"size": 8,
"backgroundImage": "https://demos.zingchart.com/view/9PWAYILS/Screen Shot 2017-04-11 at 10.47.33 AM.png"
}
},
{
"values": [33, 35, 17, 61, 66, 32, 35],
"text": "bananas",
"backgroundColor": "#ffeb3b",
"tooltip": {
"backgroundColor": "#fbc02d"
},
"legendMarker": {
"backgroundFit": "xy",
"size": 8,
"backgroundImage": "https://demos.zingchart.com/view/9PWAYILS/Screen Shot 2017-04-11 at 10.47.55 AM.png"
}
}
]
}]
};
// when you resize the window allow 50 milliseconds before triggering resize
zingchart.DEV.DEBOUNCESPEED = 50;
zingchart.render({
id: 'myChart',
data: myConfig,
height: "100%",
width: "100%",
theme: 'dark'
});
$(function() {
$("#resizable").resizable();
});
</script>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>ZingSoft Demo</title>
<link rel='stylesheet' href='//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css'>
<script src='//code.jquery.com/jquery-2.1.4.min.js'></script>
<script src='//code.jquery.com/ui/1.11.4/jquery-ui.min.js'></script>
<script src="https://cdn.zingchart.com/zingchart.min.js"></script>
</head>
<body>
<div id="resizable">
<div id='myChart'></div>
</div>
</body>
</html>
#myChart {
width: 100%;
height: 100%;
}
#resizable {
height: 200px;
width: 200px;
padding: 15px;
border: 2px dashed #AAA;
}
var myConfig = {
"graphset": [{
"type": "bar",
"title": {
"text": "Weekly Fruit Sales",
"adjustLayout": true,
"mediaRules": [{
"maxWidth": 400,
"visible": false
},
{
"maxHeight": 300,
"visible": false
}
]
},
"scaleX": {
"labels": ["Sun", "Mon", "Tues", "Wed", "Thurs", "Fri", "Sat"],
"label": {
"text": "Day Of The Week",
"fontSize": 18,
"mediaRules": [{
"maxWidth": 768,
"fontSize": 15
},
{
"maxWidth": 400,
"visible": false
},
{
"maxHeight": 300,
"visible": false
}
]
},
"item": {
"fontSize": 13,
"mediaRules": [{
"maxWidth": 400,
"fontSize": 10,
"angle": 45
}]
}
},
"scaleY": {
"label": {
"text": "Value",
"fontSize": 18,
"mediaRules": [{
"maxWidth": 768,
"fontSize": 15
},
{
"maxWidth": 400,
"visible": false
},
{
"maxHeight": 300,
"visible": false
}
]
},
"item": {
"fontSize": 13,
"mediaRules": [{
"maxWidth": 400,
"fontSize": 10
}]
},
"guide": {
"lineStyle": "dotted"
}
},
"plotarea": {
"margin": "dynamic"
},
"legend": {
"backgroundColor": "black",
"adjustLayout": true,
"mediaRules": [{
"maxWidth": 400,
"visible": false
},
{
"maxWidth": 768,
"layout": "float",
"align": "center"
}
]
},
"plot": {
"tooltip": {
"text": "%kl<br>%t: %v",
"borderRadius": "3px",
"textAlign": "left"
},
"aspect": "spline",
"marker": {
"size": 3,
"borderWidth": 0
}
},
"series": [{
"values": [40, 49, 15, 21, 70, 51, 69],
"text": "apples",
"backgroundColor": "#f44336",
"legendMarker": {
"backgroundFit": "xy",
"size": 8,
"backgroundImage": "https://demos.zingchart.com/view/9PWAYILS/Screen Shot 2017-04-11 at 10.46.49 AM.png"
}
},
{
"values": [31, 66, 35, 33, 59, 61, 55],
"text": "oranges",
"backgroundColor": "#ff9800",
"legendMarker": {
"backgroundFit": "xy",
"size": 8,
"backgroundImage": "https://demos.zingchart.com/view/9PWAYILS/Screen Shot 2017-04-11 at 10.47.33 AM.png"
}
},
{
"values": [33, 35, 17, 61, 66, 32, 35],
"text": "bananas",
"backgroundColor": "#ffeb3b",
"tooltip": {
"backgroundColor": "#fbc02d"
},
"legendMarker": {
"backgroundFit": "xy",
"size": 8,
"backgroundImage": "https://demos.zingchart.com/view/9PWAYILS/Screen Shot 2017-04-11 at 10.47.55 AM.png"
}
}
]
}]
};
// when you resize the window allow 50 milliseconds before triggering resize
zingchart.DEV.DEBOUNCESPEED = 50;
zingchart.render({
id: 'myChart',
data: myConfig,
height: "100%",
width: "100%",
theme: 'dark'
});
$(function() {
$("#resizable").resizable();
});