ofc.js 841 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. function findSWF(movieName) {
  2. if (navigator.appName.indexOf("Microsoft")!= -1) {
  3. return window[movieName];
  4. } else {
  5. return document[movieName];
  6. }
  7. }
  8. /**
  9. * @param index as integer.
  10. *
  11. * Returns a CLONE of the chart with one of the elements removed
  12. */
  13. function chart_remove_element(chart, index)
  14. {
  15. // global_showing_old_data = !global_showing_old_data;
  16. // clone the chart
  17. var modified_chart = {};
  18. jQuery.extend(modified_chart, chart);
  19. // remove the old data from the chart:
  20. var element = modified_chart.elements[1];
  21. var elements = new Array();
  22. var c=0;
  23. for(i=0; i<modified_chart.elements.length; i++)
  24. {
  25. if(i!=index)
  26. {
  27. elements[c] = modified_chart.elements[i];
  28. c++;
  29. }
  30. }
  31. modified_chart.elements = elements;
  32. return modified_chart;
  33. }