DGR
DGR

Reputation: 3

MPAndroid Chart same chart width

enter image description here

I try to figure out, how to set the same width for both of these charts. The yAxis labels may change, so all I need is to set the effective chart width of the second chart to the width of the first one. Anyone tips on how to implement this? Also I try to drag and scale them together. I can't find anything about this and there is no (?) example on how to make this happen. I started with a listener for the gestures...

Upvotes: 0

Views: 881

Answers (1)

Mehul Kabaria
Mehul Kabaria

Reputation: 6622

Can you please add below line in your code.

mChart.setViewPortOffsets(50f, 0f, 50f, 0f);

in this, mChart is object of LineChart.

Upvotes: 1

Related Questions