<?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[Selecting the axis markers in QChart]]></title><description><![CDATA[<p dir="auto">I am using QtCharts and I am trying to figure out how to set the markers on the x- and y-axis to the values they are based on. With the code I have now the axis values are set with the default ticker I assume.</p>
<pre><code>chart-&gt;legend()-&gt;hide();
chart-&gt;addSeries(motor_1);
chart-&gt;createDefaultAxes();
chart-&gt;setTitle("Motor 1");
chart-&gt;setMargins(QMargins(0,0,0,0));
int max_x = *std::max_element(duration_list.begin(),duration_list.end());
chart-&gt;axisX()-&gt;setRange(0, round(max_x*1.1));
int max_y = *std::max_element(endvalue_list.begin(),endvalue_list.end());
chart-&gt;axisY()-&gt;setRange(0,round(max_y));
ui-&gt;gridLayout-&gt;addWidget(chartview);
chartview-&gt;setRenderHint(QPainter::Antialiasing);
</code></pre>
<p dir="auto">If the points I want too plot are (0,0),(5,0),(6,36),(30,36) I want markers on the x-axis with values; 0,5,6,30. And on the y-axis; 0,36.</p>
<p dir="auto">Is there some setting that lets me set the axis values myself?</p>
]]></description><link>https://forum.qt.io/topic/80506/selecting-the-axis-markers-in-qchart</link><generator>RSS for Node</generator><lastBuildDate>Sat, 07 Mar 2026 14:32:31 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/80506.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 20 Jun 2017 05:51:24 GMT</pubDate><ttl>60</ttl></channel></rss>