com.github.davaded.echarts.axis.AxisTick Maven / Gradle / Ivy
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2015 [email protected]
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.github.davaded.echarts.axis;
import java.io.Serializable;
import com.github.davaded.echarts.style.LineStyle;
import lombok.Getter;
import lombok.Setter;
/**
* 坐标轴小标记
*
* @author liuzh
*/
@Getter
@Setter
public class AxisTick implements Serializable {
private static final long serialVersionUID = -1941931349381173253L;
/**
* 是否显示,默认为false,设为true后下面为默认样式
*/
private Boolean show;
/**
* 小标记显示挑选间隔,默认为'auto',可选为:
* 'auto'(自动隐藏显示不下的) | 0(全部显示) | {number}(用户指定选择间隔)
*/
private Object interval;
/**
* 小标记是否显示为间隔,默认等于boundaryGap
*/
private Boolean onGap;
/**
* 小标记是否显示为在grid内部,默认在外部
*/
private Boolean inside;
/**
* 默认值5,属性length控制线长
*/
private Integer length;
/**
* 属性lineStyle控制线条样式,(详见lineStyle)
*
* @see LineStyle
*/
private LineStyle lineStyle;
/**
* 分割段数,默认为5,为0时为线性渐变,calculable为true是默认均分100份
*/
private Integer splitNumber;
/**
* 类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。
* defalut:false
*
*/
private Boolean alignWithLabel = false;
/**
* 显示
* 获取show值
*
* @return {@link Boolean}
*/
public Boolean show() {
return this.show;
}
/**
* 显示
* 设置show值
*
* @param show 显示
* @return {@link AxisTick}
*/
public AxisTick show(Boolean show) {
this.show = show;
return this;
}
/**
* 间隔
* 获取interval值
*
* @return {@link Object}
*/
public Object interval() {
return this.interval;
}
/**
* 间隔
* 设置interval值
*
* @param interval 间隔
* @return {@link AxisTick}
*/
public AxisTick interval(Object interval) {
this.interval = interval;
return this;
}
/**
* 论鸿沟
* 获取onGap值
*
* @return {@link Boolean}
*/
public Boolean onGap() {
return this.onGap;
}
/**
* 论鸿沟
* 设置onGap值
*
* @param onGap 论鸿沟
* @return {@link AxisTick}
*/
public AxisTick onGap(Boolean onGap) {
this.onGap = onGap;
return this;
}
/**
* 里边
* 获取inside值
*
* @return {@link Boolean}
*/
public Boolean inside() {
return this.inside;
}
/**
* 里边
* 设置inside值
*
* @param inside 里边
* @return {@link AxisTick}
*/
public AxisTick inside(Boolean inside) {
this.inside = inside;
return this;
}
/**
* 长度
* 获取length值
*
* @return {@link Integer}
*/
public Integer length() {
return this.length;
}
/**
* 长度
* 设置length值
*
* @param length 长度
* @return {@link AxisTick}
*/
public AxisTick length(Integer length) {
this.length = length;
return this;
}
/**
* 线条样式
* 属性lineStyle控制线条样式,(详见lineStyle)
*
* @return {@link LineStyle}
* @see LineStyle
*/
public LineStyle lineStyle() {
if (this.lineStyle == null) {
this.lineStyle = new LineStyle();
}
return this.lineStyle;
}
/**
* 线条样式
* 设置style值
*
* @param style 格调
* @return {@link AxisTick}
*/
public AxisTick lineStyle(LineStyle style) {
this.lineStyle = style;
return this;
}
/**
* 拆分编号
* 获取splitNumber值
*
* @return {@link Integer}
*/
public Integer splitNumber() {
return this.splitNumber;
}
/**
* 拆分编号
* 设置splitNumber值
*
* @param splitNumber 拆分编号
* @return {@link AxisTick}
*/
public AxisTick splitNumber(Integer splitNumber) {
this.splitNumber = splitNumber;
return this;
}
/**
* 与标签对齐
* description: 设置 alignWithLabel 的值。
*
* @param alignWithLabel 与标签对齐
* @return {@link AxisTick}
*/
public AxisTick alignWithLabel(Boolean alignWithLabel){
this.alignWithLabel=alignWithLabel;
return this;
}
/**
* 与标签对齐
* description: 获取 alignWithLabel 的值。
* Boolean
*
* @return {@link Boolean}
* @version v1.0
*/
public Boolean alignWithLabel(){
return this.alignWithLabel;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy