How to make charts/graphs (such as line graphs, bar graphs, circle graphs), etc. in C++, Qt, QML, Blackberry 10 Cascades Beta 3 SDK?

倾然丶 夕夏残阳落幕 提交于 2019-12-03 16:13:53

One way to create graphs im Qt and QML is to add a Webview and use html library to display graphs. I have used flot and found it quite flexible.

Here is simple QML wrapper for QCustomPlot: https://github.com/ncp1402/ql-lineplot

This is an old question, but as for me, it was worth to wait.

At this moment there is Qt 5.7.0 Released. Among other new features there are:

  • Qt Charts. Previously commercial-only Qt Charts module is now included in Qt under also GPLv3 license for open source users.

  • Qt Data Visualization. Previously commercial-only Qt Data Visualization module is now included in Qt under also GPLv3 license for open source users.

If someone is interested, here is good place to start:

As suggested already, use the WebView object to host your graphs library, you'll find way more libraries to use with it than natively.

From personal experience, I can tell that http://www.highcharts.com/ works very well with Playbook OS and Blackberry 10 OS

well i am also looking for solution.

if it is simple plot then maybe you can create ImagePaint with ImagePaintData. very simple example is shown here: https://developer.blackberry.com/cascades/reference/bb_cascades_imagepaint.html

It is also possible to render a chart and seve it as Png for example; Then you could display this as an Image in QML also;

Another option is to use foreign window as described here: https://developer.blackberry.com/cascades/files/webinars/cascades_opengl_webcast.pdf

you could use opengl to render graphics, or try to compile chart library

Well- web browser controll seem like the easiest sollution,and i thinnk that i will try it.

I tried this. Not every Charts library wors on bb10 simulator. For exaple flot , wich was mentioned earlier doesn't work. but some libraries works . for example highCharts and http://elycharts.com/

If you need something in C++ using QT you might have a look at QWT http://qwt.sourceforge.net/index.html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!