Thanks so much, that fixes the problem. Completely makes sense.
Morgan
On Tuesday, January 13, 2015 at 5:21:21 AM UTC-8, Daniel LaLiberte wrote:
>
> The ChartRangeFilter doesn't change the range of values just because it is
> given new data. It assumes you want to preserve the previously set range,
> rather than resetting to show everything, on the assumption that you aren't
> changing your data that much, and the user would expect the range to be
> preserved. You can set the range yourself, however, which is probably what
> you should do if your data changes radically. Call
> yourControl.setState({range: {start: firstDate, end: lastDate}})
>
> There might be something else going on, however. But it would be easiest
> for me to see your page in action to investigate further. The error you
> are seeing is suspicious, and at least indicates there is a bug in the
> ChartRangeFilter, so I would like to see how this happens.
>
>
> On Tue, Jan 13, 2015 at 1:44 AM, <[email protected] <javascript:>>
> wrote:
>
>> Hello,
>>
>> I have a simple dashboard with a LineChart and a ChartDateFilter. I want
>> to show data from different dataviews depending on user input.
>>
>> Right now, I maintain the dataviews as global variables. When I want to
>> show show a particular dataset, I call
>>
>> *dashboard.draw(dataviews[index]);*
>>
>> I have two datasets in my test set. No matter which one I draw first, it
>> displays correctly, but when I draw the second one the chart becomes
>> corrupted. I have attached a picture of the resulting chart. As you can
>> see, the line chart is zoomed in infinitely far. One of the sliders on the
>> ChartDataFilter is gone. If I try to move the other one, I get a
>> javascript error:
>> Error: Invalid negative value for <rect> attribute
>> width="-22811.88127169454"
>>
>> Afterwards, displaying the first dataset does not fix the chart. I am
>> not sure how to debug this behavior. Is it acceptable to simply switch
>> dataviews when using the draw function?
>>
>> I can work around the issue by completely destroying and rebuilding the
>> dashboard, ChartWrapper, and ControlWrapper, but this is somewhat slow.
>>
>> Any suggestions would be appreciated.
>>
>> Thanks,
>> Morgan
>>
>>
>> --
>> 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]
>> <javascript:>.
>> To post to this group, send email to [email protected]
>> <javascript:>.
>> Visit this group at
>> http://groups.google.com/group/google-visualization-api.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
> - 978-394-1058
> [email protected] <javascript:> 5CC, Cambridge MA
> [email protected] <javascript:> 9 Juniper Ridge Road, Acton MA
>
--
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.