ErrorBar
ErrorBar renders whiskers to represent error margins on a chart. It must be a child of a graphical element. ErrorBar expects data in one of the following forms: The values provided are relative to the main data value. For example, if the main data value is 10 and the error value is 2, the error bar will extend from 8 to 12 for symmetric error bars. In other words, what ErrorBar will render is: In stacked or ranged Bar charts, ErrorBar will use the higher data value as the reference point for calculating the error bar positions.
相关链接
Props
dataKeyFunction | number | string
Decides how to extract the value of this ErrorBar from the data:
string: the name of the field in the data object;number: the index of the field in the data;function: a function that receives the data object and returns the value of this ErrorBar.
The error values can be a single value for symmetric error bars; or an array of a lower and upper error value for asymmetric error bars.
示例:
animationBeginnumberoptional
默认值:
0animationDurationnumberoptional
默认值:
400animationEasing"ease" | "ease-in" | "ease-in-out" | "ease-out" | "linear"optional
默认值:
"ease-in-out"directionnumber | stringoptional
Direction of the error bar. Usually determined by chart layout, except in Scatter chart. In Scatter chart, "x" means horizontal error bars, "y" means vertical error bars.
isAnimationActivebooleanoptional
默认值:
truestrokestringoptional
The stroke color. If "none", no line will be drawn.
默认值:
"black"strokeWidthnumber | stringoptional
The width of the stroke
默认值:
1.5widthnumber | stringoptional
Width of the error bar ends (the serifs) in pixels. This is not the total width of the error bar, but just the width of the little lines at the ends.
The total width of the error bar is determined by the data value plus/minus the error value.
默认值:
5示例:
zIndexnumberoptional
默认值:
400示例: