Avoid common pitfalls:
- Don't forget the document type declaration of the file where you put the chart. Otherwise you get a wrong chart and a difference between Internet Explorer and other browsers. The charts are not designed for quirks mode!
- Put the backlink before you create the chart. If you use the free version that needs a backlink.
- Put '.ChartMain { cursor: move }' to your CSS definition to make it visible that the chart can be moved.
Class names for CSS usage:
- ChartMain The main div with all parts
- Chart The bars of the chart
- ChartUp The bars with a higher value then the compare value. Only used for the chart type HighLowActualDiff
- ChartDown The bars with a lower value then the compare value. Only used for the chart type HighLowActualDiff
Only use the following functions even when other functions or objects are also accessible, because other functions or objects can be
changed without notice!
Parameter class for the class FillUpChart:
ColorPara
- Color01 Color 1 used to draw the chart
- Color02 Color 2 used to draw the chart
- Color03 Color 3 used to draw the chart
- Color04 Color 4 used to draw the chart
Parameter class for the class FillUpChart:
ComparePara
- Value Value to compare with. For example old price in stocks
- Color The line color of the old price
- Opacity The opacity of the old price
Constructor:
FillUpChart (X-Label, Y-Label, Width, ChartWidth, Height, ChartHeight, Dragging, ColorPara, ChartType, ComparePara)
- X-Label Value -1 or -2: X-Labels above the chart; Value 0: No X-Labels; Value 1 or 2: X-Label below the chart; Value -2 or 2: The lines are drawn behind the chart
- Y-Label Value -1 or -2: Y-Labels left to the chart; Value 0: No Y-Labels; Value 1 or 2: Y-Label right to the chart; Value -2 or 2: The lines are drawn behind the chart
- Width The width of the chart with X-Labels
- ChartWidth The width of the chart itself
- Height The height of the chart with Y-Labels
- ChartHeight The height of the chart itself
- Dragging Value true: The whole chart is draggable; value false: The chart is not draggable
- ColorPara Object ColorPara with colors for the chart
- ChartType Type of the chart: ChartType.HighLowClose, ChartType.HighLowActual, ChartType.HighLowActualWall, ChartType.HighLowActualDiff or ChartType.HighLowActualRange
- ComparePara Object ComparePara with parameters for a comparing line
Public methods of class FillUpChart
ActualValue (Actual value, Line color, Line length, Text color, Text height, Font)
- Actual value Value -1: Show the actual value left from the current position; Value 0: Don't show the actual value; Value 1: Show the actual value right from the current position
- Line color Color of the line to the actual value
- Line length Length of the line to the actual value
- Text color Color of the actual value
- Text height Max height of the actual value text
- Font Font used for writing the actual value
MaxValue (Max value, Line color, Line length, Text color, Text height, Font)
- Max value Value -1: Show the maximal value left from its position; Value 0: Don't show the maximal value; Value 1: Show the maximal value right from its position
- Line color Color of the line to the maximal value
- Line length Length of the line to the maximal value
- Text color Color of the maximal value
- Text height Max height of the maximal value text
- Font Font used for writing the maximal value
MinValue (Min value, Line color, Line length, Text color, Text height, Font)
- Min value Value -1: Show the minimal value left from its position; Value 0: Don't show the minimal value; Value 1: Show the minimal value right from its position
- Line color Color of the line to the minimal value
- Line length Length of the line to the minimal value
- Text color Color of the minimal value
- Text height Max height of the minimal value text
- Font Font used for writing the minimal value
GetXPos (Xval)
- Xval X-value
- Return: The X-position in pixel
SetOpenHighLowClose (Xval, Open, High, Low, Close)
- Xval X-Position of the new values
- Open First of the new values
- High The highest of the new values
- Low The lowest of the new values
- Close The last of the new values
SetPoint (Xval, Value)
- Xval X-Position of the new value
- Value The new value
ScaleY (X Pos of Min Y, Min Y, X Pos of Max Y, Max Y)
- X Pos of Min Y Position of the minimum value at the x-axis
- Min Y The minimum value
- X Pos of Max Y Position of the maximum value at the x-axis
- Max Y The maximum value
SetYLabels (Min parts, Line color, Line overflow, TextHAbst, abstTop, abstBottom, Font, Color)
- Min parts Minimal count of labels in Y-direction
- Line color Color of the lines to the labels
- Line overflow Amount of pixel the lines are longer then the width of the chart
- TextHAbst Distance of the labels to the chart
- abstTop Amount of pixels from the top, where no labels are set
- abstBottom Amount of pixels from the bottom, where no labels are set
- Font Font used to write the labels
- Color Color used to write the labels
SetXLabels (Line color, Line overflow, TextVAbst, TextHAbst, Font, Color)
- Line color Color of the lines to the labels
- Line overflow Amount of pixels the lines are longer then the height of the chart
- TextVAbst Distance of the labels to the chart
- TextHAbst Distance of the labels to the line
- Font Font used to write the labels
- Color Color used to write the labels
SetXLabel (Pos, Text)
- Pos X-position of the label and line
- Text Text of the label
SetXRange (Min X, Max X)
- Min X The minimal X-position
- Max X The maximal X-position
SetNewMaxValue (X Pos of Max Y, Max Y)
Use this function to set the exact position of the maximum value.
- X Pos of Max Y Position of the maximum value at the x-axis
- Max Y The maximum value
SetNewMinValue (X Pos of Min Y, Min Y)
Use this function to set the exact position of the minimum value.
- X Pos of Min Y Position of the minimum value at the x-axis
- Min Y The minimum value
Callback functions
onNewMaxValue (X Pos of Max Y, Max Y)
- X Pos of Max Y Position of the maximum value at the x-axis
- Max Y The maximum value
onNewMinValue (X Pos of Min Y, Min Y)
- X Pos of Min Y Position of the minimum value at the x-axis
- Min Y The minimum value
onMouseOverBar (X pos Open, Open Val, xReserved1, Max Y, xReserved2, Min Y, X pos Close, Close Val)
- X pos Open Start position of the bar interval
- Open Val The open value
- Max Y The maximum value
- Min Y The minimum value
- X pos Close End position of the bar interval
- Close Val The close value
onMouseOverOut (reserved1, reserved2, X Pos of Max Y, Max Y, X Pos of Min Y, Min Y, reserved3 ,reserved4)
- X Pos of Max Y Position of the maximum value at the x-axis
- Max Y The maximum value
- X Pos of Min Y Position of the minimum value at the x-axis
- Min Y The minimum value