Overview |
Using iASP_Chart component, you can create professional looking charts very easily. Features include:
- Creates JPG, PNG, and BMP formats
- 3D features
- Supports Response.BinaryWrite
- Pie, Bar, Area, and many other styles
- Automatically creates legends
- Supports multiple series per chart
- Charts can be resized and rotated
Note: We also has 2 versions for this component, one needs Jimi classes to run with both jdk1.1.x and jdk1.2, and the other can run only run with jdk1.2 and doesn't need Jimi classes support.
Use the following links to view the details:
Properties:
Up Property
Description
Angle By default the Angle property is set to 0. If you wish to rotate the final chart image, set Angle to the angle of rotation. AxisGridColor Sets the grid line color of the chart (if present). AxisGridLines AxisGridLines is true by default and determines if an axis grid is displayed. Example:
Chart.AxisGridLines = false
AxisHorizFont The AxisHorizFont property exposes the horizontal axis font object. Valid sub-properties are
- Name : string
- Size : integer
- Bold : boolean
- Italic : boolean
- Underline : boolean
- Strikethrough : boolean
- Weight : smallint
Example:
Chart.AxisHorizFont.Name = "Arial" Chart.AxisHorizFont.Size = 12 Chart.AxisHorizFont.Bold = trueAxisHorizFontColor AxisHorizFontColor determines what color the horizontal axis font is drawn with. Example:
Chart.AxisHorizFontColor = vbBlackAxisLabelFontBottom AxisLabelFontLeft
These properties expose the axis label font objects. See AxisHorizFont for details. Example
Chart.AxisLabelFontBottom.Bold = true
AxisLabelFontColor AxisLabelFontColor determines what color the axis label fonts are drawn with. AxisVertFont The AxisVertFont property exposes the vertical axis font object. See AxisHorizFont for details. AxisVertFontColor AxisVertFontColor determines what color the vertical axis font is drawn with. BarLayout If you have multiple bar series in a chart, the BarLayout property specifies how the bar series will be drawn. Valid values are
- cNone = 0
- cSide = 1
- cStacked = 2
Example:
Chart.BarLayout = cNoneBarStyle BarStyle determines the style of the bars drawn for bar series. Valid values are:
- cRectangle = 0
- cPyramid = 1
- cInvPyramid = 2
- cCylinder = 3
- cEllipse = 4
- cArrow = 5
- cRectGradient = 6
Example:
Chart.BarStyle = cRectGradientBevelInner The BevelInner property determines whether the inner bevel for the chart is displayed. Example:
Chart.BevelInner = falseBevelOuter The BevelOuter property determines whether the outer bevel for the chart is displayed. Example:
Chart.BevelOuter = falseBevelWidth The BevelWidth property determines the width in pixels between the inner and the outer bevels of a panel. Example:
Chart.BevelWidth = 2BorderWidth The BorderWidth property determines the width in pixels of the border around a panel. Example:
Chart.BorderWidth = 1BottomAxisIncrement The BottomAxisIncrement Property determines the minimum axis increment for the bottom axis. Example:
Chart.BottomAxisIncrement = 100
BottomWallColor The BottomWallColor property specifies the color used to fill the bottom wall background. Example:
Chart.BottomWallColor = vbYellowChartBGColor The ChartBGColor property specifies the color used to fill the chart background. Example:
Chart.ChartBGColor = vbWhiteChartTitleFont The ChartTitleFont property specifies the font characteristics used to draw chart titles. See AxisHorizFont for sub-properties. ChartTitleFontColor The ChartTitleFontColor property specifies the font color used to draw chart titles. Example:
Chart.ChartTitleFontColor = vbBlueColorDepth The ColorDepth Property sets the color depth of the resulting image. This only affects BMP pictures. The default is 24bit. Valid values are:
Description Value 1bit 1 4bit 2 8bit 3 15bit 4 16bit 5 24bit 6 32bit 7
Example:Chart.ColorDepth = 7
ConvertPath Path to optional (user supplied) image conversion utility. This property is used during the call to the ConvertImage method. See ConvertImage details for more information. Example:
Chart.ConvertPath = "c:\imgconv\myconv.exe"
ConvertParams Parameters used during the call to the ConvertImage method. See ConvertImage details for more information. Example:
Chart.ConvertParams = "image1.bmp chrt32.xbm"
CurrentSeries The CurrentSeries indicates/sets which series is currently active. For single series charts this will always be 1 but for multi-series charts this value will change each time a new series is added. You can switch between series by modifying this value. Example:
Chart.CurrentSeries = 2Error The Error property is used to report any errors that may have occurred during various method calls. Example:
Response.Write "Error: " & Chart.Error
Expires If the component is an eval version the Expires property will return the date that the component quits functioning. Example:
Response.Write "Component Expires: " & Chart.ExpiresFileName The FileName property specifies the physical path where a file will be saved using the SaveChart method. Example:
Chart.FileName = "d:\inetpub\wwwroot\images\abc.jpg"Frame Typically charts have a frame around them. You can hide the grid lines using the AxisGridLines property. If you wish to hide the frame also you can set Frame to false. Example:
Chart.Frame = false
GradientDirection The chart panel may have a background gradient. The GradientDirection Property determines which direction the gradient should be drawn in. Valid values are:
- cTopBottom = 0
- cBottomTop = 1
- cLeftRight = 2
- cRightLeft = 3
Example:
Chart.GradientDirection = cTopBottomGradientEndColor Determines the end color for the gradient. Example:
Chart.GradientEndColor = vbWhiteGradientStartColor Determines the beginning color for the gradient. Example:
Chart.GradientEndColor = vbYellowGradientVisible Determines whether the chart panel gradient is visible or not. Example:
Chart.GradientVisible = trueHeight The Height property determines the height of the chart. Example:
Chart.Height = 500HintsBGColor Determines the background color of the chart hints. HintsFont The HintsFont property specifies the font characteristics used to draw chart hints. See AxisHorizFont for sub-properties. HintsFontColor The HintsFontColor property specifies the font color used to draw chart hints. Example:
Chart.HintsFontColor = vbBlueHintsTransparent Determines whether chart hints are transparent or not. Example:
Chart.HintsTransparent = trueHintsVisible Determines whether chart hints are visible or not. Example:
Chart.HintsVisible = trueHLabelStyle, VLabelStyle Sets the Horizontal and Vertical Axis label styles. Valid values are:
Value Description
0 Automatic 1 None 2 Axis scales 3 Series point marks 4 XLabels Example:
Chart.HLabelStyle = 3
HorizAxisMax The axis minimums and maximums are automatically set based upon the points you add to the chart but you can override these calculated values. HorizAxisMax determines the maximum value displayed on the horizontal axis. Example:
Chart.HorizAxisMax = 200HorizAxisMin The axis minimums and maximums are automatically set based upon the points you add to the chart but you can override these calculated values. HorizAxisMin determines the minimum value displayed on the horizontal axis. Example:
Chart.HorizAxisMin = 10Image Image is a read only property that contains the binary data for the current Chart. You can use this to write the binary data directly to the client rather than using the SaveChart method. Your application design should dictate the best method to use. From ASP you can use Response.BinaryWrite to write this image data to the client. Be sure and set ContentType to the proper content-type. Currently the Image property only supports JPEG or PNG data. See the included file BinWChrt.asp for an example of how to use this property. Set the ImageFormat property to JPG or PNG before using this property. ImageFormat ImageFormat determines what graphics format the image will be saved to. Valid values are
- JPG = 1
- BMP = 2
- PNG = 3
Example:
Chart.ImageFormat = 3JPEGQuality If the ImageFormat is set to JPEG then the JPEGQuality property specifies the quality of the JPEG image to be saved. Valid values are 1-100. Example:
Chart.JPEGQuality = 95LeftAxisIncrement Determines the axis increment for the left axis. Example:
Chart.LeftAxisIncrement = 100
LeftWallColor The LeftWallColor property specifies the color used to fill the left wall background. Example:
Chart.LeftWallColor = vbYellowLegendFont The LegendFont property exposes the Legend font object. See AxisHorizFont for details. LegendFontColor The LegendFontColor property specifies the font color used to draw legend text. Example:
Chart.LegendFontColor = vbGreenLegendPosition Determines where the legend should be placed on the chart. Valid values are:
- cLeft = 0
- cRight = 1
- cTop = 2
- cBottom = 3
Example:
Chart.LegendPosition = cRightLegendStyle Determines the style of the legend. Valid values are:
- cAuto = 0
- cSeries = 1
- cValues = 2
- cLastValues = 3
Example:
Chart.LegendStyle = cSeriesLegendTextStyle Determines how Legend text items will be formatted. The following values are legal.
Name
Description
Value Simple Point label only 0 LeftValue Point value and point label 1 RightValue Point label and point value 2 LeftPercent Percent and point label 3 RightPercent Point label and percent 4 XValue Point's X value (only for series with X values) 5 Example:
Chart.LegendTextStyle = 3
LegendVisible Determines if the legend will be displayed or not. Example:
Chart.LegendVisible = falseLineWidth LineWidth is the width of the line that's drawn for the following series types: QuickLine, Line, and Point. Setting the LineWidth sets the line width for the CurrentSeries only. Example:
Chart.LineWidth = 3
PanelColor Determines the color used to fill the chart panel background. Example:
Chart.PanelColor = vbWhiteProgressiveJPEGEncoding ProgressiveJPEGEncoding determines whether an image can be progressively displayed when it is decompressed. ProgressiveJPEGEncoding is off by default. Example:
Chart.ProgressiveJPEGEncoding = trueRegisteredTo Returns the name of the customer or company who purchased the component or "Evaluation" if the component is an evaluation copy. Example:
Response.Write "Registered To: " & Chart.RegisteredToSeriesColor Determines the color of the current series. Example:
Chart.SeriesColor = vbRedSeriesInLegend SeriesInLegend determines if the CurrentSeries is include in the legend. The default is true. Example:
Chart.SeriesInLegend = falseSeriesTitle Determines the title of the current series. Example:
Chart.SeriesTitle = "'97 Widget Shipments"Stairs For Line and Area series you can create stair stepped lines if you set Stairs = true. Version Gets the internal component version number. Example:
Response.Write "Component Version: " & Chart.VersionVertAxisMax The axis minimums and maximums are automatically set based upon the points you add to the chart but you can override these calculated values. VertAxisMax determines the maximum value displayed on the vertical axis. Example:
Chart.VertAxisMax = 200VertAxisMin The axis minimums and maximums are automatically set based upon the points you add to the chart but you can override these calculated values. VertAxisMin determines the minimum value displayed on the vertical axis. Example:
Chart.VertAxisMin = 10View3D The View3D property determines if the chart will have a 3D look or not. The default is true. Example:
Chart.View3D = falseWidth The Width property determines the width of the chart. Example:
Chart.Width = 500Methods
Up Method
Parameters
Return Value
Description
AddAxisLabel intAxis, strValue (none) Sets the Axis label intAxis may be
- 1 = Left Axis
- 2 = Bottom Axis
AddCandle strDate, dblOpen, dblHigh, dblLow, dblClose (none) Adds a new candle point to a Candle series. See the demo code AspChrt5.asp for a demonstration of this routine. AddSeries intSeriesType (none) Adds a new series to the chart. Valid values for intSeriesType are:
- cBar = 1
- cHBar = 2
- cPie = 3
- cArea = 4
- cLine = 5
- cPoint = 6
- cCandle = 7
- cQuickLine = 8
After adding a new series you will call AddValue to add values to the current series except for Candle charts which call AddCandle.
AddValue dblValue, strLabel, intColor (none) Adds new points to the current series. AddXY dblXValue, dblYValue, strXLabel, intColor (none) Inserts a new point in the Series having values dblX, dbl. strXLabel may be empty (""). AddXYArray array of AddXY values (none) Allows adding a large number of XY points to a chart efficiently. See AspChrt9.asp for a demo of how to use AddXYArray. AddY dblYValue, strLabel, intColor (none) Inserts a new point in the Series having the value dblY. strLabel may be empty (""). ChartTitleAdd strTitle (none) Adds the strTitle text to the chart title. ChartTitleClear (none) (none) Clears any text assigned to the chart title. Clear (none) (none) Clears the chart, clears all series and values added. ConvertImage bolEraseSource Boolean (true/false) The ConvertImage method allows you to convert images into formats not inherently supported by AspChart. Here's how it works:
- Assign the path and filename of your image conversion utility to ConvertPath.
- Assign the command-line parameters that your image conversion program requires to the ConvertParams property. Be sure and use explicit pathnames if necessary.
- Assign the FileName property so the Chart component knows where to save the chart to.
- Call ConvertImage
Here's what happens:
- AspChart will save the image to FileName.
- AspChart will execute your image conversion utility with the ConvertPath and ConvertParams you specified.
- AspChart will optionally erase (bolEraseSource) the file specified in FileName.
When debugging your setup it is best to specifiy bolEraseSource as false. Be sure the anonymous IIS user or authenticated users who access this component are able to execute the ConvertPath utility.
LoadBackdrop strFileName Boolean (true/false) Loads a BMP or JPG to be used as the chart background. Example:
Chart.LoadBackdrop ("d:\pub\images\corplogo.jpg")
SaveChart (none) Boolean (true/false) Saves the chart to the FileName property file. ShowMinorTicks LeftAxis, BottomAxis N/A Sets whether or not the Left and Bottom axis will show minor ticks. Example:
Chart.ShowMinorTicks false, false
If you require technical support please send complete details about the problem you are having to support@halcyonsoft.com.
Copyright © 1998-2000, Halcyon Software Inc. All rights reserved.