Scaled time series?

edited 7:35PM in FastCube
Hi all

It is possible to make charts where the axis are scaled according to e.g. time?

My problem: I measure temperature over time, but not at regular intervals -lets say I have measures at 11, 14 and 15 o-clock.
I want a chart, where temperature is on the y-axis and time is on the x-axis. AND I want the x-axis to be scaled so that there are a longer distance between 11 and 14 than between 14 and 15. Is this possible?

I would also like the chart to be able to ignore null values. Lets say I have two sensors measuring temperature - but not at the same intervals. If I try to chart these two sensors on the same chart, the lines will "drop" to 0, when one sensor has a value and the other does not. Is it possible to avoid this?

Best regards - and thanks to Fast-Report for a great product.

Kristian Tylvad

Comments

  • edited February 2012
    Hi.

    To ignore null values use property TfcChart.SkipNullPoints.
    But You need to fix fcChart.pas:
    procedure TfcCustomChart.SendChartData(ATypeChartData: TfcTypeChartData;
    ... line 864
          if (TVarData(AValues[i]).VType in [varEmpty, varNull]) then
            Series[i].AddNull(AStr) // !!! fixed from Series[ASerIndex].AddNull(AStr)
          else
          begin
            if Series[i] is THorizBarSeries then
              Series[i].AddX(AValues[i], AStr, clTeeColor)
            else
              Series[i].AddY(AValues[i], AStr, clTeeColor);
          end;
    ...
    ... line 890
          if (TVarData(AValues[i]).VType in [varEmpty, varNull]) then
            Series[i].AddNull(AData1[i])  // !!! fixed from Series[ASerIndex].AddNull(AData1[i])
          else
          begin
            if aSeries is THorizBarSeries then
              aSeries.AddX(AValues[i], AData1[i], clTeeColor)
            else
              aSeries.AddY(AValues[i], AData1[i], clTeeColor);
          end;
    ...
    

    Best regards,
    Oleg Pryalkov.
  • edited 7:35PM
    Hi Oleg

    Thanks for your reply regarding the null values. Do you also have a suggestion for my question regarding time series?

    Best Regards
    Kristian Tylvad
  • edited 7:35PM
    Hi Oleg

    Tried your suggestion regarding null values, and it worked fine.

    Have you had time to think about my other problem? I really need the possibility to scale the axis intervals according to the distance between the labels, as I wrote in my first post.

    Hope you can help me!

    Have a nice weekend

    Best Regards
    Kristian Tylvad
  • edited 7:35PM
    Hi.

    There is no way to do it in FastCube 1.

    Best regards,
    Oleg Pryalkov.
  • Hey there, I'm having the same problem here. I wonder if there's a possibility to scale the axis intervals, need some help here. Cheers
  • edited 7:35PM
    Hi Oleg and CM

    I have "solved" this problem by making alterations to fcChart.pas:

    1) I have added the properties IsXYChart, XIsDateTime and YIsDatetime
    2) I have altered the SendChartData routine, so that if the IsXYChart property is set and the series is Line or point, it tries to convert aStr to either datetime or float (depending on whether XIsDatetime or YIsdatetime is set), and then Calls AddXY instead of AddX/AddY
    3) I also set the datetime property on the series.xvalues and series.yvalues according to the XIsDatetime and YIsDatetime properties.

    These alterations are of course complete hacks and only works under given circumstances. The best would be to alter the input parameters to the SendChartData routine so that we dont have to convert a "legend" string into something, but already know the datatype. Here, it should also be possible to detect the datatype of the series, so that its datetime proerty can be set automatically.

    Can we hope to see something like this in FC2, Oleg?

    Best Regards
    Kristian
  • edited 7:35PM
    Hi Kristian.

    Please send me the modified modules.
    I will analyze and update the FC1 and FC2 to support Scale time series.

    Best regards,
    Oleg Pryalkov.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.