Home Forums Chart Support Error chart indexLabel

Error chart indexLabel

Viewing 2 posts - 1 through 2 (of 2 total)
  • #36978

    When using Error chart combined with Bar chart i want to show text close to the whisker, but when option indexLabel is used on Error chart it shows text near both whiskers. Is it possible to show text near only one whisker and pick near left/right/top/bottom to show?
    Ideally would be awesome if this text can be shown at the tick side (inside bar if it fits, or outside if not).

    https://jsfiddle.net/324ky8pn/

    #36988

    @kurser,

    Is it possible to show text near only one whisker and pick near left/right/top/bottom to show?

    You can show a specific indexLabel by checking its index parameter within indexLabelFormatter as shown in the code snippet below –

    indexLabelFormatter: function(e){
      if(e.index === 0)
        return e.dataSeries.name + " -  " + e.dataPoint.y[1];
      else
        return " ";
    }

    In your case, you can use indexLabelPlacement to postion the indexLabel to left or right of whisker but positioning to it to top or bottom is not available as of now.

    Please take a look at this JSFiddle for a working example with complete code.

    Displaying one indexLabel in error chart

    Ideally would be awesome if this text can be shown at the tick side (inside bar if it fits, or outside if not).

    Can you please brief us more on the above requirement?

    ___________
    Indranil Singh Deo
    Team CanvasJS

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

You must be logged in to reply to this topic.