Melfeky
asked on
I want to customize this chart to fit into my db.
Hi all experts,
i have downloaded Flashchart products , and when i opened the ASP file to set the db connection and to select the records from the table i couldn't customize that to fit my db.
Here is the asp file which connects to the db and by the way the include file "flashchart_20.asp" contains the color setting of the chart.
<!-- #include file="flashchart_20.asp" -->
<%
Response.Expires=0
randomize timer
rvar=trim(request("r"))
Set conn=Server.CreateObject(" Adodb.Conn ection")
cnpath="DBQ=" & server.mappath("DB1.mdb")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath & ";Uid=anonymous; Pwd="
'for example purposes, we set chartid=1
chartid=1
'Retrieve Chart Layout Values
vsql="select * from chart where chartid=" & chartid
Set rs=conn.execute(vsql)
chart_bgcolor=trim(rs("cha rt_bgcolor "))
chart_style=trim(rs("chart _style"))
chart_title=trim(rs("chart _title"))
chart_title_color=trim(rs( "chart_tit le_color") )
chart_subtitle=trim(rs("ch art_subtit le"))
chart_subtitle_color=trim( rs("chart_ subtitle_c olor"))
chart_comment=trim(rs("cha rt_comment "))
chart_comment_color=trim(r s("chart_c omment_col or"))
chart_frame_bgcolor=trim(r s("chart_f rame_bgcol or"))
chart_frame_style=trim(rs( "chart_fra me_style") )
chart_frame_border=trim(rs ("chart_fr ame_border "))
chart_frame_size=trim(rs(" chart_fram e_size"))
chart_tooltip_color=trim(r s("chart_t ooltip_col or"))
chart_tooltip_style=trim(r s("chart_t ooltip_sty le"))
chart_tooltip_border=trim( rs("chart_ tooltip_bo rder"))
chart_tooltip_bgcolor=trim (rs("chart _tooltip_b gcolor"))
chart_horizontal_grid=trim (rs("chart _horizonta l_grid"))
chart_horizontal_grid_colo r=trim(rs( "chart_hor izontal_gr id_color") )
chart_horizontal_label_col or=trim(rs ("chart_ho rizontal_l abel_color "))
chart_vertical_label_orien tation="la belvertica l" 'trim(rs("chart_vertical_l abel_orien tation"))
chart_vertical_grid=trim(r s("chart_v ertical_gr id"))
chart_vertical_grid_color= trim(rs("c hart_verti cal_grid_c olor"))
chart_horizontal_title=tri m(rs("char t_horizont al_title") )
chart_horizontal_text_colo r=trim(rs( "chart_hor izontal_te xt_color") )
chart_vertical_title=trim( rs("chart_ vertical_t itle"))
chart_vertical_text_color= trim(rs("c hart_verti cal_text_c olor"))
chart_legend_text_color=tr im(rs("cha rt_legend_ text_color "))
chart_legend_style=trim(rs ("chart_le gend_style "))
chart_max_value=trim(rs("c hart_max_v alue"))
chart_min_value=trim(rs("c hart_min_v alue"))
'Retrieve Chart Data
vchart_initialize
vchart_set_bgcolor chart_bgcolor,chart_style
vchart_set_title chart_title, chart_title_color
vchart_set_subtitle chart_subtitle, chart_subtitle_color
vchart_set_comment chart_comment,chart_commen t_color
vchart_set_frame chart_frame_bgcolor, chart_frame_style
vchart_set_frameborder chart_frame_border, chart_frame_size
vchart_set_tooltip chart_tooltip_color,chart_ tooltip_st yle,chart_ tooltip_bg color,char t_tooltip_ border
vchart_set_legend chart_legend_text_color, chart_legend_style
vchart_set_horizontalgrid chart_horizontal_grid,char t_horizont al_grid_co lor
vchart_set_horizontalgridl abel chart_horizontal_label_col or
vchart_set_verticalgrid chart_vertical_grid,chart_ vertical_g rid_color
vchart_set_horizontalgrid chart_horizontal_grid,char t_horizont al_grid_co lor
vchart_set_verticalgridlab elorientat ion chart_vertical_label_orien tation
vchart_set_horizontaltitle chart_horizontal_text_colo r,chart_ho rizontal_t itle
vchart_set_verticaltitle chart_vertical_text_color, chart_vert ical_title
vchart_set_minvalue chart_min_value
vchart_set_maxvalue chart_max_value
'Retrieve Series Data
vsql="select * from series where series_chartid=" & chartid & " order by seriesid"
Set rs=conn.execute(vsql)
do while not rs.eof
seriesid=trim(rs("seriesid "))
series_title=trim(rs("seri es_title") )
series_type=trim(rs("serie s_type"))
series_style=trim(rs("seri es_style") )
series_bgcolor=trim(rs("se ries_bgcol or"))
series_spacing=trim(rs("se ries_spaci ng"))
vchart_add_series series_title, series_type, series_bgcolor, series_style, series_spacing
'Retrieve Series data values
vsql="select * from series_data where series_data_seriesid=" & seriesid & " order by series_dataid"
Set ts=conn.execute(vsql)
do while not ts.eof
series_data_value=trim(ts( "series_da ta_value") )
series_data_label=trim(ts( "series_da ta_label") )
series_data_label_color=tr im(ts("ser ies_data_l abel_color "))
vchart_add_series_data seriesid, series_data_value
vchart_add_label series_data_label,series_d ata_label_ color
ts.movenext
loop
rs.movenext
loop
vchart_show
set rs=nothing
set ts=nothing
conn.close
set conn=nothing
%>
My db is called DB1.mdb
and it has a table called "Weight" and has these column:
"Weightid"
"MEMBER_ID"
"currentweight"
"d_date"
Where i want the x-axis to display the values from the d_date and i want the y-axis to display the currentweight.
Could anyone help me in this.
i have downloaded Flashchart products , and when i opened the ASP file to set the db connection and to select the records from the table i couldn't customize that to fit my db.
Here is the asp file which connects to the db and by the way the include file "flashchart_20.asp" contains the color setting of the chart.
<!-- #include file="flashchart_20.asp" -->
<%
Response.Expires=0
randomize timer
rvar=trim(request("r"))
Set conn=Server.CreateObject("
cnpath="DBQ=" & server.mappath("DB1.mdb")
conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; " & cnpath & ";Uid=anonymous; Pwd="
'for example purposes, we set chartid=1
chartid=1
'Retrieve Chart Layout Values
vsql="select * from chart where chartid=" & chartid
Set rs=conn.execute(vsql)
chart_bgcolor=trim(rs("cha
chart_style=trim(rs("chart
chart_title=trim(rs("chart
chart_title_color=trim(rs(
chart_subtitle=trim(rs("ch
chart_subtitle_color=trim(
chart_comment=trim(rs("cha
chart_comment_color=trim(r
chart_frame_bgcolor=trim(r
chart_frame_style=trim(rs(
chart_frame_border=trim(rs
chart_frame_size=trim(rs("
chart_tooltip_color=trim(r
chart_tooltip_style=trim(r
chart_tooltip_border=trim(
chart_tooltip_bgcolor=trim
chart_horizontal_grid=trim
chart_horizontal_grid_colo
chart_horizontal_label_col
chart_vertical_label_orien
chart_vertical_grid=trim(r
chart_vertical_grid_color=
chart_horizontal_title=tri
chart_horizontal_text_colo
chart_vertical_title=trim(
chart_vertical_text_color=
chart_legend_text_color=tr
chart_legend_style=trim(rs
chart_max_value=trim(rs("c
chart_min_value=trim(rs("c
'Retrieve Chart Data
vchart_initialize
vchart_set_bgcolor chart_bgcolor,chart_style
vchart_set_title chart_title, chart_title_color
vchart_set_subtitle chart_subtitle, chart_subtitle_color
vchart_set_comment chart_comment,chart_commen
vchart_set_frame chart_frame_bgcolor, chart_frame_style
vchart_set_frameborder chart_frame_border, chart_frame_size
vchart_set_tooltip chart_tooltip_color,chart_
vchart_set_legend chart_legend_text_color, chart_legend_style
vchart_set_horizontalgrid chart_horizontal_grid,char
vchart_set_horizontalgridl
vchart_set_verticalgrid chart_vertical_grid,chart_
vchart_set_horizontalgrid chart_horizontal_grid,char
vchart_set_verticalgridlab
vchart_set_horizontaltitle
vchart_set_verticaltitle chart_vertical_text_color,
vchart_set_minvalue chart_min_value
vchart_set_maxvalue chart_max_value
'Retrieve Series Data
vsql="select * from series where series_chartid=" & chartid & " order by seriesid"
Set rs=conn.execute(vsql)
do while not rs.eof
seriesid=trim(rs("seriesid
series_title=trim(rs("seri
series_type=trim(rs("serie
series_style=trim(rs("seri
series_bgcolor=trim(rs("se
series_spacing=trim(rs("se
vchart_add_series series_title, series_type, series_bgcolor, series_style, series_spacing
'Retrieve Series data values
vsql="select * from series_data where series_data_seriesid=" & seriesid & " order by series_dataid"
Set ts=conn.execute(vsql)
do while not ts.eof
series_data_value=trim(ts(
series_data_label=trim(ts(
series_data_label_color=tr
vchart_add_series_data seriesid, series_data_value
vchart_add_label series_data_label,series_d
ts.movenext
loop
rs.movenext
loop
vchart_show
set rs=nothing
set ts=nothing
conn.close
set conn=nothing
%>
My db is called DB1.mdb
and it has a table called "Weight" and has these column:
"Weightid"
"MEMBER_ID"
"currentweight"
"d_date"
Where i want the x-axis to display the values from the d_date and i want the y-axis to display the currentweight.
Could anyone help me in this.
have you tried their website, they have some very nice online help there. adding data from adata base. Go into the online help there, and then select flashchart, it is detailed and they have code examples, I would start their. then you will have more of a code sample if you are still having trouble to bring here, really there is not enough above to really help. I am not even sure if the above is for a line chart like you are trying to create.
ASKER
I have searched in the website but i couldn't find any online support link here is a link to the site :http://flashcharts.mousepeople.com
would u provide me with a url with this link.
would u provide me with a url with this link.
sorry, I thought you were using these guys, http://www.aurigma.com/Products/FlashChart/ not sure if they are related to yours or not, I would perhaps still go here, here it is still charts with asp and asp.net, and they do have code samples.
go here http://www.aurigma.com/Support/default.aspx?mainsrc=OnlineHelp.aspx and then in the left nav expand flashchart.
lots of good information there.
go here http://www.aurigma.com/Support/default.aspx?mainsrc=OnlineHelp.aspx and then in the left nav expand flashchart.
lots of good information there.
ASKER
is it free ?
how can i use it with ASP?
how can i use it with ASP?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
ok thanks ,
but i need something which is free
but i need something which is free
thanks for the points sorry this was not more help.
ASKER
thanks, u tried to help.
If u hve time would u look at this topic:
Q_21173148.html
If u hve time would u look at this topic:
Q_21173148.html