You must Sign In to post a response.
  • Category: ASP.NET

    How display google chart in in

    I have developed a for open window and in windows i am display in
    google chart. when i close this window, I am getting error. becuase
    of my div and google chart are storing in the buffter.

    when i use following javascript it is working but my original(backand screen changing,
    after some type it getting original screen which i stored in (var originalContents)
    so i want store my original screen after close window chart.. So give my advice
    how to do avoid error..

    I want work perfect. I press linkbutton to open window by javsscript(one time or more time)
    it should not getting error.. Other wise give another solution but with practically code to
    open window display google chart..

    I think my problem in : document.body.innerHTML = originalContents;

    <script type="text/javascript">

    function PrintDiv() {
    var showActivityChart = document.getElementById('<%=dActivityChart.ClientID %>'); = "none";

    var logo = document.getElementById('<%=dMainLogoPrint.ClientID %>'); = "block";

    var hideActivityChart = document.getElementById('<%=dHideActivityChart.ClientID %>'); = "block";


    var printContents = document.getElementById('<%=dChartContainer.ClientID %>').innerHTML;
    var originalContents = document.body.innerHTML;

    document.body.innerHTML = printContents;
    document.body.innerHTML = originalContents;


    <script type="text/javascript">
    function divHide() {
    var logo = document.getElementById('<%=dMainLogoPrint.ClientID %>'); = "none";

    var hideActivityChart = document.getElementById('<%=dHideActivityChart.ClientID %>'); = "none";

    <script type="text/javascript">
    google.load("visualization", "1", { packages: ["corechart"] });
    //Do not call this method on pageload

    function drawhideActivityChart() {
    var data = new google.visualization.DataTable();

    data.addColumn('string', 'Status');
    data.addColumn('number', 'TotalStatus');


    <%= SetFarmerChart() %>

    var activityChart = new google.visualization.PieChart(document.getElementById('activityChart'));

    activityChart.draw(data, { title: 'Farmer Status Details', titleTextStyle: { color: 'Maroon', fontSize: '20', fontStyle: 'normal' }, is3D: 'true', tooltip: { text: 'value' }, pieSliceText: 'value', legend: 'right', width: 600, height: 320 });
  • #768110
    which error is prompting ? can you attach a screen shot for that so that we can help you better
    Editor, DotNetSpider MVM
    Microsoft MVP 2014 [ASP.NET/IIS]

Sign In to post your comments