Remove shadow/background glow on highcharts data label?

前端 未结 4 480
感动是毒
感动是毒 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: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/

提交回复
热议问题