Added pixelRatio option to override canvas upscaling. Resolves #876, test included...
[dygraphs.git] / tests / customLabel.html
CommitLineData
54425b14 1<!DOCTYPE html>
8e4a6af3
DV
2<html>
3 <head>
fd6b8dad 4 <link rel="stylesheet" href="../dist/dygraph.css">
8e4a6af3 5 <title>Label styles</title>
fbd6834a 6 <script type="text/javascript" src="../dist/dygraph.js"></script>
7e5ddc94 7
8e4a6af3 8 <script type="text/javascript" src="data.js"></script>
3f6b0b18
DV
9 <style type="text/css">
10 /*
11 NOTE: dygraphs does set some properties on the built-in legend, e.g.
12 background-color and left. If you wish to override these, you can add
13 "!important" to your CSS styles, as below.
14
15 The full list of styles for which this is necessary are listed in
16 plugins/legend.js. They are:
17 o position
18 o font-size
19 o z-index
20 o width
21 o top
22 o left
23 o background
24 o line-height
25 o text-align
26 o overflow
27 */
28 #div_g14 .dygraph-legend {
29 width: 100px;
30 background-color: transparent !important;
31 left: 40px !important;
32 }
33 </style>
8e4a6af3
DV
34 </head>
35 <body>
36 <p>Labels are transparent and repositioned:</p>
d16579a0 37 <div id="div_g14" style="width:600px; height:300px;"></div>
8e4a6af3
DV
38
39 <script type="text/javascript">
285a6bda 40 g14 = new Dygraph(
d16579a0 41 document.getElementById("div_g14"),
285a6bda 42 NoisyData, {
8e4a6af3
DV
43 rollPeriod: 14,
44 errorBars: true,
285a6bda 45 labelsSeparateLines: true,
2b66af4f
DV
46 axes: {
47 y: {
48 axisLabelWidth: 20
49 }
50 }
8e4a6af3
DV
51 }
52 );
53 </script>
54 </body>
55</html>