Page 1 of 1

Problem with Axis Relabelling

Posted: Thu Jul 09, 2015 2:15 pm
by 15670876
I am moving some code written on VS2005 C++ with TeeChart for .NET v2 , recompiling using VS2013 C++ with TeeChart for .NET 2014 4.1.2014.12150

The old compile produces a great image but the new compile produces a chart were the right axis title overlaps the custom labels.
It worked before but doesn't work now - I haven't changed any of this code.

PS How to I add images to demonstrate this problem? The "Upload Attachment" says "The extension bmp is not allowed."

Thanks

Bob

I have been relabelling a right axis using the following code ( VS2013 c++ ) :

System::Void Relabel_Right_Depth_Axis(double depth_increment, double sound_speed)
{
this->tChart1->Refresh();
this->tChart1->AutoRepaint = false;
//this->tChart1->Axes->Right->Labels->Visible = false;
this->tChart1->Axes->Right->Labels->Items->Clear();
this->tChart1->Axes->Right->Minimum = this->tChart1->Axes->Left->Minimum;
this->tChart1->Axes->Right->Maximum = this->tChart1->Axes->Left->Maximum;
// min time
double tmin = this->tChart1->Axes->Left->Minimum;
double tmax = this->tChart1->Axes->Left->Maximum;
double dstart = depth_increment * Math::Round(0.75*tmin/depth_increment);
double dmax = 0.75*tmax;
while ( dstart <= dmax)
{
double t = dstart/0.75;
this->tChart1->Axes->Right->Labels->Items->Add(t, dstart.ToString());
dstart += depth_increment;
}
this->tChart1->AutoRepaint = true;
//this->tChart1->Axes->Right->Labels->Visible = true;
this->tChart1->Refresh();
}

Re: Problem with Axis Relabelling

Posted: Fri Jul 10, 2015 8:44 am
by Christopher
Hello Bob,
bobcourtney wrote:PS How to I add images to demonstrate this problem? The "Upload Attachment" says "The extension bmp is not allowed."
There are some instructions on how to post to this forum here, which you may be interested in reading.

What would be more useful than an image, from our side, would be a short, self-contained, compilable example as explained here. Would you be so kind as to provide us with one? In this way we will be able to give you quick answer.