2012-10-17 2 views
0

xml 데이터를 통해 생성되는 두 개의 차트가 있습니다. IE9에서는 작동하지 않습니다. 여기IE9에서 하이 차트

코드 :

var chart;var chartB; 
jQuery(function() { 

    var options = { 
     chart: { 
      renderTo: 'container', 
      type: 'column', 
      marginTop: 160 

     }, 
     title: { 
      text: 'Wochen\u00FCbersicht', 
     }, 
     xAxis: { 
      categories: [] 

     }, 
     yAxis: { 
      title: { 
       text: 'Minuten' 

      }, 

     }, 

일련 여기

   Highcharts.setOptions({ colors: ['#faebd7', '#00ffff ', '#000000', '#0000ff', '#8a2be2', '#7fff00', '#00008b', '#008000', '#ff1493', '#800000', '#ffa500', '#006400', '#ffff00', '#008080', '#ff0000', '#000080', '#bdb76b', '#20b2aa', '#ffd700', '#00ffff',] }); 
      }); 
      var chart = new Highcharts.Chart(options); 
     }); 

세트 색 제 차트

var options2 = { 
     chart: { 
      renderTo: 'containerB', 
      type: 'column', 

     }, 

     title: { 
      text: 'Monats\u00FCbersicht', 
     }, 
     xAxis: { 
      categories: [] 

     }, 
     yAxis: { 
      title: { 
       text: 'Minuten' 
      }, 
     }, 
     series: [] 
    }; 
    // Load the data from the XML file 

     $.get('Monat.xml', function(xml) { 

      // Split the lines 
      var $xml = $(xml); 

      // push categories 
      $xml.find('categories Monat').each(function(i, category) { 
       options2.xAxis.categories.push($(category).text()); 
      }); 

      // push series 
      $xml.find('series').each(function(i, series) { 
       var seriesOptions = { 
        name: $(series).find('name').text(), 
        data: [] 
       }; 

       // push data points 
       $(series).find('data Minuten').each(function(i, Minuten) { 
        seriesOptions.data.push(
         parseInt($(Minuten).text()) 
        ); 
       }); 

       // add it to the options 
       options2.series.push(seriesOptions); 
       Highcharts.setOptions({ colors: ['#faebd7', '#00ffff ', '#000000', '#0000ff', '#8a2be2', '#7fff00', '#00008b', '#008000', '#ff1493', '#800000', '#ffa500', '#006400', '#ffff00', '#008080', '#ff0000', '#000080', '#bdb76b', '#20b2aa', '#ffd700', '#00ffff',] }); 
      }); 
      var chartB = new Highcharts.Chart(options2); 
     }); 

    });   
,369에게
 series: [] 
    };`load Data from xml file` 
    // Load the data from the XML file 
     $.get('Woche.xml', function(xml) { 

      // Split the lines 
      var $xml = $(xml); 

      // push categories 
      $xml.find('categories Monat').each(function(i, category) { 
       options.xAxis.categories.push($(category).text()); 
      }); 

      // push series 
      $xml.find('series').each(function(i, series) { 
       var seriesOptions = { 
        name: $(series).find('name').text(), 
        data: [] 
       }; 

       // push data points 
       $(series).find('data Minuten').each(function(i, Minuten) { 
        seriesOptions.data.push(
         parseInt($(Minuten).text()) 
        ); 
       }); 

       // add it to the options 
       options.series.push(seriesOptions); 

시작

XML에서 채워진다

답변

3

각 차트의 JSON 옵션을 보면 IE에서 지원되지 않는 yAxis 제목 뒤에 쉼표가 있습니다.