ipecharts.option.angleaxis module#
- class ipecharts.option.angleaxis.AngleAxis(**kwargs: Any)[source]#
Bases:
BaseWidget- Warning:
Autogenerated class
The angle axis in Polar Coordinate.
- id Unicode(None)#
Component ID, not specified by default. If specified, it can be used to refer the component in option or API.
- polarIndex Float(None)#
The index of angle axis in Polar Coordinate. The first axis is used by default.
- startAngle Float(None)#
Starting angle of axis. 90 degrees by default, standing for top position of center. 0 degree stands for right position of center.
The following shows an example with startAngle of 45 deg.
- endAngle Float(None)#
> Since v5.5.0
Ending angle of axis. null by default, standing for a whole circle.
The following shows an example with endAngle of -180 deg.
- clockwise Bool(None)#
Whether the positive position of axis is clockwise. True for clockwise by default.
The following shows an example with clockwise as false.
- type Unicode(None)#
Type of axis.
Option:
‘value’ Numerical axis, suitable for continuous data.
‘category’ Category axis, suitable for discrete category data. Category data can be auto retrieved from [series.data](#series.data) or [dataset.source](#dataset.source), or can be specified via [angleAxis.data](#angleAxis.data).
‘time’ Time axis, suitable for continuous time series data. As compared to value axis, it has a better formatting for time and a different tick calculation method. For example, it decides to use month, week, day or hour for tick based on the range of span.
‘log’ Log axis, suitable for log data. Stacked bar or line series with type: ‘log’ axes may lead to significant visual errors and may have unintended effects in certain circumstances. Their use should be avoided.
- boundaryGap Union(None)#
The boundary gap on both sides of a coordinate axis. The setting and behavior of category axes and non-category axes are different.
The boundaryGap of category axis can be set to either true or false. Default value is set to be true, in which case [axisTick](#angleAxis.axisTick) is served only as a separation line, and labels and data appear only in the center part of two [axis ticks](#angleAxis.axisTick), which is called band.
For non-category axis, including time, numerical value, and log axes, boundaryGap is an array of two values, representing the spanning range between minimum and maximum value. The value can be set in numeric value or relative percentage, which becomes invalid after setting [min](#angleAxis.min) and [max](#angleAxis.max). Example:
``` boundaryGap: [‘20%’, ‘20%’]
- min Union(None)#
The minimum value of axis.
It can be set to a special value ‘dataMin’ so that the minimum value on this axis is set to be the minimum label.
It will be automatically computed to make sure axis tick is equally distributed when not set.
In category axis, it can also be set as the ordinal number. For example, if a catergory axis has data: [‘categoryA’, ‘categoryB’, ‘categoryC’], and the ordinal 2 represents ‘categoryC’. Moreover, it can be set as negative number, like -3.
If min is specified as a function, it should return a min value, like:
``` min: function (value) {
return value.min - 20;
}
value is an object, containing the min value and max value of the data. This function should return the min value of axis, or return null/undefined to make echarts use the auto calculated min value (null/undefined return is only supported since v4.8.0).
- max Union(None)#
The maximum value of axis.
It can be set to a special value ‘dataMax’ so that the minimum value on this axis is set to be the maximum label.
It will be automatically computed to make sure axis tick is equally distributed when not set.
In category axis, it can also be set as the ordinal number. For example, if a catergory axis has data: [‘categoryA’, ‘categoryB’, ‘categoryC’], and the ordinal 2 represents ‘categoryC’. Moreover, it can be set as negative number, like -3.
If max is specified as a function, it should return a max value, like:
``` max: function (value) {
return value.max - 20;
}
value is an object, containing the min value and max value of the data. This function should return the max value of axis, or return null/undefined to make echarts use the auto calculated max value (null/undefined return is only supported since v4.8.0).
- scale Bool(None)#
It is available only in numerical axis, i.e., [type](#angleAxis.type): ‘value’.
It specifies whether not to contain zero position of axis compulsively. When it is set to be true, the axis may not contain zero position, which is useful in the scatter chart for both value axes.
This configuration item is unavailable when the [min](#angleAxis.min) and [max](#angleAxis.max) are set.
- splitNumber Float(None)#
Number of segments that the axis is split into. Note that this number serves only as a recommendation, and the true segments may be adjusted based on readability.
This is unavailable for category axis.
- minInterval Float(None)#
Minimum gap between split lines.
For example, it can be set to be 1 to make sure axis label is show as integer.
``` {
minInterval: 1
}
It is available only for axis of [type](#angleAxis.type) ‘value’ or ‘time’.
- maxInterval Float(None)#
Maximum gap between split lines.
For example, in time axis ([type](#angleAxis.type) is ‘time’), it can be set to be 3600 * 24 * 1000 to make sure that the gap between axis labels is less than or equal to one day.
``` {
maxInterval: 3600 * 1000 * 24
}
It is available only for axis of [type](#angleAxis.type) ‘value’ or ‘time’.
- interval Float(None)#
Compulsively set segmentation interval for axis.
As [splitNumber](#angleAxis.splitNumber) is a recommendation value, the calculated tick may not be the same as expected. In this case, interval should be used along with [min](#angleAxis.min) and [max](#angleAxis.max) to compulsively set tickings. But in most cases, we do not suggest using this, our automatic calculation is enough for most situations.
This is unavailable for ‘category’ and ‘time’ axes. Logged value should be passed for [type](#angleAxis.type): ‘log’ axis.
- logBase Float(None)#
Base of logarithm, which is valid only for numeric axes with [type](#angleAxis.type): ‘log’.
- startValue Float(None)#
> Since v5.5.1
To specify the start value of the axis.
- silent Bool(None)#
Set this to true, to prevent interaction with the axis.
- triggerEvent Bool(None)#
Set this to true to enable triggering events.
Parameters of the event include:
``` {
// Component type: xAxis, yAxis, radiusAxis, angleAxis // Each of which has an attribute for index, e.g., xAxisIndex for xAxis componentType: string, // Value on axis before being formatted. // Click on value label to trigger event. value: ‘’, // Name of axis. // Click on laben name to trigger event. name: ‘’
}
- axisLine Dict()#
Settings related to axis line.
- axisTick Dict()#
Settings related to axis tick.
- minorTick Dict()#
> Since v4.6.0
Settings related minor ticks.
Note: minorTick is not available in the category type axis.
Examples:
Using minor ticks in function plotting.
Using minor ticks in log axis.
- axisLabel Dict()#
Settings related to axis label.
- splitLine Dict()#
Split line of axis in [grid](#grid) area.
- minorSplitLine Dict()#
> Since v4.6.0
Minor split lines of axis in the [grid](#grid) area。It will align to the [minorTick](#angleAxis.minorTick)
- splitArea Dict()#
Split area of axis in [grid](#grid) area, not shown by default.
- data Any(None)#
Category data, available in [type](#angleAxis.type): ‘category’ axis.
If [type](#angleAxis.type) is not specified, but axis.data is specified, the [type](#angleAxis.type) is auto set as ‘category’.
If [type](#angleAxis.type) is specified as ‘category’, but axis.data is not specified, axis.data will be auto collected from [series.data](#series.data). It brings convenience, but we should notice that axis.data provides then value range of the ‘category’ axis. If it is auto collected from [series.data](#series.data), Only the values appearing in [series.data](#series.data) can be collected. For example, if [series.data](#series.data) is empty, nothing will be collected.
Example:
``` // Name list of all categories data: [‘Monday’, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’, ‘Sunday’] // Each item could also be a specific configuration item. // In this case, value is used as the category name. data: [{
value: ‘Monday’, // Highlight Monday textStyle: {
fontSize: 20, color: ‘red’
}
}, ‘Tuesday’, ‘Wednesday’, ‘Thursday’, ‘Friday’, ‘Saturday’, ‘Sunday’]
- axisPointer Dict()#
axisPointer settings on the axis.
- tooltip Dict()#
> Since v5.6.0
The tooltip configuration for angleAxis, must set [triggerEvent](#angleAxis.triggerEvent) as true and enable global [option.tooltip](#tooltip) component.
- animation Bool(None)#
Whether to enable animation.
- animationThreshold Float(None)#
Whether to set graphic number threshold to animation. Animation will be disabled when graphic number is larger than threshold.
- animationDuration Union(None)#
Duration of the first animation, which supports callback function for different data to have different animation effect:
``` animationDuration: function (idx) {
// delay for later data is larger return idx * 100;
}
- animationEasing Unicode(None)#
Easing method used for the first animation. Varied easing effects can be found at [easing effect example](https://echarts.apache.org/examples/en/editor.html?c=line-easing).
- animationDelay Union(None)#
Delay before updating the first animation, which supports callback function for different data to have different animation effect.
For example:
``` animationDelay: function (idx) {
// delay for later data is larger return idx * 100;
}
See [this example](https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay) for more information.
- animationDurationUpdate Union(None)#
Time for animation to complete, which supports callback function for different data to have different animation effect:
``` animationDurationUpdate: function (idx) {
// delay for later data is larger return idx * 100;
}
- animationEasingUpdate Unicode(None)#
Easing method used for animation.
- animationDelayUpdate Union(None)#
Delay before updating animation, which supports callback function for different data to have different animation effects.
For example:
``` animationDelayUpdate: function (idx) {
// delay for later data is larger return idx * 100;
}
See [this example](https://echarts.apache.org/examples/en/editor.html?c=bar-animation-delay) for more information.
- zlevel Float(None)#
zlevel value of all graphical elements in Angle Axis.
zlevel is used to make layers with Canvas. Graphical elements with different zlevel values will be placed in different Canvases, which is a common optimization technique. We can put those frequently changed elements (like those with animations) to a separate zlevel. Notice that too many Canvases will increase memory cost, and should be used carefully on mobile phones to avoid crash.
Canvases with bigger zlevel will be placed on Canvases with smaller zlevel.
- z Float(None)#
z value of all graphical elements in Angle Axis, which controls order of drawing graphical components. Components with smaller z values may be overwritten by those with larger z values.
z has a lower priority to zlevel, and will not create new Canvas.