Recent

Author Topic: Hi Problem with TChart  (Read 11673 times)

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #15 on: December 17, 2014, 01:32:28 pm »
Im getting a weird error.   'ERead Error Unknown property SuppressPrevUnit'  at address 43C4A1

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #16 on: December 17, 2014, 01:44:31 pm »
Hi again. Is the strange maths for the temperature is just to get random results?

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Hi Problem with TChart
« Reply #17 on: December 17, 2014, 01:55:13 pm »
Sorry, no trunk... Please open unit1.lfm by a text editor (notepad or similar) and delete the line with "SuppressPrevUnit".

Strange math? My idea was that the temperature during the year follow a cosine function, I multiplied it by -1 to have the lowest temperatures in winter. The rest is standard scalingsuch that the maximum/minimum temperatures are MAX_TEMP and MIN_TEMP, respectively. And I added some noise created by the random() function.

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #18 on: December 17, 2014, 05:29:02 pm »
That is what I want to do. Thanks so much. I think I can adapt that code to my project. If I get stuck I know where to go. Thanks again

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #19 on: December 18, 2014, 06:42:26 pm »
OK I have got the graph working now. There are 2 things that I cant get right.
I would rather just have a dot or nothing than the little squares for the points but I haven't found how to change that.
Is it possible to write the dates at an angle like it is in Delphi?

Thanks very much

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #20 on: December 18, 2014, 08:32:30 pm »
Hi. I have solved the angle of the Date. I should have realised that the figure was degrees. I tried small amounts at first then tried 300 and now that's fixed.  Thanks

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Hi Problem with TChart
« Reply #21 on: December 18, 2014, 11:25:41 pm »
The LabelFont of the axis has a property Orientation which is the rotation angle in tenths of a degree. Using a value of 900 means 90 degrees.

The point symbol of a lineseries is defined by the series property Pointer.Style. And you can modify Pointer.HorizSize and Pointer.VertSize to change its size.

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #22 on: December 20, 2014, 06:53:11 pm »
Thanks for that info.
I now have another problem and your knowledge of maths will make it simple.
I know its the wrong forum but I am now graphing barometric pressure in inches.  How do you restrict the max and min values to 2 or three decimals.  I get a max and min value from the table as it loads the readings

Thanks

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Hi Problem with TChart
« Reply #23 on: December 20, 2014, 08:34:54 pm »
Quote
How do you restrict the max and min values to 2 or three decimals.
You mean the axis labels? Set the Marks.Format of the corresponding axis to %.2f (the "2" being the number of decimals).

goldfish999

  • New Member
  • *
  • Posts: 29
Re: Hi Problem with TChart
« Reply #24 on: December 20, 2014, 08:40:19 pm »
OK Thank you

 

TinyPortal © 2005-2018