Solved How to Remove Spacing between chartview and it's Plotarea.
-
-
My requirement is that Plotarea of chartview in Qml should acquire whole space.
-
I don't want spacing between chartview and plotarea grids.
-
For this, i made
margins.top: 0 margins.bottom: 0 margins.left: 0 margins.right: 0
-
After Doing this, there was still little spacing between grids and chartview.
-
Then i did this, by giving minus values to x,y axis and increasing width and height.
Rectangle { width : 400 height: 200 clip:true ChartView { height: parent.height+42 width: parent.width+51 x:-32 y:-15 legend.visible:false margins.top: 0 margins.bottom: 0 margins.left: 0 margins.right: 0 } }
- After doing this it got adjusted properly.
- But when i am chaning Valueaxis(max), then it is again chaing it's position.
- Valueaxis which is inside chartview, there is min max value, if max=5 then it's displaying properly, if i change max=10 then it's changing its position, on some value's it's showing properly, on some it's not
ValueAxis { id:y_axis min: 0 max: 5 // on 5 it's proper, if i change it to 10 grids position is changing tickCount: 4 labelsVisible: false }
Any Possible Solution ?
-
-
@Bhushan_Sure hi, is this the same question ?
-
@LeLev No it's some what different question, actually i found out what is the problem of previous and this question both, it's bug actually, it's changing position with respect to log10. Finding a way to ignore this bug, I will post solution if i get something.
-
Chartview's grid reposition itself everytime whenever min or max of Valueaxis changes. Whenever Valueaxis min or max changes in order of log10 then it reposition it's grid.