dygraphs
Version:
dygraphs is a fast, flexible open source JavaScript charting library.
22 lines (21 loc) • 592 B
JavaScript
/*global Gallery,Dygraph,data */
//galleryActive=false
Gallery.register(
'border',
{
name: "Border test",
title: 'Graph stays within the border',
setup: function(parent) {
parent.innerHTML =
"<style>.dygraph-legend { border: 1px solid black; }</style>" +
"<div id='bordered' style='border: 1px solid red; width:600px; height:300px;'></div>";
},
run: function() {
new Dygraph(document.getElementById('bordered'), data,
{
title: 'Chart Title',
xlabel: 'Date',
ylabel: 'Temperature (F)'
});
}
});