Label values - rotating och showing with tip

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
E-portal
Newbie
Newbie
Posts: 1
Joined: Wed Dec 19, 2012 12:00 am

Label values - rotating och showing with tip

Post by E-portal » Mon Dec 09, 2013 11:26 am

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
Attachments
Tip.jpg
Diagram with object id used as labelvalue.
Tip.jpg (81.42 KiB) Viewed 6806 times

Yeray
Site Admin
Site Admin
Posts: 9514
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: Label values - rotating och showing with tip

Post by Yeray » Wed Dec 11, 2013 9:26 am

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;
  }
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply