[Development] QChart 2.0

Scott Aron Bloom scott at towel42.com
Fri Mar 18 20:08:03 CET 2016


In working with QChart (which overall I LOVE btw) I have hit some issues..

First, I would love to see/learn the proper way to reload a chart.  If I have a chart with a  data, but due to user option to set what data is shown, and the user changes an option, I need to recompute the data and then re-setup the graph.

However, Im finding that while the initial load is very fast, the reloading of the X and Y series data, is very slow.

What is the best way to "reset" the data?

Second.  I found a crash, that unfortunately, the minimal example "fixes" but the code IMO is still a problem.

In LineChartItem::updateGeometry()

    QChart::ChartType chartType = m_chartType;
    if (chartType == QChart::ChartTypeUndefined )
        chartType = m_series->chart()->chartType();

Its possible, (and admittedly it could be because I am reloading the data wrong see above) that the chartType is undefined AND the m_series->chart is nullptr.

Checking for nullptr for m_series->chart() fixes the bug

Third- I want to have two sets of "stacked bars" or "bar series" is that possible?  Right now the data from the two series gets stacked on opt of each other.  I would prefer to see them all presented as "a bar series of bars"? Possible?

Fourth - Im trying to modify the "zoom" to only allow X zoom and NOT Y based zoom.  Its just the nature of how what my data represents.   The only way I have figured out how to do it, is to derive from XYDomain ( which I know is private) and override the zoomIn and Zoom out functions. It works.

I can see other types of domains I would want to create, and not being able to derive from the base class or any of the domain classes seem wrong.

But it brings up the issue, why are the domains private?  Would you consider making them public APIs?  Second setDomain currently does NOT exist on the QAbstractSeries class (though it does exist on the prvate implementation class.  Is there a reason?

Thanks in advance.  Scott




thanks

Scott



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20160318/47b86e68/attachment.html>


More information about the Development mailing list