Forum > TAChart
primary Questions about TChart
wp:
--- Quote from: taazz on February 09, 2018, 08:16:55 pm ---
--- Quote from: majid.ebru on February 09, 2018, 07:31:31 pm ---how can i have mult color line?
--- End quote ---
There is no reason for multi colour lines. lines are not part of the data only points are the data lines are there to sombolize an idea only it is either negative or positive it can't be both. Don't waste your time on a illogical case.
--- End quote ---
I don't quite understand what you mean, but I could imagine several use cases of multi-colored line segments. For example to highlight segments for which the slope exceeds a given limit. Or - if the series displays a road - the color symbolizes the number of accidents on each segment.
wp:
--- Quote from: majid.ebru on February 09, 2018, 07:31:31 pm ---how can i have mult color line?
--- End quote ---
The TLineSeries of TAChart in Lazarus trunk, r57277, now has a new property "ColorEach" with which you can colorize the line segments individually. The color is added to the data points (4th parameter of the series method AddXY) and can be applied to data points symbol and/or the line segments before or after each data point (TColorEachMode = (ceNone, cePoint, ceLineBefore, ceLineAfter, cePointAndLineBefore, cePointAndLineAfter).
See the demo in the TAChart demo folder (lazarus/components/tachart/demo/line)
wp:
In the attachment there is a solution to the "color-split" chart. It is based on the user-drawn series as described above. Drag the horizontal dividing line up and down to move the color boundary. There's a little glitch, when data point symbols are shown and the dividing line goes right through the symbol because the symbol is always drawn as a full circle - to get over this a clipping approach should be used.
majid.ebru:
--- Quote from: wp on February 11, 2018, 12:18:42 am ---In the attachment there is a solution to the "color-split" chart. It is based on the user-drawn series as described above. Drag the horizontal dividing line up and down to move the color boundary. There's a little glitch, when data point symbols are shown and the dividing line goes right through the symbol because the symbol is always drawn as a full circle - to get over this a clipping approach should be used.
--- End quote ---
Thankyou
your project is very Goooooooood
but i can't compile your project?
waht do i do?
i should update my TChart element?
majid.ebru:
--- Quote from: wp on February 10, 2018, 09:52:01 pm ---
--- Quote from: majid.ebru on February 09, 2018, 07:31:31 pm ---how can i have mult color line?
--- End quote ---
The TLineSeries of TAChart in Lazarus trunk, r57277, now has a new property "ColorEach" with which you can colorize the line segments individually. The color is added to the data points (4th parameter of the series method AddXY) and can be applied to data points symbol and/or the line segments before or after each data point (TColorEachMode = (ceNone, cePoint, ceLineBefore, ceLineAfter, cePointAndLineBefore, cePointAndLineAfter).
See the demo in the TAChart demo folder (lazarus/components/tachart/demo/line)
--- End quote ---
it's perfect
how can i do that?
Navigation
[0] Message Index
[#] Next page
[*] Previous page