ChartDirector 6.0 (Ruby Edition)
FinanceChart
Key Features
Using FinanceChart
FinanceChart Source Code
FinanceChart Methods
Method | Inherited | Description |
---|---|---|
FinanceChart | (Self) | Creates a new FinanceChart object. |
enableAntiAlias | (Self) | Enables/Disables anti-alias. |
setMargins | (Self) | Sets the margins around the plot area. The default is 40 pixels for the left and right margins, and 30 pixels for the top margin and 35 pixels for the bottom margin. |
addPlotAreaTitle | (Self) | Adds a text title above the plot area. You may add multiple title above the plot area by calling this method multiple times. |
setPlotAreaStyle | (Self) | Sets the plot area background and grid colors. The default is a white background with light grey (DDDDDD) grid lines. |
setPlotAreaBorder | (Self) | Sets the plot area border color and the gap distance between charts. The default is a grey (888888) border with two 2 pixels gap between charts. |
setLegendStyle | (Self) | Sets legend font style and background color. The default is Arial 8 pt black font on a semi-transparent light grey (80CCCCCC) background. |
setXAxisStyle | (Self) | Sets x-axis label style. The default is Arial 8 pt black color as font with no text rotation. |
setYAxisStyle | (Self) | Sets y-axis label style. The default is Arial 8 pt black color, with 14 pixels margin. |
setAxisOnRight | (Self) | Sets whether the main y-axis is on right of left side of the plot area. The default is on right. |
setLogScale | (Self) | Determines if log scale should be used for the main chart. The default is to use linear scale. |
setPercentageAxis | (Self) | Label the axis of the main chart in percentage unit. |
setDateLabelFormat | (Self) | Sets the date/time formats to use for the x-axis labels under various cases. |
setDateLabelSpacing | (Self) | Sets the minimum label spacing between two labels on the time axis. |
setToolTipDateFormat | (Self) | Sets the date/time formats to use for the tool tips under various cases. |
getToolTipDateFormat | (Self) | Gets the date/time format string to use for tool tips. |
setNumberLabelFormat | (Self) | Sets the number format to use. |
setData | (Self) | Sets the data to be used in the chart. |
addMainChart | (Self) | Adds the main chart - the chart that shows the data for the prices. |
addCandleStick | (Self) | Adds a candlestick layer to the main chart. |
addHLOC | (Self) | Adds a HLOC layer to the main chart. |
addCloseLine | (Self) | Adds a closing price line on the main chart. |
addWeightedClose | (Self) | Adds a weighted close line on the main chart. |
addTypicalPrice | (Self) | Adds a typical price line on the main chart. |
addMedianPrice | (Self) | Adds a median price line on the main chart. |
addComparison | (Self) | Adds a data series to the main chart for comparison with the closing price. |
addSimpleMovingAvg | (Self) | Adds a simple moving average line on the main chart. |
addExpMovingAvg | (Self) | Adds an exponential moving average line on the main chart. |
addTriMovingAvg | (Self) | Adds a triangular moving average line on the main chart. |
addWeightedMovingAvg | (Self) | Adds a weighted moving average line on the main chart. |
addParabolicSAR | (Self) | Adds a parabolic SAR indicator to the main chart. |
addBand | (Self) | Adds a generic band to the main finance chart. This method is used internally by other methods to add various bands (eg. Bollinger band, Donchian channels, etc). |
addBollingerBand | (Self) | Adds a Bollinger band to the main chart. |
addDonchianChannel | (Self) | Adds a Donchian channel to the main chart. |
addEnvelop | (Self) | Adds a price envelop to the main chart. The price envelop is a defined as a ratio around a moving average. For example, a ratio of 0.2 means 20% above and below the moving average. |
addVolBars | (Self) | Adds a volume bar chart layer on the main chart. |
addIndicator | (Self) | Adds a blank indicator chart to the finance chart. Used internally to add other indicators. Override to change the default formatting (eg. axis fonts, etc.) of the various indicators. |
addLineIndicator | (Self) | Adds a generic line indicator chart. |
addLineIndicator2 | (Self) | Adds a line to an existing indicator chart. |
addBarIndicator | (Self) | Adds a generic bar indicator chart. |
addBarIndicator2 | (Self) | Adds a bar layer to an existing indicator chart. |
addThreshold | (Self) | Adds an upper/lower threshold range to an existing indicator chart. |
addAccDist | (Self) | Adds an Accumulation/Distribution indicator chart. |
addAroon | (Self) | Adds an Aroon Up/Down indicators chart. |
addAroonOsc | (Self) | Adds an Aroon Oscillator indicator chart. |
addADX | (Self) | Adds an Average Directional Index indicators chart. |
addATR | (Self) | Adds an Average True Range indicators chart. |
addBollingerWidth | (Self) | Adds a Bollinger Band Width indicator chart. |
addCCI | (Self) | Adds a Community Channel Index indicator chart. |
addChaikinMoneyFlow | (Self) | Adds a Chaikin Money Flow indicator chart. |
addChaikinOscillator | (Self) | Adds a Chaikin Oscillator indicator chart. |
addChaikinVolatility | (Self) | Adds a Chaikin Volatility indicator chart. |
addCLV | (Self) | Adds a Close Location Value indicator chart. |
addDPO | (Self) | Adds a Detrended Price Oscillator indicator chart. |
addDonchianWidth | (Self) | Adds a Donchian Channel Width indicator chart. |
addEaseOfMovement | (Self) | Adds a Ease of Movement indicator chart. |
addFastStochastic | (Self) | Adds a Fast Stochastic indicator chart. |
addMACD | (Self) | Adds a MACD indicator chart. |
addMassIndex | (Self) | Adds a Mass Index indicator chart. |
addMFI | (Self) | Adds a Money Flow Index indicator chart. |
addMomentum | (Self) | Adds a Momentum indicator chart. |
addNVI | (Self) | Adds a Negative Volume Index indicator chart. |
addOBV | (Self) | Adds an On Balance Volume indicator chart. |
addPerformance | (Self) | Adds a Performance indicator chart. |
addPPO | (Self) | Adds a Percentage Price Oscillator indicator chart. |
addPVI | (Self) | Adds a Positive Volume Index indicator chart. |
addPVO | (Self) | Adds a Percentage Volume Oscillator indicator chart. |
addPVT | (Self) | Adds a Price Volume Trend indicator chart. |
addROC | (Self) | Adds a Rate of Change indicator chart. |
addRSI | (Self) | Adds a Relative Strength Index indicator chart. |
addSlowStochastic | (Self) | Adds a Slow Stochastic indicator chart. |
addStdDev | (Self) | Adds a Moving Standard Deviation indicator chart. |
addStochRSI | (Self) | Adds a Stochastic RSI indicator chart. |
addTRIX | (Self) | Adds a TRIX indicator chart. |
addUltimateOscillator | (Self) | Adds an Ultimate Oscillator indicator chart. |
addVolIndicator | (Self) | Adds a Volume indicator chart. |
addWilliamR | (Self) | Adds a William %R indicator chart. |
MultiChart | MultiChart | Creates a new MultiChart object. |
addChart | MultiChart | Adds a BaseChart object (or its subclass such as PieChart, XYChart, PolarChart, AngularMeter or LinearMeter) into the multi-chart. |
getChart | MultiChart | Gets the specified chart in the MultiChart. |
getChartCount | MultiChart | Gets the number of charts in the MultiChart. |
setMainChart | MultiChart | Sets the chart that receives viewport mouse actions (for zooming and scrolling support). |
setSize | BaseChart | Sets the size of the chart, exclusive of the drop shadow (if any). |
getWidth | BaseChart | Gets the width of the chart. |
getHeight | BaseChart | Gets the height of the chart. |
getAbsOffsetX | BaseChart | Gets the x offset of the chart relative to the outermost MultiChart container. |
getAbsOffsetY | BaseChart | Gets the y offset of the chart relative to the outermost MultiChart container. |
setBackground | BaseChart | Sets the background color, border color and 3D border effect of the chart. |
setRoundedFrame | BaseChart | Sets the border style of the chart to rounded corners. |
setThickFrame | BaseChart | Sets a thick frame around the chart. |
setDropShadow | BaseChart | Adds a drop shadow to the chart. |
setBorder | BaseChart | Sets the border color of the chart. |
setWallpaper | BaseChart | Uses the image from the specified file as the wallpaper to repetitively fill the background of the chart. |
setBgImage | BaseChart | Uses the image from the specified file as the background image of the chart. |
setSearchPath | BaseChart | Sets the file system search path for loading image files. |
setTransparentColor | BaseChart | Specifies a certain color to mean transparent when creating a raster image output. |
setAntiAlias | BaseChart | Controls whether anti-alias is used when drawing lines, shapes and text. |
addTitle | BaseChart | Adds a title at the top center of the chart. |
addTitle2 | BaseChart | Adds a title to the chart. |
addLegend | BaseChart | Adds a legend box to the chart. |
addLegend2 | BaseChart | Adds a legend box to the chart with grid layout. |
getLegend | BaseChart | Gets the LegendBox object representing the legend box in the chart. |
layoutLegend | BaseChart | Lays out and gets the LegendBox object representing the legend box in the chart. |
getDrawArea | BaseChart | Retrieves the internal DrawArea object that is used to draw the chart. |
addText | BaseChart | Adds a text box to the chart. |
addTable | BaseChart | Adds a CDML table to the chart. |
addLine | BaseChart | Adds a line to the chart. |
addExtraField | BaseChart | Adds an array of text to be used as an extra field in various places. |
addExtraField2 | BaseChart | Adds an array of numbers/dates to be used as an extra field in various places. |
setColor | BaseChart | Change the color at the specified position in the palette. |
setColors | BaseChart | Change the colors in the palette. |
setColors2 | BaseChart | Change the colors in the palette, starting from the specified position in the palette. |
getColor | BaseChart | Gets the color at the specified position of the palette. |
adjustBrightness | BaseChart | Creates a color that is a darkened or brightened version of the given color. |
halfColor | BaseChart | Creates a color that is half the intensity of the given color. |
dashLineColor | BaseChart | Creates a dash line color. |
patternColor | BaseChart | Creates a pattern color using an array of colors as the bitmap pattern. |
patternColor2 | BaseChart | Creates a pattern color by loading the pattern from an image file. |
linearGradientColor | BaseChart | Creates a two-point linear gradient color. |
linearGradientColor2 | BaseChart | Creates a multi-point linear gradient color. |
radialGradientColor | BaseChart | Creates a two-point radial gradient color. |
radialGradientColor2 | BaseChart | Creates a multi-point radial gradient color. |
gradientColor | BaseChart | Creates a two-point linear gradient color. |
gradientColor2 | BaseChart | Creates a multi-point linear gradient color. |
setDefaultFonts | BaseChart | Sets the defaults for normal, bold, italic and bold-italic fonts. |
setFontTable | BaseChart | Sets an entry in the font table to the specified font name. |
formatValue | BaseChart | Formats a number/date using the ChartDirector formatting syntax as is in Parameter Substitution and Formatting. |
setNumberFormat | BaseChart | Sets the characters used for thousand separator, decimal point, and negative sign. |
setMonthNames | BaseChart | Sets the names of the months for date/time formatting purposes. |
setWeekDayNames | BaseChart | Sets the names of the week days for date/time formatting purposes. |
setAMPM | BaseChart | Sets the names to be used to denote morning and afternoon. |
layout | BaseChart | Perform auto-scaling of the axes (if any) and compute the positions of the various objects in the chart. |
enableVectorOutput | BaseChart | This method is deprecated. It has no effect and may be removed in future versions of ChartDirector. |
setOutputOptions | BaseChart | Sets output format options for the next chart output. Currently, only SVG, SVGZ and PDF output formats support output options. |
makeChart | BaseChart | Generates the chart image and save it into a file. |
makeChart2 | BaseChart | Generates the chart as an image in memory. |
makeChart3 | BaseChart | Generates the chart in internal format and return a DrawArea object to allow adding custom drawings on top of the chart. |
makeTmpFile | BaseChart | Generates the chart as an image and save it to a temporary file, and automatically remove old files. |
initDynamicLayer | BaseChart | Initializes a dynamic layer for drawing text and shapes. |
removeDynamicLayer | BaseChart | Removes the dynamic layer if any. |
getHTMLImageMap | BaseChart | Generates an HTML image map for the chart. |
getJsChartModel | BaseChart | Gets the Javascript Chart Model for passing to WebChartViewer.setChartModel for the purpose of supporting track cursors in a web application. |
getChartMetrics | BaseChart | Gets the chart metrics for passing to WebChartViewer.setChartMetrics to support viewports for web applications. |