You'll need to replace your hard-coded list of 18 <% ... CallDriverArray %>
tags with a loop that iterates through your array.  See this tutorial for
more hints on how to do it:
http://www.htmlgoodies.com/primers/asp/article.php/3477901

On Fri, Dec 18, 2015 at 1:43 PM, Cory Huntington <[email protected]
> wrote:

> Sorry - fat-fingered and posted early.
>
> my issue is with this section of the chart javascript:
>
>
> The database reads, etc are classic ASP.  However, the loop part needs to
> be in the chart code.  Specifically:
>
>   [' Call Drivers',   'Count'],
>                   ['<% =CallDriverArray(0,0) %>', <% =CallDriverArray(0,2)
> %>],
>   ['<% =CallDriverArray(1,0) %>', <% =CallDriverArray(1,2) %>],
>   ['<% =CallDriverArray(2,0) %>', <% =CallDriverArray(2,2) %>],
>   ['<% =CallDriverArray(3,0) %>', <% =CallDriverArray(3,2) %>],
>                   ['<% =CallDriverArray(4,0) %>', <% =CallDriverArray(4,2)
> %>],
>   ['<% =CallDriverArray(5,0) %>', <% =CallDriverArray(5,2) %>],
>   ['<% =CallDriverArray(6,0) %>', <% =CallDriverArray(6,2) %>],
>   ['<% =CallDriverArray(7,0) %>', <% =CallDriverArray(7,2) %>],
>                   ['<% =CallDriverArray(8,0) %>', <% =CallDriverArray(8,2)
> %>]
>
> my loop for the array works fine - the problem is if there are only say 3
> rows of data returned.  then the chart script looks like this:
>
>  [' Call Drivers',   'Count'],
>                   ['Label 1', 10],
>   ['Label 2', 4],
>   ['Label 3', 8],
>   [' ', ],
>                   [' ', ],
>                   [' ', ],
>                   [' ', ],
>                   [' ', ],
>                   [' ', ]
>
> This breaks the script and the chart doesn't display.  Basically, I need
> it to build a pie chart regardless of how many rows are being returned /
> how many slices there are to display?  Would a javascript loop work to
> build that section?
>
>>
>> --
> 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
> https://groups.google.com/group/google-visualization-api.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-visualization-api/ce8c7282-af15-4cb0-9856-7c4b5f0566b2%40googlegroups.com
> <https://groups.google.com/d/msgid/google-visualization-api/ce8c7282-af15-4cb0-9856-7c4b5f0566b2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Daniel LaLiberte <https://plus.google.com/100631381223468223275?prsrc=2>
[email protected] <[email protected]>   5CC, Cambridge MA

-- 
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 https://groups.google.com/group/google-visualization-api.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-visualization-api/CAOtcSJOBXqxSPreZvtsQrU9EZF0FBbj0WYx8CfjtSa4pL_DpZA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to