Google Chart API and

Posted on 2009-02-13
Last Modified: 2013-11-26
I am attempting to use the Google Chart API to create a data driven bar chart.  Below is the example code but i would like to dynamically get the day values so that it displays the last 5 days so if today is Friday it would be as below but on Monday is would be (

The data i know i can get from my SQL query as i have done this previously with a pie chart but i cant seem to get the last five days in this way.

I have seen some controls for similar but they are all in C and i want it in if possible.

The other tact i have tried is to create variables in the file containing:
        Dim dtmyesterday As String
        dtmyesterday = Today.AddDays(-1).ToString("dd/MM/yyyy")

but how do i get this into the code above in
<img src="






alt="Sample chart" id="IMG1" onclick="return IMG1_onclick()" />

Open in new window

Question by:sadshead
    LVL 1

    Author Comment

    wow 5 hours have passed, dont tell me there isnt an expert out there who can help?

    I have created a session variable in the VB which displays the date just as i want it now i need to workout a way to response.write that into the google api code for example:

    <img src="
    &amp;chl=Mon|Tue|Wed|Thu|<% response.write(session(test)) %>|"
    alt="Sample chart" id="IMG1" onclick="return IMG1_onclick()" />
    LVL 18

    Accepted Solution

    You should look at this "Google Chart API Custom Server Control "
    it`t a way to create Charts with google charts easier with


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
    Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now