public class VanChartPiePlotGlyph extends VanChartPlotGlyph
限定符和类型 | 类和说明 |
---|---|
protected class |
VanChartPiePlotGlyph.PointAndAngle |
限定符和类型 | 字段和说明 |
---|---|
protected static int |
ANGLE |
protected static double |
FIRST_QUA |
protected static double |
FOUTH_QUA |
protected java.util.ArrayList |
leftDown |
protected java.util.ArrayList |
leftUp |
protected static double |
MOVE_GAP |
protected static double |
RADIO_PERCENT |
protected double |
radius |
protected static double |
RADIUS_MIN_PERCENR |
protected static double |
RADIUS_PERCENT_DIFF |
protected double |
radiusPercent |
protected java.util.ArrayList |
rightDown |
protected java.util.ArrayList |
rightUp |
protected static double |
SECOND_QUA |
static double |
START_ANGLE |
protected static double |
THRID_QUA |
protected static double |
WHEN_MORE_RAD |
defaultAttrLabel, defaultAttrTooltip, legendBackgroundMap, legendItemList
CATEGORY_PARA, conditionCollection, DEFAULT_SIZE, plotStyle, RESET_JAVA_FONT_X, SERIES_PARA, seriesList, STACK, X_AXIS, X_PARA, Y_AXIS, Y_PARA
bounds, visible
构造器和说明 |
---|
VanChartPiePlotGlyph() |
限定符和类型 | 方法和说明 |
---|---|
protected void |
addNotNullSeriesJSON(JSONObject js,
Repository repo,
ChartWebPara para)
系列写入json
|
protected void |
bubbleSort(java.util.ArrayList list,
boolean isIncrease) |
void |
calculateDataPointPercentValue()
计算数据点的占比,用的是各个数值的绝对值.
|
protected void |
clearList() |
java.awt.Color[] |
createColors4Series()
为每个系列创建颜色数组
|
protected double |
dealEachArea(java.util.ArrayList pointArray,
int resolution,
int categoryIndex) |
protected void |
dealLabelBoundsOverLay(java.util.ArrayList pointArray,
int resolution,
int changedTimes,
double minAngle,
double maxAngle,
boolean isAdd)
标签牵引线算法描述
1、排序:四块区域分别排序,左上方和右下方,按照角度从小到大排序,
左下方和右上方,按照从大到小排序
2、计算位置及调整:四块区域按照排好序的数组计算“本身应该有”的位置,
如果当前位置被占用,则调整角度
3、调整角度方法:左上方和右下方每次增加1度,直至调整到水平位置如果还没找到,则不画标签,
左下方和右上方每次减少一个角度,直至调整到水平位置,如果还没找到,则不画标签
更改:只尝试计算一遍位置,只像水平方向调整,如果正反方向都调整,则会出现交叉
|
java.lang.String |
demoImagePath() |
java.lang.String |
getChartType() |
double |
getEndAngle() |
double |
getInnerRadiusPercent() |
protected java.awt.geom.Dimension2D |
getLabelDim(DataPoint dataPoint,
int resolution) |
LineMarkerIcon |
getLegendMarkerIcon(VanChartDataSeries dataSeries,
java.awt.Color[] colors) |
protected double |
getPercent(int seriesIndex,
int categoryIndex)
值对应的角度 比*
|
JSONObject |
getPlotOptionsJSON(Repository repo,
boolean isJsDraw,
ChartWebPara para)
获取 plotOptions的JSON对象
|
VanChartRadiusGlyph |
getRadiusGlyph() |
ChartRoseType |
getRoseType() |
protected double |
getSeriesStartAngle(int categoryIndex,
int seriesIndex) |
double |
getStartAngle() |
protected double |
getWholeAngle() |
boolean |
isExistAttrByResult(Result result,
java.lang.Class targetClass)
判断是否对某个Result进行条件设置
|
protected boolean |
isExistOuterLabels() |
boolean |
isSupportRotation()
返回是否支持旋转
|
void |
layoutDataSeriesGlyph(int resolution)
一个饼图 是一个分类.
|
void |
setEndAngle(double endAngle) |
void |
setInnerRadiusPercent(double innerRadiusPercent) |
void |
setRadiusGlyph(VanChartRadiusGlyph radiusGlyph) |
void |
setRoseType(ChartRoseType roseType) |
void |
setStartAngle(double startAngle) |
void |
setSupportRotation(boolean supportRotation) |
protected void |
sortList(boolean isOverLay)
如果是在尝试是否画的下时,各个数组按照弧度从小到大排序
如果是处理标签覆盖问题,各个数组的弧度按照从高到低排序
(接近中心点水平线为低)
|
addAlphaJSON, addBorderJSON, addHyperlinkJSON, addLabelJSON, addNullLabelJSON, addOtherJSON, addSeriesJSON, addSeriesJSONWithCate2Series, addXAxisJSON, addYAxisJSON, allNullValue, changeInfoWithCondition, createColors4Legend, createDataLabel4DataPointWithCondition, createDataLabel4EveryPoint, createDataLabel4EverySeries, createDataPointLabelAfterInstallAxisGlyph, createDataSheetLegendItems, createLegendItems, dealDataPointLabel, dealMarkerIconCondition, dealMarkerIconCondition4DataSheet, dealSeriesAccumulatedColors, draw, drawInfo, drawWithoutInfo, getAttrAlpha, getAttrAlpha, getAttrBackground, getAttrBorder, getAttrLabel, getAttrLineColor, getAxisPlotType, getCategoryNum, getChartID, getDataPointLabelBoundsWithPosition, getDefaultAttrAlpha, getDefaultAttrBorder, getDefaultAttrBubble, getDefaultAttrLabel, getDefaultAttrMarker, getDefaultAttrTooltip, getDefaultColors, getDefaultColors, getHyperLinkParas, getLabelText, getLegendItemList, getLegendSeriesSize, getMinMaxValue, getPlotGlyphType, getPointkey, getPointValue, getSeries, getSeriesFromAll, getSerieskey, getSmallIconType, isAxisRotation, isLocal, isSupportEmptyData, isTreeSeries, layoutAxisGlyph, layoutAxisGlyph, setAxisPlotType, setAxisRotation, setCategoryNum, setChartID, setHyperLinkParas, setLegendItemList, setLocal, setUseDefaultNullData
addECNameToHyperLink, addOtherJSON, addSeries, addSeriesJSON, addSeriesJSON, avoidCoverLabelBounds, axisExtendsMaxMinValueWithTrendLine, calculateOrderList, clone, createColors4Cate, createDataSheetGlyph, dealDataPointLabel, dealLabelBoundsInOrder, dealLabelBoundsOutPlotBounds, dealPlotHotAttr, doLayout, drawInfo, drawLabel4Series, drawShape4Series, equals, getAdditionalCanvasCount, getAllDataPointGlyph, getAllTrendLineGlyph, getAutoRefreshPerSecond, getCategoryCount, getCombinedSize, getConditionCollection, getDataPointLabelBoundsWithPosition, getDataPointLabelBoundsWithPosition, getDataPointLabelBoundsWithPosition4Line, getDataProcessor, getDrawSequence, getExtraLabelValue, getExtraTooltipValue, getFirstDataPoint, getHotHyperLink, getHotTooltipStyle, getPlotDetailType, getPlotFillStyle, getPlotStyle, getPreGap4AxisRightUnit, getPreGap4AxisTopUnit, getPreLeft4DataSheet, getSeriesSize, getVanChartType, getWholeChartBackground, getXDivideUnit, getYDivideUnit, is3DPlotGlyph, isDataPointXNotInPlotBounds, isNeedDealHotHyperlink, isNullValueBreak, isSeriesDragEnable, isSupportLegend, isSupportZoom, isZoom, notDealDataPointLabel, resetClip, selectableChildren, setAutoRefreshPerSecond, setCombinedSize, setConditionCollection, setDataProcessor, setHotHyperLink, setHotTooltipStyle, setIsNullValueBreak, setPlotFillStyle, setPlotStyle, setSeriesDragEnable, setWholeChartBackground, setZoom, skipDealPointHotAttr, toJSONObject, trendLineFitting
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, toVanJSONObject
protected static final int ANGLE
protected transient double radius
protected transient java.util.ArrayList leftUp
protected transient java.util.ArrayList rightUp
protected transient java.util.ArrayList leftDown
protected transient java.util.ArrayList rightDown
protected double radiusPercent
public static final double START_ANGLE
protected static final double FIRST_QUA
protected static final double SECOND_QUA
protected static final double THRID_QUA
protected static final double FOUTH_QUA
protected static final double WHEN_MORE_RAD
protected static final double MOVE_GAP
protected static final double RADIO_PERCENT
protected static final double RADIUS_PERCENT_DIFF
protected static final double RADIUS_MIN_PERCENR
public VanChartRadiusGlyph getRadiusGlyph()
public void setRadiusGlyph(VanChartRadiusGlyph radiusGlyph)
public void setEndAngle(double endAngle)
public void setInnerRadiusPercent(double innerRadiusPercent)
public void setRoseType(ChartRoseType roseType)
public void setStartAngle(double startAngle)
public ChartRoseType getRoseType()
public double getStartAngle()
public double getInnerRadiusPercent()
public double getEndAngle()
public void setSupportRotation(boolean supportRotation)
public boolean isSupportRotation()
public LineMarkerIcon getLegendMarkerIcon(VanChartDataSeries dataSeries, java.awt.Color[] colors)
getLegendMarkerIcon
在类中 VanChartPlotGlyph
public void layoutDataSeriesGlyph(int resolution)
layoutDataSeriesGlyph
在类中 VanChartPlotGlyph
resolution
- 分辨率protected double getSeriesStartAngle(int categoryIndex, int seriesIndex)
protected double getPercent(int seriesIndex, int categoryIndex)
protected double getWholeAngle()
protected java.awt.geom.Dimension2D getLabelDim(DataPoint dataPoint, int resolution)
protected void clearList()
protected void sortList(boolean isOverLay)
isOverLay
- protected void bubbleSort(java.util.ArrayList list, boolean isIncrease)
protected boolean isExistOuterLabels()
protected double dealEachArea(java.util.ArrayList pointArray, int resolution, int categoryIndex)
protected void dealLabelBoundsOverLay(java.util.ArrayList pointArray, int resolution, int changedTimes, double minAngle, double maxAngle, boolean isAdd)
更改:只尝试计算一遍位置,只像水平方向调整,如果正反方向都调整,则会出现交叉
public boolean isExistAttrByResult(Result result, java.lang.Class targetClass)
isExistAttrByResult
在类中 PlotGlyph<VanChartDataSeries>
result
- 需要判断的对象targetClass
- 是否存在的条件public void calculateDataPointPercentValue()
public JSONObject getPlotOptionsJSON(Repository repo, boolean isJsDraw, ChartWebPara para) throws JSONException
getPlotOptionsJSON
在类中 VanChartPlotGlyph
repo
- 请求isJsDraw
- 动态展示para
- JSONException
- 抛出问题public java.lang.String demoImagePath()
demoImagePath
在类中 VanChartPlotGlyph
public java.lang.String getChartType()
getChartType
在类中 PlotGlyph<VanChartDataSeries>
protected void addNotNullSeriesJSON(JSONObject js, Repository repo, ChartWebPara para) throws JSONException
addNotNullSeriesJSON
在类中 VanChartPlotGlyph
js
- json对象repo
- 请求para
- JSONException
- 抛错public java.awt.Color[] createColors4Series()
VanChartPlotGlyph
createColors4Series
在类中 VanChartPlotGlyph