Recent

Author Topic: [SOLVED] How to make the frame around the chart invisible?  (Read 621 times)

wittbo

  • Full Member
  • ***
  • Posts: 138
[SOLVED] How to make the frame around the chart invisible?
« on: January 24, 2020, 08:58:28 am »
I'm working with a simple pie chart in a simple form, made all axes invisible, I only want to see the pie chart. I could not find any way to switch off the black frame around the chart area nor to change its color to the window color. Does anyone know what to do?
« Last Edit: January 24, 2020, 09:28:23 am by wittbo »
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.0.10
iMac with MacOS 10.13.6 / Lazarus 2.0.2

howardpc

  • Hero Member
  • *****
  • Posts: 3528
Re: How to make the frame around the chart invisible?
« Reply #1 on: January 24, 2020, 09:08:53 am »
Code: Pascal  [Select][+][-]
  1. Chart1.Frame.Visible := False;
  2. Chart1.Color := yourcolor;

wittbo

  • Full Member
  • ***
  • Posts: 138
Re: How to make the frame around the chart invisible?
« Reply #2 on: January 24, 2020, 09:27:58 am »
Sorry, sometimes my brain is blocked. I was focused on borderstyle, bordercolor, border what else...
Frame, quite clear. Thanks.
BTW: Chart1.Color colors an area around the chart area (Backcolor), which contains the legend for example.
-wittbo-
MBAir with MacOS 10.14.6 / Lazarus 2.0.10
iMac with MacOS 10.13.6 / Lazarus 2.0.2

wp

  • Hero Member
  • *****
  • Posts: 7553
Re: How to make the frame around the chart invisible?
« Reply #3 on: January 24, 2020, 10:32:23 am »
Chart1.Color colors an area around the chart area (Backcolor), which contains the legend for example.
Chart.Color defines the background color of the entire chart. Chart.BackColor is the color of the  rectangle spanned by the axes. In your screenshot the axes are hidden. Like any other series, your PieSeries is drawn inside the axes. Therefore, it is pimarily the Chart.BackColor which controls your backgroundcolor. But you'll also have to adjust the Chart.Color because there is a small rim around the axis region even when the axes are turned off.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

 

TinyPortal © 2005-2018