<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[How to completely remove margins&#x2F;spacing with QML ChartView]]></title><description><![CDATA[<p dir="auto">The question is the same as in this thread:</p>
<p dir="auto">Re: <a href="/topic/74591/how-to-remove-spacings-qml-chartview">How to remove spacings? QML ChartView.</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mikhailg">@<bdi>MikhailG</bdi></a> <a href="https://stackoverflow.com/questions/41333187/how-to-remove-spacing-qml-chartview" target="_blank" rel="noopener noreferrer nofollow ugc">posted the same question on StackOverflow</a> and apparently this answer solves it:</p>
<blockquote>
<p dir="auto">Possible solution 1: QMargins property designates the minimum area around the plotting area. Try filling this remaining padding by adjusting the child (plot) itself.</p>
</blockquote>
<p dir="auto">But what does that mean? I've tried setting the size of the plotArea, but it's read only.</p>
<p dir="auto">I wanted to comment on the answer in SO, but I do not have enough reuptation to do so. If anyone else wants to do so and page <a class="plugin-mentions-user plugin-mentions-a" href="/user/mikhailg">@<bdi>MIkhailG</bdi></a> there, feel free :)</p>
<p dir="auto">Any ideas?</p>
]]></description><link>https://forum.qt.io/topic/82154/how-to-completely-remove-margins-spacing-with-qml-chartview</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 17:43:56 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/82154.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 08 Aug 2017 12:13:54 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to completely remove margins&#x2F;spacing with QML ChartView on Thu, 10 Aug 2017 10:09:51 GMT]]></title><description><![CDATA[<p dir="auto">It'd be great if this wasn't necessary... thanks for sharing - that's something that's bugging me right now, just not high priority yet.</p>
<p dir="auto">I also wish we could get at the QChart* / Chart item from that ChartView there... I haven't found a way except pass a LineSeries ref to C++, QLineSeries* ptr-&gt;chart(); is just a bit annoying.</p>
<p dir="auto">Anyhow - charts that I didn't have to handcraft - they are working very well so far for me.</p>
<p dir="auto">Re: the legend: I'm was pleased with how it hides the legend for a series's visible set to false. That was nice to not have to work for that.</p>
]]></description><link>https://forum.qt.io/post/409566</link><guid isPermaLink="true">https://forum.qt.io/post/409566</guid><dc:creator><![CDATA[6thC]]></dc:creator><pubDate>Thu, 10 Aug 2017 10:09:51 GMT</pubDate></item><item><title><![CDATA[Reply to How to completely remove margins&#x2F;spacing with QML ChartView on Thu, 10 Aug 2017 09:46:17 GMT]]></title><description><![CDATA[<p dir="auto">I found a hacky solution and posted it on SO to get a response from <a class="plugin-mentions-user plugin-mentions-a" href="/user/mikhailg">@<bdi>MikhailG</bdi></a> there, and he updated his answer.</p>
<p dir="auto">My solution in short:</p>
<pre><code>ChartView
{
    x: -10
    y: -10

    width: parent.width + 20
    height: parent.height + 20
}
</code></pre>
<p dir="auto">In addition to setting the margins to 0  and having the legend and the axes not be visible.</p>
<p dir="auto">See <a href="https://stackoverflow.com/questions/41333187/how-to-remove-spacing-qml-chartview" target="_blank" rel="noopener noreferrer nofollow ugc">this link</a> for the updated answer on SO.</p>
]]></description><link>https://forum.qt.io/post/409565</link><guid isPermaLink="true">https://forum.qt.io/post/409565</guid><dc:creator><![CDATA[Obi-Wan]]></dc:creator><pubDate>Thu, 10 Aug 2017 09:46:17 GMT</pubDate></item></channel></rss>