• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

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.Connection")
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("chart_bgcolor"))
chart_style=trim(rs("chart_style"))
chart_title=trim(rs("chart_title"))
chart_title_color=trim(rs("chart_title_color"))
chart_subtitle=trim(rs("chart_subtitle"))
chart_subtitle_color=trim(rs("chart_subtitle_color"))
chart_comment=trim(rs("chart_comment"))
chart_comment_color=trim(rs("chart_comment_color"))
chart_frame_bgcolor=trim(rs("chart_frame_bgcolor"))
chart_frame_style=trim(rs("chart_frame_style"))
chart_frame_border=trim(rs("chart_frame_border"))
chart_frame_size=trim(rs("chart_frame_size"))
chart_tooltip_color=trim(rs("chart_tooltip_color"))
chart_tooltip_style=trim(rs("chart_tooltip_style"))
chart_tooltip_border=trim(rs("chart_tooltip_border"))
chart_tooltip_bgcolor=trim(rs("chart_tooltip_bgcolor"))
chart_horizontal_grid=trim(rs("chart_horizontal_grid"))
chart_horizontal_grid_color=trim(rs("chart_horizontal_grid_color"))
chart_horizontal_label_color=trim(rs("chart_horizontal_label_color"))
chart_vertical_label_orientation="labelvertical" 'trim(rs("chart_vertical_label_orientation"))
chart_vertical_grid=trim(rs("chart_vertical_grid"))
chart_vertical_grid_color=trim(rs("chart_vertical_grid_color"))
chart_horizontal_title=trim(rs("chart_horizontal_title"))
chart_horizontal_text_color=trim(rs("chart_horizontal_text_color"))
chart_vertical_title=trim(rs("chart_vertical_title"))
chart_vertical_text_color=trim(rs("chart_vertical_text_color"))
chart_legend_text_color=trim(rs("chart_legend_text_color"))
chart_legend_style=trim(rs("chart_legend_style"))
chart_max_value=trim(rs("chart_max_value"))
chart_min_value=trim(rs("chart_min_value"))
'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_comment_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_style,chart_tooltip_bgcolor,chart_tooltip_border
vchart_set_legend chart_legend_text_color, chart_legend_style
vchart_set_horizontalgrid chart_horizontal_grid,chart_horizontal_grid_color
vchart_set_horizontalgridlabel chart_horizontal_label_color
vchart_set_verticalgrid chart_vertical_grid,chart_vertical_grid_color
vchart_set_horizontalgrid chart_horizontal_grid,chart_horizontal_grid_color
vchart_set_verticalgridlabelorientation chart_vertical_label_orientation
vchart_set_horizontaltitle chart_horizontal_text_color,chart_horizontal_title
vchart_set_verticaltitle chart_vertical_text_color,chart_vertical_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("series_title"))
      series_type=trim(rs("series_type"))
      series_style=trim(rs("series_style"))
      series_bgcolor=trim(rs("series_bgcolor"))
      series_spacing=trim(rs("series_spacing"))
      
      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_value"))
            series_data_label=trim(ts("series_data_label"))
            series_data_label_color=trim(ts("series_data_label_color"))
            vchart_add_series_data seriesid, series_data_value
            vchart_add_label series_data_label,series_data_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.
0
Melfeky
Asked:
Melfeky
  • 4
  • 4
1 Solution
 
reginabCommented:
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.

0
 
MelfekyAuthor Commented:
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.
0
 
reginabCommented:
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.
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
MelfekyAuthor Commented:
is it free ?
how can i use it with ASP?
0
 
reginabCommented:
I do not believe it is free, it is for use with asp and asp.net but the informationin the online manual is free.
0
 
MelfekyAuthor Commented:
ok thanks ,
but i need something which is free
0
 
reginabCommented:
thanks for the points sorry this was not more help.
0
 
MelfekyAuthor Commented:
thanks,  u tried to help.
If u hve time would u look at this topic:
Q_21173148.html
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 4
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now