Overview  
ConfigsEventsMethods
Coordinate2D  

the coordinate2d componment

Configs
ParameterTypeDescriptionDefined By
ObjectSpecifies style for axis of this coordinate. Available property are:
@Option enable {Boolean} True to display the axis.(default to true)
@Option color {String} Specifies the color of each axis.(default to '#666666')
@Option width {Number/Array} Specifies the width of each axis, If given the a array,there must be have have 4 element, like this:[1,0,0,1](top-right-bottom-left).(default to 1)
Coordinate2D
StringHere,specify as false to make background transparent.(default to null)
Coordinate2D
ObjectHere,specify as true by default
Painter
floatSpecifies the factor make color dark or light for this element,relative to background-color,the bigger the value you set,the larger the color changed.scope{0.01 - 0.5}.(defaults to '0.15')
Painter
ObjectSpecifies config crosshair.(default enable to false).For details see iChart.CrossHair Note:this has a extra property named 'enable',indicate whether crosshair available(default to false)
Coordinate2D
StringSpecifies the unit of font-size.(default to 'px')
Component
BooleanTrue to apply the gradient.(default to false)
Painter
StringSpecifies the gradient mode of background.(defaults to 'LinearGradientUpDown')
@Option 'LinearGradientUpDown'
@Option 'LinearGradientDownUp'
@Option 'LinearGradientLeftRight'
@Option 'LinearGradientRightLeft'
@Option 'RadialGradientOutIn'
@Option 'RadialGradientInOut'
Painter
StringSpecifies the color of the grid.(default to '#dbe1e1')
Coordinate2D
NumberSpecifies the linewidth of the grid.(default to 1)
Coordinate2D
ObjectSpecifies the stlye of horizontal grid.(default to empty object).Available property are:
@Option solid {Boolean} True to draw a solid line.else draw a dotted line.(default to true)
@Option size {Number} Specifies size of line segment when solid is false.(default to 10)
@Option fator {Number} Specifies the times to size(default to 1)
@Option width {Number} Specifies the width of grid line.(default to 1)
@Option color {String} Specifies the color of grid line.(default to '#dbe1e1')
Coordinate2D
BooleanTrue to display grid line.(default to true)
Coordinate2D
Objectthis is grid config for custom.there has two valid property horizontal and vertical.the property's sub property is: way:the manner calculate grid-line (default to 'share_alike') Available property are:
@Option share_alike
@Option given_value value: when property way apply to 'share_alike' this property mean to the number of grid's line.
when apply to 'given_value' this property mean to the distance each grid line(unit:pixel) .
code will like:
{
horizontal: {way:'share_alike',value:10},
vertical: { way:'given_value', value:40 }
}
Coordinate2D
ObjectSpecifies the stlye of horizontal grid.(default to empty object).Available property are:
@Option solid {Boolean} True to draw a solid line.else draw a dotted line.(default to true)
@Option size {Number} Specifies size of line segment when solid is false.(default to 10)
@Option fator {Number} Specifies the times to size(default to 1)
@Option width {Number} Specifies the width of grid line.(default to 1)
@Option color {String} Specifies the color of grid line.(default to '#dbe1e1')
Coordinate2D
String/NumberHere,specify as '85%' relative to client height.(default to '85%')
Coordinate2D
BooleanIf True the grid line will be ignored when gird and coordinate's edge overlap.(default to false)
Coordinate2D
BooleanIf True the grid line will be ignored when gird and axis overlap.(default to true)
Coordinate2D
ObjectA config object containing one or more event handlers.(default to null)
Painter
NumberSpecifies Horizontal offset(x-axis) in pixel.(default to 0)
Painter
NumberSpecifies Vertical distance (y-axis) in pixel.(default to 0)
Painter
NumberIf you want to totally override the positioning of the chart,you should setting it.(default to null)
Painter
NumberIf you want to totally override the positioning of the chart,you should setting it.(default to null)
Painter
NumberSpecifies the padding for this element in pixel,the same rule as css padding.(defaults to 10)
Painter
Arraythe option for scale.For details see iChart.Scale
Coordinate2D
Booleanindicate whether the grid is accord with scale,on the premise of grids is not specify. this just give a convenient way bulid grid for default.and actual value depend on scale's scale2grid
Coordinate2D
BooleanSpecifies whether the element should be show a shadow.In general there will be get a high render speed when apply false.(default to false)
Element
NumberSpecifies How blur you want your shadow to be.(default to 4)
Element
StringSpecifies the color of your shadow is.(default to '#666666')
Element
NumberSpecifies Horizontal distance (x-axis) between the shadow and the shape in pixel.(default to 0)
Element
NumberSpecifies Vertical distance (y-axis) between the shadow and the shape in pixel.(default to 0)
Element
BooleanTrue to stripe the axis.(default to true)
Coordinate2D
StringSpecifies the direction apply striped color.(default to 'v')Available value are:
@Option 'h' horizontal
@Option 'v' vertical
Coordinate2D
float(0.01 - 0.5)Specifies the factor make color dark striped,relative to background-color,the bigger the value you set,the larger the color changed.(defaults to '0.01')
Coordinate2D
StringSpecifies the default strokeStyle of the canvas's context in this element.(defaults to 'gray')
Painter
String/NumberSpecifies the valid height,less than the height of coordinate.you can applies a percent value relative to width.(default to '100%')
Coordinate2D
String/NumberSpecifies the valid width,less than the width of coordinate.you can applies a percent value relative to width.(default to '100%')
Coordinate2D
String/NumberHere,specify as '85%' relative to client width.(default to '85%')
Coordinate2D
NumberOverride the default as -1 to make sure it at the bottom.(default to -1)
Coordinate2D
Events
NameDescriptionDefined By
beforedraw
Fires before the element drawing.Return false from an event handler to stop the draw.
Parameter
  • this : Coordinate2D  
Painter
click
Fires when this element is clicked
Parameter
  • this : Coordinate2D  
  • e : EventObject   The click event object
  • param : Object   The additional parameter
Painter
draw
Fires after the element drawing when calling the draw method.
Parameter
  • this : Coordinate2D  
Painter
initialize
Fires after the element initializing is finished this is for test
Parameter
  • this : Coordinate2D  
Element
mousemove
Fires when the mouse move on the element
Parameter
  • this : Coordinate2D  
  • e : EventObject   The mousemove event object
Painter
mouseout
Fires when the mouse exits the element
Parameter
  • this : Coordinate2D  
  • e : EventObject   The mouseout event object
Painter
mouseover
Fires when the mouse hovers over the element
Parameter
  • this : Coordinate2D  
  • e : EventObject   The mouseover event object
Painter
Methods
NameDescriptionDefined By
draw
The commnd fire to draw the chart use configuration,
* this is a abstract method.Currently known,both iChart.Chart and iChart.Component implement this method.
Parameter
  • None
Return
  void
Painter
getDimension
return the component's dimension,return hold following property
* @property x:the left-top coordinate-x
* @property y:the left-top coordinate-y
* @property width:the width of component,note:available there applies box model
* @property height:the height of component,note:available there applies box model
Parameter
  • None
Return
  object
Component
reference:Component