Page 1 of 1

Problems upgrading Steema 2 to Steema 4

Posted: Fri Aug 09, 2013 8:46 pm
by 9787981
Hi, I'm hoping some people on the forum may have some answers to some problems we've been having with Steema 4's TeeChart.
Our company is upgrading from TeeChart v2 to TeeChart v4 and some of the existing functionality no longer works.

1) The checkbox legend now shows and hides pen series' when clicked but does not visibly change checked state
2) When scrolling left or right the series pen data and line move but the Xaxis remains fixed and no longer coincides with the data
3) The properties, Xaxis.EndPosition/Xaxis.StartPosition and Yaxis.EndPosition/Yaxis.StartPosition only work as percentages (0-100) even when Xaxis/Yaxis .PositionUnits is set to Pixels

Any thoughts?

Re: Problems upgrading Steema 2 to Steema 4

Posted: Mon Aug 12, 2013 11:59 am
by 10050769
Hello BenW,
1) The checkbox legend now shows and hides pen series' when clicked but does not visibly change checked state
I can not reproduce your problem using next code with latest maintenance release of TeechartFor.Net, build number build 4.1.2013.07300.

Code: Select all

    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      for (int i = 0; i < 4; i++)
      {
        new FastLine(tChart1.Chart);
        tChart1[i].FillSampleValues();
      }
      tChart1.Legend.CheckBoxes = true; 
}
Could you please tell us if you can reproduce your problem using my code? If your problem doesn't appear with my code, please try to arrange for us a simple project where your problem appears, because we can try to find a solution for it.
2) When scrolling left or right the series pen data and line move but the Xaxis remains fixed and no longer coincides with the data
Sorry, but I can not reproduce your problem when I doing scroll, using previous code, the scroll of left or right axes works in my end. Could you please arrange a simple code for us where the problem appears?
3) The properties, Xaxis.EndPosition/Xaxis.StartPosition and Yaxis.EndPosition/Yaxis.StartPosition only work as percentages (0-100) even when Xaxis/Yaxis .PositionUnits is set to Pixels
To defalut PositionUnits is percent, but if using next code:

Code: Select all

 public Form1()
    {
      InitializeComponent(); 
      InitializeChart();
      
    }
    
    private void InitializeChart()
    {
      tChart1.Aspect.View3D = false;
      for (int i = 0; i < 4; i++)
      {
        new FastLine(tChart1.Chart);
        tChart1[i].FillSampleValues();
      }
      tChart1.Legend.CheckBoxes = true;
      tChart1.Axes.Left.StartEndPositionUnits = PositionUnits.Pixels; 
      tChart1.AfterDraw += tChart1_AfterDraw;
      tChart1.Draw();
      button1.Click +=button1_Click;
    }

    void tChart1_AfterDraw(object sender, Graphics3D g)
    {
      Rectangle rect = tChart1.Chart.ChartRect;
      tChart1.Axes.Left.StartPosition = 1;
      tChart1.Axes.Left.EndPosition = rect.Height;
      this.Text = tChart1.Axes.Left.StartPosition.ToString() + "," + tChart1.Axes.Left.EndPosition.ToString(); 
    }
I can get next image:
TChartPixels.jpg
TChartPixels.jpg (94.52 KiB) Viewed 8419 times
If you change PositionUnits.Pixels to PositionUnits.Percent I can get next image:
TChartPercents.jpg
TChartPercents.jpg (91.4 KiB) Viewed 8415 times
You can see differences in the both images, when you work with percent or pixels, therefore the StartPosition and EndPostion not only works with percent. If your problem persist, would be very grateful if you can explain us exactly where the problem is produced and why do you consider the properties doesn't works by pixels because we can try to help you?

Thanks,

Re: Problems upgrading Steema 2 to Steema 4

Posted: Mon Aug 12, 2013 4:31 pm
by 9787981
In testing your submitted sample for problems 1 and 2 it appears the chart has none of the reported bugs, I'm not sure what exactly is different about the way we use the chart that could cause such behavior.
There is huge amounts of code involved surrounding the chart which is embedded in our own application, I'm not sure where to begin looking. We still have an Xaxis scale issue and a legend checkbox issue.
Our Xaxis scrolls with the left mouse button and a context menu appears with the right mouse button. Also our legend is positioned absolutely with custom positioning could this cause the checkboxes not to work?

As for problem 3, we did see that exact issue (as seen in the image) where the axis overruns the bottom edge of the chart. We have resolved the issue by using 100 as a percentage instead of a height in pixels regardless of the units the chart is configured in.

Re: Problems upgrading Steema 2 to Steema 4

Posted: Tue Aug 13, 2013 9:00 am
by 10050769
Hello BenW,
There is huge amounts of code involved surrounding the chart which is embedded in our own application, I'm not sure where to begin looking. We still have an Xaxis scale issue and a legend checkbox issue.
Our Xaxis scrolls with the left mouse button and a context menu appears with the right mouse button. Also our legend is positioned absolutely with custom positioning could this cause the checkboxes not to work?
Axis scroll problem isn't produced for me and the problem with checkboxes doesn't appear for me, using a custom position of legend. In this point, If my code works for you, I recommend you try to create a simple code where the both problems, the scrolling axes and legend checkboxes, appear, because we can reproduce these here and try to suggest a solution for you.

Thanks,