Series Line skip and label questions
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Series Line skip and label questions
How can I just skip over a point in a series if it doesn't have a value?
S1.data.values = [R1, R2, R3, R4, R5, R6, R7, R8, R9];
S1.data.x = [250, 500, 1000, 1500, 2000, 3000, 4000, 6000, 8000];
Like if R4 is a null value?
X axis labels = [".25K",".5K", "1K", "1.5K", "2K", "3K", "4K", "6K", "8K"];
I want the labels to print whether the particular point in the series has a value or not.
Also, how can I make each of the labels on the X axis be equal distance apart, even if they're numeric and not an equal value apart?
S1.data.values = [R1, R2, R3, R4, R5, R6, R7, R8, R9];
S1.data.x = [250, 500, 1000, 1500, 2000, 3000, 4000, 6000, 8000];
Like if R4 is a null value?
X axis labels = [".25K",".5K", "1K", "1.5K", "2K", "3K", "4K", "6K", "8K"];
I want the labels to print whether the particular point in the series has a value or not.
Also, how can I make each of the labels on the X axis be equal distance apart, even if they're numeric and not an equal value apart?
Re: Series Line skip and label questions
Hi,
You can add null values as in the following example:
You can add null values as in the following example:
Code: Select all
Chart1.addSeries(new Tee.Line([5,3,2,null,7,1]) );
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Re: Series Line skip and label questions
Thank you. I will give that a try.
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Re: Series Line skip and label questions
That did not work. Wondering if there is something in the setup that I am missing.
Re: Series Line skip and label questions
Hi,
Sorry, the actual version doesn't support treatNulls so with a Line series you can add the null points and they are just skipped.
The next maintenance release will include the treatNulls property that will allow you to choose between:
"skip": it doesn't draw the point but the line segment between the points before and after the null point is still drawn.
"dontPaint": the point isn't drawn and neither the segment linking the points next to it.
Sorry, the actual version doesn't support treatNulls so with a Line series you can add the null points and they are just skipped.
The next maintenance release will include the treatNulls property that will allow you to choose between:
"skip": it doesn't draw the point but the line segment between the points before and after the null point is still drawn.
"dontPaint": the point isn't drawn and neither the segment linking the points next to it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Re: Series Line skip and label questions
Is the best workaround then to stop when reaching a null, and then manually join the prior point and the next point?
Do you know of another workaround? I have worked with TeeChart in Delphi before, but not in javascript. We now need our graph on our web page.
Are there any manuals or books that can be downloaded that describe the TeeChart javascript process.
Do you know of another workaround? I have worked with TeeChart in Delphi before, but not in javascript. We now need our graph on our web page.
Are there any manuals or books that can be downloaded that describe the TeeChart javascript process.
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Re: Series Line skip and label questions
For some reason I did get part of it working today:
AChart=new Tee.Chart("canvas1");
var SerR=new Tee.Line();
R1=50, R2=null, R3=80, R4=40, R5=40, R6=50, R7=null, R8=80, R9=80 ;
SerR.data.values.clear;
SerR.data.x = [250, 500, 1000, 1500, 2000, 3000, 4000, 6000, 8000];
SerR.data.values = [R1, R2, R3, R4, R5, R6, R7, R8, R9];
SerR.data.labels = [".25K", ".5K", "1K", "1.5K", "2K", "3K", "4K", "6K", "8K"];
AChart.addSeries(SerR).pointer.visible = true;
Not sure what happened other than maybe order of lines changed.
Now to get the X=axis to space equally between the 9 points, even though their numeric difference is not equal.
Any suggestions would be appreciated.
AChart=new Tee.Chart("canvas1");
var SerR=new Tee.Line();
R1=50, R2=null, R3=80, R4=40, R5=40, R6=50, R7=null, R8=80, R9=80 ;
SerR.data.values.clear;
SerR.data.x = [250, 500, 1000, 1500, 2000, 3000, 4000, 6000, 8000];
SerR.data.values = [R1, R2, R3, R4, R5, R6, R7, R8, R9];
SerR.data.labels = [".25K", ".5K", "1K", "1.5K", "2K", "3K", "4K", "6K", "8K"];
AChart.addSeries(SerR).pointer.visible = true;
Not sure what happened other than maybe order of lines changed.
Now to get the X=axis to space equally between the 9 points, even though their numeric difference is not equal.
Any suggestions would be appreciated.
Re: Series Line skip and label questions
Hi
However, no label will be drawn where you don't have a point. So you may prefer to show the axis values instead of the series labels in the bottom axis labels:
I'm glad to hear you made it work fine. If you find what makes the difference, don't hesitate to share it with us.DALC.SENIOR wrote:Not sure what happened other than maybe order of lines changed.
You can play with the axis increment.DALC.SENIOR wrote:Now to get the X=axis to space equally between the 9 points, even though their numeric difference is not equal.
Any suggestions would be appreciated.
Code: Select all
AChart.axes.bottom.increment = 1000;
Code: Select all
AChart.axes.bottom.labels.labelStyle = "value";
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Re: Series Line skip and label questions
Yes, I have tried that and it helps, but is not what our user's expect to see.
Previously in a Delphi7 & TeeChart application I did several years ago, I manually drew grid lines on the graph in that way.
Haven't seen a way in TeeChart for javascript to do that yet.
Previously in a Delphi7 & TeeChart application I did several years ago, I manually drew grid lines on the graph in that way.
Haven't seen a way in TeeChart for javascript to do that yet.
Re: Series Line skip and label questions
Hello,
This is what I get with the code below and the actual sources we have here, isn't it what you are expecting?
If not, please, try to describe what are you expecting to achieve, or show it to us in a picture.
This is what I get with the code below and the actual sources we have here, isn't it what you are expecting?
If not, please, try to describe what are you expecting to achieve, or show it to us in a picture.
Code: Select all
var SerR=new Tee.Line();
R1=50, R2=null, R3=80, R4=40, R5=40, R6=50, R7=null, R8=80, R9=80 ;
SerR.data.values.clear;
SerR.data.x = [250, 500, 1000, 1500, 2000, 3000, 4000, 6000, 8000];
SerR.data.values = [R1, R2, R3, R4, R5, R6, R7, R8, R9];
SerR.data.labels = [".25K", ".5K", "1K", "1.5K", "2K", "3K", "4K", "6K", "8K"];
Chart1.addSeries(SerR).pointer.visible = true;
Chart1.axes.bottom.increment = 1000;
Chart1.axes.bottom.labels.labelStyle = "value";
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
-
- Newbie
- Posts: 11
- Joined: Thu Feb 28, 2013 12:00 am
Re: Series Line skip and label questions
Yes, those are the points. The problem is that it is the points that need to be equal distance apart, not the numbers.
_____ .25K_____.5K_____ 1K _____ 2K _____ 4K _____ 8K are spaced equally on the x-axis.
I also need some custom symbols for some of the points.
_____ .25K_____.5K_____ 1K _____ 2K _____ 4K _____ 8K are spaced equally on the x-axis.
I also need some custom symbols for some of the points.
Re: Series Line skip and label questions
Hello,
http://www.teechart.net/support/viewtop ... 18&t=13981
In that case, you should add the points in equidistant data.x values and show the non-equidistant values, your series labels:DALC.SENIOR wrote:Yes, those are the points. The problem is that it is the points that need to be equal distance apart, not the numbers.
_____ .25K_____.5K_____ 1K _____ 2K _____ 4K _____ 8K are spaced equally on the x-axis.
Code: Select all
Chart1=new Tee.Chart("canvas1");
var SerR=new Tee.Line();
R1=50, R2=null, R3=80, R4=40, R5=40, R6=50, R7=null, R8=80, R9=80 ;
SerR.data.values.clear;
SerR.data.values = [R1, R2, R3, R4, R5, R6, R7, R8, R9];
SerR.data.labels = [".25K", ".5K", "1K", "1.5K", "2K", "3K", "4K", "6K", "8K"];
Chart1.addSeries(SerR).pointer.visible = true;
Chart1.draw();
Since this isn't strictly related, please, continue the discussion in the according thread if the solution suggested doesn't fit your needs:DALC.SENIOR wrote:I also need some custom symbols for some of the points.
http://www.teechart.net/support/viewtop ... 18&t=13981
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |