Hi,
How do I set (or turn off) the gradient in the VolumePipe?
It makes no difference whether Gradient is checked or unchecked or set to Left Right or Top Bottom - the chart looks the same.
Also - how do I set the Maks Arrows for the VolumePipe? Because of the Series Cone Percent, the Mark can be some distance from its segment.
I'm not having much luck getting the Mark's Arrows to show up - above are the placement of the visible Pointers.
Thanks.
.
Problem with Gradient and Marks lines in VolumePipe
Re: Problem with Gradient and Marks lines in VolumePipe
Hello,
I guess the gradient you are trying to disable is the 3D effect. If you set the chart to 2D then you won't see it.MVBobj wrote:How do I set (or turn off) the gradient in the VolumePipe?
It makes no difference whether Gradient is checked or unchecked or set to Left Right or Top Bottom - the chart looks the same.
You can create a customized TVolumePipeSeries overriding the DrawMark method to change ChartRect.Top property before drawing each mark (and restore after the drawing). Ie:MVBobj wrote:Also - how do I set the Maks Arrows for the VolumePipe? Because of the Series Cone Percent, the Mark can be some distance from its segment.
I'm not having much luck getting the Mark's Arrows to show up - above are the placement of the visible Pointers.
Code: Select all
type
TMyVolumePipeSeries = class(TVolumePipeSeries)
protected
procedure DrawMark(ValueIndex: Integer; const St: String; APosition: TSeriesMarkPosition); override;
end;
TVolumePipeSeriesAccess = class(TVolumePipeSeries)
end;
//...
procedure TForm1.FormCreate(Sender: TObject);
begin
Chart1.View3D:=false;
with Chart1.AddSeries(TMyVolumePipeSeries) as TMyVolumePipeSeries do
begin
FillSampleValues();
Brush.Gradient.Visible:=false;
Marks.Visible:=true;
end;
end;
procedure TMyVolumePipeSeries.DrawMark(ValueIndex: Integer; const St: String;
APosition: TSeriesMarkPosition);
var oldTop, xVal, yDisp, IDiff, overallWidth: Integer;
BoundingPoints: TFourPoints;
tmp: TCoordinate;
tmpCone : Single;
begin
oldTop:=ParentChart.ChartRect.Top;
With ParentChart.ChartRect do
Begin
BoundingPoints[0]:= TeePoint(Left+2,Top+2); //topleft
tmpCone:=(ConePercent div 2)*0.01;
tmp:={$IFNDEF FMX}Round{$ENDIF}(Top+(Bottom-Top) * tmpCone);
BoundingPoints[1]:= TeePoint(Right-2, tmp); //topright
tmp:={$IFNDEF FMX}Round{$ENDIF}(Bottom-((Bottom-Top) * tmpCone));
BoundingPoints[2]:= TeePoint(Right-2, tmp); //bottomright
BoundingPoints[3]:= TeePoint(Left+2,Bottom-2); //bottomleft
end;
IDiff:=BoundingPoints[1].Y-BoundingPoints[0].Y;
overallWidth:=BoundingPoints[1].X-BoundingPoints[0].X;
xVal:=TVolumePipeSeriesAccess(Self).CalcSegment(ValueIndex,YValues[ValueIndex])+BoundingPoints[0].X; //add left displacement
yDisp:=Round((((xVal-BoundingPoints[0].X)/overallWidth)*IDiff));
ParentChart.ChartRect.Top:=BoundingPoints[0].Y+yDisp;
inherited;
ParentChart.ChartRect.Top:=oldTop
end;
Best Regards,
Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) | |
Please read our Bug Fixing Policy |