Home Forums Chart Support change individual label color

change individual label color

Viewing 6 posts - 1 through 6 (of 6 total)
  • #21581

    To emphasizea single bar I can change the bar to a different color. I much rather emphasize an individual or several bars by changing the font weight, or color of the label. Is that possible?

    #21586

    @PierreLCoulombe,

    Changing font weight or color of the axis label for individual dataPoint is not possible as of now.

    However, you can use stripLines to achieve the same. Please take a look at this jsfiddle, where the fontColor and fontWeight of stripLine labels are set to achieve a label as that of axis label.
    __
    Priyanka M S
    Team CanvasJS

    #21595

    Thanks but values are actually text not numbers so that won’t help. It did give me the idea of using striplines areas but again the start end points have to be numbers or dates. It would be nice to have a feature involving datapoints where one could use a reference number, or element number, row number to set stripline conditions instead of the actual datapoint value.

    #21596

    @pierrelcoulombe,

    You can set label of a stripLine using label property. With the help of addTo method, you can add stripLines at desired places after chart is rendered.

    Please take a look at this updated JSFiddle, where you can change the color of axisX labels by passing labelFontColor property in specific dataPoint.


    Vishwas R
    Team CanvasJS

    #21599

    That works well for me. Makes a complex text file easier to read. see this JS Fiddle

    #21604

    @pierrelcoulombe,

    I’m glad to hear it worked well for you :)


    Vishwas R
    Team CanvasJS

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.