Bar patterns

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

Bar patterns

Post by Jim Green » Tue Aug 12, 2014 4:14 pm

Hello, I'm using the latest (?) v1.7 July 2014 teechart.js. I believe this includes a fix to http://bugs.teechart.net/show_bug.cgi?id=831, involving patterns in bar series. While the image does appear, it is stretched to the bar rectangle. An image needs to be tiled to serve as a pattern. Is this something that can be done?

Also, in VCL, a two color, B&W pattern displays with the series colors. If this is not possible, I can create a pattern per-color, though this is obviously extra work.

I can provide a sample if you need it.

Thanks.

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

Re: Bar patterns

Post by Yeray » Wed Aug 13, 2014 3:03 pm

Hello,
Jim Green wrote:I'm using the latest (?) v1.7 July 2014 teechart.js. I believe this includes a fix to http://bugs.teechart.net/show_bug.cgi?id=831, involving patterns in bar series. While the image does appear, it is stretched to the bar rectangle. An image needs to be tiled to serve as a pattern. Is this something that can be done?
I see. I've reopened the ticket and added a comment to it so it can be revised.
Jim Green wrote:Also, in VCL, a two color, B&W pattern displays with the series colors. If this is not possible, I can create a pattern per-color, though this is obviously extra work.
I've added a new ticket to the public tracker:
http://bugs.teechart.net/show_bug.cgi?id=885
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: Bar patterns

Post by Jim Green » Wed Aug 13, 2014 4:34 pm

Thanks.

FWIW, I added tiling by adding a "style" property to ChartImage and using createPattern/fill when style is "repeat" (instead of drawImage). Source attached.

Note that it also allows repeat-x, repeat-y and no-repeat, though only "repeat" works. Maybe you'll spot why - I'm a complete noob at Canvas drawing.

(I also disabled "hassymbol" in Legend to allow symbols to show in more cases.)

Jim.

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

Re: Bar patterns

Post by Yeray » Thu Aug 14, 2014 2:16 pm

Hi Jim,

I've removed the attachment because it contained the source code of TeeChart.
However, I downloaded it first and I'll post it in the ticket B831 as a private comment so it can be studied for implementation in next releases.
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: Bar patterns

Post by Jim Green » Thu Aug 14, 2014 2:43 pm

Sorry! Should have thought of that...

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

Re: Bar patterns

Post by Yeray » Thu Aug 14, 2014 2:49 pm

Hi Jim,
Jim Green wrote:Sorry! Should have thought of that...
No problem!
And thanks for sharing the fix proposal!
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