Page 1 of 1

A SINGLE series that has individual 'bitmaps' as points.

Posted: Tue Oct 12, 2010 3:09 am
by 8751509
Greetings,

I've asked this question kind of before .. but I'm still not sure .. so why not keep asking questions until I get my write permission taken away from me :-p

Is there a way to have a single series that has arbitrary and possibly unique bitmaps/icons/whatever they are called at the point values.

The other code on here I have found seem to have 1 series using 1 'custom' image for the point.
I want 1 series using multiple images

Now I can apply my images on the chart, but right now each image is its own series ... i.e. shows up in TChart.Series.Count collection .... 1 for each bitmap I use ..
This was not a problem until I started trying to build a "Value Line" tool based around the CursorTool .... on average I might have up 10 series of various types plotted on the screen as at any one time .. the cursor tool functions and snaps its way across the screen without problem .. but I have somtimes 80 single images to annotate my graph and the Cursor tool slows waaaaaaaaaaaaaaaaaaaaay down.

My underlying ValueLine code does NOT iterate through the series collection as I "SnapChange" each movement ... which somewhat confused me (I thought I was traversing too many series .. but no) and made me wonder why the cursor tool was slowing ...

If I dont plot the 80 or so bitmaps all is wonderful again ... so methinks .. reducing 80 single value series .. to 1, 80 point series could be the answer ... possible ???

Cheers.

Re: A SINGLE series that has individual 'bitmaps' as points.

Posted: Wed Oct 13, 2010 8:26 am
by narcis
Hi Phil,

The optimal solution here I think it would be extending ImagePoint series with an image sort of valuelist so that you can use to store each point image so that when your series points are painted you get the image from the images valuelist/array using drawn point index.

Here there's an ImagePoint implementation. Instead of using a fixed image you could get it from mentioned valuelist/array using index argument in DrawValue. An example of a custom series with an additional ValueList can be seen here.

BTW: If you create your own custom series you might be interested in knowing about serialization issues discussed here.

Hope this helps!!

Re: A SINGLE series that has individual 'bitmaps' as points.

Posted: Sun Oct 24, 2010 10:47 pm
by 8751509
Whoops .. I posted my thanks and my solution but its gone ... oh well ... cheers again ... ;-)