public abstract class PlotGlyph<T extends DataSeries> extends RectangleGlyph
| 限定符和类型 | 字段和说明 |
|---|---|
protected static java.lang.String |
CATEGORY_PARA |
protected ConditionCollection |
conditionCollection
图表条件属性的集合
|
protected static int |
DEFAULT_SIZE |
protected int |
plotStyle |
protected static double |
RESET_JAVA_FONT_X |
protected static java.lang.String |
SERIES_PARA |
protected java.util.List<T> |
seriesList
系列的集合
|
static java.lang.String |
STACK |
static java.lang.String |
X_AXIS |
protected static java.lang.String |
X_PARA |
static java.lang.String |
Y_AXIS |
protected static java.lang.String |
Y_PARA |
bounds, visible| 构造器和说明 |
|---|
PlotGlyph() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addECNameToHyperLink(java.lang.String ecName,
int sheetIndex) |
void |
addOtherJSON(JSONObject js,
Repository repo) |
void |
addSeries(T series)
添加一个系列
|
void |
addSeriesJSON(JSONObject js,
ConditionCollection conditionCollection,
Repository repo) |
void |
addSeriesJSON(JSONObject js,
Repository repo)
系列写入json
|
protected java.awt.geom.Rectangle2D |
avoidCoverLabelBounds(java.awt.geom.GeneralPath path,
java.awt.geom.Rectangle2D bounds)
避免覆盖 set之前看下bounds
|
void |
axisExtendsMaxMinValueWithTrendLine(AxisGlyph axisGlyph)
坐标轴因为趋势线的前推后推等 扩展最大最小值
|
void |
calculateDataPointPercentValue()
计算数据点的占比
|
protected java.util.List |
calculateOrderList() |
java.lang.Object |
clone() |
java.awt.Color[] |
createColors4Cate()
按照分类 序号 创建颜色 数组.
|
java.awt.Color[] |
createColors4Series()
为每个系列创建颜色数组
|
DataSheetGlyph |
createDataSheetGlyph(DataSheet dataSheet,
LegendItem[] legendItems)
根据数据表和图例元素集合生成数据表Glyph,默认返回null
|
protected void |
dealDataPointLabel(DataPoint dataPoint,
int resolution)
处理数据点的标签的边框
|
protected void |
dealLabelBoundsInOrder() |
protected void |
dealLabelBoundsOutPlotBounds(java.awt.geom.Rectangle2D labelBounds,
java.awt.geom.GeneralPath labelsPath,
DataPoint dataPoint,
java.util.List orderList,
int orderListIndex) |
void |
dealPlotHotAttr(Repository repo)
处理图表中Plot的热点属性
|
void |
doLayout(DataSheetGlyph glyph)
布局DataSheetGlyph
|
void |
draw(java.awt.Graphics g,
int resolution)
画所有Plot都共有的系列
|
void |
drawInfo(java.awt.Graphics g) |
protected void |
drawLabel4Series(java.awt.Graphics g,
int resolution) |
void |
drawShape4Series(java.awt.Graphics g,
int resolution) |
boolean |
equals(java.lang.Object ob) |
int |
getAdditionalCanvasCount()
获取组合图表需要的canvas数量
|
void |
getAllDataPointGlyph(java.util.List<TextGlyph> list)
所有数据点标签的glyph
|
void |
getAllTrendLineGlyph(java.util.List<TrendLineGlyph> list)
所有的趋势线的glyph
|
int |
getAutoRefreshPerSecond()
获取画图区自动刷新显示数据的时间间隔,单位秒。
|
int |
getCategoryCount()
返回分类的数目
|
abstract java.lang.String |
getChartType() |
double |
getCombinedSize()
获取作为被组合的图的大小
|
ConditionCollection |
getConditionCollection()
获取画图区的条件属性集合
|
protected java.awt.geom.Rectangle2D |
getDataPointLabelBoundsWithPosition(java.awt.geom.Dimension2D labelPreDim,
java.awt.geom.Rectangle2D dataPointRect,
DataPoint dataPoint,
int position) |
protected java.awt.geom.Rectangle2D |
getDataPointLabelBoundsWithPosition(java.awt.geom.Dimension2D labelPreDim,
java.awt.geom.Rectangle2D dataPointRect,
int position)
返回特定DataPoint的标签边界, 默认没有标签.
|
protected java.awt.geom.Rectangle2D |
getDataPointLabelBoundsWithPosition4Line(java.awt.geom.Dimension2D labelPreDim,
java.awt.geom.Rectangle2D dataPointRect,
int position)
返回线型(折线, 散点, 面积, 雷达) 无位置设置, 默认数据点正上方 间距2px
|
DataProcessor |
getDataProcessor() |
int[] |
getDrawSequence()
获取画系列时系列的序号的一个有序组合
|
protected java.lang.String |
getExtraLabelValue() |
protected java.lang.String |
getExtraTooltipValue() |
protected DataPoint |
getFirstDataPoint() |
NameJavaScriptGroup |
getHotHyperLink()
获取画图区的超级链接
|
AttrContents |
getHotTooltipStyle()
获取画图区热点提示信息的样式 内容
|
java.lang.String |
getPlotDetailType() |
AttrFillStyle |
getPlotFillStyle() |
abstract java.lang.String |
getPlotGlyphType()
用于JS中的Type类型.
|
JSONObject |
getPlotOptionsJSON(Repository repo,
boolean isJsDraw,
ChartWebPara para)
获取 plotOptions的JSON对象
|
int |
getPlotStyle() |
double |
getPreGap4AxisRightUnit()
值轴单位的 右侧压缩
|
double |
getPreGap4AxisTopUnit()
值轴单位 只有两种可能, 一种是压缩上方空间, 一种是压缩右侧空间, 所以考虑两种可能
|
double |
getPreLeft4DataSheet(int resolution) |
DataSeries |
getSeries(int index)
指定位置上的系列, 如果不存在, 则返回一个空的系列.
|
int |
getSeriesSize()
已经添加的系列的数量
|
java.lang.String |
getSmallIconType()
图表切换时的小图标
|
java.lang.String |
getVanChartType() |
Background |
getWholeChartBackground() |
protected double |
getXDivideUnit() |
protected double |
getYDivideUnit() |
boolean |
is3DPlotGlyph()
判断是否是3维的图表类型
|
protected boolean |
isDataPointXNotInPlotBounds(float px)
判断系列点的x值是否在绘图范围内 暂时先只判断x值, 因为y值对绘图效果的影响不大. x值会直接导致确缺失.
|
boolean |
isExistAttrByResult(Result result,
java.lang.Class targetClass)
判断是否对某个Result进行条件设置
|
boolean |
isNeedDealHotHyperlink()
是否需要处理热点链接
|
boolean |
isNullValueBreak()
获取空值时画图区的处理方法
|
boolean |
isSeriesDragEnable()
是否可以进行系列拖拽
|
boolean |
isSupportLegend()
是否支持图例
|
boolean |
isSupportZoom() |
boolean |
isZoom()
返回是否可以缩放
|
abstract void |
layoutAxisGlyph(int resolution)
对绘图区中的坐标轴部分进行布局
|
abstract void |
layoutDataSeriesGlyph(int resolution)
对绘图区中的数据系列部分进行布局
|
protected boolean |
notDealDataPointLabel(DataPoint dataPoint,
TextGlyph textGlyph) |
protected void |
resetClip(java.awt.Graphics2D g2d)
画绘图内部内容时指定范围.
|
java.util.Iterator |
selectableChildren()
返回可被选中的孩子系列
|
void |
setAutoRefreshPerSecond(int autoRefreshPerSecond)
设置画图区自动刷新的时间间隔,单位为秒。
|
void |
setCombinedSize(double size)
设置作为组合图的大小
|
void |
setConditionCollection(ConditionCollection conditionCollection)
设置画图区的条件属性集合
|
void |
setDataProcessor(DataProcessor dataProcessor) |
void |
setHotHyperLink(NameJavaScriptGroup hotHyperLink)
设置画图区的超级链接
|
void |
setHotTooltipStyle(AttrContents hotTooltipStyle)
设置画图区热点提示信息的显示样式 内容
|
void |
setIsNullValueBreak(boolean nullValueBreak)
设置空值时的处理方法
|
void |
setPlotFillStyle(AttrFillStyle plotFillStyle) |
void |
setPlotStyle(int plotStyle)
设置风格
|
void |
setSeriesDragEnable(boolean seriesDragEnable) |
void |
setWholeChartBackground(Background parentBackground) |
void |
setZoom(boolean zoom)
设置是否可以缩放
|
protected boolean |
skipDealPointHotAttr(DataPoint point) |
JSONObject |
toJSONObject(Repository repo)
MapPlot 继承, 用于图片web请求加载.
|
protected void |
trendLineFitting(double[] xVal,
double[] yVal,
DataSeries dataSeries)
趋势线拟合计算
|
getBounds, getOutline4Fill, getShape, isInvisible, isVisible, setBounds, setVisibledealCondition, dealConditionWithSeriesColor, drawOnlyBorder, drawWithOutBorder, getAlpha, getBackground, getBorderColor, getBorderStyle, getGeneralInfo, getRoundRadius, is3DIE6, isRoundBorder, isShadow, paint, paintBackground, putBackgroundJSON, putPlotBackgroundJSON, setAlpha, setBackground, setBorderColor, setBorderStyle, setGeneralInfo, setRoundBorder, toVanJSONObjectpublic static final java.lang.String STACK
protected static final double RESET_JAVA_FONT_X
protected static final int DEFAULT_SIZE
public static final java.lang.String X_AXIS
public static final java.lang.String Y_AXIS
protected static final java.lang.String Y_PARA
protected static final java.lang.String X_PARA
protected static final java.lang.String CATEGORY_PARA
protected static final java.lang.String SERIES_PARA
protected java.util.List<T extends DataSeries> seriesList
protected ConditionCollection conditionCollection
protected int plotStyle
public DataProcessor getDataProcessor()
public void setDataProcessor(DataProcessor dataProcessor)
public void addSeries(T series)
series - 要添加的系列public int getSeriesSize()
public DataSeries getSeries(int index)
index - 要返回的系列的索引public int getCategoryCount()
public java.util.Iterator selectableChildren()
public void getAllDataPointGlyph(java.util.List<TextGlyph> list)
public void getAllTrendLineGlyph(java.util.List<TrendLineGlyph> list)
public void setHotHyperLink(NameJavaScriptGroup hotHyperLink)
hotHyperLink - 超级链接集合public NameJavaScriptGroup getHotHyperLink()
public void setPlotStyle(int plotStyle)
public int getPlotStyle()
public void setPlotFillStyle(AttrFillStyle plotFillStyle)
public AttrFillStyle getPlotFillStyle()
public boolean isZoom()
public boolean isSupportZoom()
public void setZoom(boolean zoom)
zoom - 是否可以缩放public double getCombinedSize()
public void setCombinedSize(double size)
size - 大小public void setHotTooltipStyle(AttrContents hotTooltipStyle)
hotTooltipStyle - 样式public AttrContents getHotTooltipStyle()
public void setIsNullValueBreak(boolean nullValueBreak)
nullValueBreak - true表示空值时断开显示,false表示直接跳过空值public boolean isNullValueBreak()
public void setAutoRefreshPerSecond(int autoRefreshPerSecond)
autoRefreshPerSecond - 自动刷新数据的间隔public int getAutoRefreshPerSecond()
public void setSeriesDragEnable(boolean seriesDragEnable)
seriesDragEnable - 设置是否可以进行系列拖拽public boolean isSeriesDragEnable()
public void setConditionCollection(ConditionCollection conditionCollection)
conditionCollection - 条件属性public ConditionCollection getConditionCollection()
public int[] getDrawSequence()
public void doLayout(DataSheetGlyph glyph)
glyph - 数据表public DataSheetGlyph createDataSheetGlyph(DataSheet dataSheet, LegendItem[] legendItems)
dataSheet - 数据表legendItems - 图例集合public java.awt.Color[] createColors4Series()
public java.awt.Color[] createColors4Cate()
public double getPreGap4AxisTopUnit()
public double getPreGap4AxisRightUnit()
public double getPreLeft4DataSheet(int resolution)
protected void dealLabelBoundsInOrder()
protected java.util.List calculateOrderList()
protected void dealLabelBoundsOutPlotBounds(java.awt.geom.Rectangle2D labelBounds,
java.awt.geom.GeneralPath labelsPath,
DataPoint dataPoint,
java.util.List orderList,
int orderListIndex)
protected boolean isDataPointXNotInPlotBounds(float px)
px - 系列点x值public boolean isNeedDealHotHyperlink()
public void dealPlotHotAttr(Repository repo)
repo - 请求.protected boolean skipDealPointHotAttr(DataPoint point)
protected java.awt.geom.Rectangle2D avoidCoverLabelBounds(java.awt.geom.GeneralPath path,
java.awt.geom.Rectangle2D bounds)
path - bounds - public void draw(java.awt.Graphics g,
int resolution)
draw 在接口中 Glyphdraw 在类中 GeneralGlyphg - 图形对象resolution - 分辨率protected void resetClip(java.awt.Graphics2D g2d)
public void drawShape4Series(java.awt.Graphics g,
int resolution)
protected void drawLabel4Series(java.awt.Graphics g,
int resolution)
public void drawInfo(java.awt.Graphics g)
public abstract void layoutAxisGlyph(int resolution)
resolution - 分辨率public abstract void layoutDataSeriesGlyph(int resolution)
resolution - 分辨率protected void dealDataPointLabel(DataPoint dataPoint, int resolution)
dataPoint - 数据点resolution - 分辨率protected boolean notDealDataPointLabel(DataPoint dataPoint, TextGlyph textGlyph)
protected java.awt.geom.Rectangle2D getDataPointLabelBoundsWithPosition(java.awt.geom.Dimension2D labelPreDim,
java.awt.geom.Rectangle2D dataPointRect,
int position)
protected java.awt.geom.Rectangle2D getDataPointLabelBoundsWithPosition(java.awt.geom.Dimension2D labelPreDim,
java.awt.geom.Rectangle2D dataPointRect,
DataPoint dataPoint,
int position)
protected java.awt.geom.Rectangle2D getDataPointLabelBoundsWithPosition4Line(java.awt.geom.Dimension2D labelPreDim,
java.awt.geom.Rectangle2D dataPointRect,
int position)
public void axisExtendsMaxMinValueWithTrendLine(AxisGlyph axisGlyph)
axisGlyph - 趋势线的扩展对平行坐标轴的影响.protected void trendLineFitting(double[] xVal,
double[] yVal,
DataSeries dataSeries)
public void calculateDataPointPercentValue()
protected DataPoint getFirstDataPoint()
public boolean equals(java.lang.Object ob)
equals 在类中 RectangleGlyphpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone 在接口中 FCloneableclone 在类中 RectangleGlyphjava.lang.CloneNotSupportedException - 如果克隆失败则抛出此异常public boolean is3DPlotGlyph()
public JSONObject toJSONObject(Repository repo) throws JSONException
toJSONObject 在接口中 GlyphtoJSONObject 在类中 RectangleGlyphrepo - 请求JSONException - 抛出问题public abstract java.lang.String getPlotGlyphType()
public java.lang.String getPlotDetailType()
public int getAdditionalCanvasCount()
public java.lang.String getSmallIconType()
public abstract java.lang.String getChartType()
public java.lang.String getVanChartType()
public void addSeriesJSON(JSONObject js, Repository repo) throws JSONException
js - json对象repo - 请求JSONException - 抛错public void addSeriesJSON(JSONObject js, ConditionCollection conditionCollection, Repository repo) throws JSONException
JSONExceptionprotected double getYDivideUnit()
protected double getXDivideUnit()
public JSONObject getPlotOptionsJSON(Repository repo, boolean isJsDraw, ChartWebPara para) throws JSONException
repo - 请求isJsDraw - 动态展示para - JSONException - 抛出问题protected java.lang.String getExtraLabelValue()
protected java.lang.String getExtraTooltipValue()
public void addOtherJSON(JSONObject js, Repository repo) throws JSONException
JSONExceptionpublic void setWholeChartBackground(Background parentBackground)
public Background getWholeChartBackground()
public boolean isExistAttrByResult(Result result, java.lang.Class targetClass)
result - 需要判断的对象targetClass - 是否存在的条件public boolean isSupportLegend()
public void addECNameToHyperLink(java.lang.String ecName,
int sheetIndex)