Your $scope object has several errant commas:
$scope.chartObject = {
"type": "LineChart",
"displayed": true,
"data": {
"cols": [
{
"label": "Month",
"type": "number", // <-- this comma
},
{
"label": "Weight",
"type": "number", // <-- this comma
}
],
"rows": chartdata
},
"options": {
"title": "Weight per month",
"isStacked": "true",
"fill": 20,
"displayExactValues": true,
"vAxis": {
"title": "Sales unit",
"gridlines": {
"count": 10
}
},
"hAxis": {
"title": "Date", // <-- this comma
}
},
"formatters": {}
}
Internet Explorer has an irrational fear of commas at the end of arrays and
object literals, and will curl up into a ball and quiver with terror
whenever it encounters one.
On Monday, July 28, 2014 6:56:56 PM UTC-4, vipul choudhary wrote:
>
> Thanks Thomas for quick reply.
>
> I am using the following code snippets:
>
> *InHTML* :
>
> <div google-chart chart="chartObject" style="{{chart.cssStyle}}" />
>
> *In my JavaScript file:*
>
>
> var chartdata = processArray(_doubleDimensionJSONData);
> $scope.chartObject = {
> "type": "LineChart",
> "displayed": true,
> "data": {
> "cols": [
> {
> "label": "Month",
> "type": "number",
> },
> {
> "label": "Weight",
> "type": "number",
> }
> ],
> "rows": chartdata
> },
> "options": {
> "title": "Weight per month",
> "isStacked": "true",
> "fill": 20,
> "displayExactValues": true,
> "vAxis": {
> "title": "Sales unit",
> "gridlines": {
> "count": 10
> }
> },
> "hAxis": {
> "title": "Date",
>
> }
> },
> "formatters": {}
> }
>
> My ProcessArray method prepares chart data here where weight and event
> time are my Y and X Axis values
>
> function processArray(json) {
> var chartData = [];
> for (var i = 0; i < json.length; i++) {
> if (json[i].Weight != null) {
> chartData.push
> ({
> c: [
> { v: formatDate(new
> Date(json[i].EventTime)) },
> { v: json[i].Weight }
> ]
>
> });
> }
> }
> return chartData;
> debugger;
> }
>
>
>
> The above code works fine on ie10 with plotting of my data. But when I try
> drawing it on ie8 the graph does not shows up. Interestingly sometimes the
> graph shows up but it keep fluctuating and growing. But that too not all
> the time.
>
>
>
> Let me know if you need any more information.
>
> Regards
>
> Bipul Kumar
>
> Senior Software Engineer
>
> Accenture
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Monday, 28 July 2014 16:15:53 UTC-5, trybka wrote:
>
>> Can you post your code? Google Charts supports IE8+.
>>
>> My guess is there's just some syntax that IE8-9 don't like (usually
>> trailing commas in Arrays).
>>
>> Thomas Rybka | Software Engineer | [email protected] | GViz
>>
>>
>> On Mon, Jul 28, 2014 at 5:13 PM, vipul choudhary <[email protected]>
>> wrote:
>>
>>> I am not able to see Google Line Chart individually just on ie8 or ie9.
>>> But when I run it on ie10, and change the compatibility to ie8 or ie9(
>>> using F12 and setting up browser mode on browser), it shows up.
>>>
>>> Please provide assistance, how I can run the chart app on ie8. I cannot
>>> update ie browser version because of requirements.
>>> Also suggest some other chart control supporting AngularJS and accepting
>>> JSON Array for Chart( if any) , if Google chart is not supported on ie8 or
>>> ie9.
>>>
>>> Thanks for help in advance.
>>>
>>> --
>>> 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.