Glad I could help. Good luck!
On Wed, Apr 1, 2015 at 12:20 PM Alex Frie <[email protected]> wrote:
> Oh okay, did not know that was possible.
> *Thanks for the help!*
> Really appreciate the quick and good answers.
>
> Now I have something to work on, but at least I know how;)
>
>
> On Wednesday, April 1, 2015 at 6:17:09 PM UTC+2, Sergey wrote:
>
>> That's right. You shouldn't do that if you're creating them procedurally
>> (i.e. via document.createElement). You should do something like:
>> var chartContainer = document.getElementById('div');
>> dashboardContainer.appendChild(chartContainer);
>> var lineChart1 = new google.visualization.ChartWrapper({
>> 'chartType': 'LineChart',
>> 'container': chartContainer,
>> ...
>>
>> On Wed, Apr 1, 2015 at 12:13 PM Alex Frie <[email protected]> wrote:
>>
>>> oh yeah Okay allmost :P
>>> What do you mean by "shouldn't refer to them by ID if you do"
>>>
>>> Should I not do like this:
>>> var lineChart1 = new google.visualization.ChartWrapper({
>>> 'chartType' : 'LineChart',
>>> 'containerId' : 'chart1',
>>>
>>>
>>>
>>>
>>>
>>> On Wednesday, April 1, 2015 at 6:09:10 PM UTC+2, Sergey wrote:
>>>
>>>> Presumably you will know how many charts you will need when the page
>>>> loads. It's not inherently an issue to represent your data as you did, you
>>>> will just need to combine it all into one DataTable at the end. Ultimately,
>>>> how you do that is up to you. It also isn't inherently an issue to create
>>>> divs, but you shouldn't refer to them by ID if you do. ChartWrapper also
>>>> has a 'container' option where you can specify an actual container element.
>>>> Does this make sense?
>>>>
>>>> On Wed, Apr 1, 2015 at 12:04 PM Alex Frie <[email protected]> wrote:
>>>>
>>>>> Wow don't understand how you can reply this fast. Really nice!
>>>>> Okay your example makes a lot of sense.
>>>>> The problem is just that I don't really know how many chars I need (It
>>>>> is part of a bigger site and depends on the user).
>>>>>
>>>>> Thats why I had a data that looked like this:
>>>>> var testJson =
>>>>> [{
>>>>> 'title':'testTitle',
>>>>> 'unit':'cm',
>>>>> 'data':[
>>>>> ['Date', 'number', 'number'],
>>>>> [1344988800, 11, 12],
>>>>> [1344988801, 12, 12]
>>>>> ]
>>>>> },
>>>>> {
>>>>> 'title':'testTitle2',
>>>>> 'unit':'C',
>>>>> 'data':[
>>>>> ['Date', 'sensor1', 'sensor2', 'sensor3'],
>>>>> [1344988800, 16, 18, 20],
>>>>> [1344988801, 17, 18, 19]
>>>>> ]
>>>>> },
>>>>> ];
>>>>> I get what you are saying but any good iders how to do it dynamicly?
>>>>> In the data example above I godt two chart. But it can be between 1
>>>>> and 7.
>>>>>
>>>>> On Wednesday, April 1, 2015 at 5:56:08 PM UTC+2, Sergey wrote:
>>>>>
>>>>>> When you render using a Dashboard, the entire Dashboard will want to
>>>>>> use one DataTable. Generally, the way to do this is to have all your
>>>>>> series
>>>>>> in one data table and use the 'view.columns' option to limit the columns
>>>>>> that each chart sees. It looks like you're currently creating a Dashboard
>>>>>> for each chart, which is not how it's intended to work. Your example is a
>>>>>> little complicated to modify, so here's an example written from scratch:
>>>>>> http://jsfiddle.net/41rsjqg9/3/
>>>>>>
>>>>>> I wasn't entirely sure what you were trying to do with the multiple
>>>>>> axes since you had two charts, so I just omitted that part.
>>>>>>
>>>>>> On Wed, Apr 1, 2015 at 11:39 AM Alex Frie <[email protected]> wrote:
>>>>>>
>>>>> I am trying to make multipel charts that all are controled by one
>>>>>>> dataslider.
>>>>>>> Eatch chart got the sate x-axis and the same data in in.
>>>>>>>
>>>>>>> I tryed but for some reason it shows the same data in eatch chart.
>>>>>>> You can see my test here:
>>>>>>> http://jsfiddle.net/41rsjqg9/1/
>>>>>>>
>>>>>>> This is not a finished code, but if anyone can tell me a way to do
>>>>>>> this I will really appreciate it!
>>>>>>>
>>>>>>> --
>>>>>>> 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 google-visualization-api+unsub
>>>>>>> [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.
>>>>>>>
>>>>>> --
>>>>> 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.
>>>>>
>>>> --
>>> 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.
>>>
>> --
> 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.
>
--
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.