override which series appears in legend
override which series appears in legend
Is there a way to exclude a series from appearing in the legend? It must remain visible.
Re: override which series appears in legend
Hello,
http://bugs.teechart.net/show_bug.cgi?id=731
Feel free to add your mail to the CC list to be automatically notified when an update arrives.
I've just added it to the wish list to be implemented in future releases:WCantrall wrote:Is there a way to exclude a series from appearing in the legend? It must remain visible.
http://bugs.teechart.net/show_bug.cgi?id=731
Feel free to add your mail to the CC list to be automatically notified when an update arrives.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: override which series appears in legend
Has this been implemented yet?
We're porting some TeeChart_PHP scripts to Javascript / HTML5 and rely on it quite heavily. Happy to test a beta version, as our system won't be going live immediately.
Alternatively, is there a way to override a legend draw method/event?
Kind regards
Mark
We're porting some TeeChart_PHP scripts to Javascript / HTML5 and rely on it quite heavily. Happy to test a beta version, as our system won't be going live immediately.
Alternatively, is there a way to override a legend draw method/event?
Kind regards
Mark
Re: override which series appears in legend
Hi Mark,
I'm afraid it hasn't been implemented yet.
I've incremented the issue Importance so it can be reviewed asap.
I'm afraid it hasn't been implemented yet.
I've incremented the issue Importance so it can be reviewed asap.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: override which series appears in legend
I've implemented a crude "showInLegend" into javascript version 2014.07.31.1.7 (attached) if that's of any help to anyone?
Hopefully it can be tidied up adopted in the main source
Mark
Hopefully it can be tidied up adopted in the main source
Mark
Re: override which series appears in legend
Hi Mark,
I've removed the attachment in your post because it contains a the TeeChart sources.
We'll study your implementation and we'll be back to you here asap.
**** EDIT ****
For those customers interested in the implementation Mark has just proposed, I'll try to explain it here:
1. Initialize the property at Tee.Series:
2. Add the appropriate condition at drawSeries:
3. Change itemsCount accordingly:
I've removed the attachment in your post because it contains a the TeeChart sources.
We'll study your implementation and we'll be back to you here asap.
**** EDIT ****
For those customers interested in the implementation Mark has just proposed, I'll try to explain it here:
1. Initialize the property at Tee.Series:
Code: Select all
Tee.Series=function(o,o2) {
this.chart=null;
this.data={ values:[], labels:[], source:null }
this.yMandatory=true;
this.horizAxis="bottom";
this.vertAxis="left";
this.showInLegend=true; //AMJ: added ShowInLegend
//...
Code: Select all
this.drawSeries=function(index,order) {
var s=chart.series.items[index];
if ((this.showHidden || s.visible) && s.showInLegend) { //AMJ: added ShowInLegend
this.drawItem(s.titleText(index),s,order,true);
return true;
}
else
return false;
}
Code: Select all
this.itemsCount=function() {
//...
if ((st==="values") && (result>0))
result=ss.firstVisible().legendCount();
else
{
if (((st==="auto") && (result>1)) || (st==="series")) { //AMJ: added ShowInLegend - remove count where not showInLegend?
var t;
for(t=0; t<ss.items.length; t++)
if (!ss.items[t].showInLegend) result--;
}
else
if (result==1)
result=ss.firstVisible().legendCount();
}
//...
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: override which series appears in legend
Whoops - Sorry - didn't think!Yeray wrote:I've removed the attachment in your post because it contains a the TeeChart sources.
Re: override which series appears in legend
Hi,
Thanks for sharing it!
No worries. I've edited the post above to show your proposal.amjonas wrote:Whoops - Sorry - didn't think!
Thanks for sharing it!
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: override which series appears in legend
There have been two releases of Javascript/HTML5 since this post, and it's not been implemented in the core.
Any problems with the implementation? it matches VCL/PHP which we also use.
Slightly bored of continuing to have to update the new releases!
Mark
Any problems with the implementation? it matches VCL/PHP which we also use.
Slightly bored of continuing to have to update the new releases!
Mark
Re: override which series appears in legend
Hello Mark,
Excuse us for the delay here.
I've added your implementation to the internal sources so the next maintenance release with include it.
Excuse us for the delay here.
I've added your implementation to the internal sources so the next maintenance release with include it.
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |
Re: override which series appears in legend
Hello,
Note we decided to change showInLegend for legend.visible.
So with the next update you'll be able to do:
Note we decided to change showInLegend for legend.visible.
So with the next update you'll be able to do:
Code: Select all
Chart1.series.items[0].legend.visible=false;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |