Transparent annotations?

TeeChart for JavaScript for the HTML5 Canvas
Post Reply
Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

Transparent annotations?

Post by Jim Green » Tue Dec 02, 2014 4:28 pm

Can the background of an Annotation be made transparent?

Thanks.

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

Re: Transparent annotations?

Post by Yeray » Wed Dec 03, 2014 11:51 am

Hi Jim,

Try setting an empty format.fill (""). Ie:

Code: Select all

  Chart1.legend.visible=false;
  
  series1 = Chart1.addSeries(new Tee.Area()).addRandom();
  
  var a1=new Tee.Annotation(Chart1);
  a1.format.fill="";
  a1.format.stroke.fill="darkgray";
  a1.format.font.style="14px Tahoma";
  a1.format.font.fill="black";
  a1.text="This is an\nannotation\nwith a long\ntext in it";
  a1.position.x=50;
  a1.position.y=100;
  Chart1.tools.add(a1);
  
  Chart1.draw();
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

Jim Green
Newbie
Newbie
Posts: 43
Joined: Thu Aug 03, 2006 12:00 am

Re: Transparent annotations?

Post by Jim Green » Thu Dec 04, 2014 5:51 pm

Yes, that works. Thank you!

Post Reply