pub struct AxisOption {Show 27 fields
pub axis_type: AxisType,
pub data: Vec<DataValue>,
pub name: Option<String>,
pub name_location: Option<String>,
pub name_gap: Option<f64>,
pub name_text_style: Option<LabelOption>,
pub position: Option<Position>,
pub show: bool,
pub axis_label: Option<LabelOption>,
pub axis_line: Option<AxisLineOption>,
pub axis_tick: Option<AxisTickOption>,
pub split_line: Option<SplitLineOption>,
pub min: Option<f64>,
pub max: Option<f64>,
pub split_gap: Option<f64>,
pub split_number: Option<usize>,
pub interval: Option<f64>,
pub min_interval: Option<f64>,
pub max_interval: Option<f64>,
pub log_base: Option<f64>,
pub boundary_gap: Option<f64>,
pub align_ticks: Option<bool>,
pub grid_index: Option<usize>,
pub offset: Option<f64>,
pub axis_pointer: Option<AxisPointerOption>,
pub formatter: Option<String>,
pub color: Option<String>,
}Expand description
The options of one axis.
Fields§
§axis_type: AxisTypeThe kind of the axis.
data: Vec<DataValue>The categories or the tick values of the axis.
name: Option<String>The name of the axis.
name_location: Option<String>The position of the axis’ name.
name_gap: Option<f64>The gap between the axis’ name and the axis.
name_text_style: Option<LabelOption>The style of the axis’ name.
position: Option<Position>The position of the axis.
show: boolWhether the axis is drawn.
axis_label: Option<LabelOption>The labels of the axis.
axis_line: Option<AxisLineOption>The line of the axis.
axis_tick: Option<AxisTickOption>The tick marks of the axis.
split_line: Option<SplitLineOption>The split lines of the axis.
min: Option<f64>The minimum value of the axis.
max: Option<f64>The maximum value of the axis.
split_gap: Option<f64>The gap between the axis and its split lines, as a fraction of the axis’ length.
split_number: Option<usize>The number of split lines.
interval: Option<f64>The interval between two split lines.
min_interval: Option<f64>The minimum interval between two split lines.
max_interval: Option<f64>The maximum interval between two split lines.
log_base: Option<f64>Whether the axis uses a logarithmic scale.
boundary_gap: Option<f64>The boundary gap of a category axis.
align_ticks: Option<bool>Whether the axis is aligned with the other axis of the same grid.
grid_index: Option<usize>The index of the grid the axis belongs to.
offset: Option<f64>Whether the axis is drawn on the other side of the grid.
axis_pointer: Option<AxisPointerOption>The colour of the axis’ area.
formatter: Option<String>The formatter used for the axis’ labels.
color: Option<String>The colour of the axis.
Implementations§
Source§impl AxisOption
Inherent implementation of AxisOption.
impl AxisOption
Inherent implementation of AxisOption.
Sourcepub fn data(self, data: Vec<DataValue>) -> Self
pub fn data(self, data: Vec<DataValue>) -> Self
Sets the categories or the tick values of the axis.
§Arguments
Vec<DataValue>- AVec<DataValue>parameter.