Results 1 to 4 of 4

Thread: QChartView panning feature limit

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2021

    Default QChartView panning feature limit

    I have implemented a Line Graph using QChartView.

    In this graph, I have implemented a panning feature. Code for panning is given as follows.

    void ChartView::keyPressEvent(QKeyEvent *event)
    switch (event->key()) {
    case Qt::Key_Left:
    chart()->scroll(-10, 0);

    case Qt::Key_Right:
    chart()->scroll(10, 0);

    The panning feature is working.

    However, I want to add limits to panning like 0 ~ 500000. Once the graph axis reaches 500000, panning should stop.
    Any suggestions?
    Attached Images Attached Images

Similar Threads

  1. Problem with implementing custom QChartView
    By Mohsin in forum Qt Programming
    Replies: 3
    Last Post: 14th May 2021, 16:50
  2. adding new QChart in a QChartView
    By zemlemer in forum Newbie
    Replies: 3
    Last Post: 7th September 2019, 16:02
  3. Frameless QChart in QChartview not possible?
    By in forum Qt Programming
    Replies: 0
    Last Post: 5th May 2019, 16:29
  4. Save QChartView as PNG
    By Carlsberg in forum Qt Programming
    Replies: 1
    Last Post: 24th June 2017, 16:44
  5. Problem getting QChartView to display
    By derrickbj in forum Qt Programming
    Replies: 5
    Last Post: 20th September 2016, 16:55

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.