When clicked on Chart tag multiple times why the chart size is being larger and smaller?

10 views
Skip to first unread message

Kiran Kumar

unread,
Nov 6, 2015, 5:06:47 AM11/6/15
to Google Visualization API

i have got some JSON data and I am representing tabular as well as chart data using Google Charts The issue i am facing is that , When clicked on chart tab multiple times why the chart size is sometimes shown bigger and smaller in size .

Some part of my code

var historic_json = [
    {
        "high_val": 1089,
        "low_val": 1046.05,
        "current_day": "01-Oct",
        "open_val": 1064.8,
        "close_val": 1055.35
    },
    {
        "high_val": 1110,
        "low_val": 1055,
        "current_day": "05-Oct",
        "open_val": 1065,
        "close_val": 1106.45
    }
];

$(document).ready(function()
{
    $('ul.tabs-2 li:eq(0)').click();
});

and this is my fiddle

http://jsfiddle.net/jq4f69cz/19/

Could you please tell me how can i resolve this issue ??

Thanks in advance .

Daniel LaLiberte

unread,
Nov 6, 2015, 8:32:19 AM11/6/15
to Google Visualization API
Kiran,

The problem is caused by one of two things: drawing the chart when it is not visible, and not specifying the chart size in the options.   The following update to your example shows how you can fix this:  http://jsfiddle.net/dlaliberte/jq4f69cz/20/

--
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-visualizati...@googlegroups.com.
To post to this group, send email to google-visua...@googlegroups.com.
Visit this group at http://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-visualization-api/75829e91-25ce-4e33-b7b0-21ec6d352159%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
dlaliberte@Google.com   5CC, Cambridge MA
daniel.laliberte@GMail.com 9 Juniper Ridge Road, Acton MA
Reply all
Reply to author
Forward
0 new messages