dygraphs
Version:
dygraphs is a fast, flexible open source JavaScript charting library.
61 lines (56 loc) • 1.68 kB
HTML
<html>
<head>
<meta charset="UTF-8">
<title>Label styles</title>
<link rel="stylesheet" type="text/css" href="../dist/dygraph.css" />
<link rel="stylesheet" type="text/css" href="../common/vextlnk.css" />
<script type="text/javascript" src="../dist/dygraph.js"></script>
<script type="text/javascript" src="data.js"></script>
<style type="text/css">
/*
NOTE: dygraphs does set some properties on the built-in legend, e.g.
background-color and left. If you wish to override these, you can add
"!important" to your CSS styles, as below.
The full list of styles for which this is necessary are listed in
plugins/legend.js. They are:
o position
o font-size
o z-index
o width
o top
o left
o background
o line-height
o text-align
o overflow
*/
#div_g14 .dygraph-legend {
width: 100px;
background-color: transparent ;
left: 40px ;
}
</style>
</head>
<body>
<p>Labels are transparent and repositioned:</p>
<div id="div_g14" style="width:600px; height:300px;"></div>
<script type="text/javascript"><!--//--><![CDATA[//><!--
Dygraph.onDOMready(function onDOMready() {
g14 = new Dygraph(
document.getElementById("div_g14"),
NoisyData, {
rollPeriod: 14,
errorBars: true,
labelsSeparateLines: true,
axes: {
y: {
axisLabelWidth: 20
}
}
}
);
});
//--><!]]></script>
</body>
</html>