mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 05:49:23 +02:00
TAChart: Draw color map series at design time. Minor demo update
git-svn-id: trunk@29324 -
This commit is contained in:
parent
cc9a3993f7
commit
e0eacbebbd
@ -55,7 +55,7 @@
|
|||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="9"/>
|
<Version Value="10"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<IncludeFiles Value="$(ProjOutDir)"/>
|
<IncludeFiles Value="$(ProjOutDir)"/>
|
||||||
|
@ -65,13 +65,11 @@ object Form1: TForm1
|
|||||||
object Chart1XAxis: TConstantLine
|
object Chart1XAxis: TConstantLine
|
||||||
Legend.Visible = False
|
Legend.Visible = False
|
||||||
Position = 0
|
Position = 0
|
||||||
SeriesColor = clBlack
|
|
||||||
end
|
end
|
||||||
object Chart1YAxis: TConstantLine
|
object Chart1YAxis: TConstantLine
|
||||||
Legend.Visible = False
|
Legend.Visible = False
|
||||||
LineStyle = lsVertical
|
LineStyle = lsVertical
|
||||||
Position = 0
|
Position = 0
|
||||||
SeriesColor = clBlack
|
|
||||||
end
|
end
|
||||||
object Chart1BarSeries1: TBarSeries
|
object Chart1BarSeries1: TBarSeries
|
||||||
Title = 'Cos(x)'
|
Title = 'Cos(x)'
|
||||||
|
@ -427,7 +427,7 @@ var
|
|||||||
gp: TDoublePoint;
|
gp: TDoublePoint;
|
||||||
v: Double;
|
v: Double;
|
||||||
begin
|
begin
|
||||||
if IsEmpty then exit;
|
if not (csDesigning in ComponentState) and IsEmpty then exit;
|
||||||
|
|
||||||
ext := ParentChart.CurrentExtent;
|
ext := ParentChart.CurrentExtent;
|
||||||
bounds := EmptyExtent;
|
bounds := EmptyExtent;
|
||||||
@ -458,7 +458,8 @@ begin
|
|||||||
continue;
|
continue;
|
||||||
end;
|
end;
|
||||||
gp := GraphToAxis(ParentChart.ImageToGraph((pt + next) div 2));
|
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
|
if ColorSource <> nil then
|
||||||
ACanvas.Brush.Color := ColorByValue(v);
|
ACanvas.Brush.Color := ColorByValue(v);
|
||||||
ACanvas.Rectangle(
|
ACanvas.Rectangle(
|
||||||
|
Loading…
Reference in New Issue
Block a user