mirror of
				https://gitlab.com/freepascal.org/lazarus/lazarus.git
				synced 2025-11-04 12:29:27 +01: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>
 | 
			
		||||
  </ProjectOptions>
 | 
			
		||||
  <CompilerOptions>
 | 
			
		||||
    <Version Value="9"/>
 | 
			
		||||
    <Version Value="10"/>
 | 
			
		||||
    <PathDelim Value="\"/>
 | 
			
		||||
    <SearchPaths>
 | 
			
		||||
      <IncludeFiles Value="$(ProjOutDir)"/>
 | 
			
		||||
 | 
			
		||||
@ -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)'
 | 
			
		||||
 | 
			
		||||
@ -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(
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user