Flip bar chart

pull/520/head
Alinson S. Xavier 6 years ago
parent 77a9701805
commit 105baf629a

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@ -59,7 +59,7 @@ class BarChart(var theme: Theme,
canvas.fillRect(0.0, 0.0, width, height)
fun barGroupOffset(c: Int) = marginLeft + paddingLeft +
(nColumns - c - 1) * barGroupWidth
(c) * barGroupWidth
fun barOffset(c: Int, s: Int) = barGroupOffset(c) +
barGroupMargin +
@ -130,8 +130,8 @@ class BarChart(var theme: Theme,
val isLargeInterval = (axis[0].distanceTo(axis[1]) > 300)
for (c in 0 until nColumns) {
val x = barGroupOffset(nColumns - c - 1)
val date = axis[nColumns - c - 1]
val x = barGroupOffset(c)
val date = axis[c]
if(isLargeInterval) {
canvas.drawText(date.year.toString(),
x + barGroupWidth / 2,

Loading…
Cancel
Save