For Classic Charts, the 'title' option is at the top level, not under
'chart'. Like so:
var options = {
title: 'Feedback Odenplan',
series: {
0: { color: 'Red' },
1: { color: 'Yellow' },
2: { color: 'Green' }
}
};
On Fri, Jun 5, 2015 at 7:18 AM Shahid Majeed <[email protected]>
wrote:
> Hi,
> I am using google column chart in my website. I have two problem with
> chart.
>
> 1. I have set the title chart title but its does not appear on the chart.
> 2. I want to export to PDF and EXCEL my report along with google chart how
> i can do this.
>
> Here is my script
>
> Thanks allot.
> <%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs"
> Inherits="test" %>
>
> <!DOCTYPE html>
>
> <html xmlns="http://www.w3.org/1999/xhtml">
> <head runat="server">
> <title></title>
> <script type="text/javascript" src="https://www.google.com/jsapi
> "></script>
> <script type="text/javascript">
> google.load("visualization", "1", { packages: ["corechart"] });
> google.setOnLoadCallback(drawChart);
> function drawChart() {
> var data = google.visualization.arrayToDataTable([
> ['Month', 'Bad', 'Good', 'Excellent'],
> ['Jan', 10, 30, 60],
> ['Feb', 5, 15, 80],
> ['Mar', 10, 30, 60],
> ['Apr', 5, 5, 90]
> ]);
>
> var options = {
> chart: {
> title: 'Feedback Odenplan',
> },
> series: {
> 0: { color: 'Red' },
> 1: { color: 'Yellow' },
> 2: { color: 'Green' }
> }
> };
>
> var chart = new
> google.visualization.ColumnChart(document.getElementById('columnchart_material'));
>
> chart.draw(data, options);
> }
> </script>
> </head>
> <body>
> <form id="form1" runat="server">
> <div id="columnchart_material" style="width: 900px; height:
> 500px;"></div>
> </form>
> </body>
> </html>
>
>
>
>
> /Shahid
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Chart 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-chart-api.
> For more options, visit https://groups.google.com/d/optout.
>
--
You received this message because you are subscribed to the Google Groups
"Google Chart 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-chart-api.
For more options, visit https://groups.google.com/d/optout.