データベースからデータを選択して、winform でグラフを描画しています。それは正常に動作します。必要なのは、一部のデータ値が最大値より大きい場合、グラフ内のそのポイントが強調表示されるか、赤く着色されることです。どうやってやるの?助けてください。
String^ constring = L"datasource=localhost;port=3306;username=root;password=root;";
MySqlConnection^ conDataBase = gcnew MySqlConnection(constring);
MySqlCommand^ cmdDataBase = gcnew MySqlCommand("select * from `data`.`test`;",conDataBase);
MySqlDataReader^ myReader;
try{
conDataBase->Open();
myReader = cmdDataBase->ExecuteReader();
// MessageBox::Show("Data Inserted");
while(myReader->Read()){
String^ v_datetime;
String^ v_temp;
v_datetime = myReader->GetString("datetime");
v_pressure = myReader->GetInt32("temp").ToString();
String^ status;
if (myReader->GetInt32("temp") > 1000 && myReader->GetInt32("temp") < 50 )
{
status = " Abnormal ";
**// and this point only should be highlited or different color in the graph**
}
else{
status = " Normal";
}
this->label3->Text = status;
this->chart2->Series["Temperature"]->Points->AddXY(v_datetime,myReader->GetInt32("temp"));
// comboBox1->Items->Add(vName);
}
}catch(Exception^ex){
MessageBox::Show(ex->Message);
}