218 KiB
sidebar_position, slug
| sidebar_position | slug |
|---|---|
| 41 | /api |
API手册
所有类
- Align
- AngleAxis
- AngleAxisTheme
- AnimationAddition
- AnimationChange
- AnimationEasing
- AnimationExchange
- AnimationFadeIn
- AnimationFadeOut
- AnimationHiding
- AnimationInfo
- AnimationInfoContext
- AnimationInteraction
- AnimationStyle
- AnimationStyleHelper
- AnimationType
- AreaStyle
- AreaStyle.AreaOrigin
- ArrowStyle
- Axis
- Axis.AxisMinMaxType
- Axis.AxisPosition
- Axis.AxisType
- Axis3DHelper
- AxisAnimation
- AxisContext
- AxisHandler<T>
- AxisHelper
- AxisLabel
- AxisLine
- AxisMinorSplitLine
- AxisMinorTick
- AxisName
- AxisSplitArea
- AxisSplitLine
- AxisTheme
- AxisTick
- Background
- Bar
- BarChart
- BarType
- BaseAxisTheme
- BaseChart
- BaseGraph
- BaseLine
- BaseScatter
- BaseSerie
- BlurStyle
- BorderStyle
- CalendarCoord
- Candlestick
- CandlestickChart
- ChartCached
- ChartConst
- ChartDrawer
- ChartHelper
- ChartLabel
- ChartObject
- ChartText
- CheckHelper
- ChildComponent
- ColorUtil
- Comment
- CommentItem
- CommentLayer
- CommentMarkStyle
- ComponentHandlerAttribute
- ComponentHelper
- ComponentTheme
- CoordOptionsAttribute
- CoordSystem
- DataHelper
- DataZoom
- DataZoom.FilterMode
- DataZoom.RangeMode
- DataZoomContext
- DataZoomHelper
- DataZoomTheme
- DateTimeUtil
- DebugInfo
- DefaultAnimationAttribute
- DefaultTooltipAttribute
- DefineSymbolsUtil
- EffectScatter
- EmphasisStyle
- EmphasisStyle.BlurScope
- EmphasisStyle.FocusType
- EndLabelStyle
- FormatterHelper
- GraphData
- GraphEdge
- GraphNode
- GridCoord
- GridCoord3D
- GridCoord3DContext
- GridCoordContext
- GridLayout
- GridLayoutContext
- Heatmap
- HeatmapChart
- HeatmapType
- IconStyle
- IconStyle.Layer
- IgnoreDoc
- ImageStyle
- Indicator
- INeedSerieContainer
- InputHelper
- InteractData
- IPropertyChanged
- ISerieComponent
- ISerieContainer
- ISerieDataComponent
- ISimplifiedSerie
- ItemStyle
- IUpdateRuntimeData
- JsonUtil
- LabelLine
- LabelLine.LineType
- LabelStyle
- LabelStyle.Position
- Lang
- LangCandlestick
- LangTime
- LayerHelper
- Legend
- Legend.SelectedMode
- Legend.Type
- LegendContext
- LegendHelper
- LegendItem
- LegendTheme
- Level
- LevelStyle
- Line
- LineArrow
- LineArrow.Position
- LineChart
- LineHelper
- LineStyle
- LineStyle.Type
- LineType
- ListFor
- ListForComponent
- ListForSerie
- ListPool<T>
- Location
- Location.Align
- MainComponent
- MainComponentContext
- MainComponentHandler
- MainComponentHandler<T>
- MarkArea
- MarkAreaData
- MarkAreaType
- MarkLine
- MarkLineData
- MarkLineType
- MarqueeStyle
- MathUtil
- MLValue
- MLValue.Type
- MonoBehaviour
- Orient
- Padding
- Painter
- Painter.Type
- Parallel
- ParallelAxis
- ParallelChart
- ParallelCoord
- ParallelCoordContext
- Pie
- PieChart
- PolarAxisTheme
- PolarChart
- PolarCoord
- PolarCoordContext
- PropertyUtil
- Radar
- RadarAxisTheme
- RadarChart
- RadarCoord
- RadarCoord.PositionType
- RadarCoord.Shape
- RadarCoordContext
- RadarType
- RadiusAxis
- RadiusAxisTheme
- ReflectionUtil
- RequireChartComponentAttribute
- Ring
- RingChart
- RoseType
- RuntimeUtil
- SampleType
- Scatter
- ScatterChart
- SelectStyle
- Serie
- SerieColorBy
- SerieComponentAttribute
- SerieContext
- SerieConvertAttribute
- SerieData
- SerieDataComponentAttribute
- SerieDataContext
- SerieDataExtraFieldAttribute
- SerieDataLink
- SerieDataSortType
- SerieEventData
- SerieEventDataPool
- SerieHandler
- SerieHandler<T>
- SerieHandlerAttribute
- SerieHelper
- SerieLabelHelper
- SerieLabelPool
- SerieParams
- SeriesHelper
- SerieState
- SerieSymbol
- SerieTheme
- Settings
- SimplifiedBar
- SimplifiedBarChart
- SimplifiedCandlestick
- SimplifiedCandlestickChart
- SimplifiedLine
- SimplifiedLineChart
- Since
- SingleAxis
- SingleAxisCoord
- StageColor
- StateStyle
- SubTitleTheme
- SVG
- SVGPath
- SVGPathSeg
- SVGPathSegType
- SymbolSizeType
- SymbolStyle
- SymbolType
- TextLimit
- TextPadding
- TextStyle
- Theme
- ThemeStyle
- ThemeType
- Title
- TitleStyle
- TitleTheme
- Tooltip
- Tooltip.Position
- Tooltip.Trigger
- Tooltip.TriggerOn
- Tooltip.Type
- TooltipContext
- TooltipData
- TooltipHelper
- TooltipTheme
- TooltipView
- TooltipViewItem
- UGL
- UGL.Direction
- UGLExample
- UGLHelper
- UIComponent
- UIComponentTheme
- UIHelper
- ViewControl
- VisualMap
- VisualMap.SelectedMode
- VisualMap.Type
- VisualMapContext
- VisualMapHelper
- VisualMapRange
- VisualMapTheme
- Wrapper<T>
- XAxis
- XAxis3D
- XChartsMgr
- XCResourceImporterWindow
- XCResourcesImporter
- XCSettings
- XCThemeMgr
- XLog
- YAxis
- YAxis3D
- ZAxis3D
Align
class in XCharts.Runtime
对齐方式。文本,图标,图形等的对齐方式。
可选:
Center: 对齐方式。文本,图标,图形等的对齐方式。Left: 对齐方式。文本,图标,图形等的对齐方式。Right: 对齐方式。文本,图标,图形等的对齐方式。
AngleAxis
class in XCharts.Runtime / 继承自: Axis
极坐标系的角度轴。
AngleAxis.GetValueAngle
public float GetValueAngle(double value)
AngleAxis.SetDefaultValue
public override void SetDefaultValue()
AngleAxisTheme
class in XCharts.Runtime / 继承自: BaseAxisTheme
AngleAxisTheme.base(theme)
public AngleAxisTheme(ThemeType theme) : base(theme)
AngleAxisTheme.AngleAxisTheme
public AngleAxisTheme(ThemeType theme) : base(theme) { }
AnimationAddition
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.8.0开始支持
数据新增动画。
AnimationChange
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.8.0开始支持
数据变更动画。
AnimationEasing
class in XCharts.Runtime
可选:
Linear:
AnimationExchange
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.15.0开始支持
数据交换动画。一般用于图表数据排序时顺序变化的动画。
AnimationFadeIn
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.8.0开始支持
淡入动画。
AnimationFadeOut
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.8.0开始支持
淡出动画。
AnimationHiding
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.8.0开始支持
数据隐藏动画。
AnimationInfo
class in XCharts.Runtime / 子类: AnimationFadeIn,AnimationFadeOut,AnimationChange,AnimationAddition,AnimationHiding,AnimationInteraction,AnimationExchange
从
v3.8.0开始支持
动画配置参数。
AnimationInfo.delay
public float delay
动画开始前的延迟时间。
AnimationInfo.delayFunction
public AnimationDelayFunction delayFunction
动画延迟的委托函数。
AnimationInfo.duration
public float duration
动画的时长。默认用于计算动画的速度。也可以通过speed指定速度。
AnimationInfo.durationFunction
public AnimationDurationFunction durationFunction
动画时长的委托函数。
AnimationInfo.enable
public bool enable
是否开启动画效果。
AnimationInfo.OnAnimationEnd
public Action OnAnimationEnd
动画结束的回调。
AnimationInfo.OnAnimationStart
public Action OnAnimationStart
动画开始的回调。
AnimationInfo.reverse
public bool reverse
是否开启反向动画效果。
AnimationInfo.speed
public float speed
动画的速度。当指定speed时,duration将失效。默认为0,表示不指定速度。
AnimationInfo.End
public void End()
结束动画。
AnimationInfo.GetIndexDelay
public float GetIndexDelay(int dataIndex)
获取动画延迟。
AnimationInfo.Init
public bool Init(float curr, float dest, int totalPointIndex)
初始化动画。
AnimationInfo.IsFinish
public bool IsFinish()
动画是否结束。
AnimationInfo.IsInDelay
public bool IsInDelay()
动画是否在延迟中。
AnimationInfo.IsInIndexDelay
public bool IsInIndexDelay(int dataIndex)
动画是否在索引延迟中。
AnimationInfo.Pause
public void Pause()
暂停动画。
AnimationInfo.Reset
public void Reset()
重置动画。
AnimationInfo.Resume
public void Resume()
恢复动画。
AnimationInfo.Start
public void Start(bool reset = true)
开始动画。
AnimationInfoContext
class in XCharts.Runtime
AnimationInteraction
class in XCharts.Runtime / 继承自: AnimationInfo
从
v3.8.0开始支持
交互动画。
AnimationInteraction.offset
public MLValue offset
交互的多样式数值。如饼图的扇形选中时的偏移。
AnimationInteraction.radius
public MLValue radius
半径的多样式数值。
AnimationInteraction.width
public MLValue width
宽度的多样式数值。
AnimationInteraction.GetOffset
public float GetOffset()
AnimationInteraction.GetRadius
public float GetRadius(float radius)
AnimationInteraction.GetWidth
public float GetWidth(float width)
AnimationStyle
class in XCharts.Runtime / 继承自: ChildComponent
动画组件,用于控制图表的动画播放。支持配置五种动画表现:FadeIn(渐入动画),FadeOut(渐出动画),Change(变更动画),Addition(新增动画),Interaction(交互动画),Exchange(交换动画)。 按作用的对象可以分为两类:SerieAnimation(系列动画)和DataAnimation(数据动画)。
AnimationStyle.addition
public AnimationAddition addition
数据新增动画配置。
AnimationStyle.change
public AnimationChange change
数据变更动画配置。
AnimationStyle.enable
public bool enable
是否开启动画效果。
AnimationStyle.exchange
public AnimationExchange exchange
交换动画配置。如在排序柱图中有效。
AnimationStyle.fadeIn
public AnimationFadeIn fadeIn
渐入动画配置。
AnimationStyle.fadeInFinishCallback
public Action fadeInFinishCallback
AnimationStyle.fadeOut
public AnimationFadeOut fadeOut
渐出动画配置。
AnimationStyle.fadeOutFinishCallback
public Action fadeOutFinishCallback
AnimationStyle.hiding
public AnimationHiding hiding
数据隐藏动画配置。
AnimationStyle.interaction
public AnimationInteraction interaction
交互动画配置。
AnimationStyle.threshold
public int threshold
是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。
AnimationStyle.unscaledTime
public bool unscaledTime
动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。
AnimationStyle.Addition
public void Addition()
开始数据新增动画。
AnimationStyle.CanCheckInteract
public bool CanCheckInteract()
AnimationStyle.CheckDetailBreak
public bool CheckDetailBreak(Vector3 pos, bool isYAxis)
AnimationStyle.CheckProgress
public void CheckProgress(double total)
AnimationStyle.CheckSymbol
public void CheckSymbol(float dest)
AnimationStyle.FadeIn
public void FadeIn()
开始渐入动画。
AnimationStyle.FadeOut
public void FadeOut()
开始渐出动画。
AnimationStyle.GetAdditionDuration
public float GetAdditionDuration()
AnimationStyle.GetChangeDuration
public float GetChangeDuration()
AnimationStyle.GetCurrDetail
public float GetCurrDetail()
AnimationStyle.GetCurrIndex
public int GetCurrIndex()
AnimationStyle.GetCurrRate
public float GetCurrRate()
AnimationStyle.GetExchangeDuration
public float GetExchangeDuration()
AnimationStyle.GetInteractionDuration
public float GetInteractionDuration()
AnimationStyle.GetInteractionRadius
public float GetInteractionRadius(float radius)
AnimationStyle.GetSysmbolSize
public float GetSysmbolSize(float dest)
AnimationStyle.HasFadeOut
public bool HasFadeOut()
AnimationStyle.InitProgress
public void InitProgress(List<Vector3> paths, bool isY)
初始化动画配置。
AnimationStyle.IsDataAnimation
public bool IsDataAnimation()
是否为数据动画。BottomToTop和InsideOut类型的为数据动画。
AnimationStyle.IsEnd
public bool IsEnd()
AnimationStyle.IsFadeIn
public bool IsFadeIn()
AnimationStyle.IsFadeOut
public bool IsFadeOut()
AnimationStyle.IsFinish
public bool IsFinish()
AnimationStyle.IsInDelay
public bool IsInDelay()
AnimationStyle.IsSerieAnimation
public bool IsSerieAnimation()
是否为系列动画。LeftToRight、AlongPath和Clockwise类型的为系列动画。
AnimationStyle.Pause
public void Pause()
暂停所有动画。
AnimationStyle.Reset
public void Reset()
Reset all animations.
AnimationStyle.Restart
public void Restart()
重启当前激活的动画。
AnimationStyle.Resume
public void Resume()
恢复所有动画。
AnimationStyleHelper
class in XCharts.Runtime
AnimationStyleHelper.CheckDataAnimation
public static float CheckDataAnimation(BaseChart chart, Serie serie, int dataIndex, float destProgress, float startPorgress = 0)
AnimationStyleHelper.GetAnimationPosition
public static bool GetAnimationPosition(AnimationStyle animation, bool isY, Vector3 lp, Vector3 cp, float progress, ref Vector3 ip, ref float rate)
AnimationStyleHelper.UpdateAnimationType
public static void UpdateAnimationType(AnimationStyle animation, AnimationType defaultType, bool enableSerieDataAnimation)
AnimationStyleHelper.UpdateSerieAnimation
public static void UpdateSerieAnimation(Serie serie)
AnimationType
class in XCharts.Runtime
可选:
Default: 默认。内部会根据实际情况选择一种动画播放方式。LeftToRight: 从左往右播放动画。BottomToTop: 从下往上播放动画。InsideOut: 由内到外播放动画。AlongPath: 沿着路径播放动画。当折线图从左到右无序或有折返时,可以使用该模式。Clockwise: 顺时针播放动画。
AreaStyle
class in XCharts.Runtime / 继承自: ChildComponent,ISerieComponent,ISerieDataComponent
区域填充样式。
AreaStyle.GetColor
public Color32 GetColor(Color32 themeColor)
AreaStyle.AreaOrigin
class in XCharts.Runtime
图形区域的起始位置。默认情况下,图形会从坐标轴轴线到数据间进行填充。如果需要填充的区域是坐标轴最大值到数据间,或者坐标轴最小值到数据间,则可以通过这个配置项进行设置。
可选:
Auto: 填充坐标轴轴线到数据间的区域。Start: 填充坐标轴底部到数据间的区域。End: 填充坐标轴顶部到数据间的区域。
ArrowStyle
class in XCharts.Runtime / 继承自: ChildComponent
ArrowStyle.Clone
public ArrowStyle Clone()
ArrowStyle.Copy
public void Copy(ArrowStyle arrow)
ArrowStyle.GetColor
public Color32 GetColor(Color32 defaultColor)
Axis
class in XCharts.Runtime / 继承自: MainComponent / 子类: AngleAxis,ParallelAxis,RadiusAxis,SingleAxis,XAxis,XAxis3D,YAxis,YAxis3D,ZAxis3D
直角坐标系的坐标轴组件。
Axis.onLabelClick
public Action<int, string> onLabelClick
从
v3.15.0开始支持
点击文本标签回调函数。参数:labelIndex, labelName。
Axis.AddData
public void AddData(string category)
添加一个类目到类目数据列表
Axis.AddIcon
public void AddIcon(Sprite icon)
添加图标
Axis.ClearComponentDirty
public override void ClearComponentDirty()
Axis.ClearData
public override void ClearData()
清空类目数据
Axis.ClearVerticesDirty
public override void ClearVerticesDirty()
Axis.Clone
public Axis Clone()
Axis.Copy
public void Copy(Axis axis)
Axis.GetAddedDataCount
public int GetAddedDataCount()
获得添加过的历史数据总数
Axis.GetCategoryPosition
public Vector3 GetCategoryPosition(int categoryIndex, int dataCount = 0)
Axis.GetData
public string GetData(int index, DataZoom dataZoom)
获得在dataZoom范围内指定索引的类目数据
Axis.GetDistance
public float GetDistance(double value, float axisLength = 0)
获得值在坐标轴上的距离
Axis.GetIcon
public Sprite GetIcon(int index)
Axis.GetLabelValue
public double GetLabelValue(int index)
Axis.GetLastLabelValue
public double GetLastLabelValue()
Axis.GetLogMaxIndex
public double GetLogMaxIndex()
Axis.GetLogMinIndex
public double GetLogMinIndex()
Axis.GetLogValue
public float GetLogValue(double value)
Axis.GetValueLength
public float GetValueLength(double value, float axisLength)
Axis.IsBottom
public bool IsBottom()
Axis.IsCategory
public bool IsCategory()
是否为类目轴。
Axis.IsLeft
public bool IsLeft()
Axis.IsLog
public bool IsLog()
是否为对数轴。
Axis.IsNeedShowLabel
public bool IsNeedShowLabel(int index, int total = 0, string content = null)
Axis.IsRight
public bool IsRight()
Axis.IsTime
public bool IsTime()
是否为时间轴。
Axis.IsTop
public bool IsTop()
Axis.IsValue
public bool IsValue()
是否为数值轴。
Axis.RemoveData
public void RemoveData(int dataIndex)
Axis.ResetStatus
public override void ResetStatus()
重置状态。
Axis.SetComponentDirty
public override void SetComponentDirty()
Axis.SetNeedUpdateFilterData
public void SetNeedUpdateFilterData()
Axis.UpdateData
public void UpdateData(int index, string category)
更新类目数据
Axis.UpdateIcon
public void UpdateIcon(int index, Sprite icon)
更新图标
Axis.UpdateZeroOffset
public void UpdateZeroOffset(float axisLength)
Axis.AxisMinMaxType
class in XCharts.Runtime
坐标轴最大最小刻度显示类型。
可选:
Default: 0-最大值。MinMax: 最小值-最大值。Custom: 自定义最小值最大值。MinMaxAuto: [since("v3.7.0")]最小值-最大值。自动计算合适的值。
Axis.AxisPosition
class in XCharts.Runtime
坐标轴在Grid中的位置
可选:
Left: 坐标轴在Grid中的位置Right: 坐标轴在Grid中的位置Bottom: 坐标轴在Grid中的位置Top: 坐标轴在Grid中的位置Center: 坐标轴在Grid中的位置
Axis.AxisType
class in XCharts.Runtime
坐标轴类型。
可选:
Value: 数值轴。适用于连续数据。Category: 类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。serie的数据第0维数据对应坐标轴data的index。Log: 对数轴。适用于对数数据。Time: 时间轴。适用于连续的时序数据。
Axis3DHelper
class in XCharts.Runtime
Axis3DHelper.Get3DGridPosition
public static Vector3 Get3DGridPosition(GridCoord3D grid, XAxis3D xAxis, YAxis3D yAxis, double xValue, double yValue)
Axis3DHelper.GetLabelPosition
public static Vector3 GetLabelPosition(int i, Axis axis, Axis relativedAxis, AxisTheme theme, float scaleWid)
AxisAnimation
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.9.0开始支持
坐标轴动画配置。
AxisAnimation.Clone
public AxisAnimation Clone()
AxisAnimation.Copy
public void Copy(AxisAnimation animation)
AxisContext
class in XCharts.Runtime / 继承自: MainComponentContext
AxisContext.destMaxValue
public double destMaxValue
AxisContext.destMinValue
public double destMinValue
AxisContext.labelObjectList
public List<ChartLabel> labelObjectList
AxisContext.labelValueList
public List<double> labelValueList
AxisContext.lastMaxValue
public double lastMaxValue
当前最大值。
AxisContext.lastMinValue
public double lastMinValue
当前最小值。
AxisContext.needAnimation
public bool needAnimation
AxisContext.runtimeData
public List<string> runtimeData
数值轴时每个tick的数值。
AxisContext.sortedDataIndices
public List<int> sortedDataIndices
AxisHandler<T>
class in XCharts / 继承自: MainComponentHandler
AxisHandler<T>.component
public T component
AxisHandler<T>.DrawTop
// public override void DrawTop(VertexHelper vh)
AxisHandler<T>.OnPointerClick
public override void OnPointerClick(PointerEventData eventData)
AxisHelper
class in XCharts.Runtime
AxisHelper.AdjustCircleLabelPos
public static void AdjustCircleLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)
AxisHelper.AdjustMinMaxValue
public static void AdjustMinMaxValue(Axis axis, ref double minValue, ref double maxValue, bool needFormat, double ceilRate = 0)
调整最大最小值
AxisHelper.AdjustRadiusAxisLabelPos
public static void AdjustRadiusAxisLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)
AxisHelper.GetAxisLineArrowOffset
public static float GetAxisLineArrowOffset(Axis axis)
包含箭头偏移的轴线长度
AxisHelper.GetAxisPosition
public static float GetAxisPosition(GridCoord grid, Axis axis, double value, int dataCount = 0, DataZoom dataZoom = null)
AxisHelper.GetAxisPositionValue
public static double GetAxisPositionValue(float xy, float axisLength, double axisRange, float axisStart, float axisOffset)
AxisHelper.GetAxisValueDistance
public static float GetAxisValueDistance(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上相对起点的距离
AxisHelper.GetAxisValueLength
public static float GetAxisValueLength(GridCoord grid, Axis axis, float scaleWidth, double value, float gap = 0)
获得数值value在坐标轴上对应的长度
AxisHelper.GetAxisValuePosition
public static float GetAxisValuePosition(GridCoord grid, Axis axis, float scaleWidth, double value)
获得数值value在坐标轴上的坐标位置
AxisHelper.GetAxisValueSplitIndex
public static int GetAxisValueSplitIndex(Axis axis, double value, bool checkMaxCache, int totalSplitNumber = -1)
获得数值value在坐标轴上对应的split索引
AxisHelper.GetAxisXOrY
public static float GetAxisXOrY(GridCoord grid, Axis axis, Axis relativedAxis)
AxisHelper.GetDataWidth
public static float GetDataWidth(Axis axis, float coordinateWidth, int dataCount, DataZoom dataZoom)
获得一个类目数据在坐标系中代表的宽度
AxisHelper.GetEachWidth
public static float GetEachWidth(Axis axis, float coordinateWidth, DataZoom dataZoom = null)
AxisHelper.GetScaleNumber
public static int GetScaleNumber(Axis axis, float coordinateWidth, DataZoom dataZoom = null)
获得分割线条数
AxisHelper.GetScaleWidth
public static float GetScaleWidth(Axis axis, float coordinateWidth, int index, DataZoom dataZoom = null)
获得分割段宽度
AxisHelper.GetSplitNumber
public static int GetSplitNumber(Axis axis, float coordinateWid, DataZoom dataZoom)
获得分割段数
AxisHelper.GetTotalSplitGridNum
public static int GetTotalSplitGridNum(Axis axis)
获得分割网格个数,包含次刻度
AxisHelper.GetXAxisXOrY
public static float GetXAxisXOrY(GridCoord grid, Axis xAxis, Axis relativedAxis)
AxisHelper.GetYAxisXOrY
public static float GetYAxisXOrY(GridCoord grid, Axis yAxis, Axis relativedAxis)
AxisHelper.NeedShowSplit
public static bool NeedShowSplit(Axis axis)
AxisLabel
class in XCharts.Runtime / 继承自: LabelStyle
坐标轴刻度标签的相关设置。
AxisLabel.componentDirty
public override bool componentDirty
AxisLabel.ClearComponentDirty
public override void ClearComponentDirty()
AxisLabel.Clone
public new AxisLabel Clone()
AxisLabel.Copy
public void Copy(AxisLabel axisLabel)
AxisLabel.GetFormatterContent
public override string GetFormatterContent(int labelIndex, int totalIndex, double value, double minValue, double maxValue, bool isLog = false)
AxisLabel.IsNeedShowLabel
public bool IsNeedShowLabel(int index, int total, string content = null)
AxisLabel.SetRelatedText
public void SetRelatedText(ChartText txt, float labelWidth)
AxisLine
class in XCharts.Runtime / 继承自: BaseLine
坐标轴轴线。
AxisLine.Clone
public AxisLine Clone()
AxisLine.Copy
public void Copy(AxisLine axisLine)
AxisMinorSplitLine
class in XCharts.Runtime / 继承自: BaseLine
从
v3.2.0开始支持
坐标轴在 grid 区域中的次分隔线。次分割线会对齐次刻度线 minorTick。
AxisMinorSplitLine.autoColor
public bool autoColor
自动设置颜色。
AxisMinorSplitLine.distance
public float distance
刻度线与轴线的距离。
AxisMinorSplitLine.vertsDirty
public override bool vertsDirty
AxisMinorSplitLine.ClearVerticesDirty
public override void ClearVerticesDirty()
AxisMinorSplitLine.Clone
public AxisMinorSplitLine Clone()
AxisMinorSplitLine.Copy
public void Copy(AxisMinorSplitLine splitLine)
AxisMinorTick
class in XCharts.Runtime / 继承自: BaseLine
从
v3.2.0开始支持
坐标轴次刻度相关设置。注意:次刻度无法在类目轴中使用。
AxisMinorTick.autoColor
public bool autoColor
AxisMinorTick.vertsDirty
public override bool vertsDirty
AxisMinorTick.ClearVerticesDirty
public override void ClearVerticesDirty()
AxisMinorTick.Clone
public AxisMinorTick Clone()
AxisMinorTick.Copy
public void Copy(AxisMinorTick axisTick)
AxisName
class in XCharts.Runtime / 继承自: ChildComponent
坐标轴名称。
AxisName.Clone
public AxisName Clone()
AxisName.Copy
public void Copy(AxisName axisName)
AxisSplitArea
class in XCharts.Runtime / 继承自: ChildComponent
坐标轴在 grid 区域中的分隔区域,默认不显示。
AxisSplitArea.Clone
public AxisSplitArea Clone()
AxisSplitArea.Copy
public void Copy(AxisSplitArea splitArea)
AxisSplitArea.GetColor
public Color32 GetColor(int index, BaseAxisTheme theme)
AxisSplitLine
class in XCharts.Runtime / 继承自: BaseLine
坐标轴在 grid 区域中的分隔线。
AxisSplitLine.autoColor
public bool autoColor
自动设置颜色。
AxisSplitLine.distance
public float distance
刻度线与轴线的距离。
AxisSplitLine.vertsDirty
public override bool vertsDirty
AxisSplitLine.ClearVerticesDirty
public override void ClearVerticesDirty()
AxisSplitLine.Clone
public AxisSplitLine Clone()
AxisSplitLine.Copy
public void Copy(AxisSplitLine splitLine)
AxisTheme
class in XCharts.Runtime / 继承自: BaseAxisTheme
AxisTheme.base(theme)
public AxisTheme(ThemeType theme) : base(theme)
AxisTheme.AxisTheme
public AxisTheme(ThemeType theme) : base(theme) { }
AxisTick
class in XCharts.Runtime / 继承自: BaseLine
坐标轴刻度相关设置。
AxisTick.autoColor
public bool autoColor
AxisTick.distance
public float distance
刻度线与轴线的距离。
AxisTick.Clone
public AxisTick Clone()
AxisTick.Copy
public void Copy(AxisTick axisTick)
Background
class in XCharts.Runtime / 继承自: MainComponent
背景组件。
Background.rect
public Rect rect
背景的矩形区域。
Background.SetDefaultValue
public override void SetDefaultValue()
Bar
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer
Bar.containerIndex
public int containerIndex
Bar.containterInstanceId
public int containterInstanceId
Bar.useSortData
public override bool useSortData
Bar.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
Bar.ConvertSerie
public static Bar ConvertSerie(Serie serie)
BarChart
class in XCharts.Runtime / 继承自: BaseChart
柱状图(或称条形图)是一种通过柱形的高度(横向的情况下则是宽度)来表现数据大小的一种常用图表类型。
BarChart.DefaultBarChart
public void DefaultBarChart()
默认条形图。
BarChart.DefaultCapsuleBarChart
public void DefaultCapsuleBarChart()
默认胶囊条形图。
BarChart.DefaultCapsuleColumnChart
public void DefaultCapsuleColumnChart()
胶囊柱状图。
BarChart.DefaultGroupedBarChart
public void DefaultGroupedBarChart()
默认分组条形图。
BarChart.DefaultGroupedColumnChart
public void DefaultGroupedColumnChart()
默认分组柱状图。
BarChart.DefaultPercentBarChart
public void DefaultPercentBarChart()
默认百分比条形图。
BarChart.DefaultPercentColumnChart
public void DefaultPercentColumnChart()
默认百分比柱状图。
BarChart.DefaultStackedBarChart
public void DefaultStackedBarChart()
默认堆叠条形图。
BarChart.DefaultStackedColumnChart
public void DefaultStackedColumnChart()
默认堆叠分组柱状图。
BarChart.DefaultZebraBarChart
public void DefaultZebraBarChart()
默认斑马条形图。
BarChart.DefaultZebraColumnChart
public void DefaultZebraColumnChart()
斑马柱状图。
BarType
class in XCharts.Runtime
柱状图类型。
可选:
Normal: 普通柱形图。Zebra: 斑马柱形图。Capsule: 胶囊柱形图。
BaseAxisTheme
class in XCharts.Runtime / 继承自: ComponentTheme / 子类: AxisTheme,RadiusAxisTheme,AngleAxisTheme,PolarAxisTheme,RadarAxisTheme
BaseAxisTheme.BaseAxisTheme
public BaseAxisTheme(ThemeType theme) : base(theme)
BaseAxisTheme.Copy
public void Copy(BaseAxisTheme theme)
BaseChart
class in XCharts.Runtime / 继承自: BaseGraph,ISerializationCallbackReceiver / 子类: BarChart,CandlestickChart,HeatmapChart,LineChart,ParallelChart,PieChart,PolarChart,RadarChart,RingChart,ScatterChart,SimplifiedBarChart,SimplifiedCandlestickChart,SimplifiedLineChart
BaseChart.axis)
public virtual void InitAxisRuntimeData(Axis axis)
BaseChart.chartHeight
public float chartHeight
图表的高
BaseChart.chartHideFlags
public override HideFlags chartHideFlags
BaseChart.chartMaxAnchor
public Vector2 chartMaxAnchor
BaseChart.chartMinAnchor
public Vector2 chartMinAnchor
BaseChart.chartPivot
public Vector2 chartPivot
BaseChart.chartPosition
public Vector3 chartPosition
图表的左下角起始坐标。
BaseChart.chartRect
public Rect chartRect
BaseChart.chartSizeDelta
public Vector2 chartSizeDelta
BaseChart.chartWidth
public float chartWidth
图表的宽
BaseChart.chartX
public float chartX
图表的X
BaseChart.chartY
public float chartY
图表的Y
BaseChart.components
public List<MainComponent> components
BaseChart.customDrawGaugePointerFunction
public CustomDrawGaugePointerFunction customDrawGaugePointerFunction
自定义仪表盘指针绘制委托。
BaseChart.debug
public DebugInfo debug
BaseChart.onAxisPointerValueChanged
public Action<Axis, double> onAxisPointerValueChanged
坐标轴变更数据索引时回调。参数:axis, dataIndex/dataValue
BaseChart.onDraw
public Action<VertexHelper> onDraw
自定义绘制回调。在绘制Serie前调用。
BaseChart.onDrawAfterSerie
public Action<VertexHelper, Serie> onDrawAfterSerie
自定义Serie绘制回调。在每个Serie绘制完后调用。
BaseChart.onDrawBeforeSerie
public Action<VertexHelper, Serie> onDrawBeforeSerie
自定义Serie绘制回调。在每个Serie绘制完前调用。
BaseChart.onDrawTop
public Action<VertexHelper> onDrawTop
自定义Top层绘制回调。在绘制Tooltip前调用。
BaseChart.onDrawUpper
public Action<VertexHelper> onDrawUpper
自定义Upper层绘制回调。在绘制Tooltip前调用。
BaseChart.onInit
public Action onInit
图表的初始化完成回调。
BaseChart.onLegendClick
public Action<Legend, int, string, bool> onLegendClick
点击图例按钮回调。参数:legendIndex, legendName, show
BaseChart.onLegendEnter
public Action<Legend, int, string> onLegendEnter
鼠标进入图例回调。参数:legendIndex, legendName
BaseChart.onLegendExit
public Action<Legend, int, string> onLegendExit
鼠标退出图例回调。参数:legendIndex, legendName
BaseChart.onPointerClickBar
public Action<PointerEventData, int> onPointerClickBar
点击柱形图柱条回调。参数:eventData, dataIndex
BaseChart.onPointerClickPie
public Action<PointerEventData, int, int> onPointerClickPie
点击饼图区域回调。参数:PointerEventData,SerieIndex,SerieDataIndex
BaseChart.onPointerEnterPie
public Action<int, int> onPointerEnterPie
鼠标进入和离开饼图区域回调,SerieDataIndex为-1时表示离开。参数:PointerEventData,SerieIndex,SerieDataIndex
BaseChart.onSerieClick
public Action<SerieEventData> onSerieClick
从
v3.6.0开始支持
鼠标点击Serie回调。
BaseChart.onSerieDown
public Action<SerieEventData> onSerieDown
从
v3.6.0开始支持
鼠标按下Serie回调。
BaseChart.onSerieEnter
public Action<SerieEventData> onSerieEnter
从
v3.6.0开始支持
鼠标进入Serie回调。
BaseChart.onSerieExit
public Action<SerieEventData> onSerieExit
从
v3.6.0开始支持
鼠标离开Serie回调。
BaseChart.onUpdate
public Action onUpdate
图表的Update回调。
BaseChart.series
public List<Serie> series
BaseChart.settings
public Settings settings
全局设置组件。
BaseChart.theme
public ThemeStyle theme
BaseChart.topPainter
public Painter topPainter
BaseChart.typeListForComponent
public Dictionary<Type, FieldInfo> typeListForComponent
BaseChart.typeListForSerie
public Dictionary<Type, FieldInfo> typeListForSerie
BaseChart.AddChartComponent
public MainComponent AddChartComponent(Type type)
BaseChart.AddChartComponent<T>
public T AddChartComponent<T>() where T : MainComponent
BaseChart.AddChartComponentWhenNoExist<T>
public T AddChartComponentWhenNoExist<T>() where T : MainComponent
BaseChart.AddData
public SerieData AddData(int serieIndex, DateTime time, double yValue, string dataName = null, string dataId = null)
添加(time,y)数据到指定的系列中。
public SerieData AddData(int serieIndex, double data, string dataName = null, string dataId = null)
添加一个数据到指定的系列中。
public SerieData AddData(int serieIndex, double indexOrTimestamp, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)
public SerieData AddData(int serieIndex, double xValue, double yValue, string dataName = null, string dataId = null)
添加(x,y)数据到指定系列中。
public SerieData AddData(int serieIndex, List<double> multidimensionalData, string dataName = null, string dataId = null)
添加多维数据(x,y,z...)到指定的系列中。
public SerieData AddData(int serieIndex, params double[] multidimensionalData)
添加多维数据(x,y,z...)到指定的系列中。
public SerieData AddData(string serieName, DateTime time, double yValue, string dataName = null, string dataId = null)
添加(time,y)数据到指定的系列中。
public SerieData AddData(string serieName, double indexOrTimestamp, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)
public SerieData AddData(string serieName, double xValue, double yValue, string dataName = null, string dataId = null)
添加(x,y)数据到指定系列中。
public SerieData AddData(string serieName, List<double> multidimensionalData, string dataName = null, string dataId = null)
添加多维数据(x,y,z...)到指定的系列中。
public SerieData AddData(string serieName, params double[] multidimensionalData)
添加多维数据(x,y,z...)到指定的系列中。
BaseChart.AddLink
public SerieDataLink AddLink(int serieIndex, string sourceId, string targetId, double value = 0)
添加一个关系图的关系数据。
BaseChart.AddSerie<T>
public T AddSerie<T>(string serieName = null, bool show = true, bool addToHead = false) where T : Serie
BaseChart.AddXAxisData
public void AddXAxisData(string category, int xAxisIndex = 0)
添加一个类目数据到指定的x轴。
BaseChart.AddXAxisIcon
public void AddXAxisIcon(Sprite icon, int xAxisIndex = 0)
添加一个图标到指定的x轴。
BaseChart.AddYAxisData
public void AddYAxisData(string category, int yAxisIndex = 0)
添加一个类目数据到指定的y轴。
BaseChart.AddYAxisIcon
public void AddYAxisIcon(Sprite icon, int yAxisIndex = 0)
添加一个图标到指定的y轴。
BaseChart.AnimationEnable
public void AnimationEnable(bool flag)
是否启用Serie动画。
BaseChart.AnimationFadeIn
public void AnimationFadeIn(bool reset = true)
开始所有Serie的渐入动画。
BaseChart.AnimationFadeOut
public void AnimationFadeOut()
开始所有Serie的渐出动画。
BaseChart.AnimationPause
public void AnimationPause()
暂停所有Serie的动画。
BaseChart.AnimationReset
public void AnimationReset()
重置所有Serie的动画。
BaseChart.AnimationResume
public void AnimationResume()
继续所有Serie的动画。
BaseChart.CanAddChartComponent
public bool CanAddChartComponent(Type type)
BaseChart.CanAddSerie
public bool CanAddSerie(Type type)
BaseChart.CanAddSerie<T>
public bool CanAddSerie<T>() where T : Serie
BaseChart.CancelTooltip
public void CancelTooltip()
从
v3.7.0开始支持
取消Tooltip.
BaseChart.CanMultipleComponent
public bool CanMultipleComponent(Type type)
BaseChart.ClampInChart
public void ClampInChart(ref Vector3 pos)
BaseChart.ClampInGrid
public Vector3 ClampInGrid(GridCoord grid, Vector3 pos)
BaseChart.ClearComponentData
public virtual void ClearComponentData()
从
v3.4.0开始支持
清空所有组件的数据。
BaseChart.ClearData
public virtual void ClearData()
清空所有组件和Serie的数据。注意:Serie只是清空数据,不会移除Serie。
BaseChart.ClearSerieData
public virtual void ClearSerieData()
从
v3.4.0开始支持
清空所有serie的数据。
BaseChart.ClearSerieLinks
public virtual void ClearSerieLinks()
从
v3.10.0开始支持
清空所有serie的link数据。
BaseChart.ClickLegendButton
public void ClickLegendButton(int legendIndex, string legendName, bool show)
点击图例按钮
BaseChart.ConvertSerie
public bool ConvertSerie(Serie serie, Type type)
BaseChart.ConvertSerie<T>
public bool ConvertSerie<T>(Serie serie) where T : Serie
BaseChart.ConvertXYAxis
public void ConvertXYAxis(int index)
转换X轴和Y轴的配置
BaseChart.EnsureChartComponent<T>
public T EnsureChartComponent<T>() where T : MainComponent
从
v3.6.0开始支持
确保图表有该组件,如果没有则添加。注意:有可能添加不成功。
BaseChart.GenerateDefaultSerieName
public string GenerateDefaultSerieName()
BaseChart.GetAllSerieDataCount
public int GetAllSerieDataCount()
BaseChart.GetChartBackgroundColor
public Color32 GetChartBackgroundColor()
BaseChart.GetChartComponent<T>
public T GetChartComponent<T>(int index = 0) where T : MainComponent
BaseChart.GetChartComponentNum
public int GetChartComponentNum(Type type)
BaseChart.GetChartComponentNum<T>
public int GetChartComponentNum<T>() where T : MainComponent
BaseChart.GetChartComponents<T>
public List<MainComponent> GetChartComponents<T>() where T : MainComponent
BaseChart.GetData
public double GetData(int serieIndex, int dataIndex, int dimension = 1)
BaseChart.GetDataZoomOfAxis
public DataZoom GetDataZoomOfAxis(Axis axis)
BaseChart.GetDataZoomOfSerie
public void GetDataZoomOfSerie(Serie serie, out DataZoom xDataZoom, out DataZoom yDataZoom)
BaseChart.GetGrid
public GridCoord GetGrid(Vector2 local)
BaseChart.GetGridOfDataZoom
public GridCoord GetGridOfDataZoom(DataZoom dataZoom)
BaseChart.GetItemColor
public Color32 GetItemColor(Serie serie)
public Color32 GetItemColor(Serie serie, SerieData serieData, int colorIndex)
BaseChart.GetLegendRealShowNameColor
public Color32 GetLegendRealShowNameColor(string name)
BaseChart.GetLegendRealShowNameIndex
public int GetLegendRealShowNameIndex(string name)
BaseChart.GetMarkColor
public Color32 GetMarkColor(Serie serie, SerieData serieData)
从
v3.4.0开始支持
获得Serie的标识颜色。
BaseChart.GetOrAddChartComponent<T>
public T GetOrAddChartComponent<T>() where T : MainComponent
BaseChart.GetPainter
public Painter GetPainter(int index)
BaseChart.GetRealtimeSortSerie
public Serie GetRealtimeSortSerie(int gridIndex)
BaseChart.GetSerie
public Serie GetSerie(int serieIndex)
BaseChart.GetSerie<T>
public T GetSerie<T>(int serieIndex) where T : Serie
BaseChart.GetSerieBarGap<T>
public float GetSerieBarGap<T>(int gridIndex) where T : Serie
BaseChart.GetSerieBarRealCount<T>
public int GetSerieBarRealCount<T>(int gridIndex) where T : Serie
BaseChart.GetSerieIndexIfStack<T>
public int GetSerieIndexIfStack<T>(Serie currSerie, int gridIndex) where T : Serie
BaseChart.GetSerieSameStackTotalValue<T>
public double GetSerieSameStackTotalValue<T>(string stack, int dataIndex, int gridIndex) where T : Serie
BaseChart.GetSeriesMinMaxValue
public virtual void GetSeriesMinMaxValue(Axis axis, int axisIndex, out double tempMinValue, out double tempMaxValue)
BaseChart.GetSerieTotalGap<T>
public float GetSerieTotalGap<T>(float categoryWidth, float gap, int index, int gridIndex) where T : Serie
BaseChart.GetSerieTotalWidth<T>
public float GetSerieTotalWidth<T>(float categoryWidth, float gap, int realBarCount, int gridIndex) where T : Serie
BaseChart.GetTitlePosition
public Vector3 GetTitlePosition(Title title)
BaseChart.GetVisualMapOfSerie
public VisualMap GetVisualMapOfSerie(Serie serie)
BaseChart.GetXDataZoomOfSerie
public DataZoom GetXDataZoomOfSerie(Serie serie)
BaseChart.GetXLerpColor
public Color32 GetXLerpColor(Color32 areaColor, Color32 areaToColor, Vector3 pos, GridCoord grid)
BaseChart.GetYLerpColor
public Color32 GetYLerpColor(Color32 areaColor, Color32 areaToColor, Vector3 pos, GridCoord grid)
BaseChart.HasChartComponent
public bool HasChartComponent(Type type)
BaseChart.HasChartComponent<T>
public bool HasChartComponent<T>()
BaseChart.HasRealtimeSortSerie
public bool HasRealtimeSortSerie(int gridIndex)
BaseChart.HasSerie
public bool HasSerie(Type type)
BaseChart.HasSerie<T>
public bool HasSerie<T>() where T : Serie
BaseChart.Init
public void Init(bool defaultChart = true)
BaseChart.InitAxisRuntimeData
public virtual void InitAxisRuntimeData(Axis axis) { }
BaseChart.InsertSerie
public void InsertSerie(Serie serie, int index = -1, bool addToHead = false)
BaseChart.InsertSerie<T>
public T InsertSerie<T>(int index, string serieName = null, bool show = true) where T : Serie
BaseChart.Internal_CheckAnimation
public void Internal_CheckAnimation()
BaseChart.IsActiveByLegend
public virtual bool IsActiveByLegend(string legendName)
获得指定图例名字的系列是否显示。
BaseChart.IsAllAxisCategory
public bool IsAllAxisCategory()
纯类目轴。
BaseChart.IsAllAxisValue
public bool IsAllAxisValue()
纯数值坐标轴(数值轴或对数轴)。
BaseChart.IsInAnyGrid
public bool IsInAnyGrid(Vector2 local)
BaseChart.IsInChart
public bool IsInChart(float x, float y)
BaseChart.IsSerieName
public bool IsSerieName(string name)
BaseChart.MoveDownSerie
public bool MoveDownSerie(int serieIndex)
BaseChart.MoveUpSerie
public bool MoveUpSerie(int serieIndex)
BaseChart.OnAfterDeserialize
public void OnAfterDeserialize()
BaseChart.OnBeforeSerialize
public void OnBeforeSerialize()
BaseChart.OnBeginDrag
public override void OnBeginDrag(PointerEventData eventData)
BaseChart.OnDataZoomRangeChanged
public virtual void OnDataZoomRangeChanged(DataZoom dataZoom)
BaseChart.OnDrag
public override void OnDrag(PointerEventData eventData)
BaseChart.OnEndDrag
public override void OnEndDrag(PointerEventData eventData)
BaseChart.OnLegendButtonClick
public virtual void OnLegendButtonClick(int index, string legendName, bool show)
BaseChart.OnLegendButtonEnter
public virtual void OnLegendButtonEnter(int index, string legendName)
BaseChart.OnLegendButtonExit
public virtual void OnLegendButtonExit(int index, string legendName)
BaseChart.OnPointerClick
public override void OnPointerClick(PointerEventData eventData)
BaseChart.OnPointerDown
public override void OnPointerDown(PointerEventData eventData)
BaseChart.OnPointerEnter
public override void OnPointerEnter(PointerEventData eventData)
BaseChart.OnPointerExit
public override void OnPointerExit(PointerEventData eventData)
BaseChart.OnPointerUp
public override void OnPointerUp(PointerEventData eventData)
BaseChart.OnScroll
public override void OnScroll(PointerEventData eventData)
BaseChart.RefreshBasePainter
public void RefreshBasePainter()
BaseChart.RefreshChart
public void RefreshChart(int serieIndex)
在下一帧刷新图表的指定serie。
public void RefreshChart(Serie serie)
在下一帧刷新图表的指定serie。
BaseChart.RefreshDataZoom
public void RefreshDataZoom()
在下一帧刷新DataZoom
BaseChart.RefreshGraph
public override void RefreshGraph()
BaseChart.RefreshPainter
public void RefreshPainter(Serie serie)
BaseChart.RefreshTopPainter
public void RefreshTopPainter()
BaseChart.RefreshUpperPainter
public void RefreshUpperPainter()
BaseChart.RemoveAllChartComponent
public void RemoveAllChartComponent()
BaseChart.RemoveAllSerie
public virtual void RemoveAllSerie()
从
v3.2.0开始支持
移除所有的Serie。当确认只需要移除Serie时使用该接口,其他情况下一般用RemoveData()。
BaseChart.RemoveChartComponent
public bool RemoveChartComponent(MainComponent component)
BaseChart.RemoveChartComponent<T>
public bool RemoveChartComponent<T>(int index = 0)
BaseChart.RemoveChartComponents
public int RemoveChartComponents(Type type)
BaseChart.RemoveChartComponents<T>
public int RemoveChartComponents<T>()
BaseChart.RemoveData
public virtual void RemoveData(string serieName)
清除指定系列名称的数据。
BaseChart.RemoveSerie
public void RemoveSerie(int serieIndex)
public void RemoveSerie(Serie serie)
BaseChart.RemoveSerie<T>
public void RemoveSerie<T>() where T : Serie
BaseChart.ReplaceSerie
public bool ReplaceSerie(Serie oldSerie, Serie newSerie)
BaseChart.ResetChartStatus
public void ResetChartStatus()
从
v3.10.0开始支持
重置图表状态。当设置某些参数后,由于动画影响,可能导致图表状态不正确,此时可以调用该接口重置图表状态。
BaseChart.ResetDataIndex
public bool ResetDataIndex(int serieIndex)
重置serie的数据项索引。避免数据项索引异常。
BaseChart.SetBasePainterMaterial
public void SetBasePainterMaterial(Material material)
设置Base Painter的材质球
BaseChart.SetInsertDataToHead
public void SetInsertDataToHead(bool insertDataToHead)
从
v3.11.0开始支持
设置数据插入到头部。
BaseChart.SetMaxCache
public void SetMaxCache(int maxCache)
设置可缓存的最大数据量。当数据量超过该值时,会自动删除第一个值再加入最新值。
BaseChart.SetPainterActive
public void SetPainterActive(int index, bool flag)
BaseChart.SetSerieActive
public void SetSerieActive(int serieIndex, bool active)
设置指定系列是否显示。
public void SetSerieActive(Serie serie, bool active)
BaseChart.SetSeriePainterMaterial
public void SetSeriePainterMaterial(Material material)
设置Serie Painter的材质球
BaseChart.SetTopPainterMaterial
public void SetTopPainterMaterial(Material material)
设置Top Painter的材质球
BaseChart.SetUpperPainterMaterial
public void SetUpperPainterMaterial(Material material)
设置Upper Painter的材质球
BaseChart.TriggerTooltip
public bool TriggerTooltip(Vector3 localPosition)
从
v3.7.0开始支持
在指定的位置尝试触发Tooltip.
BaseChart.TryAddChartComponent
public bool TryAddChartComponent(Type type)
BaseChart.TryAddChartComponent<T>
public bool TryAddChartComponent<T>(out T component) where T : MainComponent
BaseChart.TryGetChartComponent<T>
public bool TryGetChartComponent<T>(out T component, int index = 0)
BaseChart.UpdateData
public bool UpdateData(int serieIndex, int dataIndex, double value)
更新指定系列中的指定索引数据。
public bool UpdateData(int serieIndex, int dataIndex, int dimension, double value)
更新指定系列指定索引指定维数的数据。维数从0开始。
public bool UpdateData(int serieIndex, int dataIndex, List<double> multidimensionalData)
更新指定系列指定索引的数据项的多维数据。
public bool UpdateData(string serieName, int dataIndex, int dimension, double value)
更新指定系列指定索引指定维数的数据。维数从0开始。
public bool UpdateData(string serieName, int dataIndex, List<double> multidimensionalData)
更新指定系列指定索引的数据项的多维数据。
BaseChart.UpdateDataName
public bool UpdateDataName(int serieIndex, int dataIndex, string dataName)
更新指定系列中的指定索引数据名称。
BaseChart.UpdateLegendColor
public virtual void UpdateLegendColor(string legendName, bool active)
BaseChart.UpdateTheme
public void UpdateTheme(Theme theme)
切换图表主题。
BaseChart.UpdateXAxisData
public void UpdateXAxisData(int index, string category, int xAxisIndex = 0)
更新X轴类目数据。
BaseChart.UpdateXAxisIcon
public void UpdateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)
更新X轴图标。
BaseChart.UpdateYAxisData
public void UpdateYAxisData(int index, string category, int yAxisIndex = 0)
更新Y轴类目数据。
BaseChart.UpdateYAxisIcon
public void UpdateYAxisIcon(int index, Sprite icon, int yAxisIndex = 0)
更新Y轴图标。
BaseGraph
class in XCharts.Runtime / 继承自: MaskableGraphic,IPointerDownHandler,IPointerUpHandler, / 子类: BaseChart,UIComponent
BaseGraph.chartHideFlags
public virtual HideFlags chartHideFlags
BaseGraph.childrenNodeNames
public List<string> childrenNodeNames
BaseGraph.clickPos
public Vector2 clickPos
BaseGraph.forceOpenRaycastTarget
public bool forceOpenRaycastTarget
强制开启鼠标事件检测。
BaseGraph.graphAnchoredPosition
public Vector2 graphAnchoredPosition
BaseGraph.graphHeight
public float graphHeight
图形的高
BaseGraph.graphMaxAnchor
public Vector2 graphMaxAnchor
BaseGraph.graphMinAnchor
public Vector2 graphMinAnchor
BaseGraph.graphPivot
public Vector2 graphPivot
BaseGraph.graphPosition
public Vector3 graphPosition
图形的左下角起始坐标。
BaseGraph.graphRect
public Rect graphRect
BaseGraph.graphSizeDelta
public Vector2 graphSizeDelta
BaseGraph.graphWidth
public float graphWidth
图形的宽
BaseGraph.graphX
public float graphX
图形的X
BaseGraph.graphY
public float graphY
图形的Y
BaseGraph.isDragingClick
public bool isDragingClick
BaseGraph.isPointerClick
public bool isPointerClick
鼠标是否点击了图表。
BaseGraph.isPointerInChart
public bool isPointerInChart
鼠标是否在图表内。
BaseGraph.onBeginDrag
public Action<PointerEventData, BaseGraph> onBeginDrag
鼠标开始拖拽回调。
BaseGraph.onDrag
public Action<PointerEventData, BaseGraph> onDrag
鼠标拖拽回调。
BaseGraph.onEndDrag
public Action<PointerEventData, BaseGraph> onEndDrag
鼠标结束拖拽回调。
BaseGraph.onPointerClick
public Action<PointerEventData, BaseGraph> onPointerClick
鼠标点击回调。
BaseGraph.onPointerDown
public Action<PointerEventData, BaseGraph> onPointerDown
鼠标按下回调。
BaseGraph.onPointerEnter
public Action<PointerEventData, BaseGraph> onPointerEnter
鼠标进入回调。
BaseGraph.onPointerExit
public Action<PointerEventData, BaseGraph> onPointerExit
鼠标退出回调。
BaseGraph.onPointerUp
public Action<PointerEventData, BaseGraph> onPointerUp
鼠标弹起回调。
BaseGraph.onScroll
public Action<PointerEventData, BaseGraph> onScroll
鼠标滚动回调。
BaseGraph.painter
public Painter painter
BaseGraph.pointerPos
public Vector2 pointerPos
鼠标位置。
BaseGraph.warningInfo
public string warningInfo
警告信息。
BaseGraph.CheckWarning
public string CheckWarning()
检测警告信息。
BaseGraph.LocalPointToScreenPoint
public Vector2 LocalPointToScreenPoint(Vector2 localPoint)
从
v3.7.0开始支持
图表内坐标转屏幕坐标。
BaseGraph.LocalPointToWorldPoint
public Vector2 LocalPointToWorldPoint(Vector2 localPoint)
从
v3.7.0开始支持
图表内坐标转世界坐标。
BaseGraph.OnBeginDrag
public virtual void OnBeginDrag(PointerEventData eventData)
BaseGraph.OnDrag
public virtual void OnDrag(PointerEventData eventData)
BaseGraph.OnEndDrag
public virtual void OnEndDrag(PointerEventData eventData)
BaseGraph.OnPointerClick
public virtual void OnPointerClick(PointerEventData eventData)
BaseGraph.OnPointerDown
public virtual void OnPointerDown(PointerEventData eventData)
BaseGraph.OnPointerEnter
public virtual void OnPointerEnter(PointerEventData eventData)
BaseGraph.OnPointerExit
public virtual void OnPointerExit(PointerEventData eventData)
BaseGraph.OnPointerUp
public virtual void OnPointerUp(PointerEventData eventData)
BaseGraph.OnScroll
public virtual void OnScroll(PointerEventData eventData)
BaseGraph.RebuildChartObject
public void RebuildChartObject()
移除并重新创建所有图表的Object。
BaseGraph.RefreshAllComponent
public void RefreshAllComponent()
BaseGraph.RefreshGraph
public virtual void RefreshGraph()
在下一帧刷新图形。
BaseGraph.SaveAsImage
public void SaveAsImage(string imageType = "png", string savePath = "")
保存图表为图片。
BaseGraph.ScreenPointToChartPoint
public bool ScreenPointToChartPoint(Vector2 screenPoint, out Vector2 chartPoint)
BaseGraph.SetPainterDirty
public void SetPainterDirty()
重新初始化Painter
BaseGraph.SetSize
public virtual void SetSize(float width, float height)
设置图形的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform)
BaseLine
class in XCharts.Runtime / 继承自: ChildComponent / 子类: AxisLine,AxisMinorSplitLine,AxisMinorTick,AxisSplitLine,AxisTick
线条基础配置。
BaseLine.BaseLine
public BaseLine(bool show) : base()
BaseLine.Copy
public void Copy(BaseLine axisLine)
BaseLine.GetColor
public Color32 GetColor(Color32 themeColor)
BaseLine.GetLength
public float GetLength(float themeLength)
BaseLine.GetType
public LineStyle.Type GetType(LineStyle.Type themeType)
BaseLine.GetWidth
public float GetWidth(float themeWidth)
BaseScatter
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer / 子类: EffectScatter,Scatter
BaseScatter.containerIndex
public int containerIndex
BaseScatter.containterInstanceId
public int containterInstanceId
BaseSerie
class in XCharts.Runtime / 子类: Serie
BaseSerie.anyDirty
public bool anyDirty
BaseSerie.ClearData()
public virtual void ClearData()
BaseSerie.componentDirty
public virtual bool componentDirty
BaseSerie.defaultColorBy
public virtual SerieColorBy defaultColorBy
BaseSerie.gameObject
public GameObject gameObject
BaseSerie.handler
public SerieHandler handler
BaseSerie.multiDimensionLabel
public virtual bool multiDimensionLabel
BaseSerie.OnBeforeSerialize()
public virtual void OnBeforeSerialize()
BaseSerie.OnDataUpdate()
public virtual void OnDataUpdate()
BaseSerie.painter
public Painter painter
BaseSerie.refreshComponent
public Action refreshComponent
BaseSerie.titleJustForSerie
public virtual bool titleJustForSerie
BaseSerie.useSortData
public virtual bool useSortData
BaseSerie.vertsDirty
public virtual bool vertsDirty
BaseSerie.ClearComponentDirty
public virtual void ClearComponentDirty()
BaseSerie.ClearData
public virtual void ClearData() { }
BaseSerie.ClearDirty
public virtual void ClearDirty()
BaseSerie.ClearVerticesDirty
public virtual void ClearVerticesDirty()
BaseSerie.IsComponentDirty
public static bool IsComponentDirty(ChildComponent component)
BaseSerie.IsVertsDirty
public static bool IsVertsDirty(ChildComponent component)
BaseSerie.OnAfterDeserialize
public virtual void OnAfterDeserialize()
BaseSerie.OnBeforeSerialize
public virtual void OnBeforeSerialize() { }
BaseSerie.OnDataUpdate
public virtual void OnDataUpdate() { }
BaseSerie.OnRemove
public virtual void OnRemove()
BaseSerie.RefreshLabel
public void RefreshLabel()
BaseSerie.SetAllDirty
public virtual void SetAllDirty()
BaseSerie.SetComponentDirty
public virtual void SetComponentDirty()
BaseSerie.SetVerticesDirty
public virtual void SetVerticesDirty()
BlurStyle
class in XCharts.Runtime / 继承自: StateStyle,ISerieComponent,ISerieDataComponent
从
v3.2.0开始支持
淡出状态样式。
BorderStyle
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.10.0开始支持
边框样式。
BorderStyle.GetRuntimeBorderColor
public Color32 GetRuntimeBorderColor()
BorderStyle.GetRuntimeBorderWidth
public float GetRuntimeBorderWidth()
BorderStyle.GetRuntimeCornerRadius
public float[] GetRuntimeCornerRadius()
BorderStyle.IsCricle
public bool IsCricle()
CalendarCoord
class in XCharts.Runtime / 继承自: CoordSystem,IUpdateRuntimeData,ISerieContainer
CalendarCoord.IsPointerEnter
public bool IsPointerEnter()
CalendarCoord.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
Candlestick
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer
Candlestick.containerIndex
public int containerIndex
Candlestick.containterInstanceId
public int containterInstanceId
Candlestick.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
CandlestickChart
class in XCharts.Runtime / 继承自: BaseChart
蜡烛图,也叫K线图,用于描述证券、衍生品或货币的价格走势的一种金融图表样式。
ChartCached
class in XCharts.Runtime
ChartCached.ColorToDotStr
public static string ColorToDotStr(Color color)
ChartCached.ColorToStr
public static string ColorToStr(Color color)
ChartCached.FloatToStr
public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0)
ChartCached.GetSerieLabelName
public static string GetSerieLabelName(string prefix, int i, int j)
ChartCached.GetString
public static string GetString(string prefix, int suffix)
ChartCached.IntToStr
public static string IntToStr(int value, string numericFormatter = "")
ChartCached.NumberToDateStr
public static string NumberToDateStr(double timestamp, string formatter)
ChartCached.NumberToDateTime
public static DateTime NumberToDateTime(double timestamp)
ChartCached.NumberToStr
public static string NumberToStr(double value, string formatter)
ChartCached.NumberToTimeSpan
public static TimeSpan NumberToTimeSpan(double timestamp)
ChartCached.NumberToTimeStr
public static string NumberToTimeStr(double timestamp, string formatter)
ChartConst
class in XCharts.Runtime
ChartDrawer
class in XCharts.Runtime
ChartHelper
class in XCharts.Runtime
ChartHelper.ignoreVector3
public static Vector3 ignoreVector3
ChartHelper.sb
public static StringBuilder sb
ChartHelper.ActiveAllObject
public static void ActiveAllObject(Transform parent, bool active, string match = null)
ChartHelper.AddIcon
public static Image AddIcon(string name, Transform parent, IconStyle iconStyle)
ChartHelper.Cancat
public static string Cancat(string str1, int i)
ChartHelper.ClearEventListener
public static void ClearEventListener(GameObject obj)
ChartHelper.CopyArray<T>
public static bool CopyArray<T>(T[] toList, T[] fromList)
ChartHelper.CopyList<T>
public static bool CopyList<T>(List<T> toList, List<T> fromList)
ChartHelper.DestoryGameObject
public static void DestoryGameObject(GameObject go)
ChartHelper.DestoryGameObjectByMatch
public static void DestoryGameObjectByMatch(Transform parent, List<string> children)
ChartHelper.DestroyAllChildren
public static void DestroyAllChildren(Transform parent)
ChartHelper.EnsureComponent<T>
public static T EnsureComponent<T>(GameObject gameObject) where T : Component
确保对象有指定的组件,如果没有则添加。
ChartHelper.GetActualValue
public static float GetActualValue(float valueOrRate, float total, float maxRate = 1.5f)
ChartHelper.GetAngle360
public static float GetAngle360(Vector2 from, Vector2 to)
获得0-360的角度(12点钟方向为0度)
ChartHelper.GetBlurColor
public static Color32 GetBlurColor(Color32 color, float a = 0.3f)
ChartHelper.GetColor
public static Color32 GetColor(string hexColorStr)
ChartHelper.GetDire
public static Vector3 GetDire(float angle, bool isDegree = false)
ChartHelper.GetFullName
public static string GetFullName(Transform transform)
ChartHelper.GetHighlightColor
public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)
ChartHelper.GetLastValue
public static Vector3 GetLastValue(List<Vector3> list)
ChartHelper.GetMaxCeilRate
public static float GetMaxCeilRate(float value, float ceilRate)
ChartHelper.GetMaxDivisibleValue
public static double GetMaxDivisibleValue(double max, double ceilRate)
ChartHelper.GetMaxLogValue
public static double GetMaxLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)
ChartHelper.GetMinCeilRate
public static float GetMinCeilRate(float value, float ceilRate)
ChartHelper.GetMinDivisibleValue
public static double GetMinDivisibleValue(double min, double ceilRate)
ChartHelper.GetMinLogValue
public static double GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber)
ChartHelper.GetOrAddComponent<T>
public static T GetOrAddComponent<T>(GameObject gameObject) where T : Component
ChartHelper.GetPointList
public static void GetPointList(ref List<Vector3> posList, Vector3 sp, Vector3 ep, float k = 30f)
ChartHelper.GetPos
public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)
ChartHelper.GetPosition
public static Vector3 GetPosition(Vector3 center, float angle, float radius)
ChartHelper.GetSelectColor
public static Color32 GetSelectColor(Color32 color, float rate = 0.8f)
ChartHelper.GetVertialDire
public static Vector3 GetVertialDire(Vector3 dire)
ChartHelper.HideAllObject
public static void HideAllObject(Transform parent, string match = null)
ChartHelper.IsActiveByScale
public static bool IsActiveByScale(Image image)
public static bool IsActiveByScale(Transform transform)
ChartHelper.IsClearColor
public static bool IsClearColor(Color color)
ChartHelper.IsColorAlphaZero
public static bool IsColorAlphaZero(Color color)
ChartHelper.IsEquals
public static bool IsEquals(float d1, float d2)
ChartHelper.IsIngore
public static bool IsIngore(Vector3 pos)
ChartHelper.IsInRect
public static bool IsInRect(Vector3 pos, float xMin, float xMax, float yMin, float yMax)
ChartHelper.IsPointInQuadrilateral
public static bool IsPointInQuadrilateral(Vector3 P, Vector3 A, Vector3 B, Vector3 C, Vector3 D)
ChartHelper.IsValueEqualsColor
public static bool IsValueEqualsColor(Color color1, Color color2)
ChartHelper.IsValueEqualsList<T>
public static bool IsValueEqualsList<T>(List<T> list1, List<T> list2)
ChartHelper.IsValueEqualsString
public static bool IsValueEqualsString(string str1, string str2)
ChartHelper.IsValueEqualsVector2
public static bool IsValueEqualsVector2(Vector2 v1, Vector2 v2)
ChartHelper.IsValueEqualsVector3
public static bool IsValueEqualsVector3(Vector3 v1, Vector3 v2)
ChartHelper.IsZeroVector
public static bool IsZeroVector(Vector3 pos)
ChartHelper.ParseFloatFromString
public static List<float> ParseFloatFromString(string jsonData)
ChartHelper.ParseStringFromString
public static List<string> ParseStringFromString(string jsonData)
ChartHelper.RemoveComponent<T>
public static void RemoveComponent<T>(GameObject gameObject)
ChartHelper.RemoveTMPComponents
public static void RemoveTMPComponents(GameObject gameObject)
ChartHelper.RotateRound
public static Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle)
ChartHelper.SaveAsImage
public static Texture2D SaveAsImage(RectTransform rectTransform, Canvas canvas, string imageType = "png", string path = "")
ChartHelper.SetActive
public static bool SetActive(Image image, bool active)
public static bool SetActive(Text text, bool active)
public static bool SetActive(Transform transform, bool active)
通过设置scale实现是否显示,优化性能,减少GC
ChartHelper.SetBackground
public static void SetBackground(Image background, Background imageStyle)
ChartHelper.SetColorOpacity
public static void SetColorOpacity(ref Color32 color, float opacity)
ChartLabel
class in XCharts.Runtime / 继承自: Image
ChartLabel.hideIconIfTextEmpty
public bool hideIconIfTextEmpty
ChartLabel.isAnimationEnd
public bool isAnimationEnd
ChartLabel.isIconActive
public bool isIconActive
ChartLabel.rect
public Rect rect
ChartLabel.GetHeight
public float GetHeight()
ChartLabel.GetPosition
public Vector3 GetPosition()
ChartLabel.GetTextHeight
public float GetTextHeight()
ChartLabel.GetTextWidth
public float GetTextWidth()
ChartLabel.GetWidth
public float GetWidth()
ChartLabel.InRect
public bool InRect(Vector2 local)
ChartLabel.IsActiveByScale
public bool IsActiveByScale()
ChartLabel.SetActive
public void SetActive(bool flag, bool force = false)
ChartLabel.SetIcon
public void SetIcon(Image image)
ChartLabel.SetIconActive
public void SetIconActive(bool flag)
ChartLabel.SetIconSize
public void SetIconSize(float width, float height)
ChartLabel.SetIconSprite
public void SetIconSprite(Sprite sprite)
ChartLabel.SetPadding
public void SetPadding(float[] padding)
ChartLabel.SetPosition
public void SetPosition(Vector3 position)
ChartLabel.SetRectPosition
public void SetRectPosition(Vector3 position)
ChartLabel.SetRotate
public void SetRotate(float rotate)
ChartLabel.SetSize
public void SetSize(float width, float height)
ChartLabel.SetText
public bool SetText(string text)
ChartLabel.SetTextActive
public void SetTextActive(bool flag)
ChartLabel.SetTextColor
public void SetTextColor(Color color)
ChartLabel.SetTextPadding
public void SetTextPadding(TextPadding padding)
ChartLabel.SetTextRotate
public void SetTextRotate(float rotate)
ChartLabel.UpdateIcon
public void UpdateIcon(IconStyle iconStyle, Sprite sprite = null, Color color = default(Color))
ChartObject
class in XCharts.Runtime
ChartObject.Destroy
public virtual void Destroy()
ChartText
class in XCharts.Runtime
ChartText.tmpText
public TextMeshProUGUI tmpText
ChartText.ChartText
public ChartText(GameObject textParent)
ChartText.GetColor
public Color GetColor()
ChartText.GetPreferredHeight
public float GetPreferredHeight()
ChartText.GetPreferredText
public string GetPreferredText(string content, string suffix, float maxWidth)
ChartText.GetPreferredWidth
public float GetPreferredWidth()
ChartText.GetText
public string GetText()
ChartText.SetActive
public void SetActive(bool flag)
ChartText.SetAlignment
public void SetAlignment(TextAnchor alignment)
ChartText.SetColor
public void SetColor(Color color)
ChartText.SetFont
public void SetFont(TMP_FontAsset font)
ChartText.SetFontAndSizeAndStyle
public void SetFontAndSizeAndStyle(TextStyle textStyle, ComponentTheme theme)
ChartText.SetFontSize
public void SetFontSize(float fontSize)
ChartText.SetFontStyle
public void SetFontStyle(FontStyle fontStyle)
ChartText.SetLineSpacing
public void SetLineSpacing(float lineSpacing)
ChartText.SetLocalEulerAngles
public void SetLocalEulerAngles(Vector3 position)
ChartText.SetLocalPosition
public void SetLocalPosition(Vector3 position)
ChartText.SetRectPosition
public void SetRectPosition(Vector3 position)
ChartText.SetSizeDelta
public void SetSizeDelta(Vector2 sizeDelta)
ChartText.SetText
public void SetText(string text)
CheckHelper
class in XCharts.Runtime
CheckHelper.CheckChart
public static string CheckChart(BaseChart chart)
ChildComponent
class in XCharts.Runtime / 子类: AnimationStyle,AxisAnimation,AxisName,AxisSplitArea,AreaStyle,ArrowStyle,BaseLine,BorderStyle,IconStyle,ImageStyle,ItemStyle,Level,LevelStyle,LineArrow,LineStyle,Location,MLValue,MarqueeStyle,Padding,StageColor,SymbolStyle,TextLimit,TextStyle,CommentItem,CommentMarkStyle,LabelLine,LabelStyle,MarkAreaData,MarkLineData,StateStyle,VisualMapRange,ViewControl,UIComponentTheme,SerieData,SerieDataLink,ComponentTheme,SerieTheme,ThemeStyle
ChildComponent.anyDirty
public bool anyDirty
需要重绘图表或重新初始化组件。
ChildComponent.componentDirty
public virtual bool componentDirty
组件重新初始化标记。
ChildComponent.gameObject
public GameObject gameObject
ChildComponent.index
public virtual int index
ChildComponent.painter
public Painter painter
ChildComponent.refreshComponent
public Action refreshComponent
ChildComponent.vertsDirty
public virtual bool vertsDirty
图表重绘标记。
ChildComponent.ClearComponentDirty
public virtual void ClearComponentDirty()
ChildComponent.ClearDirty
public virtual void ClearDirty()
ChildComponent.ClearVerticesDirty
public virtual void ClearVerticesDirty()
ChildComponent.IsComponentDirty
public static bool IsComponentDirty(ChildComponent component)
ChildComponent.IsVertsDirty
public static bool IsVertsDirty(ChildComponent component)
ChildComponent.SetAllDirty
public virtual void SetAllDirty()
ChildComponent.SetComponentDirty
public virtual void SetComponentDirty()
ChildComponent.SetVerticesDirty
public virtual void SetVerticesDirty()
ColorUtil
class in XCharts.Runtime
ColorUtil.GetColor
public static Color32 GetColor(string hexColorStr)
将字符串颜色值转成Color。
Comment
class in XCharts.Runtime / 继承自: MainComponent,IPropertyChanged
从
v3.15.0开始支持
图表注解组件。用于标注图表中的特殊信息。
Comment.items
public List<CommentItem> items
注解项。每个注解组件可以设置多个注解项。
Comment.layer
public CommentLayer layer
注解的显示层级。
Comment.show
public bool show
是否显示注解组件。
Comment.GetLabelStyle
public LabelStyle GetLabelStyle(int index)
获取注解项的文本样式。
Comment.GetMarkStyle
public CommentMarkStyle GetMarkStyle(int index)
获取注解项的标记样式。
Comment.OnChanged
public void OnChanged()
参数变更时的回调处理。
CommentItem
class in XCharts.Runtime / 继承自: ChildComponent
注解项。
CommentItem.labelObject
public ChartLabel labelObject
CommentItem.markRect
public Rect markRect
注解区域。
CommentItem.markStyle
public CommentMarkStyle markStyle
注解标记区域样式。
CommentItem.show
public bool show
是否显示当前注解项。
CommentLayer
class in XCharts.Runtime
注解的显示层级。
可选:
Lower: 注解在系列下方。Upper: 注解在系列上方。
CommentMarkStyle
class in XCharts.Runtime / 继承自: ChildComponent
注解项区域样式。
CommentMarkStyle.lineStyle
public LineStyle lineStyle
线条样式。
CommentMarkStyle.show
public bool show
是否显示当前注解项。
ComponentHandlerAttribute
class in XCharts.Runtime / 继承自: Attribute
ComponentHandlerAttribute.ComponentHandlerAttribute
public ComponentHandlerAttribute(Type handler, bool allowMultiple, int order = 3)
ComponentHelper
class in XCharts.Runtime
ComponentHelper.GetAngleAxis
public static AngleAxis GetAngleAxis(List<MainComponent> components, int polarIndex)
ComponentHelper.GetRadiusAxis
public static RadiusAxis GetRadiusAxis(List<MainComponent> components, int polarIndex)
ComponentHelper.GetXAxisOnZeroOffset
public static float GetXAxisOnZeroOffset(List<MainComponent> components, XAxis axis)
ComponentHelper.GetYAxisOnZeroOffset
public static float GetYAxisOnZeroOffset(List<MainComponent> components, YAxis axis)
ComponentHelper.IsAnyCategoryOfYAxis
public static bool IsAnyCategoryOfYAxis(List<MainComponent> components)
ComponentTheme
class in XCharts.Runtime / 继承自: ChildComponent / 子类: BaseAxisTheme,DataZoomTheme,LegendTheme,SubTitleTheme,TitleTheme,TooltipTheme,VisualMapTheme
ComponentTheme.ComponentTheme
public ComponentTheme(ThemeType theme)
ComponentTheme.Copy
public virtual void Copy(ComponentTheme theme)
ComponentTheme.Reset
public virtual void Reset(ComponentTheme defaultTheme)
CoordOptionsAttribute
class in XCharts.Runtime / 继承自: Attribute
CoordOptionsAttribute.Contains<T>
public bool Contains<T>() where T : CoordSystem
CoordOptionsAttribute.CoordOptionsAttribute
public CoordOptionsAttribute(Type coord, Type coord2)
public CoordOptionsAttribute(Type coord, Type coord2, Type coord3)
public CoordOptionsAttribute(Type coord, Type coord2, Type coord3, Type coord4)
CoordSystem
class in XCharts.Runtime / 继承自: MainComponent / 子类: RadarCoord,CalendarCoord,GridCoord,GridCoord3D,ParallelCoord,PolarCoord,SingleAxisCoord
坐标系系统。
DataHelper
class in XCharts.Runtime
DataZoom
class in XCharts.Runtime / 继承自: MainComponent,IUpdateRuntimeData
DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。
DataZoom.realtime
public bool realtime
拖动时,是否实时更新系列的视图。如果设置为 false,则只在拖拽结束的时候更新。默认为true,暂不支持修改。
DataZoom.startEndFunction
public CustomDataZoomStartEndFunction startEndFunction
start和end变更委托。
DataZoom.GetBackgroundColor
public Color32 GetBackgroundColor(Color32 themeColor)
DataZoom.GetBorderColor
public Color32 GetBorderColor(Color32 themeColor)
DataZoom.GetFillerColor
public Color32 GetFillerColor(Color32 themeColor)
DataZoom.IsContainsAxis
public bool IsContainsAxis(Axis axis)
DataZoom.IsContainsXAxis
public bool IsContainsXAxis(int index)
DataZoom.IsContainsYAxis
public bool IsContainsYAxis(int index)
DataZoom.IsInEndZoom
public bool IsInEndZoom(Vector2 pos)
给定的坐标是否在结束活动条触发区域内
DataZoom.IsInMarqueeArea
public bool IsInMarqueeArea(Vector2 pos)
DataZoom.IsInSelectedZoom
public bool IsInSelectedZoom(int totalIndex, int index, bool invert)
DataZoom.IsInStartZoom
public bool IsInStartZoom(Vector2 pos)
给定的坐标是否在开始活动条触发区域内
DataZoom.IsInZoom
public bool IsInZoom(Vector2 pos)
给定的坐标是否在缩放区域内
DataZoom.SetDefaultValue
public override void SetDefaultValue()
DataZoom.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
DataZoom.FilterMode
class in XCharts.Runtime
dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。
可选:
Filter: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。WeakFilter: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。Empty: 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。None: 不过滤数据,只改变数轴范围。
DataZoom.RangeMode
class in XCharts.Runtime
The value type of start and end.取值类型
可选:
//Value: The value type of start and end.取值类型Percent: 百分比。
DataZoomContext
class in XCharts.Runtime / 继承自: MainComponentContext
DataZoomContext.endValue
public double endValue
运行时实际范围的结束值
DataZoomContext.height
public float height
DataZoomContext.invert
public bool invert
DataZoomContext.isCoordinateDrag
public bool isCoordinateDrag
DataZoomContext.isDrag
public bool isDrag
DataZoomContext.isEndDrag
public bool isEndDrag
DataZoomContext.isMarqueeDrag
public bool isMarqueeDrag
DataZoomContext.isStartDrag
public bool isStartDrag
DataZoomContext.marqueeEndPos
public Vector3 marqueeEndPos
DataZoomContext.marqueeRect
public Rect marqueeRect
DataZoomContext.marqueeStartPos
public Vector3 marqueeStartPos
DataZoomContext.startValue
public double startValue
运行时实际范围的开始值
DataZoomContext.width
public float width
DataZoomContext.x
public float x
DataZoomContext.y
public float y
DataZoomHelper
class in XCharts.Runtime
DataZoomHelper.UpdateDataZoomRuntimeStartEndValue
public static void UpdateDataZoomRuntimeStartEndValue(DataZoom dataZoom, Serie serie)
DataZoomHelper.UpdateDataZoomRuntimeStartEndValue<T>
public static void UpdateDataZoomRuntimeStartEndValue<T>(BaseChart chart) where T : Serie
DataZoomTheme
class in XCharts.Runtime / 继承自: ComponentTheme
DataZoomTheme.Copy
public void Copy(DataZoomTheme theme)
DataZoomTheme.DataZoomTheme
public DataZoomTheme(ThemeType theme) : base(theme)
DateTimeUtil
class in XCharts.Runtime
DateTimeUtil.GetDateTime
public static DateTime GetDateTime(double timestamp, bool local = true)
DateTimeUtil.GetDefaultDateTimeString
public static string GetDefaultDateTimeString(double timestamp, double range = 0)
DateTimeUtil.GetTimestamp
public static double GetTimestamp(DateTime time, bool local = false)
public static double GetTimestamp(string dateTime, bool local = false)
DateTimeUtil.IsDateOrTimeRegex
public static bool IsDateOrTimeRegex(string regex, ref bool date, ref string formatter)
DebugInfo
class in XCharts.Runtime
DebugInfo.avgFps
public float avgFps
平均帧率。
DebugInfo.foldSeries
public bool foldSeries
是否在Inspector上折叠Serie。
DebugInfo.fps
public float fps
当前帧率。
DebugInfo.refreshCount
public int refreshCount
图表每秒刷新次数。
DebugInfo.show
public bool show
是否显示Debug组件。
DebugInfo.showAllChartObject
public bool showAllChartObject
是否在Hierarchy试图显示所有chart下的节点。
DebugInfo.Init
public void Init(BaseChart chart)
DebugInfo.Update
public void Update()
DefaultAnimationAttribute
class in XCharts.Runtime / 继承自: Attribute
DefaultAnimationAttribute.DefaultAnimationAttribute
public DefaultAnimationAttribute(AnimationType handler, bool enableSerieDataAddedAnimation)
DefaultTooltipAttribute
class in XCharts.Runtime / 继承自: Attribute
DefaultTooltipAttribute.DefaultTooltipAttribute
public DefaultTooltipAttribute(Tooltip.Type type, Tooltip.Trigger trigger)
DefineSymbolsUtil
class in XCharts.Runtime
DefineSymbolsUtil.AddGlobalDefine
public static void AddGlobalDefine(string symbol)
DefineSymbolsUtil.RemoveGlobalDefine
public static void RemoveGlobalDefine(string symbol)
EffectScatter
class in XCharts.Runtime / 继承自: BaseScatter
EffectScatter.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
EmphasisStyle
class in XCharts.Runtime / 继承自: StateStyle,ISerieComponent,ISerieDataComponent
从
v3.2.0开始支持
高亮状态样式。
EmphasisStyle.BlurScope
class in XCharts.Runtime
淡出范围。
可选:
GridCoord: 淡出范围为坐标系,默认使用该配置。Series: 淡出范围为系列。Global: 淡出范围为全局。
EmphasisStyle.FocusType
class in XCharts.Runtime
聚焦类型。
可选:
None: 不淡出其它图形,默认使用该配置。Self: 只聚焦(不淡出)当前高亮的数据的图形。Series: 聚焦当前高亮的数据所在的系列的所有图形。
EndLabelStyle
class in XCharts.Runtime / 继承自: LabelStyle
EndLabelStyle.EndLabelStyle
public EndLabelStyle()
FormatterHelper
class in XCharts.Runtime
FormatterHelper.NeedFormat
public static bool NeedFormat(string content)
FormatterHelper.ReplaceAxisLabelContent
public static void ReplaceAxisLabelContent(ref string content, string value, int index, int totalIndex)
FormatterHelper.ReplaceIndexContent
public static void ReplaceIndexContent(ref string content, int currIndex, int totalIndex)
FormatterHelper.TrimAndReplaceLine
public static string TrimAndReplaceLine(string content)
GraphData
class in XCharts.Runtime
数据结构-图。
GraphData.AddEdge
public GraphEdge AddEdge(string nodeId1, string nodeId2, double value)
GraphData.AddNode
public GraphNode AddNode(string nodeId, string nodeName, int dataIndex, double value)
GraphData.BreadthFirstTraverse
public void BreadthFirstTraverse(GraphNode startNode, System.Action<GraphNode> onTraverse)
GraphData.Clear
public void Clear()
GraphData.DeepFirstTraverse
public void DeepFirstTraverse(GraphNode startNode, System.Action<GraphNode> onTraverse)
GraphData.EachNode
public void EachNode(System.Action<GraphNode> onEach)
GraphData.ExpandAllNodes
public void ExpandAllNodes(bool flag, int level = -1)
GraphData.ExpandNode
public void ExpandNode(string nodeId, bool flag)
GraphData.GetDepthNodes
public List<List<GraphNode>> GetDepthNodes()
GraphData.GetEdge
public GraphEdge GetEdge(string nodeId1, string nodeId2)
GraphData.GetExpandedNodesCount
public static int GetExpandedNodesCount(List<GraphNode> nodes)
GraphData.GetMaxDepth
public int GetMaxDepth()
GraphData.GetNode
public GraphNode GetNode(string nodeId)
GraphData.GetNodeDepth
// public void GetNodeDepth(GraphNode node, ref int depth, int recursiveCount = 0)
public int GetNodeDepth(GraphNode node, int recursiveCount = 0)
GraphData.GetNodesTotalValue
public static double GetNodesTotalValue(List<GraphNode> nodes)
GraphData.GetRootNodes
public List<GraphNode> GetRootNodes()
GraphData.GraphData
public GraphData(bool directed)
GraphData.IsAllNodeInZeroPosition
public bool IsAllNodeInZeroPosition()
GraphData.Refresh
public void Refresh()
GraphEdge
class in XCharts.Runtime
图的边。
GraphEdge.GraphEdge
public GraphEdge(GraphNode node1, GraphNode node2, double value)
GraphEdge.IsPointInEdge
public bool IsPointInEdge(Vector2 point)
GraphNode
class in XCharts.Runtime
图的节点。
GraphNode.degree
public int degree
GraphNode.inDegree
public int inDegree
GraphNode.outDegree
public int outDegree
GraphNode.Expand
public void Expand(bool flag)
GraphNode.GraphNode
public GraphNode(string id, string name, int dataIndex)
GraphNode.IsAllInEdgesCollapsed
public bool IsAllInEdgesCollapsed()
GraphNode.IsAnyInEdgesExpanded
public bool IsAnyInEdgesExpanded()
GraphNode.ToString
public override string ToString()
GridCoord
class in XCharts.Runtime / 继承自: CoordSystem,IUpdateRuntimeData,ISerieContainer
Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid.
GridCoord.BoundaryPoint
public bool BoundaryPoint(Vector3 sp, Vector3 ep, ref List<Vector3> point)
给定的线段和Grid边界的交点
GridCoord.Clamp
public void Clamp(ref Vector3 pos)
从
v3.7.0开始支持
将位置限制在网格内。
GridCoord.ClampX
public void ClampX(ref Vector3 pos)
从
v3.7.0开始支持
将位置的X限制在网格内。
GridCoord.ClampY
public void ClampY(ref Vector3 pos)
从
v3.7.0开始支持
将位置的Y限制在网格内。
GridCoord.Contains
public bool Contains(float x, float y)
给定的位置是否在网格内。
public bool Contains(Vector3 pos, bool isYAxis)
从
v3.7.0开始支持
给定的位置是否在网格内。
GridCoord.ContainsX
public bool ContainsX(float x)
从
v3.7.0开始支持
给定的x是否在网格内。
GridCoord.ContainsY
public bool ContainsY(float y)
从
v3.7.0开始支持
给定的y是否在网格内。
GridCoord.IsPointerEnter
public bool IsPointerEnter()
指针是否在网格内。
GridCoord.NotAnyIntersect
public bool NotAnyIntersect(Vector3 sp, Vector3 ep)
从
v3.10.0开始支持
判断给定的线段是否与Grid边界是否完全不会相交。
GridCoord.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
GridCoord3D
class in XCharts.Runtime / 继承自: CoordSystem,IUpdateRuntimeData,ISerieContainer
从
v3.11.0开始支持
Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid.
GridCoord3D.Clamp
public void Clamp(ref Vector3 pos)
将位置限制在网格内。
GridCoord3D.Contains
public bool Contains(Vector3 pos)
给定的位置是否在网格内。
GridCoord3D.IsLeft
public bool IsLeft()
The opening of the coordinate system faces to the left. 坐标系开口朝向左边。
GridCoord3D.IsPointerEnter
public bool IsPointerEnter()
指针是否在网格内。
GridCoord3D.NotAnyIntersect
public bool NotAnyIntersect(Vector3 sp, Vector3 ep)
判断给定的线段是否与Grid边界是否完全不会相交。
GridCoord3D.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
GridCoord3DContext
class in XCharts.Runtime / 继承自: MainComponentContext
GridCoordContext
class in XCharts.Runtime / 继承自: MainComponentContext
GridLayout
class in XCharts.Runtime / 继承自: MainComponent,IUpdateRuntimeData
从
v3.8.0开始支持
网格布局组件。用于管理多个GridCoord的布局,可以通过row和column来控制网格的行列数。
GridLayout.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
GridLayoutContext
class in XCharts.Runtime / 继承自: MainComponentContext
Heatmap
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer
Heatmap.containerIndex
public int containerIndex
Heatmap.containterInstanceId
public int containterInstanceId
Heatmap.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
HeatmapChart
class in XCharts.Runtime / 继承自: BaseChart
热力图主要通过颜色去表现数值的大小,必须要配合 visualMap 组件使用。 可以应用在直角坐标系以及地理坐标系上,这两个坐标系上的表现形式相差很大,直角坐标系上必须要使用两个类目轴。
HeatmapChart.DefaultCountHeatmapChart
public void DefaultCountHeatmapChart()
默认计数热力图。
HeatmapType
class in XCharts.Runtime
热力图类型。通过颜色映射划分。
可选:
Data: 数据映射型。默认用第2维数据作为颜色映射。要求数据至少有3个维度数据。Count: 个数映射型。统计数据在划分的格子中出现的次数,作为颜色映射。要求数据至少有2个维度数据。
IconStyle
class in XCharts.Runtime / 继承自: ChildComponent
IconStyle.align
public Align align
水平方向对齐方式。
IconStyle.autoHideWhenLabelEmpty
public bool autoHideWhenLabelEmpty
当label内容为空时是否自动隐藏图标
IconStyle.color
public Color color
图标颜色。
IconStyle.height
public float height
图标高。
IconStyle.layer
public Layer layer
显示在上层还是在下层。
IconStyle.offset
public Vector3 offset
图标偏移。
IconStyle.show
public bool show
是否显示图标。
IconStyle.sprite
public Sprite sprite
图标的图片。
IconStyle.type
public Image.Type type
图片的显示类型。
IconStyle.width
public float width
图标宽。
IconStyle.Clone
public IconStyle Clone()
IconStyle.Copy
public void Copy(IconStyle iconStyle)
IconStyle.Reset
public void Reset()
IconStyle.Layer
class in XCharts.Runtime
可选:
UnderText: The icon is display under the label text. 图标在标签文字下AboveText: The icon is display above the label text. 图标在标签文字上
IgnoreDoc
class in XCharts.Runtime / 继承自: Attribute
IgnoreDoc.IgnoreDoc
public IgnoreDoc()
ImageStyle
class in XCharts.Runtime / 继承自: ChildComponent,ISerieComponent,ISerieDataComponent
ImageStyle.autoColor
public bool autoColor
是否自动颜色。
ImageStyle.color
public Color color
图标颜色。
ImageStyle.height
public float height
图标高。
ImageStyle.show
public bool show
是否显示图标。
ImageStyle.sprite
public Sprite sprite
图标的图片。
ImageStyle.type
public Image.Type type
图片的显示类型。
ImageStyle.width
public float width
图标宽。
ImageStyle.Clone
public ImageStyle Clone()
ImageStyle.Copy
public void Copy(ImageStyle imageStyle)
ImageStyle.Reset
public void Reset()
Indicator
class in XCharts.Runtime
雷达图的指示器,用来指定雷达图中的多个变量(维度)。
Indicator.indicatorList
public List<Indicator> indicatorList
指示器列表。
Indicator.max
public double max
指示器的最大值,默认为 0 无限制。
Indicator.min
public double min
指示器的最小值,默认为 0 无限制。
Indicator.name
public string name
指示器名称。
Indicator.show
public bool show
是否显示雷达坐标系组件。
Indicator.text
public Text text
指示器的文本组件。
Indicator.AddIndicator
public RadarCoord.Indicator AddIndicator(string name, double min, double max)
Indicator.AddIndicatorList
public void AddIndicatorList(List<string> nameList, double min = 0, double max = 0)
从
v3.3.0开始支持
Indicator.ClearData
public override void ClearData()
Indicator.GetFormatterIndicatorContent
public string GetFormatterIndicatorContent(string indicatorName, int index, int totalIndex)
Indicator.GetIndicator
public RadarCoord.Indicator GetIndicator(int indicatorIndex)
Indicator.GetIndicatorMax
public double GetIndicatorMax(int index)
Indicator.GetIndicatorMin
public double GetIndicatorMin(int index)
Indicator.GetIndicatorName
public string GetIndicatorName(int indicatorIndex)
Indicator.GetIndicatorPosition
public Vector3 GetIndicatorPosition(int index)
Indicator.IsInIndicatorRange
public bool IsInIndicatorRange(int index, double value)
Indicator.IsInRange
public bool IsInRange(double value)
Indicator.IsPointerEnter
public bool IsPointerEnter()
Indicator.SetDefaultValue
public override void SetDefaultValue()
Indicator.UpdateIndicator
public bool UpdateIndicator(int indicatorIndex, string name, double min, double max)
INeedSerieContainer
class in XCharts.Runtime / 子类: Bar,SimplifiedBar,Candlestick,SimplifiedCandlestick,Heatmap,Line,SimplifiedLine,Parallel,Radar,BaseScatter
InputHelper
class in XCharts.Runtime
InputHelper.GetKeyDown
public static bool GetKeyDown(KeyCode keyCode)
InputHelper.GetTouch
public static Touch GetTouch(int v)
InteractData
class in XCharts.Runtime
InteractData.Reset
public void Reset()
InteractData.SetColor
public void SetColor(ref bool needInteract, Color32 color, Color32 toColor)
InteractData.SetPosition
public void SetPosition(ref bool needInteract, Vector3 pos)
InteractData.SetValue
public void SetValue(ref bool needInteract, float value, bool previousValueZero = false)
InteractData.SetValueAndColor
public void SetValueAndColor(ref bool needInteract, float value, Color32 color, Color32 toColor)
InteractData.ToString
public override string ToString()
InteractData.TryGetColor
public bool TryGetColor(ref Color32 color, ref Color32 toColor, ref bool interacting, float animationDuration = 250)
InteractData.TryGetPosition
public bool TryGetPosition(ref Vector3 pos, ref bool interacting, float animationDuration = 250)
InteractData.TryGetValue
public bool TryGetValue(ref float value, ref bool interacting, float animationDuration = 250)
InteractData.TryGetValueAndColor
public bool TryGetValueAndColor(ref float value, ref Vector3 pos, ref bool interacting, float animationDuration = 250)
public bool TryGetValueAndColor(ref float value, ref Vector3 pos, ref Color32 color, ref Color32 toColor, ref bool interacting, float animationDuration = 250)
IPropertyChanged
class in XCharts.Runtime / 子类: Location,Comment,Legend,Title
属性变更接口
ISerieComponent
class in XCharts.Runtime / 子类: AreaStyle,ImageStyle,LineArrow,LabelLine,LabelStyle,BlurStyle,EmphasisStyle,SelectStyle,TitleStyle
可用于Serie的组件。
ISerieContainer
class in XCharts.Runtime / 子类: RadarCoord,CalendarCoord,GridCoord,GridCoord3D,ParallelCoord,PolarCoord
ISerieDataComponent
class in XCharts.Runtime / 子类: AreaStyle,ImageStyle,ItemStyle,LineStyle,SerieSymbol,LabelLine,LabelStyle,BlurStyle,EmphasisStyle,SelectStyle,TitleStyle
可用于SerieData的组件。
ISimplifiedSerie
class in XCharts.Runtime / 子类: SimplifiedBar,SimplifiedCandlestick,SimplifiedLine
ItemStyle
class in XCharts.Runtime / 继承自: ChildComponent,ISerieDataComponent
图形样式。
ItemStyle.GetBorderColor
public Color32 GetBorderColor(Color32 defaultColor)
ItemStyle.GetBorderColor0
public Color32 GetBorderColor0(Color32 defaultColor)
ItemStyle.GetColor
public Color32 GetColor(Color32 defaultColor)
ItemStyle.GetColor0
public Color32 GetColor0(Color32 defaultColor)
ItemStyle.GetGradientColor
public Color32 GetGradientColor(float value, Color32 defaultColor)
ItemStyle.GetToColor
public Color32 GetToColor()
ItemStyle.IsNeedCorner
public bool IsNeedCorner()
ItemStyle.IsNeedGradient
public bool IsNeedGradient()
ItemStyle.Reset
public void Reset()
IUpdateRuntimeData
class in XCharts.Runtime / 子类: SingleAxis,DataZoom,CalendarCoord,GridCoord,GridLayout,GridCoord3D,ParallelCoord
JsonUtil
class in XCharts.Runtime
JsonUtil.GetJsonArray<T>
public static T[] GetJsonArray<T>(string json)
JsonUtil.GetJsonObject<T>
public static T GetJsonObject<T>(string json)
JsonUtil.GetWebJson<T>
public static IEnumerator GetWebJson<T>(string url, Action<T> callback)
LabelLine
class in XCharts.Runtime / 继承自: ChildComponent,ISerieComponent,ISerieDataComponent
标签的引导线
LabelLine.GetEndSymbolOffset
public Vector3 GetEndSymbolOffset()
LabelLine.GetStartSymbolOffset
public Vector3 GetStartSymbolOffset()
LabelLine.Reset
public void Reset()
LabelLine.LineType
class in XCharts.Runtime
标签视觉引导线类型
可选:
BrokenLine: 折线Curves: 曲线HorizontalLine: 水平线
LabelStyle
class in XCharts.Runtime / 继承自: ChildComponent,ISerieComponent,ISerieDataComponent / 子类: AxisLabel,EndLabelStyle,TitleStyle
图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。
LabelStyle.Clone
public virtual LabelStyle Clone()
LabelStyle.Copy
public virtual void Copy(LabelStyle label)
LabelStyle.GetColor
public Color GetColor(Color defaultColor)
LabelStyle.GetFormatterContent
public virtual string GetFormatterContent(int labelIndex, int totalIndex, double value, double minValue, double maxValue, bool isLog = false)
LabelStyle.GetFormatterDateTime
public string GetFormatterDateTime(int labelIndex, int totalIndex, double value, double minValue, double maxValue)
LabelStyle.GetOffset
public Vector3 GetOffset(float radius)
LabelStyle.IsAutoSize
public bool IsAutoSize()
LabelStyle.IsDefaultPosition
public bool IsDefaultPosition(Position position)
LabelStyle.IsInside
public bool IsInside()
是否在内部。
LabelStyle.Reset
public void Reset()
LabelStyle.Position
class in XCharts.Runtime
标签的位置。
可选:
Default: 标签的位置。Outside: 饼图扇区外侧,通过视觉引导线连到相应的扇区。Inside: 饼图扇区内部。Center: 在饼图中心位置。Top: 图形标志的顶部。Bottom: 图形标志的底部。Left: 图形标志的左边。Right: 图形标志的右边。Start: 线的起始点。Middle: 线的中点。End: 线的结束点。
Lang
class in XCharts.Runtime / 继承自: ScriptableObject
国际化语言表。
Lang.GetCandlestickDimensionName
public string GetCandlestickDimensionName(int i)
Lang.GetDay
public string GetDay(int day)
Lang.GetMonthAbbr
public string GetMonthAbbr(int month)
LangCandlestick
class in XCharts.Runtime
LangCandlestick.List<string>()
public List<string> dimensionNames = new List<string>()
LangTime
class in XCharts.Runtime
LangTime.List<string>
public List<string> dayOfMonth = new List<string>()
public List<string> dayOfWeek = new List<string>()
public List<string> dayOfWeekAbbr = new List<string>()
public List<string> monthAbbr = new List<string>()
LayerHelper
class in XCharts.Runtime
LayerHelper.IsFixedWidthHeight
public static bool IsFixedWidthHeight(RectTransform rt)
LayerHelper.IsStretchPivot
public static bool IsStretchPivot(RectTransform rt)
Legend
class in XCharts.Runtime / 继承自: MainComponent,IPropertyChanged
图例组件。 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。
Legend.vertsDirty
public override bool vertsDirty
图表是否需要刷新(图例组件不需要刷新图表)
Legend.AddData
public void AddData(string name)
添加图例。
Legend.ClearComponentDirty
public override void ClearComponentDirty()
Legend.ClearData
public override void ClearData()
清空。
Legend.ContainsData
public bool ContainsData(string name)
是否包括由指定名字的图例
Legend.GetColor
public Color GetColor(int index)
Legend.GetData
public string GetData(int index)
获得指定索引的图例。
Legend.GetIcon
public Sprite GetIcon(int index)
获得指定索引的图例按钮。
Legend.GetIndex
public int GetIndex(string legendName)
获得指定图例的索引。
Legend.GetPosition
public Vector3 GetPosition(int index, Vector3 defaultPos)
Legend.OnChanged
public void OnChanged()
参数变更时的回调处理。
Legend.RemoveButton
public void RemoveButton()
移除所有图例按钮。
Legend.RemoveData
public void RemoveData(string name)
移除指定名字的图例。
Legend.SetButton
public void SetButton(string name, LegendItem item, int total)
给图例绑定按钮。
Legend.UpdateButtonColor
public void UpdateButtonColor(string name, Color color)
更新图例按钮颜色。
Legend.UpdateContentColor
public void UpdateContentColor(string name, Color color)
更新图例文字颜色。
Legend.SelectedMode
class in XCharts.Runtime
图例选择的模式,控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。
可选:
Multiple: 多选。Single: 单选。None: 无法选择。
Legend.Type
class in XCharts.Runtime
图例组件。 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。
可选:
Auto: 自动匹配。Custom: 自定义图标。EmptyCircle: 空心圆。Circle: 圆形。Rect: 正方形。可通过Setting的legendIconCornerRadius参数调整圆角。Triangle: 三角形。Diamond: 菱形。Candlestick: 烛台(可用于K线图)。
LegendContext
class in XCharts.Runtime / 继承自: MainComponentContext
LegendContext.background
public Image background
LegendContext.center
public Vector2 center
LegendContext.height
public float height
运行时图例的总高度
LegendContext.width
public float width
运行时图例的总宽度
LegendHelper
class in XCharts.Runtime
LegendHelper.CheckDataHighlighted
public static int CheckDataHighlighted(Serie serie, string legendName, bool heighlight)
LegendHelper.CheckDataShow
public static bool CheckDataShow(Serie serie, string legendName, bool show)
LegendHelper.GetContentColor
public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)
LegendHelper.GetIconColor
public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)
LegendHelper.ResetItemPosition
public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)
LegendHelper.SetLegendBackground
public static void SetLegendBackground(Legend legend, ImageStyle style)
LegendItem
class in XCharts.Runtime
LegendItem.button
public Button button
LegendItem.gameObject
public GameObject gameObject
LegendItem.index
public int index
LegendItem.legendName
public string legendName
LegendItem.name
public string name
LegendItem.text
public ChartText text
LegendItem.GetIconColor
public Color GetIconColor()
LegendItem.GetIconRect
public Rect GetIconRect()
LegendItem.SetActive
public void SetActive(bool active)
LegendItem.SetBackground
public void SetBackground(ImageStyle imageStyle)
LegendItem.SetButton
public void SetButton(Button button)
LegendItem.SetContent
public bool SetContent(string content)
LegendItem.SetContentBackgroundColor
public void SetContentBackgroundColor(Color color)
LegendItem.SetContentColor
public void SetContentColor(Color color)
LegendItem.SetContentPosition
public void SetContentPosition(Vector3 offset)
LegendItem.SetIcon
public void SetIcon(Image icon)
LegendItem.SetIconActive
public void SetIconActive(bool active)
LegendItem.SetIconColor
public void SetIconColor(Color color)
LegendItem.SetIconImage
public void SetIconImage(Sprite image)
LegendItem.SetIconSize
public void SetIconSize(float width, float height)
LegendItem.SetObject
public void SetObject(GameObject obj)
LegendItem.SetPosition
public void SetPosition(Vector3 position)
LegendItem.SetText
public void SetText(ChartText text)
LegendItem.SetTextBackground
public void SetTextBackground(Image image)
LegendTheme
class in XCharts.Runtime / 继承自: ComponentTheme
LegendTheme.Copy
public void Copy(LegendTheme theme)
LegendTheme.LegendTheme
public LegendTheme(ThemeType theme) : base(theme)
Level
class in XCharts.Runtime / 继承自: ChildComponent
Level.depth
public int depth
层级深度。
Level.itemStyle
public ItemStyle itemStyle
数据项样式。
Level.label
public LabelStyle label
文本标签样式。
Level.lineStyle
public LineStyle lineStyle
线条样式。
Level.upperLabel
public LabelStyle upperLabel
上方的文本标签样式。
LevelStyle
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.10.0开始支持
LevelStyle.levels
public List<Level> levels
各层节点对应的配置。当enableLevels为true时生效,levels[0]对应的第一层的配置,levels[1]对应第二层,依次类推。当levels中没有对应层时用默认的设置。
LevelStyle.show
public bool show
是否启用LevelStyle
Line
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer
Line.containerIndex
public int containerIndex
Line.containterInstanceId
public int containterInstanceId
Line.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
Line.ConvertSerie
public static Line ConvertSerie(Serie serie)
LineArrow
class in XCharts.Runtime / 继承自: ChildComponent,ISerieComponent
LineArrow.Position
class in XCharts.Runtime
可选:
End: 末端箭头Start: 头端箭头
LineChart
class in XCharts.Runtime / 继承自: BaseChart
折线图是用折线将各个数据点标志连接起来的图表,用于展现数据的变化趋势。可用于直角坐标系和极坐标系上。 设置 areaStyle 后可以绘制面积图。
LineChart.DefaultAreaLineChart
public void DefaultAreaLineChart()
默认面积折线图。
LineChart.DefaultDashLineChart
public void DefaultDashLineChart()
默认虚线折线图。
LineChart.DefaultLogLineChart
public void DefaultLogLineChart()
默认对数轴折线图。
LineChart.DefaultSmoothAreaLineChart
public void DefaultSmoothAreaLineChart()
默认平滑面积折线图。
LineChart.DefaultSmoothLineChart
public void DefaultSmoothLineChart()
默认平滑折线图。
LineChart.DefaultStackAreaLineChart
public void DefaultStackAreaLineChart()
默认堆叠面积折线图。
LineChart.DefaultStackLineChart
public void DefaultStackLineChart()
默认堆叠折线图。
LineChart.DefaultStepLineChart
public void DefaultStepLineChart()
默认阶梯折线图。
LineChart.DefaultTimeLineChart
public void DefaultTimeLineChart()
默认时间折线图。
LineHelper
class in XCharts.Runtime
LineHelper.GetDataAverageRate
public static int GetDataAverageRate(Serie serie, float axisLength, int maxCount, bool isYAxis)
LineHelper.GetLineWidth
public static float GetLineWidth(ref bool interacting, Serie serie, float defaultWidth)
LineStyle
class in XCharts.Runtime / 继承自: ChildComponent,ISerieDataComponent
线条样式。 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle.color,线条颜色默认也会取该颜色。 toColor,toColor2可设置水平方向的渐变,如需要设置垂直方向的渐变,可使用VisualMap。
LineStyle.Clone
public LineStyle Clone()
LineStyle.Copy
public void Copy(LineStyle lineStyle)
LineStyle.GetColor
public Color32 GetColor(Color32 themeColor)
LineStyle.GetGradientColor
public Color32 GetGradientColor(float value, Color32 defaultColor)
LineStyle.GetLength
public float GetLength(float themeLength)
LineStyle.GetType
public Type GetType(Type themeType)
LineStyle.GetWidth
public float GetWidth(float themeWidth)
LineStyle.IsNeedGradient
public bool IsNeedGradient()
LineStyle.IsNotSolidLine
public bool IsNotSolidLine()
LineStyle.LineStyle
public LineStyle(float width)
public LineStyle(LineStyle.Type type)
public LineStyle(LineStyle.Type type, float width)
LineStyle.Type
class in XCharts.Runtime
线的类型。
可选:
Solid: 实线Dashed: 虚线Dotted: 点线DashDot: 点划线DashDotDot: 双点划线None: 双点划线
LineType
class in XCharts.Runtime
折线图样式类型
可选:
Normal: 普通折线图。Smooth: 平滑曲线。StepStart: 阶梯线图:当前点。StepMiddle: 阶梯线图:当前点和下一个点的中间。StepEnd: 阶梯线图:下一个拐点。
ListFor
class in XCharts.Runtime / 继承自: Attribute / 子类: ListForComponent,ListForSerie
ListFor.ListFor
public ListFor(Type type)
ListForComponent
class in XCharts.Runtime / 继承自: ListFor
ListForComponent.ListForComponent
public ListForComponent(Type type) : base(type)
ListForSerie
class in XCharts.Runtime / 继承自: ListFor
ListForSerie.ListForSerie
public ListForSerie(Type type) : base(type)
ListPool<T>
class in XCharts.Runtime
ListPool<T>.ClearAll
public static void ClearAll()
ListPool<T>.Get
public static List<T> Get()
ListPool<T>.Release
public static void Release(List<T> toRelease)
Location
class in XCharts.Runtime / 继承自: ChildComponent,IPropertyChanged
位置类型。通过Align快速设置大体位置,再通过left,right,top,bottom微调具体位置。
Location.runtimeAnchorMax
public Vector2 runtimeAnchorMax
Location.runtimeAnchorMin
public Vector2 runtimeAnchorMin
Location对应的anchorMin。
Location.runtimeBottom
public float runtimeBottom
Location.runtimeLeft
public float runtimeLeft
Location.runtimePivot
public Vector2 runtimePivot
Loation对应的中心点。
Location.runtimeRight
public float runtimeRight
Location.runtimeTextAlignment
public TextAnchor runtimeTextAlignment
Location对应的Anchor锚点
Location.runtimeTMPTextAlignment
public TextAlignmentOptions runtimeTMPTextAlignment
Location.runtimeTop
public float runtimeTop
Location.GetPosition
public Vector3 GetPosition(float chartWidth, float chartHeight)
返回在坐标系中的具体位置
Location.GetRect
public Rect GetRect(float graphX, float graphY, float graphWidth, float graphHeight, float rectWidth, float rectHeight)
Location.IsBottom
public bool IsBottom()
Location.IsCenter
public bool IsCenter()
Location.IsTop
public bool IsTop()
Location.OnChanged
public void OnChanged()
属性变更时更新textAnchor,minAnchor,maxAnchor,pivot
Location.UpdateRuntimeData
public void UpdateRuntimeData(float chartWidth, float chartHeight)
Location.Align
class in XCharts.Runtime
对齐方式
可选:
TopLeft: 对齐方式TopRight: 对齐方式TopCenter: 对齐方式BottomLeft: 对齐方式BottomRight: 对齐方式BottomCenter: 对齐方式Center: 对齐方式CenterLeft: 对齐方式CenterRight: 对齐方式
MainComponent
class in XCharts.Runtime / 继承自: IComparable / 子类: Axis,Background,Comment,DataZoom,Legend,MarkArea,MarkLine,Settings,Title,Tooltip,VisualMap,GridLayout,CoordSystem
MainComponent.anyDirty
public bool anyDirty
需要重绘图表或重新初始化组件。
MainComponent.ClearData()
public virtual void ClearData()
MainComponent.componentDirty
public virtual bool componentDirty
组件重新初始化标记。
MainComponent.gameObject
public GameObject gameObject
MainComponent.index
public int index
MainComponent.instanceId
public int instanceId
MainComponent.painter
public Painter painter
MainComponent.refreshComponent
public Action refreshComponent
MainComponent.Reset()
public virtual void Reset()
MainComponent.ResetStatus()
public virtual void ResetStatus()
MainComponent.SetDefaultValue()
public virtual void SetDefaultValue()
MainComponent.vertsDirty
public virtual bool vertsDirty
图表重绘标记。
MainComponent.ClearComponentDirty
public virtual void ClearComponentDirty()
MainComponent.ClearData
public virtual void ClearData() { }
MainComponent.ClearDirty
public virtual void ClearDirty()
MainComponent.ClearVerticesDirty
public virtual void ClearVerticesDirty()
MainComponent.CompareTo
public int CompareTo(object obj)
MainComponent.OnRemove
public virtual void OnRemove()
MainComponent.Reset
public virtual void Reset() { }
MainComponent.ResetStatus
public virtual void ResetStatus() { }
MainComponent.SetAllDirty
public virtual void SetAllDirty()
MainComponent.SetComponentDirty
public virtual void SetComponentDirty()
MainComponent.SetDefaultValue
public virtual void SetDefaultValue() { }
MainComponent.SetVerticesDirty
public virtual void SetVerticesDirty()
MainComponentContext
class in XCharts.Runtime / 子类: AxisContext,DataZoomContext,LegendContext,RadarCoordContext,VisualMapContext,GridCoordContext,GridLayoutContext,GridCoord3DContext,ParallelCoordContext,PolarCoordContext
MainComponentHandler
class in XCharts.Runtime / 子类: AxisHandler<T>,MainComponentHandler<T>
MainComponentHandler.attribute
public ComponentHandlerAttribute attribute
MainComponentHandler.BeforceSerieUpdate()
public virtual void BeforceSerieUpdate()
MainComponentHandler.chart
public BaseChart chart
MainComponentHandler.eventData)
public virtual void OnBeginDrag(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnDrag(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnEndDrag(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnPointerClick(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnPointerDown(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnPointerEnter(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnPointerExit(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnPointerUp(PointerEventData eventData)
MainComponentHandler.eventData)
public virtual void OnScroll(PointerEventData eventData)
MainComponentHandler.InitComponent()
public virtual void InitComponent()
MainComponentHandler.inited
public bool inited
MainComponentHandler.order
public int order
MainComponentHandler.RemoveComponent()
public virtual void RemoveComponent()
MainComponentHandler.sb)
public virtual void CheckComponent(StringBuilder sb)
MainComponentHandler.serieIndex)
public virtual void OnSerieDataUpdate(int serieIndex)
MainComponentHandler.Update()
public virtual void Update()
MainComponentHandler.vh)
public virtual void DrawBase(VertexHelper vh)
MainComponentHandler.vh)
public virtual void DrawTop(VertexHelper vh)
MainComponentHandler.vh)
public virtual void DrawUpper(VertexHelper vh)
MainComponentHandler.BeforceSerieUpdate
public virtual void BeforceSerieUpdate() { }
MainComponentHandler.CheckComponent
public virtual void CheckComponent(StringBuilder sb) { }
MainComponentHandler.DrawBase
public virtual void DrawBase(VertexHelper vh) { }
MainComponentHandler.DrawTop
public virtual void DrawTop(VertexHelper vh) { }
MainComponentHandler.DrawUpper
public virtual void DrawUpper(VertexHelper vh) { }
MainComponentHandler.InitComponent
public virtual void InitComponent() { }
MainComponentHandler.OnBeginDrag
public virtual void OnBeginDrag(PointerEventData eventData) { }
MainComponentHandler.OnDrag
public virtual void OnDrag(PointerEventData eventData) { }
MainComponentHandler.OnEndDrag
public virtual void OnEndDrag(PointerEventData eventData) { }
MainComponentHandler.OnPointerClick
public virtual void OnPointerClick(PointerEventData eventData) { }
MainComponentHandler.OnPointerDown
public virtual void OnPointerDown(PointerEventData eventData) { }
MainComponentHandler.OnPointerEnter
public virtual void OnPointerEnter(PointerEventData eventData) { }
MainComponentHandler.OnPointerExit
public virtual void OnPointerExit(PointerEventData eventData) { }
MainComponentHandler.OnPointerUp
public virtual void OnPointerUp(PointerEventData eventData) { }
MainComponentHandler.OnScroll
public virtual void OnScroll(PointerEventData eventData) { }
MainComponentHandler.OnSerieDataUpdate
public virtual void OnSerieDataUpdate(int serieIndex) { }
MainComponentHandler.RemoveComponent
public virtual void RemoveComponent() { }
MainComponentHandler.Update
public virtual void Update() { }
MainComponentHandler<T>
class in XCharts.Runtime / 继承自: MainComponentHandler
MainComponentHandler<T>.component
public T component
MarkArea
class in XCharts.Runtime / 继承自: MainComponent
图表标域,常用于标记图表中某个范围的数据。
MarkArea.runtimeLabel
public ChartLabel runtimeLabel
图表标域,常用于标记图表中某个范围的数据。
MarkArea.runtimeLabelPosition
public Vector3 runtimeLabelPosition
MarkArea.runtimeRect
public Rect runtimeRect
MarkArea.SetDefaultValue
public override void SetDefaultValue()
MarkAreaData
class in XCharts.Runtime / 继承自: ChildComponent
标域的数据。
MarkAreaData.runtimeValue
public double runtimeValue
标域的数据。
MarkAreaType
class in XCharts.Runtime
标域类型
可选:
None: 标域类型Min: 最小值。Max: 最大值。Average: 平均值。Median: 中位数。
MarkLine
class in XCharts.Runtime / 继承自: MainComponent
图表标线。
MarkLine.SetDefaultValue
public override void SetDefaultValue()
MarkLineData
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.9.0开始支持
图表标线的数据。
MarkLineData.runtimeCurrentEndPosition
public Vector3 runtimeCurrentEndPosition
MarkLineData.runtimeEndPosition
public Vector3 runtimeEndPosition
MarkLineData.runtimeInGrid
public bool runtimeInGrid
MarkLineData.runtimeLabel
public ChartLabel runtimeLabel
MarkLineData.runtimeStartPosition
public Vector3 runtimeStartPosition
MarkLineData.runtimeValue
public double runtimeValue
MarkLineType
class in XCharts.Runtime
标线类型
可选:
Custom: 自定义。可自定义xy坐标或数值。Min: 最小值。Max: 最大值。Average: 平均值。Median: 中位数。
MarqueeStyle
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.5.0开始支持
Marquee style. It can be used for the DataZoom component. 选取框样式。可用于DataZoom组件。
MarqueeStyle.apply
public bool apply
选取框范围是否应用到DataZoom上。当为true时,框选结束后的范围即为DataZoom的选择范围。
MarqueeStyle.areaStyle
public AreaStyle areaStyle
选取框区域填充样式。
MarqueeStyle.lineStyle
public LineStyle lineStyle
选取框区域边框样式。
MarqueeStyle.onEnd
public Action<DataZoom> onEnd
自定义选取框结束选取时的回调。
MarqueeStyle.onGoing
public Action<DataZoom> onGoing
自定义选取框选取进行时的回调。
MarqueeStyle.onStart
public Action<DataZoom> onStart
自定义选取框开始选取时的回调。
MarqueeStyle.realRect
public bool realRect
是否选取实际框选区域。当为true时,以鼠标的其实点和结束点间的实际范围作为框选区域。
MathUtil
class in XCharts.Runtime
MathUtil.Abs
public static double Abs(double d)
MathUtil.Approximately
public static bool Approximately(double a, double b)
MathUtil.Clamp
public static double Clamp(double d, double min, double max)
MathUtil.Clamp01
public static double Clamp01(double value)
MathUtil.GetPrecision
public static int GetPrecision(double value)
MathUtil.IsInteger
public static bool IsInteger(double value)
MathUtil.Lerp
public static double Lerp(double a, double b, double t)
MLValue
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.8.0开始支持
多样式数值。
MLValue.type
public Type type
MLValue.value
public float value
MLValue.GetValue
public float GetValue(float total)
根据类型获取值。
MLValue.MLValue
public MLValue(Type type, float value)
MLValue.Type
class in XCharts.Runtime
数值类型。
可选:
Percent: 百分比形式。Absolute: 绝对值形式。Extra: 额外形式。
MonoBehaviour
class in / 子类: XLog
ObjectPool<T> where T
class in XCharts.Runtime / 继承自: new()
ObjectPool<T> where T.countActive
public int countActive
ObjectPool<T> where T.countAll
public int countAll
ObjectPool<T> where T.countInactive
public int countInactive
ObjectPool<T> where T.ClearAll
public void ClearAll()
ObjectPool<T> where T.Get
public T Get()
ObjectPool<T> where T.new
public class ObjectPool<T> where T : new()
ObjectPool<T> where T.ObjectPool
public ObjectPool(UnityAction<T> actionOnGet, UnityAction<T> actionOnRelease, bool newIfEmpty = true)
ObjectPool<T> where T.Release
public void Release(T element)
Orient
class in XCharts.Runtime
垂直还是水平布局方式。
可选:
Horizonal: 水平Vertical: 垂直
Padding
class in XCharts.Runtime / 继承自: ChildComponent / 子类: TextPadding
边距设置。
Padding.Padding()
public Padding()
Padding.Padding
public Padding(float top, float right, float bottom, float left)
Padding.SetPadding
public void SetPadding(float top, float right, float bottom, float left)
Painter
class in XCharts.Runtime / 继承自: MaskableGraphic
Painter.index
public int index
Painter.onPopulateMesh
public Action<VertexHelper, Painter> onPopulateMesh
Painter.type
public Type type
Painter.CheckRefresh
public void CheckRefresh()
Painter.Init
public void Init()
Painter.Refresh
public void Refresh()
Painter.SetActive
public void SetActive(bool flag, bool isDebugMode = false)
Painter.Type
class in XCharts.Runtime
可选:
Base:Serie:Top:
Parallel
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer
Parallel.containerIndex
public int containerIndex
Parallel.containterInstanceId
public int containterInstanceId
Parallel.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
ParallelAxis
class in XCharts.Runtime / 继承自: Axis
ParallelAxis.SetDefaultValue
public override void SetDefaultValue()
ParallelChart
class in XCharts.Runtime / 继承自: BaseChart
平行坐标系,通过绘制垂直于坐标轴的平行线来显示数据的一种可视化图表。
ParallelCoord
class in XCharts.Runtime / 继承自: CoordSystem,IUpdateRuntimeData,ISerieContainer
Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid.
ParallelCoord.Contains
public bool Contains(float x, float y)
ParallelCoord.IsPointerEnter
public bool IsPointerEnter()
ParallelCoord.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
ParallelCoordContext
class in XCharts.Runtime / 继承自: MainComponentContext
Pie
class in XCharts.Runtime / 继承自: Serie
Pie.defaultColorBy
public override SerieColorBy defaultColorBy
Pie.titleJustForSerie
public override bool titleJustForSerie
Pie.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
Pie.ConvertSerie
public static Pie ConvertSerie(Serie serie)
PieChart
class in XCharts.Runtime / 继承自: BaseChart
饼图主要用于显示不同类目占比的情况,通过弧长来反映数据的大小占比。
PieChart.DefaultAreaRosePieChart
public void DefaultAreaRosePieChart()
默认面积玫瑰饼图。
PieChart.DefaultDonutPieChart
public void DefaultDonutPieChart()
默认甜甜圈饼图。
PieChart.DefaultLabelDonutPieChart
public void DefaultLabelDonutPieChart()
默认带标签甜甜圈饼图。
PieChart.DefaultLabelPieChart
public void DefaultLabelPieChart()
默认带标签饼图。
PieChart.DefaultRadiusRosePieChart
public void DefaultRadiusRosePieChart()
默认玫瑰饼图。
PolarAxisTheme
class in XCharts.Runtime / 继承自: BaseAxisTheme
PolarAxisTheme.base(theme)
public PolarAxisTheme(ThemeType theme) : base(theme)
PolarAxisTheme.PolarAxisTheme
public PolarAxisTheme(ThemeType theme) : base(theme) { }
PolarChart
class in XCharts.Runtime / 继承自: BaseChart
极坐标系,可以用于散点图和折线图。
PolarChart.DefaultHeatmapPolarChart
public void DefaultHeatmapPolarChart()
默认极坐标色块图。
PolarChart.DefaultRadialBarPolarChart
public void DefaultRadialBarPolarChart()
默认径向柱状极坐标图。
PolarChart.DefaultTangentialBarPolarChart
public void DefaultTangentialBarPolarChart()
默认切向柱状极坐标图。
PolarCoord
class in XCharts.Runtime / 继承自: CoordSystem,ISerieContainer
极坐标系组件。 极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。
PolarCoord.Contains
public bool Contains(Vector3 pos)
PolarCoord.IsPointerEnter
public bool IsPointerEnter()
PolarCoordContext
class in XCharts.Runtime / 继承自: MainComponentContext
PropertyUtil
class in XCharts.Runtime
PropertyUtil.SetClass<T>
public static bool SetClass<T>(ref T currentValue, T newValue, bool notNull = false) where T : class
PropertyUtil.SetColor
public static bool SetColor(ref Color32 currentValue, Color32 newValue)
PropertyUtil.SetStruct<T>
public static bool SetStruct<T>(ref T currentValue, T newValue) where T : struct
Radar
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer
Radar.containerIndex
public int containerIndex
Radar.containterInstanceId
public int containterInstanceId
Radar.defaultColorBy
public override SerieColorBy defaultColorBy
Radar.multiDimensionLabel
public override bool multiDimensionLabel
Radar.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
RadarAxisTheme
class in XCharts.Runtime / 继承自: BaseAxisTheme
RadarAxisTheme.RadarAxisTheme
public RadarAxisTheme(ThemeType theme) : base(theme)
RadarChart
class in XCharts.Runtime / 继承自: BaseChart
雷达图主要用于显示多变量的数据,例如足球运动员的各项属性分析。依赖雷达组件。
RadarChart.DefaultCircleRadarChart
public void DefaultCircleRadarChart()
默认圆形雷达图。
RadarCoord
class in XCharts.Runtime / 继承自: CoordSystem,ISerieContainer
Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。
RadarCoord.PositionType
class in XCharts.Runtime
显示位置。
可选:
Vertice: 显示在顶点处。Between: 显示在两者之间。
RadarCoord.Shape
class in XCharts.Runtime
雷达图绘制类型,支持 'Polygon' 和 'Circle'。
可选:
Polygon: 雷达图绘制类型,支持 'Polygon' 和 'Circle'。Circle: 雷达图绘制类型,支持 'Polygon' 和 'Circle'。
RadarCoordContext
class in XCharts.Runtime / 继承自: MainComponentContext
RadarCoordContext.center
public Vector3 center
雷达图在容器中的具体中心点。
RadarCoordContext.dataRadius
public float dataRadius
RadarCoordContext.isPointerEnter
public bool isPointerEnter
RadarCoordContext.radius
public float radius
雷达图的运行时实际半径。
RadarType
class in XCharts.Runtime
雷达图类型。
可选:
Multiple: 多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。Single: 单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自data[1]。
RadiusAxis
class in XCharts.Runtime / 继承自: Axis
极坐标系的径向轴。
RadiusAxis.SetDefaultValue
public override void SetDefaultValue()
极坐标系的径向轴。
RadiusAxisTheme
class in XCharts.Runtime / 继承自: BaseAxisTheme
RadiusAxisTheme.base(theme)
public RadiusAxisTheme(ThemeType theme) : base(theme)
RadiusAxisTheme.RadiusAxisTheme
public RadiusAxisTheme(ThemeType theme) : base(theme) { }
ReflectionUtil
class in XCharts.Runtime
ReflectionUtil.DeepCloneSerializeField
public static object DeepCloneSerializeField(object obj)
ReflectionUtil.InvokeListAdd
public static void InvokeListAdd(object obj, FieldInfo field, object item)
ReflectionUtil.InvokeListAddTo<T>
public static void InvokeListAddTo<T>(object obj, FieldInfo field, Action<T> callback)
ReflectionUtil.InvokeListClear
public static void InvokeListClear(object obj, FieldInfo field)
ReflectionUtil.InvokeListCount
public static int InvokeListCount(object obj, FieldInfo field)
ReflectionUtil.InvokeListGet<T>
public static T InvokeListGet<T>(object obj, FieldInfo field, int i)
RequireChartComponentAttribute
class in XCharts.Runtime / 继承自: Attribute
RequireChartComponentAttribute.RequireChartComponentAttribute
public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2)
public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2, Type requiredComponent3)
Ring
class in XCharts.Runtime / 继承自: Serie
Ring.defaultColorBy
public override SerieColorBy defaultColorBy
Ring.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
Ring.GetDataTotal
public override double GetDataTotal(int dimension, SerieData serieData = null)
RingChart
class in XCharts.Runtime / 继承自: BaseChart
环形图主要用于显示每一项的比例以及各项之间的关系。
RingChart.DefaultMultipleRingChart
public void DefaultMultipleRingChart()
默认多圆环图。
RoseType
class in XCharts.Runtime
是否展示成南丁格尔图,通过半径区分数据大小。
可选:
None: 不展示成南丁格尔玫瑰图。Radius: 扇区圆心角展现数据的百分比,半径展现数据的大小。Area: 所有扇区圆心角相同,仅通过半径展现数据大小。
RuntimeUtil
class in XCharts.Runtime
RuntimeUtil.GetAllAssemblyTypes
public static IEnumerable<Type> GetAllAssemblyTypes()
RuntimeUtil.GetAllTypesDerivedFrom
public static IEnumerable<Type> GetAllTypesDerivedFrom(Type type)
RuntimeUtil.GetAllTypesDerivedFrom<T>
public static IEnumerable<Type> GetAllTypesDerivedFrom<T>()
RuntimeUtil.GetAttribute<T>
public static T GetAttribute<T>(this MemberInfo type, bool check = true) where T : Attribute
RuntimeUtil.HasSubclass
public static bool HasSubclass(Type type)
SampleType
class in XCharts.Runtime
采样类型,一般用于折线图。
可选:
Peak: 取峰值。Average: 取过滤点的平均值。Max: 取过滤点的最大值。Min: 取过滤点的最小值。Sum: 取过滤点的和。
Scatter
class in XCharts.Runtime / 继承自: BaseScatter
Scatter.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
ScatterChart
class in XCharts.Runtime / 继承自: BaseChart
散点图主要用于展现两个数据维度之间的关系。
ScatterChart.DefaultBubbleChart
public void DefaultBubbleChart()
默认气泡图。
SelectStyle
class in XCharts.Runtime / 继承自: StateStyle,ISerieComponent,ISerieDataComponent
从
v3.2.0开始支持
选中状态样式。
Serie
class in XCharts.Runtime / 继承自: BaseSerie,IComparable / 子类: SerieHandler<T>,Bar,SimplifiedBar,Candlestick,SimplifiedCandlestick,Heatmap,Line,SimplifiedLine,Parallel,Pie,Radar,Ring,BaseScatter
系列。系列一般由数据和配置组成,用来表示具体的图表图形,如折线图的一条折线,柱图的一组柱子等。一个图表中可以包含多个不同类型的系列。
Serie.areaStyle
public AreaStyle areaStyle
区域填充样式。
Serie.blurStyle
public BlurStyle blurStyle
淡出状态的样式。
Serie.colorByData
public bool colorByData
取色策略是否为按数据项分配。
Serie.data
public List<SerieData> data
系列中的数据内容数组。SerieData可以设置1到n维数据。
Serie.dataCount
public int dataCount
数据项个数。
Serie.dataDirty
public bool dataDirty
Serie.emphasisStyle
public EmphasisStyle emphasisStyle
高亮状态的样式。
Serie.endLabel
public LabelStyle endLabel
Serie.highlight
public bool highlight
该系列是否高亮,一般由图例悬停触发。
Serie.index
public int index
系列索引。
Serie.interactDirty
public bool interactDirty
Serie.label
public LabelStyle label
图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。
Serie.labelDirty
public bool labelDirty
Serie.labelLine
public LabelLine labelLine
标签上的视觉引导线。
Serie.legendName
public string legendName
图例名称。当系列名称不为空时,图例名称即为系列名称;反之则为索引index。
Serie.lineArrow
public LineArrow lineArrow
折线图的箭头。
Serie.links
public List<SerieDataLink> links
数据节点的边。
Serie.nameDirty
public bool nameDirty
Serie.onClick
public Action<SerieEventData> onClick
点击系列时的回调。
Serie.onDown
public Action<SerieEventData> onDown
鼠标按下时的回调。
Serie.onEnter
public Action<SerieEventData> onEnter
鼠标进入时的回调。
Serie.onExit
public Action<SerieEventData> onExit
鼠标离开时的回调。
Serie.selectStyle
public SelectStyle selectStyle
选中状态的样式。
Serie.showDataDimension
public int showDataDimension
数据项里的数据维数。
Serie.showDataName
public bool showDataName
在Editor的inpsector上是否显示name参数
Serie.titleDirty
public bool titleDirty
Serie.titleStyle
public TitleStyle titleStyle
数据项标题样式。
Serie.AddChildData
public SerieData AddChildData(SerieData parent, List<double> value, string name, string id)
public void AddChildData(SerieData parent, SerieData serieData)
Serie.AddData
public SerieData AddData(List<double> valueList, string dataName = null, string dataId = null)
将一组数据添加到系列中。 如果数据只有一个,默认添加到维度Y中。
public SerieData AddData(params double[] values)
添加任意维数据到系列中。
Serie.AddExtraComponent<T>
public T AddExtraComponent<T>() where T : ChildComponent, ISerieComponent
Serie.AddLink
public virtual SerieDataLink AddLink(string sourceId, string targetId, double value = 0)
添加一个关系图的关系数据。
Serie.AddSerieData
public virtual void AddSerieData(SerieData serieData)
Serie.AddXYData
public SerieData AddXYData(double xValue, double yValue, string dataName = null, string dataId = null)
添加(x,y)数据到维度X和维度Y
Serie.AddYData
public SerieData AddYData(double value, string dataName = null, string dataId = null)
添加一个数据到维度Y(此时维度X对应的数据是索引)
Serie.AnimationEnable
public void AnimationEnable(bool flag)
启用或取消初始动画
Serie.AnimationFadeIn
public void AnimationFadeIn()
渐入动画
Serie.AnimationFadeOut
public void AnimationFadeOut()
渐出动画
Serie.AnimationPause
public void AnimationPause()
暂停动画
Serie.AnimationReset
public void AnimationReset()
重置动画
Serie.AnimationRestart
public void AnimationRestart()
重置动画
Serie.AnimationResume
public void AnimationResume()
继续动画
Serie.CanAddComponent
public bool CanAddComponent(Type type)
Serie.CanAddComponent<T>
public bool CanAddComponent<T>() where T : ChildComponent, ISerieComponent
Serie.ClearComponentDirty
public override void ClearComponentDirty()
Serie.ClearData
public override void ClearData()
清空所有数据
Serie.ClearDirty
public override void ClearDirty()
Serie.ClearHighlight
public void ClearHighlight()
清除所有数据的高亮标志
Serie.ClearLinks
public void ClearLinks()
清空所有Link数据
Serie.ClearSerieNameDirty
public void ClearSerieNameDirty()
Serie.ClearVerticesDirty
public override void ClearVerticesDirty()
Serie.Clone
public Serie Clone()
Serie.Clone<T>
public T Clone<T>() where T : Serie
Serie.CompareTo
public int CompareTo(object obj)
Serie.EnsureComponent
public ISerieComponent EnsureComponent(Type type)
Serie.EnsureComponent<T>
public T EnsureComponent<T>() where T : ChildComponent, ISerieComponent
确保系列有该组件。如果没有,则添加。
Serie.GetBarWidth
public float GetBarWidth(float categoryWidth, int barCount = 0, float defaultRate = 0.6f)
Serie.GetComponent
public ISerieComponent GetComponent(Type type)
Serie.GetComponent<T>
public T GetComponent<T>() where T : ChildComponent, ISerieComponent
Serie.GetData
public double GetData(int index, int dimension, DataZoom dataZoom = null)
获得指定index指定维数的数据
Serie.GetDataList
public List<SerieData> GetDataList(DataZoom dataZoom = null, bool sorted = false)
获得系列的数据列表
Serie.GetDataTotal
public virtual double GetDataTotal(int dimension, SerieData serieData = null)
Serie.GetSerieData
public SerieData GetSerieData(SerieData parent, string id)
public SerieData GetSerieData(string id, DataZoom dataZoom = null)
Serie.GetXYData
public void GetXYData(int index, DataZoom dataZoom, out double xValue, out double yVlaue)
获得指定索引的维度X和维度Y的数据
Serie.GetYCurrData
public double GetYCurrData(int index, DataZoom dataZoom = null)
Serie.GetYData
public void GetYData(int index, out double yData, out string dataName, DataZoom dataZoom = null)
获得维度Y索引对应的数据和数据名
Serie.IsIgnoreIndex
public bool IsIgnoreIndex(int index, int dimension = 1)
Serie.IsIgnorePoint
public bool IsIgnorePoint(int index)
Serie.IsIgnoreValue
public bool IsIgnoreValue(double value)
public bool IsIgnoreValue(SerieData serieData, double value)
Serie.IsLegendName
public bool IsLegendName(string legendName)
Serie.IsMinShowLabelValue
public bool IsMinShowLabelValue(double value)
public bool IsMinShowLabelValue(SerieData serieData, int dimension = 1)
Serie.IsPerformanceMode
public bool IsPerformanceMode()
是否为性能模式。性能模式下不绘制Symbol,不刷新Label,不单独设置数据项配置。
Serie.IsSerie<T>
public bool IsSerie<T>() where T : Serie
Serie.IsSerieDataLegendName
public bool IsSerieDataLegendName(string legendName)
Serie.IsSerieLegendName
public bool IsSerieLegendName(string legendName)
Serie.IsUseCoord<T>
public bool IsUseCoord<T>() where T : CoordSystem
Serie.RemoveAllComponents
public void RemoveAllComponents()
移除所有额外组件。
Serie.RemoveComponent
public void RemoveComponent(Type type)
Serie.RemoveComponent<T>
public void RemoveComponent<T>() where T : ISerieComponent
Serie.RemoveData
public void RemoveData(int index)
移除指定索引的数据
Serie.ResetDataIndex
public bool ResetDataIndex()
重置数据项索引。避免部分数据项的索引异常。
Serie.ResetInteract
public void ResetInteract()
Serie.SetAllDirty
public override void SetAllDirty()
Serie.SetCoord<T>
public bool SetCoord<T>() where T : CoordSystem
Serie.SetHighlight
public void SetHighlight(int index, bool flag)
设置指定索引的数据为高亮状态
Serie.SetVerticesDirty
public override void SetVerticesDirty()
Serie.UpdateData
public bool UpdateData(int index, List<double> values)
更新指定索引的数据项数据列表
Serie.UpdateDataName
public bool UpdateDataName(int index, string name)
Serie.UpdateXYData
public bool UpdateXYData(int index, double xValue, double yValue)
更新指定索引的维度X和维度Y的数据
Serie.UpdateYData
public bool UpdateYData(int index, double value)
更新指定索引的维度Y数据
SerieColorBy
class in XCharts.Runtime
从主题中取色策略。
可选:
Default: 默认策略。每种Serie都有自己的默认的取颜色策略。比如Line默认是Series策略,Pie默认是Data策略。Serie: 按照系列分配调色盘中的颜色,同一系列中的所有数据都是用相同的颜色。Data: 按照数据项分配调色盘中的颜色,每个数据项都使用不同的颜色。
SerieComponentAttribute
class in XCharts.Runtime / 继承自: Attribute
可添加到Serie的组件。
SerieComponentAttribute.Contains
public bool Contains(Type type)
SerieComponentAttribute.Contains<T>
public bool Contains<T>() where T : ISerieComponent
SerieComponentAttribute.SerieComponentAttribute
public SerieComponentAttribute(Type type1)
public SerieComponentAttribute(Type type1, Type type2)
public SerieComponentAttribute(Type type1, Type type2, Type type3)
public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4)
public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)
public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)
public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)
SerieContext
class in XCharts.Runtime
SerieContext.titleObject
public ChartLabel titleObject
绘制点
SerieConvertAttribute
class in XCharts.Runtime / 继承自: Attribute
可转化为哪些Serie类型。
SerieConvertAttribute.Contains
public bool Contains(Type type)
SerieConvertAttribute.Contains<T>
public bool Contains<T>() where T : Serie
SerieConvertAttribute.SerieConvertAttribute
public SerieConvertAttribute(Type serie, Type serie2)
public SerieConvertAttribute(Type serie, Type serie2, Type serie3)
public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)
SerieData
class in XCharts.Runtime / 继承自: ChildComponent
系列中的一个数据项。可存储数据名和1-n维个数据。
SerieData.areaStyle
public AreaStyle areaStyle
SerieData.blurStyle
public BlurStyle blurStyle
淡出状态的样式。
SerieData.data
public List<double> data
可指定任意维数的数值列表。
SerieData.emphasisStyle
public EmphasisStyle emphasisStyle
高亮状态的样式
SerieData.id
public string id
数据项的唯一id。唯一id不是必须设置的。
SerieData.index
public override int index
数据项索引。
SerieData.itemStyle
public ItemStyle itemStyle
单个数据项的样式设置。
SerieData.labelLine
public LabelLine labelLine
SerieData.labelObject
public ChartLabel labelObject
SerieData.labelStyle
public LabelStyle labelStyle
单个数据项的标签设置。
SerieData.legendName
public string legendName
数据项图例名称。当数据项名称不为空时,图例名称即为系列名称;反之则为索引index。
SerieData.lineStyle
public LineStyle lineStyle
SerieData.name
public string name
数据项名称。
SerieData.parentId
public string parentId
父节点id。父节点id不是必须设置的。
SerieData.radius
public float radius
自定义半径。可用在饼图中自定义某个数据项的半径。
SerieData.selected
public bool selected
该数据项是否被选中。
SerieData.selectStyle
public SelectStyle selectStyle
选中状态的样式。
SerieData.show
public bool show
该数据项是否要显示。
SerieData.sortIndex
public int sortIndex
SerieData.state
public SerieState state
数据项的默认状态。
SerieData.symbol
public SerieSymbol symbol
单个数据项的标记设置。
SerieData.titleObject
public ChartLabel titleObject
SerieData.titleStyle
public TitleStyle titleStyle
SerieData.ClearComponentDirty
public override void ClearComponentDirty()
SerieData.ClearVerticesDirty
public override void ClearVerticesDirty()
SerieData.EnsureComponent
public ISerieDataComponent EnsureComponent(Type type)
从
v3.6.0开始支持
确保数据项有指定类型的组件,如果没有则添加。
SerieData.EnsureComponent<T>
public T EnsureComponent<T>() where T : ChildComponent, ISerieDataComponent
从
v3.6.0开始支持
确保数据项有指定类型的组件,如果没有则添加。
SerieData.GetAddAnimationData
public double GetAddAnimationData(double min, double max, float animationDuration = 500f, bool unscaledTime = false)
SerieData.GetComponent<T>
public T GetComponent<T>() where T : ChildComponent, ISerieDataComponent
获取数据项的指定类型的组件,如果不存在则返回null。
SerieData.GetCurrData
public double GetCurrData(int index, AnimationStyle animation, bool inverse, double min, double max, bool loop = false)
public double GetCurrData(int index, float dataAddDuration = 500f, float animationDuration = 500f, bool unscaledTime = false, bool inverse = false)
public double GetCurrData(int index, float dataAddDuration, float animationDuration, bool inverse, double min, double max, bool unscaledTime, bool loop = false)
SerieData.GetData
public double GetData(int index, double min, double max)
SerieData.GetFirstData
public double GetFirstData(bool unscaledTime, float animationDuration = 500f)
SerieData.GetLabelHeight
public float GetLabelHeight()
SerieData.GetLabelWidth
public float GetLabelWidth()
SerieData.GetLastData
public double GetLastData()
SerieData.GetMaxData
public double GetMaxData(bool inverse = false)
最大值。
SerieData.GetMinData
public double GetMinData(bool inverse = false)
最小值。
SerieData.GetMinMaxData
public void GetMinMaxData(int startDimensionIndex, bool inverse, out double min, out double max)
SerieData.GetOrAddComponent<T>
public T GetOrAddComponent<T>() where T : ChildComponent, ISerieDataComponent
SerieData.GetPreviousData
public double GetPreviousData(int index, bool inverse = false)
SerieData.GetTotalData
public double GetTotalData()
SerieData.IsDataChanged
public bool IsDataChanged()
SerieData.IsInPolygon
public bool IsInPolygon(Vector2 p)
SerieData.List<string>
public static List<string> extraFieldList = new List<string>()
系列中的一个数据项。可存储数据名和1-n维个数据。
SerieData.OnAdd
public void OnAdd(AnimationStyle animation, double startValue = 0)
SerieData.RemoveAllComponent
public void RemoveAllComponent()
SerieData.RemoveComponent
public void RemoveComponent(Type type)
SerieData.RemoveComponent<T>
public void RemoveComponent<T>() where T : ISerieDataComponent
SerieData.Reset
public void Reset()
SerieData.SetIconActive
public void SetIconActive(bool flag)
SerieData.SetLabelActive
public void SetLabelActive(bool flag, bool force = false)
SerieData.SetPolygon
public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)
public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5)
SerieData.UpdateData
public bool UpdateData(int dimension, double value)
SerieDataComponentAttribute
class in XCharts.Runtime / 继承自: Attribute
可添加到SerieData的组件。
SerieDataComponentAttribute.Contains
public bool Contains(Type type)
SerieDataComponentAttribute.Contains<T>
public bool Contains<T>() where T : ISerieComponent
SerieDataComponentAttribute.SerieDataComponentAttribute
public SerieDataComponentAttribute(Type type1)
public SerieDataComponentAttribute(Type type1, Type type2)
public SerieDataComponentAttribute(Type type1, Type type2, Type type3)
public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4)
public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)
public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)
public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)
SerieDataContext
class in XCharts.Runtime
SerieDataContext.Reset
public void Reset()
SerieDataContext.UpdateExchangePosition
public void UpdateExchangePosition(ref float x, ref float y, float totalTime)
SerieDataExtraFieldAttribute
class in XCharts.Runtime / 继承自: Attribute
SerieDataExtraFieldAttribute.Contains
public bool Contains(string field)
SerieDataExtraFieldAttribute.SerieDataExtraFieldAttribute
public SerieDataExtraFieldAttribute(string field1)
public SerieDataExtraFieldAttribute(string field1, string field2)
public SerieDataExtraFieldAttribute(string field1, string field2, string field3)
public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4)
public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5)
public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6)
public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6, string field7)
SerieDataLink
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.10.0开始支持
数据节点之间的连线。可用于桑基图等,桑基图只支持有向无环图,请保证数据的连线是有向无环图。
SerieDataSortType
class in XCharts.Runtime
数据排序方式。
可选:
None: 按数据的顺序。Ascending: 升序。Descending: 降序。
SerieEventData
class in XCharts.Runtime
serie事件的数据。
SerieEventData.dataIndex
public int dataIndex
在serie.data中的索引。
SerieEventData.dimension
public int dimension
数据的维度。
SerieEventData.pointerPos
public Vector3 pointerPos
鼠标在chart中的位置。
SerieEventData.serieIndex
public int serieIndex
在chart.series中的索引。
SerieEventData.value
public double value
数据的值。
SerieEventData.Reset
public void Reset()
SerieEventDataPool
class in XCharts.Runtime
SerieEventDataPool.Get
public static SerieEventData Get(Vector3 pos, int serieIndex, int dataIndex, int dimension, double value)
SerieEventDataPool.Release
public static void Release(SerieEventData toRelease)
SerieHandler
class in XCharts.Runtime
SerieHandler.AfterUpdate()
public virtual void AfterUpdate()
SerieHandler.attribute
public SerieHandlerAttribute attribute
SerieHandler.BeforeUpdate()
public virtual void BeforeUpdate()
SerieHandler.chart
public BaseChart chart
SerieHandler.defaultDimension
public virtual int defaultDimension
SerieHandler.eventData)
public virtual void OnBeginDrag(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnDrag(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnEndDrag(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnPointerClick(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnPointerDown(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnPointerEnter(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnPointerExit(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnPointerUp(PointerEventData eventData)
SerieHandler.eventData)
public virtual void OnScroll(PointerEventData eventData)
SerieHandler.ForceUpdateSerieContext()
public virtual void ForceUpdateSerieContext()
SerieHandler.GetPointerItemDataDimension()
public virtual int GetPointerItemDataDimension()
SerieHandler.GetPointerItemDataIndex()
public virtual int GetPointerItemDataIndex()
SerieHandler.InitComponent()
public virtual void InitComponent()
SerieHandler.inited
public bool inited
SerieHandler.legendName)
public virtual void OnLegendButtonEnter(int index, string legendName)
SerieHandler.legendName)
public virtual void OnLegendButtonExit(int index, string legendName)
SerieHandler.OnDataUpdate()
public virtual void OnDataUpdate()
SerieHandler.RefreshLabelInternal()
public virtual void RefreshLabelInternal()
SerieHandler.RefreshLabelNextFrame()
public virtual void RefreshLabelNextFrame()
SerieHandler.RemoveComponent()
public virtual void RemoveComponent()
SerieHandler.sb)
public virtual void CheckComponent(StringBuilder sb)
SerieHandler.show)
public virtual void OnLegendButtonClick(int index, string legendName, bool show)
SerieHandler.Update()
public virtual void Update()
SerieHandler.UpdateSerieContext()
public virtual void UpdateSerieContext()
SerieHandler.vh)
public virtual void DrawBase(VertexHelper vh)
SerieHandler.vh)
public virtual void DrawSerie(VertexHelper vh)
SerieHandler.vh)
public virtual void DrawTop(VertexHelper vh)
SerieHandler.vh)
public virtual void DrawUpper(VertexHelper vh)
SerieHandler.AfterUpdate
public virtual void AfterUpdate() { }
SerieHandler.BeforeUpdate
public virtual void BeforeUpdate() { }
SerieHandler.CheckComponent
public virtual void CheckComponent(StringBuilder sb) { }
SerieHandler.DrawBase
public virtual void DrawBase(VertexHelper vh) { }
SerieHandler.DrawSerie
public virtual void DrawSerie(VertexHelper vh) { }
SerieHandler.DrawTop
public virtual void DrawTop(VertexHelper vh) { }
SerieHandler.DrawUpper
public virtual void DrawUpper(VertexHelper vh) { }
SerieHandler.ForceUpdateSerieContext
public virtual void ForceUpdateSerieContext() { }
SerieHandler.InitComponent
public virtual void InitComponent() { }
SerieHandler.OnBeginDrag
public virtual void OnBeginDrag(PointerEventData eventData) { }
SerieHandler.OnDataUpdate
public virtual void OnDataUpdate() { }
SerieHandler.OnDrag
public virtual void OnDrag(PointerEventData eventData) { }
SerieHandler.OnEndDrag
public virtual void OnEndDrag(PointerEventData eventData) { }
SerieHandler.OnLegendButtonClick
public virtual void OnLegendButtonClick(int index, string legendName, bool show) { }
SerieHandler.OnLegendButtonEnter
public virtual void OnLegendButtonEnter(int index, string legendName) { }
SerieHandler.OnLegendButtonExit
public virtual void OnLegendButtonExit(int index, string legendName) { }
SerieHandler.OnPointerClick
public virtual void OnPointerClick(PointerEventData eventData) { }
SerieHandler.OnPointerDown
public virtual void OnPointerDown(PointerEventData eventData) { }
SerieHandler.OnPointerEnter
public virtual void OnPointerEnter(PointerEventData eventData) { }
SerieHandler.OnPointerExit
public virtual void OnPointerExit(PointerEventData eventData) { }
SerieHandler.OnPointerUp
public virtual void OnPointerUp(PointerEventData eventData) { }
SerieHandler.OnScroll
public virtual void OnScroll(PointerEventData eventData) { }
SerieHandler.RefreshLabelInternal
public virtual void RefreshLabelInternal() { }
SerieHandler.RefreshLabelNextFrame
public virtual void RefreshLabelNextFrame() { }
SerieHandler.RemoveComponent
public virtual void RemoveComponent() { }
SerieHandler.Update
public virtual void Update() { }
SerieHandler.UpdateSerieContext
public virtual void UpdateSerieContext() { }
SerieHandler where T
class in / 子类: SerieHandler<T>
SerieHandler<T>
class in XCharts.Runtime / 继承自: [SerieHandler where T](#seriehandler where t),Serie
SerieHandler<T>.labelObject
public GameObject labelObject
SerieHandler<T>.serie
public T serie
SerieHandler<T>.AfterUpdate
public override void AfterUpdate()
SerieHandler<T>.BeforeUpdate
public override void BeforeUpdate()
SerieHandler<T>.DrawLabelLineSymbol
public void DrawLabelLineSymbol(VertexHelper vh, LabelLine labelLine, Vector3 startPos, Vector3 endPos, Color32 defaultColor)
SerieHandler<T>.ForceUpdateSerieContext
public override void ForceUpdateSerieContext()
SerieHandler<T>.GetPointerItemDataDimension
public override int GetPointerItemDataDimension()
SerieHandler<T>.GetPointerItemDataIndex
public override int GetPointerItemDataIndex()
SerieHandler<T>.GetSerieDataAutoColor
public virtual Color GetSerieDataAutoColor(SerieData serieData)
SerieHandler<T>.GetSerieDataLabelOffset
public virtual Vector3 GetSerieDataLabelOffset(SerieData serieData, LabelStyle label)
SerieHandler<T>.GetSerieDataLabelPosition
public virtual Vector3 GetSerieDataLabelPosition(SerieData serieData, LabelStyle label)
SerieHandler<T>.GetSerieDataTitlePosition
public virtual Vector3 GetSerieDataTitlePosition(SerieData serieData, TitleStyle titleStyle)
SerieHandler<T>.InitComponent
public override void InitComponent()
SerieHandler<T>.OnLegendButtonClick
public override void OnLegendButtonClick(int index, string legendName, bool show)
SerieHandler<T>.OnLegendButtonEnter
public override void OnLegendButtonEnter(int index, string legendName)
SerieHandler<T>.OnLegendButtonExit
public override void OnLegendButtonExit(int index, string legendName)
SerieHandler<T>.OnPointerClick
public override void OnPointerClick(PointerEventData eventData)
SerieHandler<T>.OnPointerDown
public override void OnPointerDown(PointerEventData eventData)
SerieHandler<T>.RefreshEndLabelInternal
public virtual void RefreshEndLabelInternal()
SerieHandler<T>.RefreshLabelInternal
public override void RefreshLabelInternal()
SerieHandler<T>.RefreshLabelNextFrame
public override void RefreshLabelNextFrame()
SerieHandler<T>.RefreshTitleLabelInternal
public void RefreshTitleLabelInternal()
SerieHandler<T>.RemoveComponent
public override void RemoveComponent()
SerieHandler<T>.Update
public override void Update()
SerieHandlerAttribute
class in XCharts.Runtime / 继承自: Attribute
SerieHandlerAttribute.SerieHandlerAttribute
public SerieHandlerAttribute(Type handler, bool allowMultiple)
SerieHelper
class in XCharts.Runtime
SerieHelper.CloneSerie<T>
public static T CloneSerie<T>(Serie serie) where T : Serie
SerieHelper.CopySerie
public static void CopySerie(Serie oldSerie, Serie newSerie)
SerieHelper.GetAllMinMaxData
public static void GetAllMinMaxData(Serie serie, double ceilRate = 0, DataZoom dataZoom = null)
SerieHelper.GetAreaStyle
public static AreaStyle GetAreaStyle(Serie serie, SerieData serieData)
SerieHelper.GetAverageData
public static double GetAverageData(Serie serie, int dimension = 1, DataZoom dataZoom = null)
SerieHelper.GetBlurStyle
public static BlurStyle GetBlurStyle(Serie serie, SerieData serieData)
SerieHelper.GetEmphasisStyle
public static EmphasisStyle GetEmphasisStyle(Serie serie, SerieData serieData)
SerieHelper.GetItemColor
public static Color32 GetItemColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, SerieState state = SerieState.Auto, bool opacity = true)
SerieHelper.GetItemFormatter
public static string GetItemFormatter(Serie serie, SerieData serieData, string defaultFormatter = null)
SerieHelper.GetItemMarker
public static string GetItemMarker(Serie serie, SerieData serieData, string defaultMarker = null)
SerieHelper.GetItemStyle
public static ItemStyle GetItemStyle(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
SerieHelper.GetLineColor
public static Color32 GetLineColor(Serie serie, SerieData serieData, ThemeStyle theme, int index, SerieState state = SerieState.Auto)
SerieHelper.GetLineStyle
public static LineStyle GetLineStyle(Serie serie, SerieData serieData)
SerieHelper.GetMaxData
public static double GetMaxData(Serie serie, int dimension = 1, DataZoom dataZoom = null)
SerieHelper.GetMaxSerieData
public static SerieData GetMaxSerieData(Serie serie, int dimension = 1, DataZoom dataZoom = null)
SerieHelper.GetMedianData
public static double GetMedianData(Serie serie, int dimension = 1, DataZoom dataZoom = null)
SerieHelper.GetMinData
public static double GetMinData(Serie serie, int dimension = 1, DataZoom dataZoom = null)
SerieHelper.GetMinMaxData
public static void GetMinMaxData(Serie serie, out double min, out double max, DataZoom dataZoom = null, int dimension = 0)
获得系列所有数据的最大最小值。
SerieHelper.GetMinSerieData
public static SerieData GetMinSerieData(Serie serie, int dimension = 1, DataZoom dataZoom = null)
SerieHelper.GetNumericFormatter
public static string GetNumericFormatter(Serie serie, SerieData serieData, string defaultFormatter = null)
SerieHelper.GetSelectStyle
public static SelectStyle GetSelectStyle(Serie serie, SerieData serieData)
SerieHelper.GetSerieLabel
public static LabelStyle GetSerieLabel(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
SerieHelper.GetSerieLabelLine
public static LabelLine GetSerieLabelLine(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
SerieHelper.GetSerieState
public static SerieState GetSerieState(Serie serie, SerieData serieData, bool defaultSerieState = false)
public static SerieState GetSerieState(SerieData serieData)
SerieHelper.GetSerieSymbol
public static SerieSymbol GetSerieSymbol(Serie serie, SerieData serieData, SerieState state = SerieState.Auto)
SerieHelper.GetStateStyle
public static StateStyle GetStateStyle(Serie serie, SerieData serieData, SerieState state)
SerieHelper.GetSysmbolSize
public static float GetSysmbolSize(Serie serie, SerieData serieData, float defaultSize, SerieState state = SerieState.Auto, bool checkAnimation = false)
SerieHelper.GetTitleStyle
public static TitleStyle GetTitleStyle(Serie serie, SerieData serieData)
SerieHelper.IsAllZeroValue
public static bool IsAllZeroValue(Serie serie, int dimension = 1)
系列指定维数的数据是否全部为0。
SerieHelper.IsDownPoint
public static bool IsDownPoint(Serie serie, int index)
SerieHelper.UpdateCenter
public static void UpdateCenter(Serie serie, BaseChart chart)
更新运行时中心点和半径
SerieHelper.UpdateFilterData
public static void UpdateFilterData(Serie serie, DataZoom dataZoom)
根据dataZoom更新数据列表缓存
SerieHelper.UpdateMinMaxData
public static void UpdateMinMaxData(Serie serie, int dimension, double ceilRate = 0, DataZoom dataZoom = null)
获得指定维数的最大最小值
SerieHelper.UpdateRect
public static void UpdateRect(Serie serie, Vector3 chartPosition, float chartWidth, float chartHeight)
SerieHelper.UpdateSerieRuntimeFilterData
public static void UpdateSerieRuntimeFilterData(Serie serie, bool filterInvisible = true)
SerieLabelHelper
class in XCharts.Runtime
SerieLabelHelper.CanShowLabel
public static bool CanShowLabel(Serie serie, SerieData serieData, LabelStyle label, int dimesion)
SerieLabelHelper.GetLabelColor
public static Color GetLabelColor(Serie serie, ThemeStyle theme, int index)
SerieLabelHelper.SetGaugeLabelText
public static void SetGaugeLabelText(Serie serie)
SerieLabelPool
class in XCharts.Runtime
SerieLabelPool.ClearAll
public static void ClearAll()
SerieLabelPool.Release
public static void Release(GameObject element)
SerieLabelPool.ReleaseAll
public static void ReleaseAll(Transform parent)
SerieParams
class in XCharts.Runtime
SeriesHelper
class in XCharts.Runtime
SeriesHelper.GetLastStackSerie
public static Serie GetLastStackSerie(List<Serie> series, Serie serie)
获得上一个同堆叠且显示的serie。
SeriesHelper.GetLegalSerieNameList
public static List<string> GetLegalSerieNameList(List<Serie> series)
SeriesHelper.GetMaxSerieDataCount
public static int GetMaxSerieDataCount(List<Serie> series)
SeriesHelper.GetMinAnimationDuration
public static float GetMinAnimationDuration(List<Serie> series)
SeriesHelper.GetNameColor
public static Color GetNameColor(BaseChart chart, int index, string name)
SeriesHelper.GetStackSeries
public static void GetStackSeries(List<Serie> series, ref Dictionary<int, List<Serie>> stackSeries)
获得堆叠系列列表
SeriesHelper.IsAnyClipSerie
public static bool IsAnyClipSerie(List<Serie> series)
是否有需裁剪的serie。
SeriesHelper.IsAnyColorByDataSerie
public static bool IsAnyColorByDataSerie(List<Serie> series)
是否有任何一个系列是按数据颜色的。
SeriesHelper.IsLegalLegendName
public static bool IsLegalLegendName(string name)
SeriesHelper.IsPercentStack<T>
public static bool IsPercentStack<T>(List<Serie> series, string stackName) where T : Serie
是否时百分比堆叠
SeriesHelper.IsStack
public static bool IsStack(List<Serie> series)
是否由数据堆叠
SeriesHelper.IsStack<T>
public static bool IsStack<T>(List<Serie> series, string stackName) where T : Serie
是否堆叠
SeriesHelper.UpdateSerieNameList
public static void UpdateSerieNameList(BaseChart chart, ref List<string> serieNameList)
获得所有系列名,不包含空名字。
SeriesHelper.UpdateStackDataList
public static void UpdateStackDataList(List<Serie> series, Serie currSerie, DataZoom dataZoom, List<List<SerieData>> dataList)
SerieState
class in XCharts.Runtime
Serie状态。支持正常、高亮、淡出、选中四种状态。
可选:
Normal: 正常状态。Emphasis: 高亮状态。Blur: 淡出状态。Select: 选中状态。Auto: 自动保持和父节点一致。一般用在SerieData。
SerieSymbol
class in XCharts.Runtime / 继承自: SymbolStyle,ISerieDataComponent
系列数据项的标记的图形
SerieSymbol.GetSize
public float GetSize(SerieData serieData, float themeSize)
根据指定的sizeType获得标记的大小
SerieSymbol.Reset
public override void Reset()
SerieSymbol.ShowSymbol
public bool ShowSymbol(int dataIndex, int dataCount)
SerieTheme
class in XCharts.Runtime / 继承自: ChildComponent
SerieTheme.Copy
public void Copy(SerieTheme theme)
SerieTheme.SerieTheme
public SerieTheme(ThemeType theme)
Settings
class in XCharts.Runtime / 继承自: MainComponent
全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。
Settings.show
public bool show
Settings.Copy
public void Copy(Settings settings)
Settings.Reset
public override void Reset()
SimplifiedBar
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer,ISimplifiedSerie
SimplifiedBar.containerIndex
public int containerIndex
SimplifiedBar.containterInstanceId
public int containterInstanceId
SimplifiedBar.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
SimplifiedBar.ConvertSerie
public static SimplifiedBar ConvertSerie(Serie serie)
SimplifiedBarChart
class in XCharts.Runtime / 继承自: BaseChart
简化柱状图是柱状图的简化模式,通过简化组件和配置,拥有更好的性能。
SimplifiedCandlestick
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer,ISimplifiedSerie
SimplifiedCandlestick.containerIndex
public int containerIndex
SimplifiedCandlestick.containterInstanceId
public int containterInstanceId
SimplifiedCandlestick.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
SimplifiedCandlestick.ConvertSerie
public static SimplifiedCandlestick ConvertSerie(Serie serie)
SimplifiedCandlestickChart
class in XCharts.Runtime / 继承自: BaseChart
简化K线图是K线图的简化模式,通过简化组件和配置,拥有更好的性能。
SimplifiedLine
class in XCharts.Runtime / 继承自: Serie,INeedSerieContainer,ISimplifiedSerie
SimplifiedLine.containerIndex
public int containerIndex
SimplifiedLine.containterInstanceId
public int containterInstanceId
SimplifiedLine.AddDefaultSerie
public static Serie AddDefaultSerie(BaseChart chart, string serieName)
SimplifiedLine.ConvertSerie
public static SimplifiedLine ConvertSerie(Serie serie)
SimplifiedLineChart
class in XCharts.Runtime / 继承自: BaseChart
简化折线图是折线图的简化模式,通过简化组件和配置,拥有更好的性能。
Since
class in XCharts.Runtime / 继承自: Attribute
Since.Since
public Since(string version)
SingleAxis
class in XCharts.Runtime / 继承自: Axis,IUpdateRuntimeData
单轴。
SingleAxis.SetDefaultValue
public override void SetDefaultValue()
SingleAxis.UpdateRuntimeData
public void UpdateRuntimeData(BaseChart chart)
SingleAxisCoord
class in XCharts.Runtime / 继承自: CoordSystem
StageColor
class in XCharts.Runtime / 继承自: ChildComponent
StageColor.color
public Color32 color
颜色。
StageColor.percent
public float percent
结束位置百分比。
StageColor.StageColor
public StageColor(float percent, Color32 color)
StateStyle
class in XCharts.Runtime / 继承自: ChildComponent / 子类: BlurStyle,EmphasisStyle,SelectStyle
从
v3.2.0开始支持
Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种状态。
StateStyle.ClearComponentDirty
public override void ClearComponentDirty()
StateStyle.ClearVerticesDirty
public override void ClearVerticesDirty()
StateStyle.Reset
public void Reset()
SubTitleTheme
class in XCharts.Runtime / 继承自: ComponentTheme
SubTitleTheme.SubTitleTheme
public SubTitleTheme(ThemeType theme) : base(theme)
SVG
class in XUGL
SVG.DrawPath
public static void DrawPath(VertexHelper vh, SVGPath path)
SVG.Test
public static void Test(VertexHelper vh)
SVGPath
class in XUGL
SVGPath.AddSegment
public void AddSegment(SVGPathSeg seg)
SVGPath.Draw
public void Draw(VertexHelper vh)
SVGPath.Parse
public static SVGPath Parse(string path)
SVGPathSeg
class in XUGL
SVGPathSeg.p1
public Vector2 p1
SVGPathSeg.p2
public Vector2 p2
SVGPathSeg.p3
public Vector2 p3
SVGPathSeg.x
public float x
SVGPathSeg.y
public float y
SVGPathSeg.SVGPathSeg
public SVGPathSeg(SVGPathSegType type)
SVGPathSegType
class in XUGL
可选:
M: move toL: line toH: horizontal line toV: vertial line toC: curve toS: smooth curve toQ: quadratic bezier curveT: smooth quadratic bezier curve toA: elliptical ArcZ: close path
SymbolSizeType
class in XCharts.Runtime
获取标记图形大小的方式。
可选:
Custom: 自定义大小。FromData: 通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。Function: 通过委托函数获取。
SymbolStyle
class in XCharts.Runtime / 继承自: ChildComponent / 子类: SerieSymbol
系列数据项的标记的图形
SymbolStyle.animationSize
public List<float> animationSize
带有涟漪特效动画的散点图的动画参数。
SymbolStyle.offset3
public Vector3 offset3
SymbolStyle.GetColor
public Color32 GetColor(Color32 defaultColor)
SymbolStyle.Reset
public virtual void Reset()
SymbolType
class in XCharts.Runtime
标记图形的类型。
可选:
None: 不显示标记。Custom: 自定义标记。Circle: 圆形。EmptyCircle: 空心圆。Rect: 正方形。可通过设置itemStyle的cornerRadius变成圆角矩形。EmptyRect: 空心正方形。Triangle: 三角形。EmptyTriangle: 空心三角形。Diamond: 菱形。EmptyDiamond: 空心菱形。Arrow: 箭头。EmptyArrow: 空心箭头。Plus: 加号。Minus: 减号。
TextLimit
class in XCharts.Runtime / 继承自: ChildComponent
文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。
TextLimit.Clone
public TextLimit Clone()
TextLimit.Copy
public void Copy(TextLimit textLimit)
TextLimit.GetLimitContent
public string GetLimitContent(string content)
TextLimit.SetRelatedText
public void SetRelatedText(ChartText txt, float labelWidth)
TextPadding
class in XCharts.Runtime / 继承自: Padding
文本的内边距设置。
TextPadding.TextPadding()
public TextPadding()
文本的内边距设置。
TextPadding.TextPadding
public TextPadding(float top, float right, float bottom, float left)
TextStyle
class in XCharts.Runtime / 继承自: ChildComponent
文本的相关设置。
TextStyle.TextStyle()
public TextStyle()
TextStyle.Copy
public void Copy(TextStyle textStyle)
TextStyle.GetAlignment
public TextAnchor GetAlignment(TextAnchor defaultAlignment)
TextStyle.GetColor
public Color GetColor(Color defaultColor)
TextStyle.GetFontSize
public int GetFontSize(ComponentTheme defaultTheme)
TextStyle.TextStyle
public TextStyle(int fontSize)
public TextStyle(int fontSize, FontStyle fontStyle)
public TextStyle(int fontSize, FontStyle fontStyle, Color color)
public TextStyle(int fontSize, FontStyle fontStyle, Color color, int rorate)
TextStyle.UpdateAlignmentByLocation
public void UpdateAlignmentByLocation(Location location)
Theme
class in XCharts.Runtime / 继承自: ScriptableObject
主题相关配置。
Theme.axis
public AxisTheme axis
Theme.colorPalette
public List<Color32> colorPalette
调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。
Theme.common
public ComponentTheme common
Theme.dataZoom
public DataZoomTheme dataZoom
Theme.legend
public LegendTheme legend
Theme.serie
public SerieTheme serie
Theme.subTitle
public SubTitleTheme subTitle
Theme.title
public TitleTheme title
Theme.tooltip
public TooltipTheme tooltip
Theme.visualMap
public VisualMapTheme visualMap
Theme.CheckWarning
public void CheckWarning(StringBuilder sb)
Theme.CloneTheme
public Theme CloneTheme()
克隆主题。
Theme.CopyTheme
public void CopyTheme(Theme theme)
复制主题的所有配置。
Theme.GetColor
public static Color32 GetColor(string hexColorStr)
将字符串颜色值转成Color。
Theme.GetColorStr
public string GetColorStr(int index)
获得指定索引的十六进制颜色值字符串。
Theme.GetHashCode
public override int GetHashCode()
Theme.ResetTheme
public bool ResetTheme()
重置,清除所有自定义配置。
Theme.ResetToDarkTheme
public static void ResetToDarkTheme(Theme theme)
暗主题。
Theme.ResetToDefaultTheme
public static void ResetToDefaultTheme(Theme theme)
默认主题。
Theme.SetColorPalette
public void SetColorPalette(List<string> hexColorStringList)
Theme.SetDefaultFont
public void SetDefaultFont()
Theme.SyncFontToSubComponent
public void SyncFontToSubComponent()
Theme.SyncTMPFontToSubComponent
public void SyncTMPFontToSubComponent()
ThemeStyle
class in XCharts.Runtime / 继承自: ChildComponent
主题相关配置。
ThemeStyle.axis
public AxisTheme axis
ThemeStyle.common
public ComponentTheme common
ThemeStyle.customColorPalette
public List<Color32> customColorPalette
ThemeStyle.dataZoom
public DataZoomTheme dataZoom
ThemeStyle.legend
public LegendTheme legend
ThemeStyle.serie
public SerieTheme serie
ThemeStyle.show
public bool show
ThemeStyle.subTitle
public SubTitleTheme subTitle
ThemeStyle.title
public TitleTheme title
ThemeStyle.tooltip
public TooltipTheme tooltip
ThemeStyle.visualMap
public VisualMapTheme visualMap
ThemeStyle.CheckWarning
public void CheckWarning(StringBuilder sb)
ThemeStyle.GetBackgroundColor
public Color32 GetBackgroundColor(Background background)
ThemeStyle.GetColor
public static Color32 GetColor(string hexColorStr)
将字符串颜色值转成Color。
ThemeStyle.GetColorStr
public string GetColorStr(int index)
获得指定索引的十六进制颜色值字符串。
ThemeStyle.SyncSharedThemeColorToCustom
public void SyncSharedThemeColorToCustom()
ThemeType
class in XCharts.Runtime
主题
可选:
Default: 默认主题。Light: 亮主题。Dark: 暗主题。Custom: 自定义主题。
Title
class in XCharts.Runtime / 继承自: MainComponent,IPropertyChanged
标题组件,包含主标题和副标题。
Title.show
public bool show
是否显示标题组件。
Title.text
public string text
主标题文本,支持使用 \n 换行。
Title.vertsDirty
public override bool vertsDirty
Title.ClearComponentDirty
public override void ClearComponentDirty()
Title.OnChanged
public void OnChanged()
TitleStyle
class in XCharts.Runtime / 继承自: LabelStyle,ISerieDataComponent,ISerieComponent
标题相关设置。
TitleTheme
class in XCharts.Runtime / 继承自: ComponentTheme
TitleTheme.TitleTheme
public TitleTheme(ThemeType theme) : base(theme)
Tooltip
class in XCharts.Runtime / 继承自: MainComponent
提示框组件。
Tooltip.alwayShowContent
public bool alwayShowContent
是否触发后一直显示提示框浮层。
Tooltip.backgroundColor
public Color backgroundColor
提示框的背景颜色。
Tooltip.backgroundImage
public Sprite backgroundImage
提示框的背景图片。
Tooltip.backgroundType
public Image.Type backgroundType
提示框的背景图片显示类型。
Tooltip.fixedHeight
public float fixedHeight
固定高度。比 minHeight 优先。
Tooltip.fixedWidth
public float fixedWidth
固定宽度。比 minWidth 优先。
Tooltip.ignoreDataDefaultContent
public string ignoreDataDefaultContent
被忽略数据的默认显示字符信息。如果设置为空,则表示完全不显示忽略数据。
Tooltip.ignoreDataShow
public bool ignoreDataShow
是否显示忽略数据在tooltip上。
Tooltip.itemFormatter
public string itemFormatter
提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。用|来表示多个列的分隔。 模板变量有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}。
{i}或-表示忽略当前项。 {.}为当前所指示的serie或数据项的对应颜色的圆点。
{a}为当前所指示的serie或数据项的系列名name。
{b}为当前所指示的serie或数据项的数据项serieData的name,或者类目值(如折线图的X轴)。
{c}为当前所指示的serie或数据项的y维(dimesion为1)的数值。
{d}为当前所指示的serie或数据项的y维(dimesion为1)百分比值,注意不带%号。
{e}为当前所指示的serie或数据项的数据项serieData的name。
{f}为当前所指示的serie的默认维度的数据总和。
{g}为当前所指示的serie的数据总个数。
{h}为当前所指示的serie的十六进制颜色值。
{y}为当前所指示的serie的y轴的类目值。
{c0}表示当前数据项维度为0的数据。
{c1}表示当前数据项维度为1的数据。
{d3}表示维度3的数据的百分比。它的分母是默认维度(一般是1维度)数据。
|表示多个列的分隔。
示例:"{i}", "{.}|{a}|{c}", "{.}|{b}|{c2:f2}", "{.}|{b}|{y}"
Tooltip.marker
public string marker
serie的符号标志。
Tooltip.minHeight
public float minHeight
最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。
Tooltip.minWidth
public float minWidth
最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。
Tooltip.offset
public Vector2 offset
提示框相对于鼠标位置的偏移。
Tooltip.onClickIndex
public System.Action<int> onClickIndex
Tooltip为Click触发时,点击的X轴索引的回调。
Tooltip.paddingLeftRight
public int paddingLeftRight
左右边距。
Tooltip.paddingTopBottom
public int paddingTopBottom
上下边距。
Tooltip.runtimeDataIndex
public List<int> runtimeDataIndex
当前提示框所指示的数据项索引。
Tooltip.showContent
public bool showContent
是否显示提示框浮层,默认显示。只需tooltip触发事件或显示axisPointer而不需要显示内容时可配置该项为false。
Tooltip.titleFormatter
public string titleFormatter
提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。 模板变量有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}。
{.}为当前所指示或index为0的serie的对应颜色的圆点。
{a}为当前所指示或index为0的serie的系列名name。
{b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。
{c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。
{d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带%号。
{e}为当前所指示或index为0的serie的数据项serieData的name。
{h}为当前所指示或index为0的serie的数据项serieData的十六进制颜色值。
{f}为数据总和。
{g}为数据总个数。
{y}为value所对应的y轴的类目值。
{.1}表示指定index为1的serie对应颜色的圆点。
{a1}、{b1}、{c1}中的1表示指定index为1的serie。
{c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。
{c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。
{d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。
{d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。
示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}"
Tooltip.AddSerieDataIndex
public void AddSerieDataIndex(int serieIndex, int dataIndex)
Tooltip.ClearComponentDirty
public override void ClearComponentDirty()
Tooltip.ClearData
public override void ClearData()
Tooltip.ClearSerieDataIndex
public void ClearSerieDataIndex()
Tooltip.GetContentLabelStyle
public LabelStyle GetContentLabelStyle(int index)
Tooltip.IsActive
public bool IsActive()
提示框是否显示
Tooltip.isAnySerieDataIndex
public bool isAnySerieDataIndex()
Tooltip.IsSelected
public bool IsSelected(int index)
指定索引的数据项是否被提示框选中
Tooltip.IsTriggerAxis
public bool IsTriggerAxis()
Tooltip.IsTriggerItem
public bool IsTriggerItem()
Tooltip.KeepTop
public void KeepTop()
保持Tooltiop显示在最顶上
Tooltip.SetActive
public void SetActive(bool flag)
设置Tooltip组件是否显示
Tooltip.SetContentActive
public void SetContentActive(bool flag)
设置文本框是否显示
Tooltip.Position
class in XCharts.Runtime
坐标类型。
可选:
Auto: 自适应。移动平台靠顶部显示,非移动平台跟随鼠标位置。Custom: 自定义。完全自定义显示位置(x,y)。FixedX: 只固定坐标X。Y跟随鼠标位置。FixedY:
Tooltip.Trigger
class in XCharts.Runtime
触发类型。
可选:
Item: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。Axis: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。None: 什么都不触发。Auto: 根据serie的类型自动选择触发类型。
Tooltip.TriggerOn
class in XCharts.Runtime
触发条件。
可选:
MouseMove: 鼠标移动时触发。Click: 鼠标点击时触发。
Tooltip.Type
class in XCharts.Runtime
指示器类型。
可选:
Line: 直线指示器Shadow: 阴影指示器None: 无指示器Cross: 十字准星指示器。坐标轴显示Label和交叉线。Auto: 根据serie的类型自动选择显示指示器。
TooltipContext
class in XCharts.Runtime
TooltipData
class in XCharts.Runtime
TooltipHelper
class in XCharts.Runtime
TooltipHelper.GetItemNumericFormatter
public static string GetItemNumericFormatter(Tooltip tooltip, Serie serie, SerieData serieData)
TooltipHelper.GetLineColor
public static Color32 GetLineColor(Tooltip tooltip, Color32 defaultColor)
TooltipHelper.IsIgnoreFormatter
public static bool IsIgnoreFormatter(string itemFormatter)
TooltipHelper.LimitInRect
public static void LimitInRect(BaseChart chart, Tooltip tooltip, Rect chartRect)
TooltipTheme
class in XCharts.Runtime / 继承自: ComponentTheme
TooltipTheme.Copy
public void Copy(TooltipTheme theme)
TooltipTheme.TooltipTheme
public TooltipTheme(ThemeType theme) : base(theme)
TooltipView
class in XCharts.Runtime
TooltipView.CreateView
public static TooltipView CreateView(Tooltip tooltip, ThemeStyle theme, Transform parent)
TooltipView.GetCurrentPos
public Vector3 GetCurrentPos()
TooltipView.GetTargetPos
public Vector3 GetTargetPos()
TooltipView.Refresh
public void Refresh()
TooltipView.SetActive
public void SetActive(bool flag)
TooltipView.Update
public void Update()
TooltipView.UpdatePosition
public void UpdatePosition(Vector3 pos)
TooltipViewItem
class in XCharts.Runtime
UGL
class in XUGL
UGUI 图形库
UGL.DrawDiamond
public static void DrawDiamond(VertexHelper vh, Vector3 center, float size, Color32 color, Color32 toColor)
Draw a diamond. 画菱形(钻石形状)
public static void DrawDiamond(VertexHelper vh, Vector3 center, float xRadius, float yRadius, Color32 color, Color32 toColor)
UGL.DrawEllipse
public static void DrawEllipse(VertexHelper vh, Vector3 center, float w, float h, Color32 color, float smoothness = 1)
UGL.DrawEmptyDiamond
public static void DrawEmptyDiamond(VertexHelper vh, Vector3 center, float xRadius, float yRadius, float tickness, Color32 color, Color32 emptyColor)
UGL.DrawEmptyTriangle
public static void DrawEmptyTriangle(VertexHelper vh, Vector3 pos, float size, float tickness, Color32 color, Color32 backgroundColor)
UGL.DrawLine
public static void DrawLine(VertexHelper vh, List<Vector3> points, float width, Color32 color, bool smooth, bool closepath = false)
public static void DrawLine(VertexHelper vh, Vector3 startPoint, Vector3 endPoint, float width, Color32 color, Color32 toColor)
Draw a line. 画直线
UGL.DrawMinus
public static void DrawMinus(VertexHelper vh, Vector3 center, float radius, float tickness, Color32 color)
绘制减号
UGL.DrawPlus
public static void DrawPlus(VertexHelper vh, Vector3 center, float radius, float tickness, Color32 color)
绘制加号
UGL.DrawPolygon
public static void DrawPolygon(VertexHelper vh, List<Vector3> points, Color32 color)
填充任意多边形(目前只支持凸多边形)
UGL.DrawRectangle
public static void DrawRectangle(VertexHelper vh, Rect rect, Color32 color)
public static void DrawRectangle(VertexHelper vh, Rect rect, Color32 color, Color32 toColor)
public static void DrawRectangle(VertexHelper vh, Rect rect, float border, Color32 color)
public static void DrawRectangle(VertexHelper vh, Rect rect, float border, Color32 color, Color32 toColor)
UGL.DrawSquare
public static void DrawSquare(VertexHelper vh, Vector3 center, float radius, Color32 color)
Draw a square. 画正方形
UGL.DrawSvgPath
public static void DrawSvgPath(VertexHelper vh, string path)
UGL.DrawTriangle
public static void DrawTriangle(VertexHelper vh, Vector3 pos, float size, Color32 color, Color32 toColor)
UGL.Direction
class in XUGL
曲线方向
可选:
XAxis: 沿X轴方向YAxis: 沿Y轴方向Random: 随机无序的。如一个闭合的环状曲线。
UGLExample
class in XUGL / 继承自: MaskableGraphic
UGLHelper
class in XUGL
UGLHelper.GetAngle360
public static float GetAngle360(Vector2 from, Vector2 to)
获得0-360的角度(12点钟方向为0度)
UGLHelper.GetBezier
public static Vector3 GetBezier(float t, Vector3 sp, Vector3 cp, Vector3 ep)
UGLHelper.GetBezier2
public static Vector3 GetBezier2(float t, Vector3 sp, Vector3 p1, Vector3 p2, Vector3 ep)
UGLHelper.GetBezierList
public static List<Vector3> GetBezierList(Vector3 sp, Vector3 ep, int segment, Vector3 cp)
UGLHelper.GetDire
public static Vector3 GetDire(float angle, bool isDegree = false)
UGLHelper.GetIntersection
public static bool GetIntersection(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 p4, ref List<Vector3> intersection)
获得两直线的交点
UGLHelper.GetPos
public static Vector3 GetPos(Vector3 center, float radius, float angle, bool isDegree = false)
UGLHelper.GetVertialDire
public static Vector3 GetVertialDire(Vector3 dire)
UGLHelper.IsClearColor
public static bool IsClearColor(Color color)
UGLHelper.IsPointInPolygon
public static bool IsPointInPolygon(Vector3 p, List<Vector2> polyons)
public static bool IsPointInPolygon(Vector3 p, params Vector3[] polyons)
UGLHelper.IsPointInTriangle
public static bool IsPointInTriangle(Vector3 p1, Vector3 p2, Vector3 p3, Vector3 check)
UGLHelper.IsUp
public static bool IsUp(Vector3 p1, Vector3 p2, Vector3 p3)
UGLHelper.IsValueEqualsColor
public static bool IsValueEqualsColor(Color color1, Color color2)
UGLHelper.IsValueEqualsList<T>
public static bool IsValueEqualsList<T>(List<T> list1, List<T> list2)
UGLHelper.IsValueEqualsString
public static bool IsValueEqualsString(string str1, string str2)
UGLHelper.IsValueEqualsVector2
public static bool IsValueEqualsVector2(Vector2 v1, Vector2 v2)
UGLHelper.IsValueEqualsVector3
public static bool IsValueEqualsVector3(Vector3 v1, Vector2 v2)
UGLHelper.IsZeroVector
public static bool IsZeroVector(Vector3 pos)
UGLHelper.RotateRound
public static Vector3 RotateRound(Vector3 position, Vector3 center, Vector3 axis, float angle)
UIComponent
class in XCharts.Runtime / 继承自: BaseGraph
UI组件基类。
UIComponent.background
public Background background
背景样式。
UIComponent.chartHideFlags
public override HideFlags chartHideFlags
UIComponent.theme
public UIComponentTheme theme
UIComponent.SetAllDirty
public override void SetAllDirty()
UIComponent.SetDataDirty
public void SetDataDirty()
从
v3.9.0开始支持
UIComponent.SetVerticesDirty
public override void SetVerticesDirty()
UIComponent.UpdateTheme
public bool UpdateTheme(ThemeType theme)
切换内置主题。
UIComponentTheme
class in XCharts.Runtime / 继承自: ChildComponent
UIComponentTheme.show
public bool show
UIComponentTheme.GetBackgroundColor
public Color32 GetBackgroundColor(Background background)
UIHelper
class in XCharts.Runtime
UI帮助类。
UIHelper.DrawBackground
public static void DrawBackground(VertexHelper vh, Background background, Color32 color, float smoothness = 2)
ViewControl
class in XCharts.Runtime / 继承自: ChildComponent
从
v3.11.0开始支持
3D视角控制组件。
VisualMap
class in XCharts.Runtime / 继承自: MainComponent
视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。
VisualMap.range
public double[] range
指定手柄对应数值的位置。range 应在[min,max]范围内。
VisualMap.runtimeRangeMaxHeight
public float runtimeRangeMaxHeight
VisualMap.runtimeRangeMinHeight
public float runtimeRangeMinHeight
VisualMap.text
public string[] text
两端的文本,如 ['High', 'Low']。
VisualMap.textGap
public float[] textGap
两端文字主体之间的距离,单位为px。
VisualMap.vertsDirty
public override bool vertsDirty
VisualMap.AddColors
public void AddColors(List<string> colors)
VisualMap.ClearComponentDirty
public override void ClearComponentDirty()
VisualMap.ClearVerticesDirty
public override void ClearVerticesDirty()
VisualMap.GetColor
public Color32 GetColor(double value)
VisualMap.GetIndex
public int GetIndex(double value)
VisualMap.GetValue
public double GetValue(Vector3 pos, Rect chartRect)
VisualMap.IsInRangeMaxRect
public bool IsInRangeMaxRect(Vector3 local, Rect chartRect, float triangleLen)
VisualMap.IsInRangeMinRect
public bool IsInRangeMinRect(Vector3 local, Rect chartRect, float triangleLen)
VisualMap.IsInRangeRect
public bool IsInRangeRect(Vector3 local, Rect chartRect)
VisualMap.IsInRect
public bool IsInRect(Vector3 local, Rect chartRect, float triangleLen = 20)
VisualMap.IsInSelectedValue
public bool IsInSelectedValue(double value)
VisualMap.IsPiecewise
public bool IsPiecewise()
VisualMap.SelectedMode
class in XCharts.Runtime
选择模式
可选:
Multiple: 多选。Single: 单选。
VisualMap.Type
class in XCharts.Runtime
类型。分为连续型和分段型。
可选:
Continuous: 连续型。Piecewise: 分段型。
VisualMapContext
class in XCharts.Runtime / 继承自: MainComponentContext
VisualMapContext.max
public double max
VisualMapContext.maxDrag
public bool maxDrag
VisualMapContext.min
public double min
VisualMapContext.minDrag
public bool minDrag
VisualMapContext.pointerIndex
public int pointerIndex
鼠标悬停选中的index
VisualMapContext.pointerValue
public double pointerValue
VisualMapHelper
class in XCharts.Runtime
VisualMapHelper.AutoSetLineMinMax
public static void AutoSetLineMinMax(VisualMap visualMap, Serie serie, bool isY, Axis axis, Axis relativedAxis)
VisualMapHelper.GetDimension
public static int GetDimension(VisualMap visualMap, int defaultDimension)
VisualMapHelper.IsNeedAreaGradient
public static bool IsNeedAreaGradient(VisualMap visualMap)
VisualMapHelper.IsNeedGradient
public static bool IsNeedGradient(VisualMap visualMap)
VisualMapHelper.IsNeedLineGradient
public static bool IsNeedLineGradient(VisualMap visualMap)
VisualMapHelper.SetMinMax
public static void SetMinMax(VisualMap visualMap, double min, double max)
VisualMapRange
class in XCharts.Runtime / 继承自: ChildComponent
VisualMapRange.color
public Color32 color
颜色
VisualMapRange.label
public string label
文字描述
VisualMapRange.max
public double max
范围最大值
VisualMapRange.min
public double min
范围最小值
VisualMapRange.Contains
public bool Contains(double value, double minMaxRange)
VisualMapTheme
class in XCharts.Runtime / 继承自: ComponentTheme
VisualMapTheme.Copy
public void Copy(VisualMapTheme theme)
VisualMapTheme.VisualMapTheme
public VisualMapTheme(ThemeType theme) : base(theme)
Wrapper<T>
class in XCharts.Runtime
XAxis
class in XCharts.Runtime / 继承自: Axis
直角坐标系 grid 中的 x 轴。
XAxis.SetDefaultValue
public override void SetDefaultValue()
直角坐标系 grid 中的 x 轴。
XAxis3D
class in XCharts.Runtime / 继承自: Axis
从
v3.11.0开始支持
直角坐标系 grid 中的 x 轴。
XAxis3D.SetDefaultValue
public override void SetDefaultValue()
直角坐标系 grid 中的 x 轴。
XChartsMgr
class in XCharts.Runtime
XChartsMgr.fullVersion
public static string fullVersion
XChartsMgr.AddChart
public static void AddChart(BaseChart chart)
XChartsMgr.ContainsChart
public static bool ContainsChart(BaseChart chart)
XChartsMgr.GetChart
public static BaseChart GetChart(string chartName)
XChartsMgr.GetCharts
public static List<BaseChart> GetCharts(string chartName)
XChartsMgr.GetPackageFullPath
public static string GetPackageFullPath()
XChartsMgr.GetRepeatChartNameInfo
public static string GetRepeatChartNameInfo(BaseChart chart, string chartName)
XChartsMgr.IsRepeatChartName
public static bool IsRepeatChartName(BaseChart chart, string chartName = null)
XChartsMgr.RemoveAllChartObject
public static void RemoveAllChartObject()
XChartsMgr.RemoveChart
public static void RemoveChart(string chartName)
XCResourceImporterWindow
class in XCharts.Runtime / 继承自: UnityEditor.EditorWindow
XCResourceImporterWindow.ShowPackageImporterWindow
public static void ShowPackageImporterWindow()
XCResourcesImporter
class in XCharts.Runtime
XCResourcesImporter.OnDestroy()
public void OnDestroy()
XCResourcesImporter.XCResourcesImporter()
public XCResourcesImporter()
XCResourcesImporter.OnDestroy
public void OnDestroy() { }
XCResourcesImporter.OnGUI
public void OnGUI()
XCResourcesImporter.XCResourcesImporter
public XCResourcesImporter() { }
XCSettings
class in XCharts.Runtime / 继承自: ScriptableObject
XCSettings.axisLineType
public static LineStyle.Type axisLineType
XCSettings.axisLineWidth
public static float axisLineWidth
XCSettings.axisSplitLineType
public static LineStyle.Type axisSplitLineType
XCSettings.axisSplitLineWidth
public static float axisSplitLineWidth
XCSettings.axisTickLength
public static float axisTickLength
XCSettings.axisTickWidth
public static float axisTickWidth
XCSettings.cicleSmoothness
public static float cicleSmoothness
XCSettings.customThemes
public static List<Theme> customThemes
XCSettings.dataZoomBorderWidth
public static float dataZoomBorderWidth
XCSettings.dataZoomDataLineWidth
public static float dataZoomDataLineWidth
XCSettings.editorShowAllListData
public static bool editorShowAllListData
XCSettings.font
public static Font font
XCSettings.fontSizeLv1
public static int fontSizeLv1
一级字体大小。
XCSettings.fontSizeLv2
public static int fontSizeLv2
XCSettings.fontSizeLv3
public static int fontSizeLv3
XCSettings.fontSizeLv4
public static int fontSizeLv4
XCSettings.gaugeAxisLineWidth
public static float gaugeAxisLineWidth
XCSettings.gaugeAxisSplitLineLength
public static float gaugeAxisSplitLineLength
XCSettings.gaugeAxisSplitLineWidth
public static float gaugeAxisSplitLineWidth
XCSettings.gaugeAxisTickLength
public static float gaugeAxisTickLength
XCSettings.gaugeAxisTickWidth
public static float gaugeAxisTickWidth
XCSettings.lang
public static Lang lang
XCSettings.lineSegmentDistance
public static float lineSegmentDistance
XCSettings.lineSmoothness
public static float lineSmoothness
XCSettings.lineSmoothStyle
public static float lineSmoothStyle
XCSettings.maxPainter
public static int maxPainter
XCSettings.serieCandlestickBorderWidth
public static float serieCandlestickBorderWidth
XCSettings.serieLineSymbolSize
public static float serieLineSymbolSize
XCSettings.serieLineWidth
public static float serieLineWidth
XCSettings.serieScatterSymbolSize
public static float serieScatterSymbolSize
XCSettings.serieSelectedRate
public static float serieSelectedRate
XCSettings.tmpFont
public static TMP_FontAsset tmpFont
XCSettings.tootipLineWidth
public static float tootipLineWidth
XCSettings.visualMapBorderWidth
public static float visualMapBorderWidth
XCSettings.visualMapTriangeLen
public static float visualMapTriangeLen
XCSettings.AddCustomTheme
public static bool AddCustomTheme(Theme theme)
XCSettings.ExistAssetFile
public static bool ExistAssetFile()
XCSettings.GetSettingAssetPath
public static string GetSettingAssetPath()
XCThemeMgr
class in XCharts.Runtime
XCThemeMgr.AddTheme
public static void AddTheme(Theme theme)
XCThemeMgr.CheckReloadTheme
public static void CheckReloadTheme()
XCThemeMgr.ContainsTheme
public static bool ContainsTheme(string themeName)
XCThemeMgr.ExportTheme
public static bool ExportTheme(Theme theme)
XCThemeMgr.GetAllThemeNames
public static List<string> GetAllThemeNames()
XCThemeMgr.GetTheme
public static Theme GetTheme(string themeName)
XCThemeMgr.GetThemeAssetPath
public static string GetThemeAssetPath(string themeName)
XCThemeMgr.GetThemeList
public static List<Theme> GetThemeList()
XCThemeMgr.LoadTheme
public static Theme LoadTheme(string themeName)
XCThemeMgr.ReloadThemeList
public static void ReloadThemeList()
重新加载主题列表
XCThemeMgr.SwitchTheme
public static void SwitchTheme(BaseChart chart, string themeName)
XLog
class in XCharts.Runtime / 继承自: MonoBehaviour
日志系统。用于输出带日期和日志类型的日志,支持输出到文件,支持自定义输出的日志类型。
XLog.CanLog
public static bool CanLog(int level)
XLog.ClearAllLog
public static void ClearAllLog()
XLog.Debug
public static void Debug(string log)
XLog.EnableLog
public static void EnableLog(int logType)
XLog.Error
public static void Error(string log)
XLog.FlushLog
public static void FlushLog()
XLog.GetNowTime
public static string GetNowTime(string formatter = null)
XLog.GetTimestamp
public static ulong GetTimestamp()
XLog.Info
public static void Info(string log)
XLog.Log
public static void Log(string log)
XLog.LogError
public static void LogError(string log)
XLog.LogWarning
public static void LogWarning(string log)
XLog.Proto
public static void Proto(string log)
XLog.Vital
public static void Vital(string log)
XLog.Warning
public static void Warning(string log)
YAxis
class in XCharts.Runtime / 继承自: Axis
直角坐标系 grid 中的 y 轴。
YAxis.SetDefaultValue
public override void SetDefaultValue()
直角坐标系 grid 中的 y 轴。
YAxis3D
class in XCharts.Runtime / 继承自: Axis
从
v3.11.0开始支持
直角坐标系 grid 中的 y 轴。
YAxis3D.SetDefaultValue
public override void SetDefaultValue()
直角坐标系 grid 中的 y 轴。
ZAxis3D
class in XCharts.Runtime / 继承自: Axis
从
v3.11.0开始支持
直角坐标系 grid 中的 y 轴。
ZAxis3D.SetDefaultValue
public override void SetDefaultValue()
直角坐标系 grid 中的 y 轴。