X-Git-Url: https://adrianiainlam.tk/git/?a=blobdiff_plain;f=experimental%2Fpalette%2Findex.html;h=de0cf0cce5a6c048c98834aee3213eafd02eca6f;hb=65129ba82d4efe12714be88fa3c792149c00ca10;hp=b22dbcde2b93ddfd02b2d5d051ee87f1bb7403a7;hpb=a2a0bc2d1c108637f97900ea73be16f88fa18b03;p=dygraphs.git diff --git a/experimental/palette/index.html b/experimental/palette/index.html index b22dbcd..de0cf0c 100644 --- a/experimental/palette/index.html +++ b/experimental/palette/index.html @@ -1,19 +1,17 @@ - Palette Demo - + + + + -

Palette

@@ -27,69 +25,76 @@
- Other messages: -
-
-

Learn By Doing

-
    -
  1. In the filter box, type point.
  2. -
  3. In the drawPoints text box, enter true
  4. -
  5. Press enter or click Refresh. You will - see dots on the graph where points exist.
  6. -
  7. In the pointSize text box, enter 5
  8. -
  9. Press enter or click Refresh. The dots - just got larger.
  10. -
  11. Type callback in the filter box.
  12. -
  13. Instead of a text box, you will see buttons that can be used - to define callbacks. Click the button for clickCallback.
  14. -
  15. You will see that the prototype function body is - function(e, x, points){ }. Paste in this - replacement function:

    - function(e, x){ var elem = - document.getElementById("messages"); elem.innerHTML = - elem.innerHTML + x + "<br>"; }

  16. -
  17. Click the OK button. The clickCallback - button now says defined instead of not defined.
  18. -
  19. Click anywhere on the graph. The x-value will appear on the - page.
  20. -
  21. If you click directly on a point, then an alert box will - indicate that you've clicked on a point. That's because the - pointClickCallback was defined already.
  22. -
  23. Have fun and send feedback!
  24. -
-

tips

- The palette on the right contains (most) Dygraphs options. Here's - how they work: - - - Then in the filter text box, type "point". Set drawPoints: true and - pointSize: 5. - You get the idea. +
+ instructions +
-
+
- +