Solved

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

Posted on 2004-10-13
8
214 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Melfeky
ID: 12311410
is it free ?
how can i use it with ASP?
0
 
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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are two main kinds of selectors in CSS: One is base selector like h1, h2, body, table or any existing HTML tags.  For instance, the following rule sets all paragraphs (<p> elements) to red: (CODE) CSS also allows us to define our own custom …
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will learn how to dynamically set the form action using jQuery.

751 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