Adding Y Axis Titles Built-in feature in V5.8

Comments

9 comments

  • Avatar
    Jim Thomas

    Can you show add some script to control style of the titles: font, size, color, weight?  Also how to adapt to single Y axis chart and add title to X axis.  Thanks.

    0
    Comment actions Permalink
  • Avatar
    Andrea

    I am also interested to know how to add titles to the X axis.  Please advice.  Thank you.

    0
    Comment actions Permalink
  • Avatar
    Eli

    Hi Andrea, 

    You can add x Axis title by applying the following code:

     

    widget.on('render', function(se,ev){
    if(se.queryResult.xAxis.title == undefined){
    se.queryResult.xAxis.title = {};
    }
    se.queryResult.xAxis.title.text = 'This is the X Axis';
    })

     

    For both axes you can use:

     

    widget.on('render', function(se,ev){
    if(se.queryResult.xAxis.title == undefined){
    se.queryResult.xAxis.title = {};
    }
    if(se.queryResult.yAxis[0].title == undefined){
    se.queryResult.yAxis[0].title = {};
    }
    se.queryResult.xAxis.title.text = 'This is the X Axis';
    se.queryResult.yAxis[0].title.text = 'This is the left Y Axis';
    })

    0
    Comment actions Permalink
  • Avatar
    Nick

    Hi there - is it possible to change the font style/colour/size when using this script?

    0
    Comment actions Permalink
  • Avatar
    Ido Darnell

    Hi Nick,

    for this, please see:

    https://support.sisense.com/entries/58789440-Column-and-Line-Chart-Formatting

     

     

    0
    Comment actions Permalink
  • Avatar
    Nick

    Thanks

    0
    Comment actions Permalink
  • Avatar
    Movile Service

    It is not working on the new version (6.2.2.35). Does someone knows why?

    0
    Comment actions Permalink
  • Avatar
    Tommy

    This feature was included in version 5.8, so it should no longer be necessary to use this script to add axis titles. https://www.sisense.com/documentation/v5/creating-dashboards/finetuning-widget-widget-designer/line-chart/#Design_Line 

    0
    Comment actions Permalink
  • Avatar
    Movile Service

    Tommy, it is possible to put a title into ONE axis y, right? How can I insert into 2 axis y?

     

    Thanks!

    0
    Comment actions Permalink

Please sign in to leave a comment.