1. Computing
in TIPS :: Here's a method of simulating a selection in the TChart Delphi control. When a user clicks on a bar of a chart, the respective bar changes its color.

Everything is being done using one event, the onClickSeries, which provides us the index of the clicked bar.

Read the full article to learn how to How to Select a "Bar" in the TChart Delphi control

Related: GIS / Charting / Mapping Delphi Tools and Components | Charting with Databases | Charting in Quick Reports

December 11, 2006 at 10:11 am
(1) David Berneda says:

Just a small comment, the OnClickSeries event could also be implemented changing the existing point colors instead of clearing and adding all points again:

procedure TChartForm.Chart1ClickSeries

for k := 0 to Series.Count-1 do
if k = ValueIndex then
Series.ValueColor[k] := clRed
Series.ValueColor[k] := clBlue;


Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

©2014 About.com. All rights reserved.