Set the "interpolateNulls" option to true.
On Tuesday, May 22, 2012 8:13:48 AM UTC-4, Uzilin wrote:
>
> i was using another way to build the chart, now i did lke you said, with a
> table, but on null values, it creates gaps.
> I don't want these gaps, i want a continue line, do you know some way to
> build it?
> Here is the code, if you paste on the lineChart playground, you'll see the
> gaps.
>
> function drawVisualization() {
> // Create and populate the data table.
>
> var data = new google.visualization.DataTable();
>
> // Declare columns
> data.addColumn('string', 'velocidade');
> data.addColumn('number', 'altitude');
> data.addColumn('number', 'altitude2');
>
> data.addRow(['1', 2, 3]);
> data.addRow(['1.2', 2.5, 3.2]);
> data.addRow(['1.5', , 3.5]);
> data.addRow(['2', 3, 4]);
> data.addRow(['3', 3, 5]);
> data.addRow(['4', 3, null ]);
> data.addRow(['5', 3, 7]);
> data.addRow(['6', 4, 8]);
>
> // Create and draw the visualization.
> new google.visualization.LineChart(document.getElementById(
> 'visualization')).
> draw(data, {curveType: "function",
> width: 500, height: 400,
> vAxis: {maxValue: 10}}
> );
> }
>
>
>
> 2012/5/22 MC Get Vizzy <[email protected]>
>
>> Really? What happens when you set DataTable values to null? Do you see
>> an error?
>>
>>
>> On Mon, May 21, 2012 at 10:49 PM, Rafael Uzilin <
>> [email protected]> wrote:
>>
>>> I need a line chart to compare those values, i need to analyze a
>>> function, the best function would be the highest curve on the chart for
>>> example. That's the reason i use a line chart. I can't let values "null",
>>> when i do it, the chart isn't generated.
>>>
>>>
>>> 2012/5/21 MC Get Vizzy <[email protected]>
>>>
>>>> The line chart data format is not ideally suited to your use case.
>>>>
>>>> You could use null values to pad your data, as in
>>>>
>>>> x,y1,y2
>>>> 1,4,
>>>> 2,,5
>>>> 3,5,
>>>> 4,,4
>>>> 5,9,
>>>> 6,,4
>>>>
>>>> You could also have a look at the BubbleChart, which does have a data
>>>> format like yours:
>>>>
>>>> https://developers.google.com/chart/interactive/docs/gallery/bubblechart
>>>>
>>>> 2012/5/21 Uzilin <[email protected]>
>>>>
>>>>> Bom galera, estou com uma duvida, quando vou gerar o gráfico de linha
>>>>> com sobreposição de curvas é definido N valores de Y para 1 valor de X
>>>>> ou seja, em um gráfico q contem 2 curvas sobrepostas, em um valor de X
>>>>> eu tenho 2 valores de Y, porem estou com um problema, o gráfico q
>>>>> quero gerar não tem os mesmos valores de Y para um valor de X, por
>>>>> exemplo:
>>>>> uma curva seria:
>>>>> (1, 2); (2, 4); (3, 3).
>>>>> Oma outra curva seria:
>>>>> (0.5, 0.5); (1.5,3; (3,1).
>>>>>
>>>>> Gostaria de uma ideia para gerar este gráfico de linha.
>>>>>
>>>>> Obrigado.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "Google Visualization API" group.
>>>>> To post to this group, send email to
>>>>> [email protected].
>>>>> To unsubscribe from this group, send email to
>>>>> [email protected].
>>>>> For more options, visit this group at
>>>>> http://groups.google.com/group/google-visualization-api?hl=en.
>>>>>
>>>>>
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Google Visualization API" group.
>>>> To post to this group, send email to
>>>> [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/google-visualization-api?hl=en.
>>>>
>>>
>>>
>>>
>>> --
>>> Rafael Uzilin Francisco
>>> Graduando do Curso de Gestão de Produção Industrial
>>> Instituto Federal de Educação, Ciência e Tecnologia de São Paulo - IFSP
>>> Campus Salto
>>> Fone: (19)98517545 / (19)94461571 / (19)33120554
>>>
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Google Visualization API" group.
>>> To post to this group, send email to
>>> [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/google-visualization-api?hl=en.
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Google Visualization API" group.
>> To post to this group, send email to
>> [email protected].
>> To unsubscribe from this group, send email to
>> [email protected].
>> For more options, visit this group at
>> http://groups.google.com/group/google-visualization-api?hl=en.
>>
>
>
>
> --
> Rafael Uzilin Francisco
> Graduando do Curso de Gestão de Produção Industrial
> Instituto Federal de Educação, Ciência e Tecnologia de São Paulo - IFSP
> Campus Salto
> Fone: (19)98517545 / (19)94461571 / (19)33120554
>
>
--
You received this message because you are subscribed to the Google Groups
"Google Visualization API" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-visualization-api/-/rqPEAtJ5oX4J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-visualization-api?hl=en.