I've been working on some bugs and features, and while at it, been pushing some nice new features into the experimental palette that makes it eminently more useful. Let's take a tour. You can play along at http://www.dygraphs.com/experimental/palette
1. Option Set drop-down
Using the Option Set dropdown on the palette, you can configure any axis or series that you like.
Go ahead and select line (series). You'll see a subset of the options that apply to individual series.
2. Move the line series to the second y-axis.
In the axis text box, type "y2" and press "enter" (or click Redraw, if you prefer.) The second axis will appear.
3. Configure the second y-axis.
The line is on the second y-axis, but it's not obvious. Let's make all series on the second y-axis stand out. Select y2 axis from the Option Set drop-down, and set drawPoints to true, and and pointSize to 5. Click Redraw. Presto!
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiojh_BxK0LO5hlyYoc2Tle7SJiDym5CGfVEKo0C9QkOZO67EY7Evu6F3dzZFmQsqPWqt0beT7z1SeaG-kbBvGSdQ-GfNNCpx8tH3-U06Pg-5yBhPMYaHdRQJlw7vi_KDrtgsl_hk8kQQ8/s640/4.jpg)
4. View the options as a hash.
On the top-right of the palette is a link "to hash". Click it, and the options text box appears.
5. Change the options as a text object.
Sometimes tweaking via the object hash is the way to go. In the text box, change axisLineColor from white to green. Then click OK.
OK I didn't pick the best example because it's hard to see, but this axis is green.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhGuoWJe9yPJRuOkgV-_KASyEtF_0hsyZ_xoAGmrc34QC2xRcJyeWy8xIZvrS6WNg4pytLB0tWbI8m2gafds_Zg4z6HrVpzRv36fT9iYiih7TfEx7WSs_8f3bme7bBTxWbgVUzEOYL9bts/s640/7.jpg)
Let's zoom in:
There you go! (hmm... why is there a little red in the axis?) Probably to help celebrate the christmas spirit. Happy New Year!
No comments:
Post a Comment