D3.js + C3.js
D3.js C3.js. C3 - D3.
, :
HTML
<div id="chart"></div>
JS
var chart = c3.generate({
data: {
columns: [
['data1', 90, 99, 87, 78, 89, 67, 85, 67, 85, 100]
],
type: 'bar'
}
});
JSFIDDLE
D3.js + NVD3.js
NVD3.js - D3.js, C3.js.
:
HTML
<div id='chart'>
<svg style='height:500px'> </svg>
</div>
JS
nv.addGraph(function() {
var chart = nv.models.discreteBarChart()
.x(function(d) { return d.label })
.y(function(d) { return d.value })
.staggerLabels(true)
.tooltips(false)
.showValues(true)
.transitionDuration(350)
;
d3.select('#chart svg')
.datum(exampleData())
.call(chart);
nv.utils.windowResize(chart.update);
return chart;
});
function exampleData() {
return [
{
key: "Cumulative Return",
values: [
{
"label" : "A Label" ,
"value" : 90
} ,
{
"label" : "B Label" ,
"value" : 99
} ,
{
"label" : "C Label" ,
"value" : 87
} ,
{
"label" : "D Label" ,
"value" : 78
} ,
{
"label" : "E Label" ,
"value" : 89
} ,
{
"label" : "F Label" ,
"value" : 67
} ,
{
"label" : "G Label" ,
"value" : 85
} ,
{
"label" : "H Label" ,
"value" : 67
},
{
"label" : "I Label" ,
"value" : 85
} ,
{
"label" : "J Label" ,
"value" : 100
}
]
}
]
}
JSFIDDLE
jQuery Flot
jQuery.flot - jQuery, HTML Canvas.
:
JS
var d1 = [[1,90], [2,99], [3,87], [4,78], [5,89], [6,67], [7,85], [8,67], [9,85], [10,100]];
$(document).ready(function () {
$.plot($("#placeholder"), [
{
data: d1,
bars: {
show: true
}
}
]);
});
HTML
<div id="placeholder"></div>
CSS
#placeholder {
width: 450px;
height: 200px;
}
JSFIDDLE
CSV
CSV- , .