Guest User

Untitled

a guest
May 24th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. function save() {
  2. let data = {
  3. datasets: myChart.data.datasets
  4. };
  5. $.post('/save',
  6. {
  7. savedData: JSON.stringify(data),
  8. color: document.getElementById("color").value,
  9. ...
  10. }
  11. )
  12. }
  13.  
  14. require(["dojox/json/ref"], function(){
  15. let data = {
  16. datasets: dojox.json.ref.toJson(...)
  17. }
  18. $.post('/save',
  19. ...
  20. });
  21.  
  22. require(["dojox/json/ref"], function(){
  23. data = dojox.json.ref.fromJson(...);
  24. });
  25.  
  26. <script src="//ajax.googleapis.com/ajax/libs/dojo/1.13.0/dojo/dojo.js"></script>
Add Comment
Please, Sign In to add comment