| 1 | <!DOCTYPE html> |
| 2 | <html> |
| 3 | <head> |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9"> |
| 5 | <title>Label styles</title> |
| 6 | <!--[if IE]> |
| 7 | <script type="text/javascript" src="../excanvas.js"></script> |
| 8 | <![endif]--> |
| 9 | <!-- |
| 10 | For production (minified) code, use: |
| 11 | <script type="text/javascript" src="dygraph-combined.js"></script> |
| 12 | --> |
| 13 | <script type="text/javascript" src="../dygraph-dev.js"></script> |
| 14 | |
| 15 | <script type="text/javascript" src="data.js"></script> |
| 16 | </head> |
| 17 | <body> |
| 18 | <p>Labels are styled with css3:</p> |
| 19 | <div id="div_g14" style="width:600px; height:300px;"></div> |
| 20 | |
| 21 | <script type="text/javascript"> |
| 22 | g14 = new Dygraph( |
| 23 | document.getElementById("div_g14"), |
| 24 | NoisyData, { |
| 25 | rollPeriod: 14, |
| 26 | errorBars: true, |
| 27 | labelsDivWidth: 100, |
| 28 | labelsDivStyles: { |
| 29 | 'backgroundColor': 'rgba(200, 200, 255, 0.75)', |
| 30 | 'padding': '4px', |
| 31 | 'border': '1px solid black', |
| 32 | 'borderRadius': '10px', |
| 33 | 'boxShadow': '4px 4px 4px #888' |
| 34 | }, |
| 35 | labelsSeparateLines: true, |
| 36 | yAxisLabelWidth: 20 |
| 37 | } |
| 38 | ); |
| 39 | </script> |
| 40 | </body> |
| 41 | </html> |