tchart legend & pointers lazarus / 55-TAChart ---------------------------------------------------------------------- mmab · 2010-09-25 02:39 Hi, I've noticed an unusual behavior of tchart legend. A line series with a pointer is not properly drawn in the legend field. I can only obtain the line color not the pointer. I guess this is a missing part. I tried to check it if it is still missing at the daily snapshot but looks like http://www.hu.freepascal.org/lazarus/ is not responding. I also would like to see a bunch of different pointers such as triangle, left/right triangle. But, I'd like to congratulate for the efforts to Tchart. I hope 3D plotting will be added in near future. (I can share some info such as Z-buffer on this topic) Thanks. MMAB ---------------------------------------------------------------------- Ask · 2010-09-26 01:51 Quote from: mmab on September 25, 2010, 04:39:00 amHi, I've noticed an unusual behavior of tchart legend. A line series with a pointer is not properly drawn in the legend field. I can only obtain the line color not the pointer. I guess this is a missing part. I tried to check it if it is still missing at the daily snapshot but looks like http://www.hu.freepascal.org/lazarus/ is not responding. You are right, this was a TODO item, (you can see a list of them on the wiki). Implemented in r27461-27462, should be available in the next snapshot. Quote from: mmab on September 25, 2010, 04:39:00 amI also would like to see a bunch of different pointers such as triangle, left/right triangle. Added those in r27463. Note that you can create custom pointers via OnShowPointer event. Quote from: mmab on September 25, 2010, 04:39:00 amI hope 3D plotting will be added in near future. Which kind of 3D plot do you need? TAChart already has support for 3D versions of line, bar and area series. Quote from: mmab on September 25, 2010, 04:39:00 amI can share some info such as Z-buffer on this topic Chart drawing is a typical application of painter's algorithm, so Z-buffer in not needed. On the other hand, moving to full OpenGL implementation would be interesting, but require nearly total rewrite, so is not likely to happen soon. ---------------------------------------------------------------------- mmab · 2010-09-26 23:10 Thanks for the reply. The 3D I mean is a line, a bar or a surface as in http://www.google.com/imgres?imgurl=http://www.cyber- wit.com/images/gallery/surface1_b.png&imgrefurl=http://www.cyber-wit.c om/gallery_surface.html&h=320&w=450&sz=98&tbnid=81r-jLT- x2h_QM:&tbnh=90&tbnw=127&prev=/images%3Fq%3D3d%2Bsurface&zoom=1&q=3d+s urface&usg=__sycNZSK_Fgr2XCzp1-Dmj-1EXjY=&sa=X&ei=m- mfTJagKYLGlQfMos3ZCQ&ved=0CB8Q9QEwAw Regards, MMAB ---------------------------------------------------------------------- Ask · 2010-09-27 03:13 Quote from: mmab on September 27, 2010, 01:10:08 amThe 3D I mean is a line, a bar or a surface Lines and bars already work, see demo/3d. Surface, on the other hand, is not even planned yet. ---------------------------------------------------------------------- mmab · 2010-09-27 03:43 Thanks for the info. I've downloaded the latest trunk version and I've noticed that you've solved the legend issue. I've developed a basic project with two charts on the same form, I've selected animate option at zoom for both. Whenever I zoom to one of charts, I no longer zoom in at the other chart. Is this a bug? What do you think? I knew the 3d look demo. I am not mentioning the 3d look, actual 3d plot, for example: a line that describes a helix x=3cos 3t y=3sin 3t z=t 0=length(data); end; thanks MMAB ---------------------------------------------------------------------- Ask · 2010-09-30 09:35 Quotea huge amount of data (10000-50000 data points) You do realize that this is about 10-100 data points *per pixel*? Such chart would be totally incomprehensible except for extreme zoom- in levels. And if you zoom in enough, pointers became less overlapped too. So, can you describe the problem more completely -- what are you trying to achieve by building such a chart? Maybe what you really need is a more general "overview mode", where too-dense series are automatically (or manually) replaced by a coarse-grained versions to allow user to select an appropriate area to zoom into? In other words, I think the feature you propose is too niche and suggest you think of a more general feature instead ;-) That said, you can already do exactly what you asked for: 1) Set ShowPoints=true, Pointer.Style=psNone 2) In OnDrawPointer pointer event, draw a pointer only if   AIndex mod FYourFrequency = 0 ---------------------------------------------------------------------- mmab · 2010-09-30 19:04 I tried to draw 100k points but the application cannot respond, I first thought of the pointer drawing is the bottle neck of the code. So you QuoteSo, can you describe the problem more completely -- what are you trying to achieve by building such a chart? Maybe what you really need is a more general "overview mode", where too-dense series are automatically (or manually) replaced by a coarse-grained versions to allow user to select an appropriate area to zoom into? I wanted to mention this to bring out the development of fast drawing series, i.e if a couple of x values corresponds to a same pixel column then, take min and max of the data (to identify max and min y pixels to draw) for that couple and use it for pixel drawing. Thanks. MMAB ---------------------------------------------------------------------- Ask · 2010-10-04 11:48 I fixed zooming bug, please test and close the issue if ok. Quote from: mmab on September 30, 2010, 09:04:19 pmI tried to draw 100k points but the application cannot respond, I first thought of the pointer drawing is the bottle neck of the code. That's right, very long series should not display pointers for fast drawing. Quote from: mmab on September 30, 2010, 09:04:19 pmI wanted to mention this to bring out the development of fast drawing series, i.e if a couple of x values corresponds to a same pixel column then, take min and max of the data (to identify max and min y pixels to draw) for that couple and use it for pixel drawing. Line drawing is already optimized for the simple cases, and should be quite fast. See linedemo for a timed example. I tried the optimization you suggested, but did not achieve any speed- up. I guess that polyline drawing already joins successive horizontal and vertical segments.