public class VanChartValueAxisGlyph extends VanChartBaseAxisGlyph
| 限定符和类型 | 字段和说明 |
|---|---|
protected static double |
LOG_MIN |
DEFAULT_MAX, niceMaxValue, niceMinValue, TICK_COUNTaxisGridLength, axisLabelWidth, axisLength, axisReversed, bounds, DEFAULT_SAMPLING_TIME, DEFAULT_UNIT, endLabelDim, format, isArrowShow, isCustomMaxValue, isCustomMinValue, isLabelWrap, isShowAxisLabel, labelNumber, lineColor, lineStyle, MAIN_TICK_LENGTH, mainGridColor, mainGridStyle, mainUnit, MAX_AXIS_LABEL_HEIGHT, MAX_AXIS_LABEL_WIDTH, maxValue, MIN_TICK_LENGTH, minValue, originPoint, PIE_ANGLE, plotLastBounds, plotZeroBounds, position, SEC_TICK_LENGTH, secTickMarkType, startLabelDim, textAttr, threeDBase, TICK_WIDTH, tickMarkType, titleDim, titleGlyph, TOP_AND_DOWN_GAP, unitLength, VERTICAL_ANGLE| 构造器和说明 |
|---|
VanChartValueAxisGlyph() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addIndicatorJSON(JSONObject jsonObject) |
void |
calculateAxisLengthUnit()
计算坐标轴 单位长度
|
protected void |
calculateNiceDomain(double autoMin,
double autoMax,
boolean adjustMinMax)
根据数据配置的最大最小值计算坐标轴最大最小值
|
void |
drawAxisGrid(java.awt.Graphics g)
主次网格线以及警戒线
|
protected void |
drawMainGridLineWithValue(java.awt.Graphics2D g2d,
double value) |
protected void |
drawTickLable(java.awt.Graphics g,
int resolution) |
protected void |
drawTicks(java.awt.Graphics g,
int resolution)
画刻度 y轴
|
double |
getArrowValue()
返回坐标轴箭头处的值, 最大值
|
java.lang.String |
getAxisName() |
double |
getCrossValue()
返回最小值
|
double |
getCrossValueInPlot()
返回交叉点的值.
|
java.lang.String |
getJSAxisType()
返回对应的js类型.
|
protected java.awt.geom.Rectangle2D |
getLabelBounds(double value,
double offset,
java.lang.String labelString,
int resolution) |
double |
getLogBase()
返回对数的底
|
protected double |
getMaxLabelWidthAndInitStartEndLabelDim(int resolution)
获取值坐标轴占用位置最大的标签的尺寸, 横向坐标轴返回标签的最大高度,纵向坐标轴返回标签的最大宽度
初始化最初和最后的标签Dim大小
|
java.lang.Object |
getObjectFromFormula(BaseFormula formula) |
double |
getObjectValue(java.lang.Object ob) |
java.awt.geom.Point2D |
getPoint2D(double value)
返回值 所对应的坐标轴点
|
java.awt.geom.Point2D |
getPointInBounds(double value)
返回值 对应绘图区位置的坐标点
处理了越界的情况.
|
double |
getPreLeftWidth4DataSheet(int resolution)
返回坐标轴在左侧位置 可能占用的空间宽度 , 为了给数据表预留位置
|
int |
getTickSamplingTime() |
ChartData |
getYAxisChartData() |
void |
initMinMaxValue(double autoMin,
double autoMax)
初始化最大值、最小值以及刻度大小
|
void |
initMinMaxValue(double autoMin,
double autoMax,
boolean adjustMinMax)
初始化坐标轴的最大值和最小值
|
boolean |
isLog()
返回 是否为对数对数坐标轴
|
boolean |
isPercentage()
返回是否百分比 (只有数字轴NumberAxis支持此功能)
|
void |
setLog(boolean isLog)
设置是否用对数坐标轴
|
void |
setLogBase(double logBase)
设置对数的底
|
void |
setPercentage(boolean isPercentage) |
void |
setYAxisChartData(ChartData YAxisChartData) |
JSONObject |
toJSONObject(Repository repo)
转为json数据
|
addAxisLabelJSON, addMinMaxValue, addValueFormat, calculateBoundsWidthOrientationAndTitle, calculateTitleDimesion, calculateValueTimeNiceDomain, calculatorTitleBounds, dealOnZeroAxisGlyphLocation, draw, drawAfterPlot4AlertValues, drawAlertValueGlyph, drawAxisLine, drawAxisTitle, drawIntervalBackground, drawLabel, drawLabel, finallyUpdateAxisGridLength, getAlertValuePoint, getAlertValues, getCategoryNum, getCateLabelWidth, getCustomBackgroundShape, getCustomIntervalBackgroundArray, getDefaultIntervalBackgroundColor, getDefaultTickCount, getLeftRightY, getMainTickLine, getMaxHeight, getMaxTickValue, getNiceMaxValue, getNiceMinValue, getOtherPoint2ValueLength, getOtherPositionGridLine, getOtherPositionLabelBounds, getOtherPositionTickLine, getOtherPositionTitleBounds, getSecTickLine, getTickLengthShow, getTickLine, getTickLineByCenterPoint, getValuePoint, getVanAxisName, getVanAxisType, gridLineToJSON, init, initAxisGlyphStartPoint, isAutoLabelGap, isCommonValueFormat, isHorizontalAxis, isLimitSize, isRevertAndArrow, isRotation, isTitleUseHtml, isXAdd, isYAdd, notShowAllAttr, setAlertValues, setAutoLabelGap, setCategoryNum, setChartBounds, setCommonValueFormat, setCustomIntervalBackgroundArray, setCustomMaxValue, setCustomMinValue, setDefaultIntervalBackgroundColor, setHtmlLabel, setISXAxis, setLimitSize, setMainTickLine, setMaxHeight, setMinMaxTickInterval, setNiceMaxValue, setNiceMinValue, setRotation, setSecTickLine, setTitleUseHtml, setVanAxisName, setVanAxisType, shouldBeHeight, shouldDrawTickLinecalBoundsWithMoreLabel4Cate, calculateAxisGlyph, calculateLocationWithEllipsis, changeAxisLabelStringWithLabelBounds, dealPlotBoundsWithAxisLabel, dealPlotBoundsWithAxisTitle, dealPlotBoundsWithLabel, dealPlotBoundsWithLabelInHorizontal, dealWithPlotBounds, draw4ThreeD, drawArrow, drawLabelWrapWhenNeed, drawTickLine, drawWithOutAlert, equals, get2ValueLength, getAxisGridLength, getAxisLabelDim, getAxisLabelWidth, getAxisLabelWidth, getAxisLength, getAxisType, getBigDecimalMainUnit, getBottomTitleBounds, getBounds, getCubic, getDivideUnit, getFormat, getGridLine, getLabelBounds4WrapWhenAxisLeftOrRight, getLabelNumber, getLeftTitleBounds, getLineColor, getLineStyle, getMainGridColor, getMainGridStyle, getMainUnit, getMaxValue, getMinValue, getOrigin, getPlotLastBounds, getPlotZeroBounds, getPosition, getRightTitleBounds, getSecTickMarkType, getSecUnit, getShape, getShowUnit, getTextAttr, getThreeDBase, getTickIndex4Value, getTickLine, getTickLineByCenterPoint, getTickMarkType, getTitleDim, getTopBottomX, getTopTitleBounds, getUnitLen, getVanAxisStringType, hasAxisReversed, isArrowShow, isCustomMainUnit, isCustomMaxValue, isCustomMinValue, isCustomSecUnit, isDrawBetweenTick, isHorizontal, isShowAxisLabel, isZoom, setArrowShow, setAttr, setAxisGridLength, setAxisLabelWidth, setAxisLength, setAxisReversed, setAxisType, setBounds, setCubic, setCustomMainUnit, setCustomMaxValue, setCustomMinValue, setCustomSecUnit, setDrawBetweenTick, setFormat, setLabelNumber, setLabelWrap, setLineColor, setLineStyle, setMainGridColor, setMainGridStyle, setMainUnit, setMaxValue, setMinMaxValue, setMinValue, setOrigin, setPlotZeroBounds, setPosition, setSecTickMarkType, setSecUnit, setShowAxisLabel, setTextAttr, setThreeDBase, setTickMarkType, setTitleGlyph, setUnitLen, setZoom, toVanJSONObject, value2Stringclone, selectableChildrenprotected static final double LOG_MIN
public ChartData getYAxisChartData()
public void setYAxisChartData(ChartData YAxisChartData)
public void setPercentage(boolean isPercentage)
public boolean isPercentage()
isPercentage 在类中 AxisGlyphpublic void setLogBase(double logBase)
public double getLogBase()
public java.lang.String getJSAxisType()
getJSAxisType 在类中 AxisGlyphpublic java.lang.String getAxisName()
getAxisName 在类中 AxisGlyphpublic double getCrossValueInPlot()
getCrossValueInPlot 在类中 AxisGlyphpublic double getObjectValue(java.lang.Object ob)
getObjectValue 在类中 VanChartBaseAxisGlyphpublic java.lang.Object getObjectFromFormula(BaseFormula formula)
public java.awt.geom.Point2D getPointInBounds(double value)
getPointInBounds 在类中 AxisGlyphvalue - 坐标轴上的值public java.awt.geom.Point2D getPoint2D(double value)
getPoint2D 在类中 VanChartBaseAxisGlyphpublic double getPreLeftWidth4DataSheet(int resolution)
getPreLeftWidth4DataSheet 在类中 AxisGlyphprotected double getMaxLabelWidthAndInitStartEndLabelDim(int resolution)
getMaxLabelWidthAndInitStartEndLabelDim 在类中 AxisGlyphresolution - 分辨率public void calculateAxisLengthUnit()
calculateAxisLengthUnit 在类中 AxisGlyphpublic double getCrossValue()
getCrossValue 在类中 AxisGlyphpublic double getArrowValue()
getArrowValue 在类中 AxisGlyphpublic void initMinMaxValue(double autoMin,
double autoMax)
initMinMaxValue 在类中 AxisGlyphautoMin - 最小值autoMax - 最大值public void initMinMaxValue(double autoMin,
double autoMax,
boolean adjustMinMax)
initMinMaxValue 在类中 VanChartBaseAxisGlyphautoMin - 自动计算后是否调整最大最小值(柱形图x轴为数值或者时间)autoMax - 最小值adjustMinMax - 最大值protected void calculateNiceDomain(double autoMin,
double autoMax,
boolean adjustMinMax)
autoMin - 数据配置得到的最小值autoMax - 数据配置得到的最大值adjustMinMax - 柱子要特殊处理一下public int getTickSamplingTime()
getTickSamplingTime 在类中 AxisGlyphprotected java.awt.geom.Rectangle2D getLabelBounds(double value,
double offset,
java.lang.String labelString,
int resolution)
getLabelBounds 在类中 AxisGlyphvalue - 标签的位置offset - 偏移量,标签画在刻度之间时为0.5,画在刻度下面时为0labelString - 标签文本resolution - 屏幕分辨率protected void drawTicks(java.awt.Graphics g,
int resolution)
protected void drawTickLable(java.awt.Graphics g,
int resolution)
public void drawAxisGrid(java.awt.Graphics g)
drawAxisGrid 在类中 AxisGlyphg - Graphicsprotected void drawMainGridLineWithValue(java.awt.Graphics2D g2d,
double value)
public JSONObject toJSONObject(Repository repo) throws JSONException
toJSONObject 在接口中 GlyphtoJSONObject 在类中 VanChartBaseAxisGlyphrepo - 请求JSONException - 抛错public void addIndicatorJSON(JSONObject jsonObject) throws JSONException
JSONException