Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QCharts Crop to Rectangle and Use Horizontal Scroll



  • I am trying to implement a custom graph going off the QtCharts Callout example. I want to restrict the selection of the chart to a specific area and make it possible to scroll horizontally while still displaying the Axis Values.

    the classes i am using are below
    callout.cpp
    callout.h
    main.cpp
    view.cpp
    view.h

    here is an example of what i mean

    say i want the selection region point1 = (5,0) point2 = (15,8) and the region is a QRect(point1,point2)

    selected.png

    crop.png


Log in to reply