Skip to content
  • 0 Votes
    5 Posts
    80 Views
    N
    Thanks, solution found, similar to what you are suggesting. I dug a bit further into Qt docs and found the entry for setPointsConfiguration, which takes data in the form of QHash<int, QHash<QXYSeries::PointConfiguration, QVariant>> So my new code for setting the colors looks like: QHash<int, QHash<QXYSeries::PointConfiguration, QVariant>> ptsConfig; QList<BrthPosnPlots>::iterator brthItr = m_brthPosns.begin(); MultiLineSeries *thisSrs = GetLineSeries(srs); QList<QPointF> srspts = thisSrs->points(); quint32 ctSrs = srspts.size(); if ((ctSrs < 1)) return; qsizetype bpos; for (brthItr = m_brthPosns.begin(); brthItr != m_brthPosns.end(); brthItr++) { if ((*brthItr).GetEEPos() > ctSrs) continue; if (((*brthItr).GetEIPos() > 1) && ((*brthItr).GetEEPos() > (*brthItr).GetEIPos() + 5)) { for (bpos = (*brthItr).GetEIPos(); bpos < (*brthItr).GetEEPos(); bpos++) { ptsConfig.insert_or_assign(bpos, conf); // thisSrs->setPointConfiguration(bpos, conf); } } } if (!ptsConfig.isEmpty()) { thisSrs->setPointsConfiguration(ptsConfig); } The speedup is truly amazing! From over 2 sec down to < 20 msec for this method. Thanks to all for feedback and tips.
  • QLineSeries ordering on UI

    Unsolved General and Desktop qlineseries qchart opengl chartview order
    1
    0 Votes
    1 Posts
    443 Views
    No one has replied
  • Call to temporary is a no-op

    Solved General and Desktop qlineseries qchart qchartview
    4
    0 Votes
    4 Posts
    2k Views
    W
    @wasawi2 wooops sorry my newby fault!! I just had to remove the auto in the cpp file. Therefore: linewidget.cpp //![1] m_series = new QLineSeries; //![1] linewidget.h QLineSeries* m_series = nullptr; Everything under control now. Thanks again for your fast answer @kkoehne.
  • QT charts extremely slow - QLineSeries

    Solved QML and Qt Quick qtchart qtcharts qlineseries python
    25
    0 Votes
    25 Posts
    11k Views
    fcarneyF
    "append" causes a redraw. There is no way to disable the redraw that I can find. The QML api for charts is kinda crappy for adding data points. Which is why I had to use "replace" in C++. I have done thousands of points this way and it doesn't cause delays in the UI interface.
  • 0 Votes
    5 Posts
    3k Views
    Z
    Hello, I tried the library qwt and saw that the slowdown effect did not occur. Update all my code to adapt it to the qwt library and once integrated, no type of slowdown occurs even after a couple of days. Also this library allowed me to insert better visual effects. Thanks for the help.
  • QCharts

    Unsolved General and Desktop qtcharts qlineseries
    1
    0 Votes
    1 Posts
    600 Views
    No one has replied
  • 0 Votes
    5 Posts
    3k Views
    mmikeinsantarosaM
    I think I just figured it out by setting using a bool and setting it to false at the beginning. Then just before attaching the axis determine axis visibility. If the bool is false, set the axis visibility to true then set the bool to true. The next time thru, the bool will be true and set visibility to false. I ge both lines and only one set of scales. if (axisXHasBeenAdded == false) { axisX->setVisible(true); axisXHasBeenAdded = true; } else { axisX->setVisible(false); }
  • 0 Votes
    1 Posts
    2k Views
    No one has replied
  • Gaps in QLineSeries

    Unsolved General and Desktop qlineseries chart charts
    5
    1 Votes
    5 Posts
    2k Views
    J
    @DrakeM said in Gaps in QLineSeries: When using line series, we've had severe performance problems. We end up with thousands of series to handle all of the gaps and have to create parallel scatter series because we want icons for each point that aren't part of the standard icon set. We pay a huge cost both constructing and destructing the series. Seems like it may be refreshing on each add series, but even removeAllSeries is slow. Have tried many things to suspend the painting, but with no timing effect. Any ideas on how to have many gaps without destroying performance? You can generate gaps by adding qQNaN()'s to the series. However, it doesn't seem to work with append() (it ignores NaN's), but setting the whole point data at once takes NaN's into account.
  • 0 Votes
    3 Posts
    2k Views
    pauleddP
    great! That works. With that I can spare the toggle functions at all. Thanks!