Page 1 of 1

Multi-page chart scaling error

Posted: Fri Oct 27, 2006 2:56 am
by 9526464
I have previously been able to successfully use the the multi-page chart feature with multiple trends having the same number of data points and matching x values. The last page shows the end of the data.

Upon adding a new trend to the chart - this new x,y data has fewer points than the other trends with the largest x data point being smaller than the largest x data points of the longer trends, the scaling for the multi-pages puts the last page short of the end of the data trends with the larger x values - effectively cutting off the longer trends so they cannot be viewed.

I have not found any way to show the end of the longer trends, except to increase the MaxPointsPerPage to the point where the chart is only 1 or 2 pages long - but this scale is too large for our use.

I have uploaded an example chart showing this effect to the attachments newsgroup. Any help you can offer would be most appreciated.

Thanks,
- James

Posted: Fri Oct 27, 2006 8:33 am
by narcis
Hi James,

I can not reproduce the problem here using the file you attached and TeeChart Pro v7.0.1.2 ActiveX, the latest maintenance release available at the client area. Which TeeChart version are you using?

Posted: Mon Oct 30, 2006 3:32 am
by 9526464
I made an error in sending the wrong .tee file contents. You are correct, the .tee file provided has trends of equal length and equal x values and is rendered correctly.

I have sent a new .tee file to the attachments newsgroup. This time the .tee file contains the previously described trends of different lengths and displays the behaviour of cutting off the longest trends at MaxPointsPerPage=300.

At MaxPointsPerPage = 2000 the chart is only 2 pages long and the x-axis is visible up to the highest value of 6094.

The effect is the same with TeeChart 7.0.0.8 and 7.0.1.2.

Thanks,
- James

Posted: Tue Oct 31, 2006 10:58 am
by narcis
Hi James,

Thanks for the file. I could reproduce the problem here and it seems a bug to me. I added it to our defect list (TV52011856) to be fixed for future releases.

Posted: Wed Nov 01, 2006 3:32 pm
by 9526464
How much time does it typically take to get an updated version of TeeChart to address issues like this? I need to know because this limitation makes our implementation unworkable . We either need to split the shorter data out into another chart and deal with the headaches of aligning the x-axis between 2 multi-page charts, or, if the wait is reasonable, suspend our work and wait for an updated version of TeeChart.

Any guidance you can provide would be welcome. Also, if there are any workarounds for this problem please let me know.

Thanks,
- James

Posted: Wed Nov 08, 2006 10:02 am
by Pep
Hi James,

normally we post a new maintenance release every 3 months (moreorless). Few weeks ago we posted the v7.012, but we're planning to post a new maintenance release before the end of this year.
We've marked this issue with "high priority", so we'll try to fix it for the next maintenance release.
If I find a workaround I'll let you know.

Posted: Thu Nov 09, 2006 2:40 pm
by narcis
Hi James,

Reviewing your problem, we couldn't reproduce it from scratch. Would you be so kind to send us an example project we can run "as-is" to reproduce the problem here? We need to see how the chart has been created so that we can isolate the problem.

Thanks in advance.

Posted: Fri Nov 10, 2006 5:55 am
by 9526464
I have uploaded a sample VB6 project and a test data file together with the project dependencies to the attachments newsgroup. Run the project and open the test file to see the effect re-created from scratch.

Thanks for your support,
- James

Posted: Fri Nov 10, 2006 10:48 am
by narcis
Hi James,

Thanks for the files. I could run the project but I can't reproduce the problem. I see 2 series displayed (On Potential and Off Potential). When I use MaxPointsPerPage, the last page seems to be displayed correctly. Could you please let me know the exact steps I should follow to reproduce the problem here? I'm using v7.0.1.2, which TeeChart version are you using?

Thanks for your collaboration.

Posted: Fri Nov 10, 2006 8:21 pm
by 9526464
Narcis,

I am using TeeChart version 7.0.1.2.

In attempting to make the sample project as straightforward as possible, it seems like I removed too much functionality.

There are actually two charts in the supplied test data file. One has 2 trends and scales correctly, the other has 3 visible trends and demonstrates the problem. The chart that is displayed when you open the test data file is selected based upon the individual system's sort order. To enable switching between the charts, view the object called frmWizard in the VB6 IDE and set the Visible property of the control named 'fraSurveysInner' to True using the Properties Window. You will be able to switch between the two charts by clicking on them by name in a ListBox on the 'Surveys' tab.

Let me know if you are able to make the edit successfully. I can send a new sample project if necessary.

Thanks,
- James

Posted: Fri Nov 17, 2006 11:30 am
by narcis
Hi James,

Thank you very much for the project. We could finally reproduce the issue here only using Excel files as the series datasources, not populating series manually. This may also happen using other datasources.

I've added the defect (TV52011898) to our bug list to be fixed for future releases. In the meantime, the only solution I can think of is using standard buttons and bottom axis SetMinMax method to navigate through chart pages, for example:

Code: Select all

Private Sub Command1_Click()
    'First Page
    TChart1.Axis.Bottom.SetMinMax 0, Text1.Text
End Sub

Private Sub Command2_Click()
    'Previous Page
    With TChart1.Axis.Bottom
        .SetMinMax .Minimum - Text1.Text, .Maximum - Text1.Text
    End With
End Sub

Private Sub Command3_Click()
    'Next Page
    With TChart1.Axis.Bottom
        .SetMinMax .Minimum + Text1.Text, .Maximum + Text1.Text
    End With
End Sub

Private Sub Command4_Click()
    'Last Page
    Dim MaxVal As Double
    
    For i = 0 To TChart1.SeriesCount - 2
        MaxVal = Max(TChart1.Series(i).XValues.Maximum, TChart1.Series(i + 1).XValues.Maximum)
    Next
    
    TChart1.Axis.Bottom.SetMinMax MaxVal - Text1.Text, MaxVal
End Sub

Posted: Mon Dec 04, 2006 5:25 am
by 9526464
Thank you for your suggestion.

Since I want to preserve the multi-page printing capabilities of the chart, I found that by padding the short series with AddNullXY points up to the last x value of the longer data points, I can trick the chart into displaying all pages and retain the multi-page print capability.

The problem I now have is to detect when the chart is scaling to the original, long data series or the new, shorter data series - this in order to report the correct x-axis scaling/page to the user.

Thank you for your support.
- James

Posted: Mon Dec 04, 2006 9:28 am
by narcis
Hi James,

You can try doing this setting the bottom axis to automatic again:

Code: Select all

    TChart1.Axis.Bottom.Automatic = True

Posted: Tue May 27, 2008 11:46 am
by narcis
Hi James,

As an update to TV52011856. We have been investigating the issue here and we couldn't find a good solution to it. This problem happens when the series with the maximum x value in the chart has less points than the series with the highest number of points. So we recommend manually setting and changing paxes using axes SetMinMax method.