Unlike most of the other ASPired2 products, ASPired2Graph does not have a web based interface. ASPired2Graph is a VisualBasic class for creating bar graphs and therefore, it displays what you program it to display. In other words, you have to write the code to describe your graph.
The ASPired2Graph file needs to be included in the page that will display a graph.
Displaying a graph requires a few lines of code. Below is an example of how to create a simple bar graph.
The data that you set between creating the object and closing the object is pretty flexible as long as you include an Append_Values call and the Create_Graph call is the last call.
| ASPired2Graph Class |
| class_ASPired2Graph |
This is the class that describes the graphing funtions and data.
Set objChart1 = New class_ASPired2Graph
 |
NONE
|
 |
The class object for creating the graphs
|
|
| Graphing Functions |
| Create_1VertGraph |
This creates a vertical bar graph with a single set of data.
objChart1.Create_1VertGraph()
 |
NONE
|
 |
True if an error was generated
|
|
| Create_1HorizGraph |
This creates a horizontal bar graph with a single set of data.
objChart1.Create_1HorizGraph()
 |
NONE
|
 |
True if an error was generated
|
|
| Create_StackVGraph |
This creates a stacked vertical bar graph with up to 3 sets of data
objChart1.Create_StackVGraph()
 |
NONE
|
 |
True if an error was generated
|
|
| Create_StackHGraph |
This creates a stacked horizontal bar graph with up to 3 sets of data
objChart1.Create_StackHGraph()
 |
NONE
|
 |
True if an error was generated
|
|
| Create_MultiVGraph |
This creates a vertical bar graph with up to 3 sets of data
objChart1.Create_MultiHGraph()
 |
NONE
|
 |
True if an error was generated
|
|
| Create_MultiHGraph |
This creates a horizontal bar graph with up to 3 sets of data
objChart1.Create_MultiHGraph()
 |
NONE
|
 |
True if an error was generated
|
|
| Text Setting Functions |
| Graph_Title |
Sets the title for the graph.
objChart1.Graph_Title = "My Graph Title"
 |
Title of Type STRING
|
 |
NONE
|
|
| Graph_Caption |
Sets the caption for the graph.
objChart1.Graph_Caption = "The Caption Below the Title"
 |
Caption of Type STRING
|
 |
NONE
|
|
| Graph_Footer |
Sets the footer text for the graph
objChart1.Graph_footer = "The Footer Below the Graph"
 |
Footer of Type STRING
|
 |
NONE
|
|
| Graph_LegendText |
Sets the labels for the legend on a single data set graph.
objChart1.Graph_LegendText = "Total"
 |
Title for Legend of Type STRING
|
 |
NONE
|
|
| Graph_ARRLegendText |
Sets the labels for the legend on a stacked or multi graph. The array can contain 2 or 3 titles.
objChart1.Graph_ARRLegendText = Array("South", "Central", "North")
 |
Title for Legend of Type ARRAY
|
 |
NONE
|
|
| Image Setting Functions |
| Graph_UseImage |
Sets the image used for the bars in single data set graphs.
objChart1.Graph_UseImage = IMAGES_PATH & "purple.gif"
 |
Path to Image of Type STRING
|
 |
NONE
|
|
| Graph_ARRImages |
Sets the images used for the bars in either the stacked or multi graphs. The array can contain 2 or 3 strings.
objChart1.Graph_ARRImages = Array(IMAGES_PATH & "p_purple1.gif", IMAGES_PATH & "p_red1.gif", IMAGES_PATH & "p_Blue1.gif")
 |
Path to Images of Type ARRAY
|
 |
NONE
|
|
| Graph_YImage |
This sets the image to be displayed on the side of the graph
objChart1.Graph_YImage = IMAGES_PATH & "Y100.gif"
 |
Path to Image of Type STRING
|
 |
NONE
|
|
| Size Setting Functions |
| Graph_Height |
Sets the height of the horizontal bar.
objChart1.Graph_Height = 12
 |
Bar Height of Type INT
|
 |
NONE
|
|
| Graph_Width |
Sets the width of the vertical bar.
objChart1.Graph_Width = 12
 |
Bar Width of Type INT
|
 |
NONE
|
|
| Data Setting Functions |
| Append_Labels |
This adds the labels for each item in the graph
objChart1.Append_Labels(arr_Labels)
 |
Labels of Type ARRAY
|
 |
True if an error was generated
|
|
| Append_Values |
This adds the values to the graph. The second parameter identifies the type of the graph.
0 = Single Graphs
1 = Stacked or multi graphs
objChart1.Append_Values(arr_Values)
 |
Values of Type ARRAY
Graph Type of Type INT
|
 |
True if an error was generated
|
|
| Display Option Functions |
| Graph_Normalization |
This normalizes the data by dividing the values by the normalization factor.
Bar Length in pixels = dataValue / Graph_Normalization
objChart1.Graph_Normalization = 100
 |
Normalization factor of Type INT
|
 |
NONE
|
|
| Graph_PrintValueLoc |
This determines where the values display.
0 = None
1 = Top
2 = Bottom
objChart1.Graph_PrintValueLoc = 1
 |
Location of Type INT
|
 |
NONE
|
|
| Graph_TotalLoc |
This determines where the total displays.
0 = None
1 = Top
2 = Bottom
objChart1.Graph_TotalLoc = 2
 |
Location of Type INT
|
 |
NONE
|
|
| Graph_PrintAverage |
This displays an average for the entire graph. If PrintAverage has data, then an average displays and the text in PrintAverage displays as a title.
objChart1.Graph_PrintAverage = "Average"
 |
Average Title of Type STRING
|
 |
NONE
|
|
| Status Functions |
| Graph_ErrorMsg |
This retrieves the error messages. If an error occurred during the creation of the graph, the error message is recorded. Graph_ErrorMsg retrieves the stored error message.
Response.write objChart1.Graph_ErrorMsg
 |
NONE
|
 |
Error Message of Type STRING
|
|