Remove shadow/background glow on highcharts data label?

前端 未结 4 478
感动是毒
感动是毒 2021-02-05 06:04

If you check out my http://jsfiddle.net/WOUNDEDStevenJones/oe1vcmqj/1/, the red labels on the chart have a subtle white glow behind them (in at least Chrome and FF). How do I r

相关标签:
4条回答
  • 2021-02-05 06:14

    worked for me...

    dataLabels: {
                    enabled: true,
                    color: 'white',
                    style: {
                        // textShadow: false 
                        textOutline: false
                    }
    
    0 讨论(0)
  • 2021-02-05 06:23

    Set dataLabels.styles.textShadow to false.

        plotOptions: {
            columnrange: { // or general options: "series: { ... }"
                dataLabels: {
                    enabled: true,
                    color: 'red',
                    style: {
                        textShadow: false 
                    }
                }
            }
        },
    

    Demo: http://jsfiddle.net/oe1vcmqj/2/

    EDIT:

    Since Highcharts 5.0.3, the option name is textOutline.

        plotOptions: {
            columnrange: { // or general options: "series: { ... }"
                dataLabels: {
                    enabled: true,
                    color: 'red',
                    style: {
                        textOutline: false 
                    }
                }
            }
        },
    

    Demo: http://jsfiddle.net/oe1vcmqj/49/

    EDIT v2.0:

    Since Highcharts 5.0.13, the textOutline option should be a string, so to disable outline, set textOutline: 'none'.

        plotOptions: {
            columnrange: { // or general options: "series: { ... }"
                dataLabels: {
                    enabled: true,
                    color: 'red',
                    style: {
                        textOutline: 'none' 
                    }
                }
            }
        },
    

    Demo: http://jsfiddle.net/BlackLabel/s7ejvhmu/

    0 讨论(0)
  • 2021-02-05 06:25
    dataLabels: {
          enabled: true,
          format: '{point.y}',
           style: {
              textOutline: false 
               }
            },
    
    0 讨论(0)
  • 2021-02-05 06:29

    use text-shadow:none !important; for the tag tspan

    CSS

    tspan{
        text-decoration:none;
        text-shadow:none !important;
    }
    

    FIDDLE DEMO

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