Overview  
ConfigsEventsMethods
BarStacked2D  

the stacked bar2d componment

Configs
ParameterTypeDescriptionDefined By
Stringthis property specifies the horizontal alignment of chart in an module (defaults to 'center') Available value are:
@Option 'left'
@Option 'center'
@Option 'right'
Chart
BooleanIf true element will have a animation when show, false to skip the animation.(default to false)
Chart
NumberSpecifies the duration when animation complete in millisecond.(default to 1000)
Chart
String(default to 'ease-in-out') Available value are:
@Option 'easeIn'
@Option 'easeOut'
@Option 'easeInOut'
@Option 'linear'
Chart
StringSpecifies the backgroundColor for this element.(defaults to 'FDFDFD')
Painter
NumberSpecifies the width of each bar(default to calculate according to coordinate's height)
Bar
Numberthe space of each column.this option is readOnly.(default to undefined)
Bar
ObjectHere,specify as true by default
Painter
StringSpecifies the font's color for this element.(defaults to 'black')
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
iChart.Coordinate2Dthe option for coordinate.
Bar
ArrayRequired,The datasource of Chart.must be not empty.
Chart
NumberSpecifies the number of decimal when use percent.(default to 1)
Chart
BooleanIf true mouse change to a pointer when a mouseover fired.only available when use PC.(defaults to true)
Chart
Object/StringSpecifies the config of footnote details see iChart.Text,If given a string,it will only apply the text.note:If the text is empty,then will not display
Chart
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
NumberSpecifies the height of this canvas
Chart
StringThe unique id of this element (defaults to an auto-assigned id).
Chart
iChart.TextSpecifies option of label at left.
Bar
Arraythe array of labels close to the axis
BarStacked2D
ObjectSpecifies the config of Legend.For details see iChart.Legend Note:this has a extra property named 'enable',indicate whether legend available(default to false)
Chart
StringSpecifies the default lineJoin of the canvas's context in this element.(defaults to 'round')
Chart
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
BooleanSpecifies as true to display with percent.(default to false)
BarStacked2D
Stringid of dom you want rendered(defaults '').
Chart
StringSpecifies the align of scale(default to 'bottom') Available value are:
@Option 'bottom'
Bar
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
BooleanSpecifies as true to display with percent.(default to false)
Chart
StringSpecifies the default strokeStyle of the canvas's context in this element.(defaults to 'gray')
Painter
iChart.RectangleSpecifies option of rectangle.
Bar
Object/StringSpecifies the config of subtitle details see iChart.Text,If given a string,it will only apply the text.note:If the title or subtitle'text is empty,then will not display
Chart
NumberSpecifies the distance of bar's bottom and text(default to 6)
Bar
ObjectSpecifies the config of Tip.For details see iChart.Tip Note:this has a extra property named 'enable',indicate whether tip available(default to false)
Chart
Object/StringSpecifies the config of Title details see iChart.Text,If given a string,it will only apply the text.note:If the text is empty,then will not display
Chart
BooleanIf true ignore the event touchmove.only available when support touchEvent.(defaults to false)
Chart
NumberSpecifies the width of this canvas
Chart
NumberSpecifies the chart's z_index.override the default as 999 to make it at top layer.(default to 999)
Chart
Events
NameDescriptionDefined By
afterAnimation
Fires when this element Animation finished.Only valid when animation is true
Parameter
  • this : BarStacked2D  
Chart
beforeAnimation
Fires before this element Animation.Only valid when animation is true
Parameter
  • this : BarStacked2D  
Chart
beforedraw
Fires before the element drawing.Return false from an event handler to stop the draw.
Parameter
  • this : BarStacked2D  
Painter
click
Fires when this element is clicked
Parameter
  • this : BarStacked2D  
  • 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 : BarStacked2D  
Painter
initialize
Fires after the element initializing is finished this is for test
Parameter
  • this : BarStacked2D  
Element
mousemove
Fires when the mouse move on the element
Parameter
  • this : BarStacked2D  
  • e : EventObject   The mousemove event object
Painter
mouseout
Fires when the mouse exits the element
Parameter
  • this : BarStacked2D  
  • e : EventObject   The mouseout event object
Painter
mouseover
Fires when the mouse hovers over the element
Parameter
  • this : BarStacked2D  
  • e : EventObject   The mouseover event object
Painter
resize
Fires when chart resize.
Parameter
  • width : int   chart's width
  • height : int   chart's height
Chart
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
eventOff
turn off the event listener
Parameter
  • None
Return
  void
Chart
eventOn
turn on the event listener
Parameter
  • None
Return
  void
Chart
getCoordinate
Returns the coordinate of this element.
Parameter
  • None
Return
  iChart.Coordinate2D
Bar
getDrawingArea
return the main Drawing Area's dimension,return following property:
* x:the left-top coordinate-x
* y:the left-top coordinate-y
* width:the width of drawing area
* height:the height of drawing area
Parameter
  • None
Return
  Object : contains dimension info
Chart
getFootNote
return the footnote,return undefined if unavailable
Parameter
  • None
Return
  iChart.Text : the footnote object
Chart
getSubTitle
return the subtitle,return undefined if unavailable
Parameter
  • None
Return
  iChart.Text : the subtitle object
Chart
getTitle
return the title,return undefined if unavailable
Parameter
  • None
Return
  iChart.Text : the title object
Chart
load
load the new data
Parameter
  • array : data  * @return void
Return
  void
Chart
plugin
register the customize component or combinate with other charts
Parameter
Return
  void
Chart
resize
resize the chart
Parameter
  • int : width  * @paramter int#height
Return
  void
Chart
setUp
set up the chart by latest configruation
Parameter
  • None
Return
  void
Chart
reference:Bar