public class VanChartGlyph extends ChartGlyph<VanChartPlotGlyph,VanChartLegendGlyph,VanChartDataSheetGlyph>
限定符和类型 | 字段和说明 |
---|---|
static int |
HEIGHT |
static int |
WIDTH |
bounds, visible
构造器和说明 |
---|
VanChartGlyph() |
限定符和类型 | 方法和说明 |
---|---|
void |
addChartBackgroundAndBorder(JSONObject js,
Repository repo,
BackgroundImageParam param)
图表区背景写入json
本地异步请求图片逻辑:
在每次获取图片之前,都会有个预处理过程,这个过程generateImage = false
预处理是为了比较前后有没有变化,同时,在预处理过程中,会请求所有需要的背景图片
真正画图时,只是拿已经获取到的背景图,不会再去重复请求背景图片
|
void |
addColorsJSON(PlotGlyph plotGlyph,
JSONObject js)
配色写入json
|
void |
addPlotBackgroundAndBorder(PlotGlyph plotGlyph,
JSONObject js,
Repository repo)
绘图区背景写入json
|
protected void |
chartDoLayout(int resolution) |
void |
draw(java.awt.Graphics g,
int resolution)
画ChartGlyph,包括边框轮廓、外发光、标题文本等
|
protected int |
getAutoRefreshTime(ChartGlyph chartGlyph) |
ImageManager |
getImageManager() |
VanChartZoom |
getVanChartZoom() |
boolean |
isChartSupportCanvas() |
protected void |
makeSureBounds(double borderSize,
int width,
int height) |
protected float |
minRefreshTime() |
void |
setImageManager(ImageManager imageManager) |
void |
setRefreshMoreLabel(RefreshMoreLabel refreshMoreLabel) |
void |
setVanChartTools(VanChartTools vanChartTools) |
void |
setVanChartZoom(VanChartZoom vanChartZoom) |
java.awt.Image |
toImage(int width,
int height,
int resolution)
按照指定的宽度、高度和分辨率将ChartGlyph转换为图片
|
java.awt.Image |
toImage(int width,
int height,
int resolution,
CallbackEvent callback) |
java.awt.Image |
toImage(int width,
int height,
int resolution,
CallbackEvent callback,
ChartDataParam param)
已过时。
|
JSONObject |
toJSONObject(Repository repo)
生成浏览器端需要的JSON对象
|
JSONObject |
toJSONObject(Repository repo,
double width,
double height) |
JSONObject |
toLocalJSONObject(Repository repo,
int width,
int height,
BackgroundImageParam param)
如果不生成图片,是否是异步已经不重要了
|
clone, equals, getChartID, getChartWebPara, getDataSheetGlyph, getFontScale, getLegendGlyph, getMapControlBar, getPlotGlyph, getTitleGlyph, isExport, isJSDraw, isUseChangeChart, isUseDragRefresh, selectableChildren, setChartID, setChartImagePath, setChartWebPara, setDataDefinition, setDataSheetGlyph, setExport, setFontScale, setJSDraw, setLegendGlyph, setMapControlBar, setOptions, setPlotGlyph, setRequiredCSS, setRequiredJS, setTitleGlyph, setUseChangeChart, setUseDragRefresh, setWrapperName, toJSONMap, toJSONMap4Change, toJSONMap4ChangeModel, toVanJSONObject
getBounds, getOutline4Fill, getShape, isInvisible, isVisible, setBounds, setVisible
dealCondition, dealConditionWithSeriesColor, drawOnlyBorder, drawWithOutBorder, getAlpha, getBackground, getBorderColor, getBorderStyle, getGeneralInfo, getRoundRadius, is3DIE6, isRoundBorder, isShadow, paint, paintBackground, putBackgroundJSON, putPlotBackgroundJSON, setAlpha, setBackground, setBorderColor, setBorderStyle, setGeneralInfo, setRoundBorder
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isRoundBorder, setBounds
public static final int WIDTH
public static final int HEIGHT
public ImageManager getImageManager()
public void setImageManager(ImageManager imageManager)
public void setVanChartTools(VanChartTools vanChartTools)
public VanChartZoom getVanChartZoom()
public void setVanChartZoom(VanChartZoom vanChartZoom)
public void setRefreshMoreLabel(RefreshMoreLabel refreshMoreLabel)
protected void makeSureBounds(double borderSize, int width, int height)
protected void chartDoLayout(int resolution)
public JSONObject toJSONObject(Repository repo) throws JSONException
toJSONObject
在接口中 Glyph
toJSONObject
在类中 ChartGlyph<VanChartPlotGlyph,VanChartLegendGlyph,VanChartDataSheetGlyph>
repo
- 请求.JSONException
- 抛出错误public JSONObject toLocalJSONObject(Repository repo, int width, int height, BackgroundImageParam param) throws JSONException
repo
- width
- height
- param
- 背景图片相关信息JSONException
protected int getAutoRefreshTime(ChartGlyph chartGlyph)
protected float minRefreshTime()
public void addChartBackgroundAndBorder(JSONObject js, Repository repo, BackgroundImageParam param) throws JSONException
js
- json对象repo
- 请求JSONException
- 抛错public void addColorsJSON(PlotGlyph plotGlyph, JSONObject js) throws JSONException
plotGlyph
- 绘图对象js
- json对象JSONException
- 抛错public void addPlotBackgroundAndBorder(PlotGlyph plotGlyph, JSONObject js, Repository repo) throws JSONException
plotGlyph
- 绘图对象js
- json对象repo
- 请求JSONException
- 抛错@Deprecated public java.awt.Image toImage(int width, int height, int resolution, CallbackEvent callback, ChartDataParam param)
toImage
在接口中 BaseChartGlyph
toImage
在类中 ChartGlyph<VanChartPlotGlyph,VanChartLegendGlyph,VanChartDataSheetGlyph>
public java.awt.Image toImage(int width, int height, int resolution, CallbackEvent callback)
public java.awt.Image toImage(int width, int height, int resolution)
ChartGlyph
toImage
在接口中 BaseChartGlyph
toImage
在类中 ChartGlyph<VanChartPlotGlyph,VanChartLegendGlyph,VanChartDataSheetGlyph>
width
- 结果图片的宽度height
- 结果图片的高度resolution
- 分辨率public void draw(java.awt.Graphics g, int resolution)
draw
在接口中 BaseChartGlyph
draw
在接口中 Glyph
draw
在类中 ChartGlyph<VanChartPlotGlyph,VanChartLegendGlyph,VanChartDataSheetGlyph>
g
- 图形对象resolution
- 分辨率public JSONObject toJSONObject(Repository repo, double width, double height) throws JSONException
public boolean isChartSupportCanvas()