Making the width and height of ChartView the same size as the project window (640x480) allows the text to display in full. Assuming you're not restricted on the size of your ChartView of course.
[image: 0f6ba03a-3069-498a-9dbb-80d552b4aa9e.PNG]
@suslucoder
There is no scrollBar by default but you can increase the space for your QLegend
https://doc.qt.io/qt-5/qtcharts-legend-example.html#detaching-and-attaching-legends
Or you put a custom legend in a QScrollArea
@suslucoder
There is no scrollbar. If you want one, you have to make one on your own, but it wouldn't make any sense.
You have your data and you have your series. Now you can decide which parts you want to show in your chart (this is the "scrolling")
@tague Are you currently updating every time a point is added? If so, I wondered if you could buffer the incoming data so that you do not update so frequently? Perhaps use a QTimer to control update frequency.
@suslucoder said in QtCharts::QLineSeries(0x2ea7560, There is no data on chart:
error says QtCharts::QLineSeries(0x2ea7560)
What "error"?
qDebug()<< series;
Maybe QtCharts::QLineSeries(0x2ea7560) is what that prints when you ask it to print a QLineSeries *? Since it is a pointer, maybe you intended to go qDebug()<< *series;?
@suslucoder said in Assign specific value to axis:
I want to assign axis Y the 3rd column. How can i do it?
The axis does not know anything about that file and columns inside it. You simply need to read your file and put data from that third column as data for Y axis. See https://doc.qt.io/qt-5/qxyseries.html
If you read documentation https://doc.qt.io/qt-5/qxyseries.html#append you will see that you have to provide X AND Y...
@fcarney I put the QAbstractItemModelTester in both my model, and my proxy model, and... no errors. I also swapped it to FailureReportingMode::Fatal to double check, and nothing. The endless calls to data from VXYModelMapper continue.
@Kent-Dorfman thanx for reply.
Actually I saw few java script programs for pointing accurate pixel values on image by using Mercator projection and it's formula.
I checked it works fine in Java script. But in qt I want to display whole lat long trace so wanted to plot chart with image as it's background. But not able to correctly det the background image as per chart x and y axis values.
seen https://doc.qt.io/qt-5/qxyseries.html#replace-5 ?
even if you are doing it just for one point - by destroying and creating a series over and over you do this anyhow. has to be quicker/better.
I belive that also invokes
https://doc.qt.io/qt-5/qxyseries.html#pointsReplaced
ChartView should handle redraw and everything for you.