Highcharts chart option backgroundColor:'transparent' showing black on IE 8

前端 未结 7 812
小鲜肉
小鲜肉 2020-12-08 12:41

Highcharts chart option backgroundColor:\'transparent\' showing black on IE 8

histogram = new Highcharts.Chart({
              


        
相关标签:
7条回答
  • 2020-12-08 13:07

    Try this solution:

    histogram = new Highcharts.Chart({
                    chart: { renderTo: 'histogram', defaultSeriesType: 'bar',
                             backgroundColor:'rgba(255, 255, 255, 0.0)'
                    }
    
    0 讨论(0)
  • 2020-12-08 13:08

    I found this in Highcharts sources:

    Empirical lowest possible opacities for TRACKER_FILL

    • IE6: 0.002
    • IE7: 0.002
    • IE8: 0.002
    • IE9: 0.00000000001 (unlimited)
    • IE10: 0.0001 (exporting only)
    • FF: 0.00000000001 (unlimited)
    • Chrome: 0.000001
    • Safari: 0.000001
    • Opera: 0.00000000001 (unlimited)

    TRACKER_FILL = 'rgba(192,192,192,' + (hasSVG ? 0.0001 : 0.002) + ')'

    So you can set the chart background color to 'rgba(255,255,255,0.002)' and it runs in the most important browsers.

    0 讨论(0)
  • 2020-12-08 13:18
    backgroundColor:'rgba(255, 255, 255, 0.0)',
    
    0 讨论(0)
  • 2020-12-08 13:23

    backgroundColor: 'transparent' also working if you need type safety.

    0 讨论(0)
  • 2020-12-08 13:29

    May be you have to write

    filter:0 !important;
    

    in your css.

    0 讨论(0)
  • 2020-12-08 13:30

    Can you try this -

    backgroundColor: null
    

    See on: jsfiddle

    0 讨论(0)
提交回复
热议问题