Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QML LineSeries - ChartView
Qt 6.11 is out! See what's new in the release blog

QML LineSeries - ChartView

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 351 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    neda
    wrote on last edited by neda
    #1

    Hi,
    I have a "chartview" with 3 LineSeries.
    I try to use "xAxisSeries" and "yAxisSeries" to specifying Axis.

    ValueAxis {
                        id: axisY
                        min: chartHelper.yMin 
                        max: chartHelper.yMax                    
                        tickInterval: chartHelper.tickIntervalAxisY                   
                    }
                    ValueAxis {
                        id: axisX
                        min: chartHelper.xMin 
                        max: chartHelper.xMax                    
                        tickInterval:chartHelper.tickIntervalAxisX
                    }
    
                    LineSeries {
                        id: orginalChartLineSeries                    
                        axisX: axisX
                        axisY: axisY
                        useOpenGL:true                    
                        pointsVisible: false
                        pointLabelsVisible: true
                    }
    
                    LineSeries {
                        id:xAxisSeries
                        XYPoint { x: chartHelper.xMin; y: 0 }
                        XYPoint { x: chartHelper.xMax; y: 0 }
                        color: "Black"
                        width: 2
                         axisX: axisX
                         axisY: axisY
                    }
                    LineSeries {
                        id:yAxisSeries
                        XYPoint { x: 0; y: chartHelper.yMin }
                        XYPoint { x: 0; y: chartHelper.yMax }
                        color: "Black"
                        width: 2
                    }
    

    But I don't see "xAxisSeries" and "yAxisSeries" (just see "orginalChartLineSeries").
    I have to use the below code:

    xAxisSeries.append(chartHelper.xMin,0);
     xAxisSeries.append(chartHelper.xMax,0);
    yAxisSeries.append(0,chartHelper.yMin);
    yAxisSeries.append(0,chartHelper.yMax);
    

    The above code is well and everything is ok but I don't like to use this code because I have used "XYPoint".

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved