Drunken Daddy
Drunken Daddy

Reputation: 7991

Google Chart: Overlapping bars - bring latest to front

Here's picture of my bar chart using Google Charts and the corresponding values on the right side. X-Axis is a Date Axis

enter image description here

As you can see in the table, there are two values for 16th Jan, 2017 (100 & 60). They're overlapping and though 60 is the latest reading (considering time), it is not showing in the graph. It is behind 100. How can I bring the latest reading to the front. Is there any setting in Google Chart that does this?

Upvotes: 1

Views: 767

Answers (1)

Drunken Daddy
Drunken Daddy

Reputation: 7991

My requirement was that I only needed to bring the latest value to the front.

My value list was sorted in descending order by time. So I reversed the list and problem solved.

this.myValueList = this.myValueList.reverse();

If there are two overlapping bars, google charts bring to front the later one by position in the array

Upvotes: 1

Related Questions