50 lines
1.0 KiB
HTML
50 lines
1.0 KiB
HTML
<!DOCTYPE HTML>
|
|
<html>
|
|
|
|
<head>
|
|
<script type="text/javascript">
|
|
window.onload = function () {
|
|
var chart = new CanvasJS.Chart("chartContainer",
|
|
{
|
|
title:{
|
|
text: "Employees Salary in a Company",
|
|
},
|
|
axisY: {
|
|
includeZero:false,
|
|
title: "Salary in USD(Thousands)",
|
|
interval: 10,
|
|
},
|
|
axisX: {
|
|
interval:10,
|
|
title: "Departments",
|
|
},
|
|
data: [
|
|
{
|
|
type: "rangeBar",
|
|
showInLegend: true,
|
|
yValueFormatString: "$#0.##K",
|
|
indexLabel: "{y[#index]}",
|
|
legendText: "Department wise Min and Max Salary",
|
|
dataPoints: [ // Y: [Low, High]
|
|
{x: 10, y:[80, 110], label: "Data Scientist"},
|
|
{x: 20, y:[95, 141], label: "Product Manager" },
|
|
{x: 30, y:[98, 115], label: "Web Developer" },
|
|
{x: 40, y:[90, 160], label: "Software Engineer"},
|
|
{x: 50, y:[100,152], label: "Quality Assurance"}
|
|
]
|
|
}
|
|
]
|
|
});
|
|
chart.render();
|
|
}
|
|
</script>
|
|
<script src="../../canvasjs.min.js"></script>
|
|
<title>CanvasJS Example</title>
|
|
</head>
|
|
<body>
|
|
<div id="chartContainer" style="height: 400px; width: 100%;"></div>
|
|
</body>
|
|
|
|
|
|
</html>
|