The program freezes/stops responding when i click the update button. Same with debug version, no error messages.
The chart itself looks like this when i try to update it:
If have tried all of these methods:
Code: Select all
void graph::getGraphDataUpdate(wxString dateString)
{
serie->UpdateX(5, -5);
dataset->DatasetChanged();
}
Code: Select all
void graph::getGraphDataUpdate(wxString dateString)
{
dataset->BeginUpdate();
serie->UpdateX(5, -5);
dataset->EndUpdate();
}
Code: Select all
void graph::getGraphDataUpdate(wxString dateString)
{
double f = serie->GetX(1);
wxString tester;
tester << f;
wxMessageBox(tester, wxT("Nei"));
}
Can anyone help?
Ideally i want to clear the chart, then insert new data.
The chart will always have a X axis of 0-23. (representing hours on a 24 hour clock)
In worst case, I can loop through, and replace the Y values one by one when updating the data. But i cant get this to work, as mention above.
Full code:
https://pastebin.com/BXdrVzuB
https://pastebin.com/j8rdCFY2
wxFreeChart
https://github.com/iwbnwif/wxFreeChart
wxFreeChart doc
https://iwbnwif.github.io/freechart_doc ... index.html