perfect solution - thank you!
On Friday, June 20, 2014 1:09:36 PM UTC-5, Andrew Gallant wrote:
>
> Do the subtraction to make them the correct size, but set the formatted
> value of the "goal" bar to 700 so it displays correctly in the tooltip, eg:
>
> var data = google.visualization.arrayToDataTable([
> ['y', 'sales', 'goal'],
> ['', 148, {v: 552, f: '700'}]
> ]);
>
> On Friday, June 20, 2014 10:43:13 AM UTC-4, Cory Huntington wrote:
>>
>> Looking to create a layered versus a stacked bar chart... I want to be
>> able to show progress towards a goal. For example - if I've sold 148
>> units, and the goal is 700 units, I want them on one bar (like a stacked
>> bar chart).
>>
>> If I put in the 148 and 700 as values for a stacked BC, the bar extends
>> to 848 (the sum of the two values). Yes, I can subtract them and use 148
>> and (goal-sales) for 552 to get the bar to extend to the 700 - however,
>> when you do the mouseover tooltip, it now shows the "goal" part of the bar
>> is 552 - not 700. So I want to have a bar of 700, and in front of it, a
>> bar of 148.
>>
>> this used to be available in the image charts, but I'm trying to create
>> this with the api.
>>
>> Anyone have suggestions on how this can be done?
>>
>>
>>
>> <https://lh4.googleusercontent.com/-Kb9OluuoT4w/U6RIDRfe9nI/AAAAAAAAAWo/8uUsmNr1ceU/s1600/stackedbar2.jpg>
>>
>>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-visualization-api.
For more options, visit https://groups.google.com/d/optout.