Page 1 of 1

Label values - rotating och showing with tip

Posted: Mon Dec 09, 2013 11:26 am
by 17764425
Hi,
I´m working with charts from tables like :

Code: Select all

Chart1.fromTable('2',Tee.Line,'True',0,0);


Using dates as label values, the are long, so I would like to rotate them 90 degr. Can´t work this out.
Have tried with different codes like:

Code: Select all

Chart2.axes.bottom.labelvalues.rotation = (90:0) ; 

Also have some truble with the tip tool.

Code: Select all

tip.ongettext = function(tool, text, series, index) {
  var s = 'Series point: ' + index.toFixed(0) + '\nValue: ' + series.data.values[index].toFixed(2);
  return s;
  }
I want to show the labelvalue instead of the index as Series point.

Best would be to show a Timestamp, that is a second labelvalue incerted in the table, within the tip frame. Can I work with dubble x-values like this ? If so; how ?


My grateful regards
TG

Re: Label values - rotating och showing with tip

Posted: Wed Dec 11, 2013 9:26 am
by yeray
Hello,
E-portal wrote:Using dates as label values, the are long, so I would like to rotate them 90 degr. Can´t work this out.
Have tried with different codes like:

Code: Select all

Chart2.axes.bottom.labelvalues.rotation = (90:0) ; 
Try this:

Code: Select all

Chart1.axes.bottom.labels.rotation=90;
E-portal wrote:Also have some truble with the tip tool.

Code: Select all

tip.ongettext = function(tool, text, series, index) {
  var s = 'Series point: ' + index.toFixed(0) + '\nValue: ' + series.data.values[index].toFixed(2);
  return s;
  }
I want to show the labelvalue instead of the index as Series point.

Best would be to show a Timestamp, that is a second labelvalue incerted in the table, within the tip frame. Can I work with dubble x-values like this ? If so; how ?
Try with series.data.labels[index] instead of index.toFixed(0):

Code: Select all

  tip.ongettext = function(tool, text, series, index) {
    var s = 'Series point: ' + series.data.labels[index] + '\nValue: ' + series.data.values[index].toFixed(2);
    return s;
  }