Color or Highlight a data point in graph in winforms in visual studio using c# or cli/c++ -
i drawing graph in winform picking data database. works fine. need if data value greater max value point in graph gets highlited or colored red. how can that? please help.
string^ constring = l"datasource=localhost;port=3306;username=root;password=root;"; mysqlconnection^ condatabase = gcnew mysqlconnection(constring); mysqlcommand^ cmddatabase = gcnew mysqlcommand("select * `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 "; **// , point should highlited or different color in 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); }
can't add property class represent object drawn, , when draw graph test on property , change color, shape , size.
Comments
Post a Comment