C1.Win.Chart.FlexChart - OverflowError after updating AxisX.Datasource

Posted by: hirsch on 16 February 2021, 9:03 pm EST

    • Post Options:
    • Link

    Posted 16 February 2021, 9:03 pm EST

    I try to mange the labels along the xaxis using its property ‘Datasource’ and ‘Binding’. It works just fine after the first setting. Changing the underlying list(of Objects) in Datasource due to a change of Max and Min Settings of the axis yields an OverflowError. The environment says that this error comes from ‘external code’ which obviously means form FlexChart.

    This also happens if I set the MajorGrid and MinorGrid to false.

    I am hoping for a solution or a work-around

  • Posted 17 February 2021, 11:22 pm EST

    Hi Karl,

    I am not sure why you are resetting the Axis DataSource when the Axis Min/Max are changed as FlexChart automatically calculates the required labels from the source based on the current Axis Min/Max.

    However, this behavior is not reproducible at our end as I haven’t noticed the error while changing axis data source after changing Axis Min/Max. I have tested it with the build 4.5.20203.468.

    Could you please make the necessary changes in the attached sample in order to replicate the behavior so that we can assist you accordingly? (see FlexChartAxis.zip)

    If possible please share a stripped-down sample replicating this behavior and also please share the C1 build you are using.

    Best Regards

    Kartik

    FlexChartAxis.zip

  • Posted 18 February 2021, 10:23 pm EST

    Hi Katrik,

    just before clicking on POST REPLY I had an idea … And indeed, I could solve the problem! It was’nt an error FlexChart but a feature in C1Chart. C1Chart can decide which is the appropriate Format of the data. It automatically found that my axis was date/time based and made internal conversion from Long to Double. That was great but the source of the error. Now I explictly make this conversion outside of FlexChart and it works.

    With best regards

    Karl

    Thanks again, and if you are interesting in my state 5 minutes ago you may continue to read …

    Hi Katrik,

    Thanks for your detailed and quick reply to my post.

    First of all, my original application runs with C1.Win.C1Chart. As in many other application C1Chart does what it should do in all those years. Today, I am trying to replace C1Chart with FlexChart. Using a flag, I am doing this dynamically in code. I do that cause I want to learn how to use the ‘new’ FlexChart. And my charts are using a lot of features of C1Chart. Therefore, that is not easy to transfer all the features to FlexChart. Doing the labeling of the axis with C1Chart I am setting ValueLabels, with FlexChart I am setting the DataSource of the X-Axis.

    This works fine for the first call to the sub to build the chart. If the user changes Min/Max then I am clearing the whole C1Chart (and FlexChart) and call the sub once again setting everything from scratch. (Ok, I could do better but the form has so many controls that need a refresh as well, this is done through a general routine ‘RefreshControls’.) After re-calling the sub for FleXChart, the error under consideration pops up.

    Your example: I can run it because you use features that are not installed on my machine, which are C1.Win.4.5.2, C1.Win.C1DX.4.5.2 and C1.FlexChart.4.5.2, Build 4.5.20203.468.

    I have Build 4.0.20202.438 which is the latest available. (I just checked that with C1Live). And I have C1.Win.4 and C1.Win.FlexChart.4 and no C1.Win.C1DX…?

  • Posted 21 February 2021, 3:29 pm EST

    Hi Karl,

    I am happy to hear that your problem has been resolved.

    Best Regards,

    Kartik

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels