<?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[Custom legend for chart?]]></title><description><![CDATA[<p dir="auto">I have a QChart with multiple QLineSeries, that come from 2 sources - so each series get a color according to it's source. I want to have a legend only with the two sources but the native legend is based on all of the QLineSeries. Is there a way to custom the legend? Assign specific text values, or remove unwanted ones so only the 2 sources will remain?<br />
Thanks</p>
]]></description><link>https://forum.qt.io/topic/128250/custom-legend-for-chart</link><generator>RSS for Node</generator><lastBuildDate>Sun, 07 Jun 2026 16:50:58 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/128250.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 06 Jul 2021 14:17:55 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Custom legend for chart? on Wed, 07 Jul 2021 04:26:56 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, got it working!</p>
]]></description><link>https://forum.qt.io/post/669273</link><guid isPermaLink="true">https://forum.qt.io/post/669273</guid><dc:creator><![CDATA[Jon Levanon]]></dc:creator><pubDate>Wed, 07 Jul 2021 04:26:56 GMT</pubDate></item><item><title><![CDATA[Reply to Custom legend for chart? on Tue, 06 Jul 2021 16:06:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi<br />
You can get its legend<br />
QLegend *QChart::legend() const<br />
and then<br />
<a href="https://doc.qt.io/qt-5/qlegend.html#markers" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qlegend.html#markers</a><br />
and you can then hide markers with<br />
<a href="https://doc.qt.io/qt-5/qlegendmarker.html#setVisible" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qlegendmarker.html#setVisible</a></p>
<p dir="auto">as far as i know its not possible to create a new legend as you cant assign it to the chart/series.</p>
]]></description><link>https://forum.qt.io/post/669214</link><guid isPermaLink="true">https://forum.qt.io/post/669214</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Tue, 06 Jul 2021 16:06:18 GMT</pubDate></item></channel></rss>