View Full Version : Chart Legend question with Dynamic Data

2013-09-23, 14:14

I am doing the following to create dynamic data grouping.

In my data section of the chart, I am calling my report proc and passing "data" as the value.
I concatenate the bar to create the data group so the columns have different colors.
like so

case lower(p_prop) = "data"
select str(count(*))+"|" as cnt ,ltrim(dbastatus) from dbaprodreleases group by 2 order by 2;
into cursor c_countdata

select etos(cnt) from c_countdata into array m_dataarray

m_return =astring(m_dataarray)

It is working, but I cant figure out how to display the legend correctly. It is showing up as the default "2010,2011".

I tried to use the same code in the legend as my labels, but it didn't like that?



2013-09-24, 01:02
Hi Herb,

You can just read the charting code as its in the library directory.

It it is a vertical bar char the file is graph_vbar.rsp

The "keylabels" parameter is a comma separated list. You can experiment by changing the default value on the getParameter("keylabels") function call.

The code for all the charting is included. They are VFP Server Pages (.rsp files) with JavaScript embedded in them.