Recent

Author Topic: Series using Builtin source visible at design but not runtime.  (Read 2739 times)

kapibara

  • Hero Member
  • *****
  • Posts: 549
Series using Builtin source visible at design but not runtime.
« on: December 03, 2021, 03:27:51 am »
I added some data to a few series at designtime using the Builtin source. Looks like the attached pic. When the application runs, the series are not visible anymore. What to do?
« Last Edit: December 03, 2021, 03:30:40 am by kapibara »
Lazarus trunk / fpc 3.2.2 / Kubuntu 21.10 - 64 bit

wp

  • Hero Member
  • *****
  • Posts: 9175
Re: Series using Builtin source visible at design but not runtime.
« Reply #1 on: December 03, 2021, 10:13:32 am »
You mean that series values are not stored when you add them to the DataPoints property of the built-in chart source at designtime? Yes, this is true, and it is one of the items on my to-do-list (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/37904) for which I do not have an idea how to solve it...

However, when you add a separate TListChartSource, link it to the series and enter the values to the DataPoints property of this external chartsource at designtime, the values will be preserved.
Mainly Lazarus trunk / fpc 3.2.0 / all 32-bit on Win-10, but many more...

kapibara

  • Hero Member
  • *****
  • Posts: 549
Re: Series using Builtin source visible at design but not runtime.
« Reply #2 on: December 04, 2021, 10:32:10 am »
Changed to TListChartSource, all good.

An idea. Would it be possible to save the Builtin data if to borrow code from how TListChartSource does it? Both TListChartSource and BuiltIn seem to use the same DataPoint Editor.

I looked at the sources of both TListChartSource and DataPoint Editor but didn't find out where any saving takes place though.
Lazarus trunk / fpc 3.2.2 / Kubuntu 21.10 - 64 bit

 

TinyPortal © 2005-2018