Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
How to disable labels elide in CategoryAxis in Qml Charts
lockheed last edited by
How to avoid eliding labels in CategoryAxis, when they are long? I want to show them fully.
Yohit Kumar last edited by
I think we can change the width for every category name freely
Diracsbracket last edited by Diracsbracket
There seems to be no direct method in QML for this, nor in C++.
There is a
sizeHint()method for the class
ChartCategoryAxisXwhich seems to determine this eliding behavior, but I have no idea how to access that internal class.
Otherwise, there is always
QCustomPlotwhich is easier to hack and which already seems to do what you want:
Just to test it, I used the following example:
https://www.qcustomplot.com/index.php/demos/barchartdemo with extra long labels:
Up to you then to e.g. wrap it inside a custom QML type.
lockheed last edited by lockheed
@Yohit-Kumar Could you pleas provide a code snippet? Simple changing category name width could be easiest way, but I don't know how to do this.
@Diracsbracket QCustomPlot do the job. Thanks!