Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

Windows Forms Application in C++ Help!

$
0
0

Hi,

I am trying to declare a datapoint to be able to autoscale using a checkbox on a chart. I used the datapoint on a previous program and got it to work, but I don't understand why I am getting a undeclared identifier now. Can anyone help? My code is below:

private

: System::Void checkBox1_CheckedChanged(System::Object^ sender, System::EventArgs^ e) {

DataPoint^ maxValue;

DataPoint^ minValue;

if(checkBox1->CheckState == CheckState::Checked)

{

maxValue =

this->chart2->Series["Series1"]->Points->FindMaxByValue("Y1", 0);

minValue =

this->chart2->Series["Series1"]->Points->FindMinByValue("Y1", 0);

this->chart2->ChartAreas[0]->AxisY->Maximum = maxValue->YValues[0];

this->chart2->ChartAreas[0]->AxisY->Minimum = minValue->YValues[0];

}

elseif(checkBox1->CheckState == CheckState::Unchecked)

{

this->chart2->ChartAreas[0]->AxisY->Minimum = Convert::ToDouble(textBox2->Text);

this->chart2->ChartAreas[0]->AxisY->Maximum = Convert::ToDouble(textBox1->Text);

}

error C2065: 'DataPoint' : undeclared identifier


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>