{"id":2550,"date":"2018-03-06T17:55:43","date_gmt":"2018-03-06T12:25:43","guid":{"rendered":"http:\/\/localhost:8081\/system-on-module-som\/?p=2550"},"modified":"2023-08-15T12:30:34","modified_gmt":"2023-08-15T07:00:34","slug":"play-with-qcharts-on-esomimx6","status":"publish","type":"post","link":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/play-with-qcharts-on-esomimx6\/","title":{"rendered":"Play with Qcharts on eSOMiMX6"},"content":{"rendered":"<p>Qt commercial charts is an add-on module provided by Qt with which various chart components can be incorporated into the Qt applications. The chart components can be used as Qwidget and QGraphicsWidget object or QML type.<\/p>\n<p>Qt commercial charts provide APIs for the following types of charts:<\/p>\n<ul>\n<li>Line and Spline charts<\/li>\n<li>Area and Scatter charts<\/li>\n<li>Bar charts<\/li>\n<li>Pie charts<\/li>\n<li>Box and whiskers chart<\/li>\n<li>Candlestick chart<\/li>\n<li>Polar chart<\/li>\n<\/ul>\n<p>The following axis types are supported by the QCharts<\/p>\n<ul>\n<li>Value axis<\/li>\n<li>Category axis<\/li>\n<li>Bar category axis<\/li>\n<li>Date-Time axis<\/li>\n<li>Logarithmic axis<\/li>\n<\/ul>\n<p>QCharts can be bound to the following ways to the application<\/p>\n<blockquote><p>QLineSeries *lineSeries = new QLineSeries();<\/p>\n<p>lineSeries-&gt;add(0, 9);<\/p>\n<p>lineSeries-&gt;add(1, 3);<\/p>\n<p>view-&gt;chart()-&gt;addSeries(lineSeries);<\/p>\n<p>view-&gt;chart()-&gt;createDefaultAxes();<\/p><\/blockquote>\n<p>QCharts can also be added to the QML as shown below:<\/p>\n<blockquote><p>import QtQuick 2.0<br \/>\nimport QtCharts 2.0<\/p>\n<p>ChartView {<\/p>\n<p>width: 640<\/p>\n<p>height: 480<\/p>\n<p>antialiasing: true<\/p>\n<p>PieSeries {<\/p>\n<p>id: pieSeries<\/p>\n<p>PieSlice {<\/p>\n<p>label: &#8220;Success&#8221;<\/p>\n<p>value: 94.9<\/p>\n<p>}<\/p>\n<p>PieSlice {<\/p>\n<p>label: &#8220;Failure&#8221;<\/p>\n<p>value: 5.1<\/p>\n<p>}<\/p>\n<p>}<\/p>\n<p>}<\/p><\/blockquote>\n<p>Please visit our <a href=\"https:\/\/www.e-consystems.com\/auth\/Account\/login?ReturnUrl=%2f\">developer website<\/a> to know get step by step instructions to setup toolchain with Qt on our <a href=\"https:\/\/www.e-consystems.com\/iMX6-micro-som-system-on-module.asp\">eSOMiMX6<\/a> board.<\/p>\n<p>For further assistance and queries get in touch with <a href=\"mailto:sales@e-consystems.com\">sales@e-consystems.com<\/a><\/p>\n<p>Try eSOM++ Qt Charts on eSOMiMX6<\/p>\n<p><a href=\"https:\/\/www.e-consystems.com\/auth\/Account\/login?ReturnUrl=%2f\">Toolchain with Qt 5.7<\/a><\/p>\n<p><a href=\"https:\/\/www.e-consystems.com\/auth\/Account\/login?ReturnUrl=%2f\">Toolchain with Qt 5.10<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Qt commercial charts is an add-on module provided by Qt with which various chart components&#8230;<\/p>\n","protected":false},"author":17,"featured_media":2551,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[212,213,342,343,127,340,341],"tags":[251,255,396,207,483,484],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/posts\/2550"}],"collection":[{"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/comments?post=2550"}],"version-history":[{"count":2,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/posts\/2550\/revisions"}],"predecessor-version":[{"id":2553,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/posts\/2550\/revisions\/2553"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/media\/2551"}],"wp:attachment":[{"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/media?parent=2550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/categories?post=2550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.e-consystems.com\/blog\/system-on-module-som\/wp-json\/wp\/v2\/tags?post=2550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}