TAChart: Draw color map series at design time. Minor demo update

git-svn-id: trunk@29324 -
This commit is contained in:
ask 2011-02-02 08:13:05 +00:00
parent cc9a3993f7
commit e0eacbebbd
3 changed files with 4 additions and 5 deletions

View File

@ -55,7 +55,7 @@
</Units>
</ProjectOptions>
<CompilerOptions>
<Version Value="9"/>
<Version Value="10"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>

View File

@ -65,13 +65,11 @@ object Form1: TForm1
object Chart1XAxis: TConstantLine
Legend.Visible = False
Position = 0
SeriesColor = clBlack
end
object Chart1YAxis: TConstantLine
Legend.Visible = False
LineStyle = lsVertical
Position = 0
SeriesColor = clBlack
end
object Chart1BarSeries1: TBarSeries
Title = 'Cos(x)'

View File

@ -427,7 +427,7 @@ var
gp: TDoublePoint;
v: Double;
begin
if IsEmpty then exit;
if not (csDesigning in ComponentState) and IsEmpty then exit;
ext := ParentChart.CurrentExtent;
bounds := EmptyExtent;
@ -458,7 +458,8 @@ begin
continue;
end;
gp := GraphToAxis(ParentChart.ImageToGraph((pt + next) div 2));
OnCalculate(gp.X, gp.Y, v);
if not (csDesigning in ComponentState) then
OnCalculate(gp.X, gp.Y, v);
if ColorSource <> nil then
ACanvas.Brush.Color := ColorByValue(v);
ACanvas.Rectangle(