source: code/Website/js-ofc-library/ofc.js@ 7937

Last change on this file since 7937 was 7849, checked in by dennisw, 15 years ago
File size: 878 bytes
Line 
1function findSWF(movieName) {
2 if (navigator.appName.indexOf("Microsoft")!= -1) {
3 return window[movieName];
4 } else {
5 return document[movieName];
6 }
7}
8
9
10/**
11 * @param index as integer.
12 *
13 * Returns a CLONE of the chart with one of the elements removed
14 */
15function chart_remove_element(chart, index)
16{
17
18 // global_showing_old_data = !global_showing_old_data;
19
20 // clone the chart
21 var modified_chart = {};
22 jQuery.extend(modified_chart, chart);
23
24 // remove the old data from the chart:
25 var element = modified_chart.elements[1];
26 var elements = new Array();
27 var c=0;
28 for(i=0; i<modified_chart.elements.length; i++)
29 {
30 if(i!=index)
31 {
32 elements[c] = modified_chart.elements[i];
33 c++;
34 }
35 }
36 modified_chart.elements = elements;
37 return modified_chart;
38}
Note: See TracBrowser for help on using the repository browser.