Solved

I want to customize this chart to fit into my db.

Posted on 2004-10-13
8
208 Views
Last Modified: 2010-04-06
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
Comment
Question by:Melfeky
  • 4
  • 4
8 Comments
 
LVL 4

Expert Comment

by:reginab
ID: 12308314
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
 

Author Comment

by:Melfeky
ID: 12309959
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
 
LVL 4

Expert Comment

by:reginab
ID: 12310084
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
 

Author Comment

by:Melfeky
ID: 12311410
is it free ?
how can i use it with ASP?
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 4

Accepted Solution

by:
reginab earned 500 total points
ID: 12312903
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
 

Author Comment

by:Melfeky
ID: 12312954
ok thanks ,
but i need something which is free
0
 
LVL 4

Expert Comment

by:reginab
ID: 12342960
thanks for the points sorry this was not more help.
0
 

Author Comment

by:Melfeky
ID: 12343030
thanks,  u tried to help.
If u hve time would u look at this topic:
Q_21173148.html
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

746 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

14 Experts available now in Live!

Get 1:1 Help Now