Files
XCharts/Documentation~/zh/configuration.md
2024-09-22 09:54:11 +08:00

107 KiB
Raw Blame History

sidebar_position, slug
sidebar_position slug
31 /configuration

import APITable from '@site/src/components/APITable';

配置项手册

Serie 系列

Theme 主题

MainComponent 主组件

ChildComponent 子组件

ISerieComponent 可添加到Serie的组件

ISerieDataComponent 可添加到SerieData的组件

Other 其他

AngleAxis

class in XCharts.Runtime / 继承自: Axis

极坐标系的角度轴。

AngleAxis.startAngle

float default: 0

起始刻度的角度,默认为 0 度,即圆心的正右方。

AngleAxisTheme

class in XCharts.Runtime / 继承自: BaseAxisTheme

AnimationAddition

class in XCharts.Runtime / 继承自: AnimationInfo

v3.8.0 开始支持

数据新增动画。

AnimationChange

class in XCharts.Runtime / 继承自: AnimationInfo

v3.8.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

v3.8.0 开始支持

动画配置参数。

AnimationInfo.delay

float default: 0 v3.8.0

动画开始前的延迟时间。

AnimationInfo.duration

float default: 1000 v3.8.0

动画的时长。

AnimationInfo.enable

bool default: true v3.8.0

是否开启动画效果。

AnimationInfo.reverse

bool default: false v3.8.0

是否开启反向动画效果。

AnimationInteraction

class in XCharts.Runtime / 继承自: AnimationInfo

v3.8.0 开始支持

交互动画。

AnimationInteraction.offset

MLValue v3.8.0

交互的多样式数值。如饼图的扇形选中时的偏移。 MLValue

AnimationInteraction.radius

MLValue v3.8.0

半径的多样式数值。 MLValue

AnimationInteraction.width

MLValue v3.8.0

宽度的多样式数值。 MLValue

AnimationStyle

class in XCharts.Runtime / 继承自: ChildComponent

动画组件用于控制图表的动画播放。支持配置五种动画表现FadeIn渐入动画FadeOut渐出动画Change变更动画Addition新增动画Interaction交互动画。 按作用的对象可以分为两类SerieAnimation系列动画和DataAnimation数据动画

AnimationStyle.addition

AnimationAddition v3.8.0

数据新增动画配置。 AnimationAddition

AnimationStyle.change

AnimationChange v3.8.0

数据变更动画配置。 AnimationChange

AnimationStyle.easting

AnimationEasing

可选:

  • Linear:

AnimationStyle.enable

bool default: true

是否开启动画效果。

AnimationStyle.fadeIn

AnimationFadeIn v3.8.0

渐入动画配置。 AnimationFadeIn

AnimationStyle.fadeOut

AnimationFadeOut v3.8.0

渐出动画配置。 AnimationFadeOut

AnimationStyle.hiding

AnimationHiding v3.8.0

数据隐藏动画配置。 AnimationHiding

AnimationStyle.interaction

AnimationInteraction v3.8.0

交互动画配置。 AnimationInteraction

AnimationStyle.threshold

int default: 2000

是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。

AnimationStyle.type

AnimationType

动画类型。

可选:

  • Default: 默认。内部会根据实际情况选择一种动画播放方式。
  • LeftToRight: 从左往右播放动画。
  • BottomToTop: 从下往上播放动画。
  • InsideOut: 由内到外播放动画。
  • AlongPath: 沿着路径播放动画。当折线图从左到右无序或有折返时,可以使用该模式。
  • Clockwise: 顺时针播放动画。

AnimationStyle.unscaledTime

bool v3.4.0

动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。

AreaStyle

class in XCharts.Runtime / 继承自: ChildComponent, ISerieComponent, ISerieDataComponent

区域填充样式。

AreaStyle.color

Color32

区域填充的颜色如果toColor不是默认值则表示渐变色的起点颜色。

AreaStyle.innerFill

bool v3.2.0

是否只填充多边形区域。目前只支持凸多边形。

AreaStyle.opacity

float default: 0.6f

图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。

AreaStyle.origin

AreaStyle.AreaOrigin

区域填充的起始位置。

可选:

  • Auto: 填充坐标轴轴线到数据间的区域。
  • Start: 填充坐标轴底部到数据间的区域。
  • End: 填充坐标轴顶部到数据间的区域。

AreaStyle.show

bool default: true

是否显示区域填充。

AreaStyle.toColor

Color32

渐变色的终点颜色。

AreaStyle.toTop

bool default: true v3.6.0

渐变色是到顶部还是到实际位置。默认为true到顶部。

ArrowStyle

class in XCharts.Runtime / 继承自: ChildComponent

ArrowStyle.color

Color32 default: Color.clear

箭头颜色。

ArrowStyle.dent

float default: 3

箭头的凹度。

ArrowStyle.height

float default: 15

箭头高。

ArrowStyle.offset

float default: 0

箭头偏移。

ArrowStyle.width

float default: 10

箭头宽。

Axis

class in XCharts.Runtime / 继承自: MainComponent / 子类: AngleAxis, ParallelAxis, RadiusAxis, SingleAxis, XAxis, XAxis3D, YAxis, YAxis3D, ZAxis3D

直角坐标系的坐标轴组件。

Axis.animation

AxisAnimation

坐标轴动画。 AxisAnimation

Axis.axisLabel

AxisLabel

坐标轴刻度标签。 AxisLabel

Axis.axisLine

AxisLine

坐标轴轴线。 AxisLine

Axis.axisName

AxisName

坐标轴名称。 AxisName

Axis.axisTick

AxisTick

坐标轴刻度。 AxisTick

Axis.boundaryGap

bool default: true

坐标轴两边是否留白。只对类目轴有效。

Axis.ceilRate

double default: 0

最大最小值向上取整的倍率。默认为0时自动计算。

Axis.clockwise

bool default: true

刻度增长是否按顺时针,默认顺时针。

Axis.data

List<string>

类目数据在类目轴type: 'category')中有效。

Axis.gridIndex

int

坐标轴所在的 grid 的索引,默认位于第一个 grid。

Axis.icons

List<Sprite>

类目数据对应的图标。

Axis.indicatorLabel

LabelStyle v3.4.0

指示器文本的样式。Tooltip为Cross时使用。 LabelStyle

Axis.insertDataToHead

bool

添加新数据时是在列表的头部还是尾部加入。

Axis.interval

double default: 0

强制设置坐标轴分割间隔。无法在类目轴中使用。

Axis.inverse

bool default: false

是否反向坐标轴。在类目轴中无效。

Axis.logBase

float default: 10

对数轴的底数只在对数轴type:'Log')中有效。

Axis.logBaseE

bool default: false

对数轴是否以自然数 e 为底数,为 true 时 logBase 失效。

Axis.max

double

设定的坐标轴刻度最大值当minMaxType为Custom时有效。

Axis.maxCache

int default: 0

The first data will be remove when the size of axis data is larger then maxCache.

Axis.min

double

设定的坐标轴刻度最小值当minMaxType为Custom时有效。

Axis.minCategorySpacing

float default: 0 v3.11.0

类目之间的最小间距。

Axis.minMaxType

Axis.AxisMinMaxType

坐标轴刻度最大最小值显示类型。

可选:

  • Default: 0-最大值。
  • MinMax: 最小值-最大值。
  • Custom: 自定义最小值最大值。
  • MinMaxAuto: [since("v3.7.0")]最小值-最大值。自动计算合适的值。

Axis.minorSplitLine

AxisMinorSplitLine v3.2.0

坐标轴次分割线。 AxisMinorSplitLine

Axis.minorTick

AxisMinorTick v3.2.0

坐标轴次刻度。 AxisMinorTick

Axis.offset

float

坐标轴相对默认位置的偏移。在相同position有多个坐标轴时有用。

Axis.parallelIndex

int

坐标轴所在的 parallel 的索引,默认位于第一个 parallel。

Axis.polarIndex

int

坐标轴所在的 ploar 的索引,默认位于第一个 polar。

Axis.position

Axis.AxisPosition

坐标轴在Grid中的位置。

可选:

  • Left: 坐标轴在Grid中的位置
  • Right: 坐标轴在Grid中的位置
  • Bottom: 坐标轴在Grid中的位置
  • Top: 坐标轴在Grid中的位置
  • Center: 坐标轴在Grid中的位置

Axis.show

bool default: true

是否显示坐标轴。

Axis.splitArea

AxisSplitArea

坐标轴分割区域。 AxisSplitArea

Axis.splitLine

AxisSplitLine

坐标轴分割线。 AxisSplitLine

Axis.splitNumber

int default: 0

坐标轴的期望的分割段数。默认为0表示自动分割。

Axis.type

Axis.AxisType

坐标轴类型。

可选:

  • Value: 数值轴。适用于连续数据。
  • Category: 类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。serie的数据第0维数据对应坐标轴data的index。
  • Log: 对数轴。适用于对数数据。
  • Time: 时间轴。适用于连续的时序数据。

AxisAnimation

class in XCharts.Runtime / 继承自: ChildComponent

v3.9.0 开始支持

坐标轴动画配置。

AxisAnimation.duration

float

动画时长(ms)。 默认设置为0时会自动获取serie的动画时长。

AxisAnimation.show

bool default: true

是否开启动画。

AxisAnimation.unscaledTime

bool

动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。

AxisLabel

class in XCharts.Runtime / 继承自: LabelStyle

坐标轴刻度标签的相关设置。

AxisLabel.inside

bool default: false

刻度标签是否朝内,默认朝外。

AxisLabel.interval

int default: 0

坐标轴刻度标签的显示间隔在类目轴中有效。0表示显示所有标签1表示隔一个隔显示一个标签以此类推。

AxisLabel.onZero

bool default: false

刻度标签显示在0刻度上。

AxisLabel.showAsPositiveNumber

bool default: false

将负数数值显示为正数。一般和SerieshowAsPositiveNumber配合使用。

AxisLabel.showEndLabel

bool default: true

是否显示最后一个文本。

AxisLabel.showStartLabel

bool default: true

是否显示第一个文本。

AxisLabel.textLimit

TextLimit

文本限制。 TextLimit

AxisLine

class in XCharts.Runtime / 继承自: BaseLine

坐标轴轴线。

AxisLine.arrow

ArrowStyle

轴线箭头。 ArrowStyle

AxisLine.onZero

bool

X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一个轴为数值轴且包含 0 刻度时有效。

AxisLine.showArrow

bool

是否显示箭头。

AxisMinorSplitLine

class in XCharts.Runtime / 继承自: BaseLine

v3.2.0 开始支持

坐标轴在 grid 区域中的次分隔线。次分割线会对齐次刻度线 minorTick。

AxisMinorSplitLine.autoColor

bool

自动设置颜色。

AxisMinorSplitLine.distance

float

刻度线与轴线的距离。

AxisMinorTick

class in XCharts.Runtime / 继承自: BaseLine

v3.2.0 开始支持

坐标轴次刻度相关设置。注意:次刻度无法在类目轴中使用。

AxisMinorTick.autoColor

bool

AxisMinorTick.splitNumber

int default: 5

分隔线之间分割的刻度数。

AxisName

class in XCharts.Runtime / 继承自: ChildComponent

坐标轴名称。

AxisName.labelStyle

LabelStyle

文本样式。 LabelStyle

AxisName.name

string

坐标轴名称。

AxisName.onZero

bool v3.1.0

坐标轴名称的位置是否保持和Y轴0刻度一致。

AxisName.show

bool

是否显示坐标轴名称。

AxisSplitArea

class in XCharts.Runtime / 继承自: ChildComponent

坐标轴在 grid 区域中的分隔区域,默认不显示。

AxisSplitArea.color

List<Color32>

分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。

AxisSplitArea.show

bool

是否显示分隔区域。

AxisSplitLine

class in XCharts.Runtime / 继承自: BaseLine

坐标轴在 grid 区域中的分隔线。

AxisSplitLine.autoColor

bool

自动设置颜色。

AxisSplitLine.distance

float

刻度线与轴线的距离。

AxisSplitLine.interval

int

坐标轴分隔线的显示间隔。

AxisSplitLine.showEndLine

bool default: true v3.3.0

是否显示最后一条分割线。

AxisSplitLine.showStartLine

bool default: true v3.3.0

是否显示第一条分割线。

AxisSplitLine.showZLine

bool default: true v3.11.0

是否显示Z轴部分分割线。一般用于3D坐标系。

AxisTheme

class in XCharts.Runtime / 继承自: BaseAxisTheme

AxisTick

class in XCharts.Runtime / 继承自: BaseLine

坐标轴刻度相关设置。

AxisTick.alignWithLabel

bool

类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。

AxisTick.autoColor

bool

AxisTick.distance

float

刻度线与轴线的距离。

AxisTick.inside

bool

坐标轴刻度是否朝内,默认朝外。

AxisTick.showEndTick

bool

是否显示最后一个刻度。

AxisTick.showStartTick

bool

是否显示第一个刻度。

AxisTick.splitNumber

int default: 0

分隔线之间分割的刻度数。

Background

class in XCharts.Runtime / 继承自: MainComponent

背景组件。

Background.autoColor

bool default: true

当background组件开启时是否自动使用主题背景色作为backgrounnd组件的颜色。当设置为false时用imageColor作为颜色。

Background.borderStyle

BorderStyle v3.10.0

背景边框样式。 BorderStyle

Background.image

Sprite

背景图。

Background.imageColor

Color

背景图颜色。

Background.imageHeight

float default: 0 v3.10.0

背景图高度。

Background.imageType

Image.Type

背景图填充类型。

Background.imageWidth

float default: 0 v3.10.0

背景图宽度。

Background.show

bool default: true

是否启用背景组件。

Bar

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer

BaseAxisTheme

class in XCharts.Runtime / 继承自: ComponentTheme / 子类: AxisTheme, RadiusAxisTheme, AngleAxisTheme, PolarAxisTheme, RadarAxisTheme

BaseAxisTheme.lineColor

Color32

坐标轴线颜色。

BaseAxisTheme.lineLength

float default: 0f

坐标轴线长。

BaseAxisTheme.lineType

LineStyle.Type

坐标轴线类型。

可选:

  • Solid: 实线
  • Dashed: 虚线
  • Dotted: 点线
  • DashDot: 点划线
  • DashDotDot: 双点划线
  • None: 双点划线

BaseAxisTheme.lineWidth

float default: 1f

坐标轴线宽。

BaseAxisTheme.minorSplitLineColor

Color32

次分割线线颜色。

BaseAxisTheme.splitAreaColors

List<Color32>

坐标轴分隔区域的颜色。

BaseAxisTheme.splitLineColor

Color32

分割线线颜色。

BaseAxisTheme.splitLineLength

float default: 0f

分割线线长。

BaseAxisTheme.splitLineType

LineStyle.Type

分割线线类型。

可选:

  • Solid: 实线
  • Dashed: 虚线
  • Dotted: 点线
  • DashDot: 点划线
  • DashDotDot: 双点划线
  • None: 双点划线

BaseAxisTheme.splitLineWidth

float default: 1f

分割线线宽。

BaseAxisTheme.tickColor

Color32

坐标轴线颜色。

BaseAxisTheme.tickLength

float default: 5f

刻度线线长。

BaseAxisTheme.tickWidth

float default: 1f

刻度线线宽。

BaseLine

class in XCharts.Runtime / 继承自: ChildComponent / 子类: AxisLine, AxisMinorSplitLine, AxisMinorTick, AxisSplitLine, AxisTick

线条基础配置。

BaseLine.lineStyle

LineStyle

线条样式 LineStyle

BaseLine.show

bool

是否显示坐标轴轴线。

BaseScatter

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer / 子类: EffectScatter, Scatter

BaseSerie

class in XCharts.Runtime / 子类: Serie

BlurStyle

class in XCharts.Runtime / 继承自: StateStyle, ISerieComponent, ISerieDataComponent

v3.2.0 开始支持

淡出状态样式。

BorderStyle

class in XCharts.Runtime / 继承自: ChildComponent

v3.10.0 开始支持

边框样式。

BorderStyle.borderColor

Color32

边框颜色。

BorderStyle.borderWidth

float

边框宽度。

BorderStyle.cornerRadius

float[]

圆角半径。用数组分别指定4个圆角半径顺时针左上右上右下左下。当为(1,1,1,1)时为全圆角。

BorderStyle.roundedCorner

bool default: true

是否显示圆角。

BorderStyle.show

bool default: false

是否显示边框。

CalendarCoord

class in XCharts.Runtime / 继承自: CoordSystem, IUpdateRuntimeData, ISerieContainer

Candlestick

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer

ChartText

class in XCharts.Runtime

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

Comment

class in XCharts.Runtime / 继承自: MainComponent, IPropertyChanged

图表注解组件。

Comment.items

List<CommentItem>

注解项。每个注解组件可以设置多个注解项。

Comment.labelStyle

LabelStyle

所有组件的文本样式。 LabelStyle

Comment.markStyle

CommentMarkStyle

所有组件的文本样式。 CommentMarkStyle

Comment.show

bool default: true

是否显示注解组件。

CommentItem

class in XCharts.Runtime / 继承自: ChildComponent

注解项。

CommentItem.content

string

注解的文本内容。支持模板参数可以参考Tooltip的itemFormatter。

CommentItem.labelStyle

LabelStyle

注解项的文本样式。 LabelStyle

CommentItem.location

Location v3.5.0

Comment显示的位置。 Location

CommentItem.markRect

Rect

注解区域。

CommentItem.markStyle

CommentMarkStyle

注解标记区域样式。 CommentMarkStyle

CommentItem.show

bool default: true

是否显示当前注解项。

CommentMarkStyle

class in XCharts.Runtime / 继承自: ChildComponent

注解项区域样式。

CommentMarkStyle.lineStyle

LineStyle

线条样式。 LineStyle

CommentMarkStyle.show

bool default: true

是否显示当前注解项。

ComponentTheme

class in XCharts.Runtime / 继承自: ChildComponent / 子类: BaseAxisTheme, DataZoomTheme, LegendTheme, SubTitleTheme, TitleTheme, TooltipTheme, VisualMapTheme

ComponentTheme.font

Font

字体。

ComponentTheme.fontSize

int default: 18

文本字体大小。

ComponentTheme.textBackgroundColor

Color

文本颜色。

ComponentTheme.textColor

Color

文本颜色。

ComponentTheme.tMPFont

TMP_FontAsset

字体。

CoordSystem

class in XCharts.Runtime / 继承自: MainComponent / 子类: RadarCoord, CalendarCoord, GridCoord, GridCoord3D, ParallelCoord, PolarCoord, SingleAxisCoord

坐标系系统。

DataZoom

class in XCharts.Runtime / 继承自: MainComponent, IUpdateRuntimeData

DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。

DataZoom.areaStyle

AreaStyle

阴影填充样式。 AreaStyle

DataZoom.backgroundColor

Color32

组件的背景颜色。

DataZoom.borderColor

Color32

边框颜色。

DataZoom.borderWidth

float

边框宽。

DataZoom.bottom

float

组件离容器下侧的距离。

DataZoom.enable

bool default: true

是否显示缩放区域。

DataZoom.end

float

数据窗口范围的结束百分比。范围是0 ~ 100。

DataZoom.endLock

bool v3.6.0

固定结束值,不让改变。

DataZoom.fillerColor

Color32

数据区域颜色。

DataZoom.filterMode

DataZoom.FilterMode

数据过滤类型。

可选:

  • Filter: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。
  • WeakFilter: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。
  • Empty: 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。
  • None: 不过滤数据,只改变数轴范围。

DataZoom.labelStyle

LabelStyle

文本标签格式。 LabelStyle

DataZoom.left

float

组件离容器左侧的距离。

DataZoom.lineStyle

LineStyle

阴影线条样式。 LineStyle

DataZoom.marqueeStyle

MarqueeStyle v3.5.0

选取框样式。 MarqueeStyle

DataZoom.minShowNum

int default: 2

最小显示数据个数。当DataZoom放大到最大时最小显示的数据个数。

DataZoom.orient

Orient

布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。

可选:

  • Horizonal: 水平
  • Vertical: 垂直

DataZoom.rangeMode

DataZoom.RangeMode

取绝对值还是百分比。

可选:

  • //Value: The value type of start and end.取值类型
  • Percent: 百分比。

DataZoom.right

float

组件离容器右侧的距离。

DataZoom.scrollSensitivity

float default: 1.1f

缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。

DataZoom.showDataShadow

bool

是否显示数据阴影。数据阴影可以简单地反应数据走势。

DataZoom.showDetail

bool

是否显示detail即拖拽时候显示详细数值信息。

DataZoom.start

float

数据窗口范围的起始百分比。范围是0 ~ 100。

DataZoom.startLock

bool v3.6.0

固定起始值,不让改变。

DataZoom.supportInside

bool

是否支持内置。内置于坐标系中,使用户可以在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。

DataZoom.supportInsideDrag

bool default: true

是否支持坐标系内拖拽

DataZoom.supportInsideScroll

bool default: true

是否支持坐标系内滚动

DataZoom.supportMarquee

bool

是否支持框选。提供一个选框进行数据区域缩放。

DataZoom.supportSlider

bool

是否支持滑动条。有单独的滑动条,用户在滑动条上进行缩放或漫游。

DataZoom.top

float

组件离容器上侧的距离。

DataZoom.xAxisIndexs

List<int>

控制的 x 轴索引列表。

DataZoom.yAxisIndexs

List<int>

控制的 y 轴索引列表。

DataZoom.zoomLock

bool

是否锁定选择区域(或叫做数据窗口)的大小。 如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。

DataZoomTheme

class in XCharts.Runtime / 继承自: ComponentTheme

DataZoomTheme.backgroundColor

Color32

背景颜色。

DataZoomTheme.borderColor

Color32

边框颜色。

DataZoomTheme.borderWidth

float

边框线宽。

DataZoomTheme.dataAreaColor

Color32

数据阴影的填充颜色。

DataZoomTheme.dataLineColor

Color32

数据阴影的线条颜色。

DataZoomTheme.dataLineWidth

float

数据阴影线宽。

DataZoomTheme.fillerColor

Color32

数据区域颜色。

DebugInfo

class in XCharts.Runtime

DebugInfo.foldSeries

bool default: false

是否在Inspector上折叠Serie。

DebugInfo.labelStyle

LabelStyle

LabelStyle

DebugInfo.show

bool default: true

是否显示Debug组件。

DebugInfo.showAllChartObject

bool default: false

是否在Hierarchy试图显示所有chart下的节点。

DebugInfo.showDebugInfo

bool default: false

EffectScatter

class in XCharts.Runtime / 继承自: BaseScatter

EmphasisStyle

class in XCharts.Runtime / 继承自: StateStyle, ISerieComponent, ISerieDataComponent

v3.2.0 开始支持

高亮状态样式。

EmphasisStyle.blurScope

EmphasisStyle.BlurScope

在开启focus的时候可以通过blurScope配置淡出的范围。

可选:

  • GridCoord: 淡出范围为坐标系,默认使用该配置。
  • Series: 淡出范围为系列。
  • Global: 淡出范围为全局。

EmphasisStyle.focus

EmphasisStyle.FocusType

在高亮图形时,是否淡出其它数据的图形已达到聚焦的效果。

可选:

  • None: 不淡出其它图形,默认使用该配置。
  • Self: 只聚焦(不淡出)当前高亮的数据的图形。
  • Series: 聚焦当前高亮的数据所在的系列的所有图形。

EmphasisStyle.scale

float default: 1.1f

高亮时的缩放倍数。

EndLabelStyle

class in XCharts.Runtime / 继承自: LabelStyle

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.backgroundColor

Color32

网格背景色,默认透明。

GridCoord.borderColor

Color32

网格边框颜色。

GridCoord.borderWidth

float default: 0f

网格边框宽。

GridCoord.bottom

float default: 0.14f

grid 组件离容器下侧的距离。

GridCoord.layoutIndex

int default: -1 v3.8.0

网格所属的网格布局组件的索引。默认为-1表示不属于任何网格布局组件。当设置了该值时left、right、top、bottom属性将失效。

GridCoord.left

float default: 0.11f

grid 组件离容器左侧的距离。

GridCoord.right

float default: 0.08f

grid 组件离容器右侧的距离。

GridCoord.show

bool default: true

是否显示直角坐标系网格。

GridCoord.showBorder

bool default: false

是否显示网格边框。

GridCoord.top

float default: 0.22f

grid 组件离容器上侧的距离。

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.bottom

float default: 0.15f

grid 组件离容器下侧的距离。

GridCoord3D.boxDepth

float default: 0.2f

坐标系的深度。

GridCoord3D.boxHeight

float default: 0.4f

坐标系的高度。

GridCoord3D.boxWidth

float default: 0.55f

坐标系的宽度。

GridCoord3D.left

float default: 0.15f

grid 组件离容器左侧的距离。

GridCoord3D.right

float default: 0.2f

grid 组件离容器右侧的距离。

GridCoord3D.show

bool default: true

是否显示直角坐标系网格。

GridCoord3D.showBorder

bool default: false

是否显示网格边框。

GridCoord3D.top

float default: 0.3f

grid 组件离容器上侧的距离。

GridCoord3D.viewControl

ViewControl

3D视角控制组件。 ViewControl

GridCoord3D.xYExchanged

bool default: false

GridLayout

class in XCharts.Runtime / 继承自: MainComponent, IUpdateRuntimeData

v3.8.0 开始支持

网格布局组件。用于管理多个GridCoord的布局,可以通过rowcolumn来控制网格的行列数。

GridLayout.bottom

float default: 0.12f

grid 组件离容器下侧的距离。

GridLayout.column

int default: 2

网格布局的列数。

GridLayout.inverse

bool default: false

是否反转网格布局。

GridLayout.left

float default: 0.1f

grid 组件离容器左侧的距离。

GridLayout.right

float default: 0.08f

grid 组件离容器右侧的距离。

GridLayout.row

int default: 2

网格布局的行数。

GridLayout.show

bool default: true

是否显示直角坐标系网格。

GridLayout.spacing

Vector2 default: Vector2.zero

网格布局的间距。

GridLayout.top

float default: 0.22f

grid 组件离容器上侧的距离。

Heatmap

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer

Heatmap.heatmapType

HeatmapType v3.3.0

热力图类型。通过颜色映射划分。

可选:

  • Data: 数据映射型。默认用第2维数据作为颜色映射。要求数据至少有3个维度数据。
  • Count: 个数映射型。统计数据在划分的格子中出现的次数作为颜色映射。要求数据至少有2个维度数据。

IconStyle

class in XCharts.Runtime / 继承自: ChildComponent

IconStyle.align

Align

水平方向对齐方式。

可选:

  • Center: 对齐方式。文本,图标,图形等的对齐方式。
  • Left: 对齐方式。文本,图标,图形等的对齐方式。
  • Right: 对齐方式。文本,图标,图形等的对齐方式。

IconStyle.autoHideWhenLabelEmpty

bool default: false

当label内容为空时是否自动隐藏图标

IconStyle.color

Color

图标颜色。

IconStyle.height

float default: 20

图标高。

IconStyle.layer

IconStyle.Layer

显示在上层还是在下层。

可选:

  • UnderText: The icon is display under the label text. 图标在标签文字下
  • AboveText: The icon is display above the label text. 图标在标签文字上

IconStyle.offset

Vector3

图标偏移。

IconStyle.show

bool default: false

是否显示图标。

IconStyle.sprite

Sprite

图标的图片。

IconStyle.type

Image.Type

图片的显示类型。

IconStyle.width

float default: 20

图标宽。

ImageStyle

class in XCharts.Runtime / 继承自: ChildComponent, ISerieComponent, ISerieDataComponent

ImageStyle.autoColor

bool

是否自动颜色。

ImageStyle.color

Color

图标颜色。

ImageStyle.height

float default: 0

图标高。

ImageStyle.show

bool default: true

是否显示图标。

ImageStyle.sprite

Sprite

图标的图片。

ImageStyle.type

Image.Type

图片的显示类型。

ImageStyle.width

float default: 0

图标宽。

Indicator

class in XCharts.Runtime

雷达图的指示器,用来指定雷达图中的多个变量(维度)。

Indicator.axisLine

AxisLine

轴线。 AxisLine

Indicator.axisName

AxisName

雷达图每个指示器名称的配置项。 AxisName

Indicator.ceilRate

double default: 0

最大最小值向上取整的倍率。默认为0时自动计算。

Indicator.center

float[]

雷达图的中心点。数组的第一项是横坐标,第二项是纵坐标。 当值为0-1之间时表示百分比设置成百分比时第一项是相对于容器宽度第二项是相对于容器高度。

Indicator.connectCenter

bool default: false

数值是否连线到中心点。

Indicator.gridIndex

int default: -1 v3.8.0

所使用的 layout 组件的 index。 默认为-1不指定index, 当为大于或等于0时, 为第一个layout组件的第index个格子。

Indicator.indicator

bool default: true

是否显示指示器。

Indicator.indicatorGap

float default: 10

指示器和雷达的间距。

Indicator.indicatorList

List<Indicator>

指示器列表。

Indicator.isAxisTooltip

bool

是否Tooltip显示轴线上的所有数据。

Indicator.lineGradient

bool default: true

数值线段是否需要渐变。

Indicator.max

double

指示器的最大值,默认为 0 无限制。

Indicator.min

double

指示器的最小值,默认为 0 无限制。

Indicator.name

string

指示器名称。

Indicator.outRangeColor

Color32 default: Color.red

数值超出范围时显示的颜色。

Indicator.positionType

PositionType

显示位置类型。

Indicator.radius

float default: 100

雷达图的半径。

Indicator.range

double[]

正常值范围。当数值不在这个范围时,会自动变更显示颜色。

Indicator.shape

Shape

雷达图绘制类型,支持 'Polygon' 和 'Circle'。

Indicator.show

bool

是否显示雷达坐标系组件。

Indicator.splitArea

AxisSplitArea

分割区域。 AxisSplitArea

Indicator.splitLine

AxisSplitLine

分割线。 AxisSplitLine

Indicator.splitNumber

int default: 5

指示器轴的分割段数。

Indicator.startAngle

float v3.4.0

起始角度。和时钟一样12点钟位置是0度顺时针到360度。

INeedSerieContainer

class in XCharts.Runtime / 子类: Bar, SimplifiedBar, Candlestick, SimplifiedCandlestick, Heatmap, Line, SimplifiedLine, Parallel, Radar, BaseScatter

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.backgroundColor

Color32

数据项背景颜色。

ItemStyle.backgroundWidth

float

数据项背景宽度。

ItemStyle.borderColor

Color32

边框的颜色。

ItemStyle.borderColor0

Color32

边框的颜色。

ItemStyle.borderGap

float default: 0

边框间隙。

ItemStyle.borderToColor

Color32

边框的渐变色。

ItemStyle.borderWidth

float default: 0

边框宽。

ItemStyle.centerColor

Color32

中心区域颜色。

ItemStyle.centerGap

float

中心区域间隙。

ItemStyle.color

Color32

数据项颜色。

ItemStyle.color0

Color32

数据项颜色。

ItemStyle.cornerRadius

float[]

圆角半径。用数组分别指定4个圆角半径顺时针左上右上右下左下

ItemStyle.itemFormatter

string

提示框单项的字符串模版格式器。具体配置参考Tooltipformatter

ItemStyle.itemMarker

string

提示框单项的字符标志。用在Tooltip中。

ItemStyle.markColor

Color32 v3.6.0

Serie的标识颜色。仅用于Legend和Tooltip的展示不影响绘制颜色默认为clear。

ItemStyle.numericFormatter

string

标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。
数字格式使用Axx的形式A是格式说明符的单字符支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明从0-99。如F1, E2
日期格式:以date开头用来格式化DateTime常见格式有yyyy年MM月dd日HH时mm分ss秒fff毫秒。如date:yyyy-MM-dd HH:mm:ss
时间格式:以time开头用来格式化TimeSpan常见格式有d日HH时mm分ss秒fffffff小数部分。 需要Unity2018以上版本才支持格式化并且里面的字符要转义。如time:d.HH:mm:ss
数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings
日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings
时间格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-timespan-format-strings
注意date和time格式需要v3.12.0以上版本才支持。

ItemStyle.opacity

float default: 1

透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。

ItemStyle.show

bool default: true

是否启用。

ItemStyle.toColor

Color32

渐变色的颜色1。

ItemStyle.toColor2

Color32

渐变色的颜色2。只在折线图中有效。

IUpdateRuntimeData

class in XCharts.Runtime / 子类: SingleAxis, DataZoom, CalendarCoord, GridCoord, GridLayout, GridCoord3D, ParallelCoord

LabelLine

class in XCharts.Runtime / 继承自: ChildComponent, ISerieComponent, ISerieDataComponent

标签的引导线

LabelLine.endSymbol

SymbolStyle

结束点的图形标记。 SymbolStyle

LabelLine.lineAngle

float default: 60

视觉引导线的固定角度。对折线和曲线有效。在Pie中无效。

LabelLine.lineColor

Color32 default: Color32(0,0,0,0)

视觉引导线颜色。默认和serie一致取自调色板。

LabelLine.lineEndX

float default: 0f v3.8.0

视觉引导线结束点的固定x位置。当不为0时会代替lineLength2设定引导线的x位置。

LabelLine.lineGap

float default: 1.0f

视觉引导线和容器的间距。

LabelLine.lineLength1

float default: 25f

视觉引导线第一段的长度。

LabelLine.lineLength2

float default: 15f

视觉引导线第二段的长度。

LabelLine.lineType

LabelLine.LineType

视觉引导线类型。

可选:

  • BrokenLine: 折线
  • Curves: 曲线
  • HorizontalLine: 水平线

LabelLine.lineWidth

float default: 1.0f

视觉引导线的宽度。

LabelLine.show

bool default: true

是否显示视觉引导线。

LabelLine.startSymbol

SymbolStyle

起始点的图形标记。 SymbolStyle

LabelStyle

class in XCharts.Runtime / 继承自: ChildComponent, ISerieComponent, ISerieDataComponent / 子类: AxisLabel, EndLabelStyle, TitleStyle

图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。

LabelStyle.autoOffset

bool default: false

是否开启自动偏移。当开启时Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。

LabelStyle.autoRotate

bool default: false v3.6.0

是否自动旋转。

LabelStyle.background

ImageStyle

背景图样式。 ImageStyle

LabelStyle.distance

float

距离轴线的距离。

LabelStyle.formatter

string

标签内容字符串模版格式器。支持用 \n 换行。部分组件的格式器会不生效。
模板通配符有以下这些,部分只适用于固定的组件:
{.}:圆点标记。
{a}:系列名。
{b}X轴类目名或数据名。
{c}:数据值。
{d}:百分比。
{e}:数据名。
{f}:数据和。
{g}:数据总个数。
{h}:十六进制颜色值。
{y}Y轴的类目名。
{value}:坐标轴或图例的值。
以下通配符适用UITable组件
{name} 表格的行名。
{index}:表格的行号。
以下通配符适用UIStatistc组件
{title}:标题文本。
{dd}:天。
{hh}:小时。
{mm}:分钟。
{ss}:秒。
{fff}:毫秒。
{d}:天。
{h}:小时。
{m}:分钟。
{s}:秒。
{f}:毫秒。
示例:“{b}:{c}”

LabelStyle.height

float default: 0

标签的高度。一般不用指定,不指定时则自动是文字的高度。

LabelStyle.icon

IconStyle

图标样式。 IconStyle

LabelStyle.numericFormatter

string

标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。
数字格式使用Axx的形式A是格式说明符的单字符支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明从0-99。如F1, E2
日期格式:以date开头用来格式化DateTime常见格式有yyyy年MM月dd日HH时mm分ss秒fff毫秒。如date:yyyy-MM-dd HH:mm:ss
时间格式:以time开头用来格式化TimeSpan常见格式有d日HH时mm分ss秒fffffff小数部分。 需要Unity2018以上版本才支持格式化并且里面的字符要转义。如time:d.HH:mm:ss
数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings
日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings
时间格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-timespan-format-strings
注意date和time格式需要v3.12.0以上版本才支持。

LabelStyle.offset

Vector3

距离图形元素的偏移

LabelStyle.Position

[SerializeField]

标签的位置。

LabelStyle.rotate

float

文本的旋转。

LabelStyle.show

bool default: true

是否显示文本标签。

LabelStyle.textPadding

TextPadding

文本的边距。 TextPadding

LabelStyle.textStyle

TextStyle

文本样式。 TextStyle

LabelStyle.width

float default: 0

标签的宽度。一般不用指定,不指定时则自动是文字的宽度。

Lang

class in XCharts.Runtime / 继承自: ScriptableObject

国际化语言表。

LangCandlestick

class in XCharts.Runtime

LangTime

class in XCharts.Runtime

Legend

class in XCharts.Runtime / 继承自: MainComponent, IPropertyChanged

图例组件。 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。

Legend.background

ImageStyle v3.1.0

背景图样式。 ImageStyle

Legend.colors

List<Color>

图例标记的颜色列表。

Legend.data

List<string>

图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 name如果是饼图也可以是饼图单个数据的 name。 如果 data 没有被指定会自动从当前系列中获取。指定data时里面的数据项和serie匹配时才会生效。

Legend.formatter

string

不再使用使用LabelStyle.formatter代替。

Legend.icons

List<Sprite>

自定义的图例标记图形。

Legend.iconType

Legend.Type

图例类型。

可选:

  • Auto: 自动匹配。
  • Custom: 自定义图标。
  • EmptyCircle: 空心圆。
  • Circle: 圆形。
  • Rect: 正方形。可通过Setting的legendIconCornerRadius参数调整圆角。
  • Triangle: 三角形。
  • Diamond: 菱形。
  • Candlestick: 烛台可用于K线图

Legend.itemAutoColor

bool default: true

图例标记的图形是否自动匹配颜色。

Legend.itemGap

float default: 10f

图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。

Legend.itemHeight

float default: 12.0f

图例标记的图形高度。

Legend.itemOpacity

float default: 1

图例标记的图形的颜色透明度。

Legend.itemWidth

float default: 25.0f

图例标记的图形宽度。

Legend.labelStyle

LabelStyle

文本样式。 LabelStyle

Legend.location

Location

图例显示的位置。 Location

Legend.orient

Orient

布局方式是横还是竖。

可选:

  • Horizonal: 水平
  • Vertical: 垂直

Legend.padding

Padding v3.1.0

图例标记和背景的间距。 Padding

Legend.positions

List<Vector3> v3.6.0

图例标记的自定义位置列表。

Legend.selectedMode

Legend.SelectedMode

选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。

可选:

  • Multiple: 多选。
  • Single: 单选。
  • None: 无法选择。

Legend.show

bool default: true

是否显示图例组件。

Legend.textLimit

TextLimit v3.10.0

文本限制。 TextLimit

LegendTheme

class in XCharts.Runtime / 继承自: ComponentTheme

LegendTheme.unableColor

Color

文本颜色。

Level

class in XCharts.Runtime / 继承自: ChildComponent

Level.depth

int default: 0 v3.10.0

层级深度。

Level.itemStyle

ItemStyle

数据项样式。 ItemStyle

Level.label

LabelStyle

文本标签样式。 LabelStyle

Level.lineStyle

LineStyle v3.10.0

线条样式。 LineStyle

Level.upperLabel

LabelStyle

上方的文本标签样式。 LabelStyle

LevelStyle

class in XCharts.Runtime / 继承自: ChildComponent

v3.10.0 开始支持

LevelStyle.levels

List<Level>

各层节点对应的配置。当enableLevels为true时生效levels[0]对应的第一层的配置levels[1]对应第二层依次类推。当levels中没有对应层时用默认的设置。

LevelStyle.show

bool default: false

是否启用LevelStyle

Line

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer

LineArrow

class in XCharts.Runtime / 继承自: ChildComponent, ISerieComponent

LineArrow.arrow

ArrowStyle

箭头。 ArrowStyle

LineArrow.position

LineArrow.Position

箭头位置。

可选:

  • End: 末端箭头
  • Start: 头端箭头

LineArrow.show

bool

是否显示箭头。

LineStyle

class in XCharts.Runtime / 继承自: ChildComponent, ISerieDataComponent

线条样式。 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle.color线条颜色默认也会取该颜色。 toColortoColor2可设置水平方向的渐变如需要设置垂直方向的渐变可使用VisualMap。

LineStyle.color

Color32

线的颜色。

LineStyle.dashLength

float default: 4 v3.8.1

虚线的长度。默认0时为线条宽度的12倍。在折线图中代表分割段数的倍数。

LineStyle.dotLength

float default: 2 v3.8.1

点线的长度。默认0时为线条宽度的3倍。在折线图中代表分割段数的倍数。

LineStyle.gapLength

float default: 2 v3.8.1

点线的长度。默认0时为线条宽度的3倍。在折线图中代表分割段数的倍数。

LineStyle.length

float default: 0

线长。

LineStyle.opacity

float default: 1

线的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。

LineStyle.show

bool default: true

是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。

LineStyle.toColor

Color32

线的渐变颜色(需要水平方向渐变时)。

LineStyle.toColor2

Color32

线的渐变颜色2需要水平方向三个渐变色的渐变时

LineStyle.type

LineStyle.Type

线的类型。

可选:

  • Solid: 实线
  • Dashed: 虚线
  • Dotted: 点线
  • DashDot: 点划线
  • DashDotDot: 双点划线
  • None: 双点划线

LineStyle.width

float default: 0

线宽。

Location

class in XCharts.Runtime / 继承自: ChildComponent, IPropertyChanged

位置类型。通过Align快速设置大体位置再通过leftrighttopbottom微调具体位置。

Location.align

Location.Align

对齐方式。

可选:

  • TopLeft: 对齐方式
  • TopRight: 对齐方式
  • TopCenter: 对齐方式
  • BottomLeft: 对齐方式
  • BottomRight: 对齐方式
  • BottomCenter: 对齐方式
  • Center: 对齐方式
  • CenterLeft: 对齐方式
  • CenterRight: 对齐方式

Location.bottom

float

离容器下侧的距离。

Location.left

float

离容器左侧的距离。

Location.right

float

离容器右侧的距离。

Location.top

float

离容器上侧的距离。

MainComponent

class in XCharts.Runtime / 继承自: IComparable / 子类: Axis, Background, Comment, DataZoom, Legend, MarkArea, MarkLine, Settings, Title, Tooltip, VisualMap, GridLayout, CoordSystem

MarkArea

class in XCharts.Runtime / 继承自: MainComponent

图表标域,常用于标记图表中某个范围的数据。

MarkArea.end

MarkAreaData

标域范围的结束数据。 MarkAreaData

MarkArea.itemStyle

ItemStyle

标域样式。 ItemStyle

MarkArea.label

LabelStyle

标域文本样式。 LabelStyle

MarkArea.serieIndex

int default: 0

Serie index of markArea. 标域影响的Serie索引。

MarkArea.show

bool default: true

是否显示标域。

MarkArea.start

MarkAreaData

标域范围的起始数据。 MarkAreaData

MarkArea.text

string

The text of markArea. 标域显示的文本。

MarkAreaData

class in XCharts.Runtime / 继承自: ChildComponent

标域的数据。

MarkAreaData.dimension

int default: 1

从哪个维度的数据计算最大最小值等。

MarkAreaData.name

string

标注名称。会作为文字显示。

MarkAreaData.type

MarkAreaType

特殊的标域类型,用于标注最大值最小值等。

可选:

  • None: 标域类型
  • Min: 最小值。
  • Max: 最大值。
  • Average: 平均值。
  • Median: 中位数。

MarkAreaData.xPosition

float

相对原点的 x 坐标单位像素。当type为None时有效。

MarkAreaData.xValue

double

X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引否则为具体的值。当type为None时有效。

MarkAreaData.yPosition

float

相对原点的 y 坐标单位像素。当type为None时有效。

MarkAreaData.yValue

double

Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引否则为具体的值。当type为None时有效。

MarkLine

class in XCharts.Runtime / 继承自: MainComponent

图表标线。

MarkLine.animation

AnimationStyle

标线的动画样式。 AnimationStyle

MarkLine.data

List<MarkLineData>

标线的数据列表。当数据项的group为0时每个数据项表示一条标线当group不为0时相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。

MarkLine.onTop

bool default: true v3.9.0

是否在最上层。

MarkLine.serieIndex

int default: 0

标线影响的Serie索引。

MarkLine.show

bool default: true

是否显示标线。

MarkLineData

class in XCharts.Runtime / 继承自: ChildComponent

v3.9.0 开始支持

图表标线的数据。

MarkLineData.dimension

int default: 1

从哪个维度的数据计算最大最小值等。

MarkLineData.endSymbol

SymbolStyle

结束点的图形标记。 SymbolStyle

MarkLineData.group

int default: 0

分组。当group不为0时表示这个data是标线的起点或终点group一致的data组成一条标线。

MarkLineData.label

LabelStyle

文本样式。可设置position为Start、Middle和End在不同的位置显示文本。 LabelStyle

MarkLineData.lineStyle

LineStyle

标线样式。 LineStyle

MarkLineData.name

string

标线名称将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。

MarkLineData.startSymbol

SymbolStyle

起始点的图形标记。 SymbolStyle

MarkLineData.type

MarkLineType

特殊的标线类型,用于标注最大值最小值等。

可选:

  • None: 标线类型
  • Min: 最小值。
  • Max: 最大值。
  • Average: 平均值。
  • Median: 中位数。

MarkLineData.xPosition

float

相对原点的 x 坐标单位像素。当type为None时有效。

MarkLineData.xValue

double

X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引否则为具体的值。当type为None时有效。

MarkLineData.yPosition

float

相对原点的 y 坐标单位像素。当type为None时有效。

MarkLineData.yValue

double

Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引否则为具体的值。当type为None时有效。

MarkLineData.zeroPosition

bool default: false

是否为坐标系原点。

MarqueeStyle

class in XCharts.Runtime / 继承自: ChildComponent

v3.5.0 开始支持

Marquee style. It can be used for the DataZoom component. 选取框样式。可用于DataZoom组件。

MarqueeStyle.apply

bool default: false v3.5.0

选取框范围是否应用到DataZoom上。当为true时框选结束后的范围即为DataZoom的选择范围。

MarqueeStyle.areaStyle

AreaStyle v3.5.0

选取框区域填充样式。 AreaStyle

MarqueeStyle.lineStyle

LineStyle v3.5.0

选取框区域边框样式。 LineStyle

MarqueeStyle.realRect

bool default: false v3.5.0

是否选取实际框选区域。当为true时以鼠标的其实点和结束点间的实际范围作为框选区域。

MLValue

class in XCharts.Runtime / 继承自: ChildComponent

v3.8.0 开始支持

多样式数值。

MLValue.type

MLValue.Type

可选:

  • Percent: 百分比形式。
  • Absolute: 绝对值形式。
  • Extra: 额外形式。

MLValue.value

float

Padding

class in XCharts.Runtime / 继承自: ChildComponent / 子类: TextPadding

边距设置。

Padding.bottom

float default: 0

底部间距。

Padding.left

float default: 2f

左边间距。

Padding.right

float default: 2f

右部间距。

Padding.show

bool default: true

show padding. 是否显示。

Padding.top

float default: 0

顶部间距。

Parallel

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer

ParallelAxis

class in XCharts.Runtime / 继承自: Axis

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.backgroundColor

Color

网格背景色,默认透明。

ParallelCoord.bottom

float default: 0.12f

grid 组件离容器下侧的距离。

ParallelCoord.left

float default: 0.1f

grid 组件离容器左侧的距离。

ParallelCoord.orient

Orient

坐标轴朝向。默认为垂直朝向。

可选:

  • Horizonal: 水平
  • Vertical: 垂直

ParallelCoord.right

float default: 0.08f

grid 组件离容器右侧的距离。

ParallelCoord.show

bool default: true

是否显示直角坐标系网格。

ParallelCoord.top

float default: 0.22f

grid 组件离容器上侧的距离。

Pie

class in XCharts.Runtime / 继承自: Serie

Pie.radiusGradient

bool default: false v3.8.1

是否开启半径方向的渐变效果。

PolarAxisTheme

class in XCharts.Runtime / 继承自: BaseAxisTheme

PolarCoord

class in XCharts.Runtime / 继承自: CoordSystem, ISerieContainer

极坐标系组件。 极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。

PolarCoord.backgroundColor

Color

极坐标的背景色,默认透明。

PolarCoord.center

float[]

极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。 当值为0-1之间时表示百分比设置成百分比时第一项是相对于容器宽度第二项是相对于容器高度。

PolarCoord.indicatorLabelOffset

float default: 30f v3.8.0

指示器标签的偏移量。

PolarCoord.radius

float[]

半径。radius[0]表示内径radius[1]表示外径。

PolarCoord.show

bool default: true

是否显示极坐标。

Radar

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer

Radar.smooth

bool default: false v3.2.0

是否平滑曲线。平滑曲线时不支持区域填充颜色。

RadarAxisTheme

class in XCharts.Runtime / 继承自: BaseAxisTheme

RadarCoord

class in XCharts.Runtime / 继承自: CoordSystem, ISerieContainer

Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。

RadiusAxis

class in XCharts.Runtime / 继承自: Axis

极坐标系的径向轴。

RadiusAxisTheme

class in XCharts.Runtime / 继承自: BaseAxisTheme

Ring

class in XCharts.Runtime / 继承自: Serie

Ring.radiusGradient

bool default: false v3.12.0

是否开启半径方向的渐变效果。

Scatter

class in XCharts.Runtime / 继承自: BaseScatter

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.align

Align

组件水平方向对齐方式。

可选:

  • Center: 对齐方式。文本,图标,图形等的对齐方式。
  • Left: 对齐方式。文本,图标,图形等的对齐方式。
  • Right: 对齐方式。文本,图标,图形等的对齐方式。

Serie.animation

AnimationStyle

起始动画。 AnimationStyle

Serie.avoidLabelOverlap

bool default: false

在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。

Serie.barGap

float default: 0.1f

不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30% 如果想要两个系列的柱子重叠,可以设置 barGap 为 '-1f'。这在用柱子做背景的时候有用。 在同一坐标系上,此属性会被多个 'bar' 系列共享。此属性应设置于此坐标系中最后一个 'bar' 系列上才会生效,并且是对此坐标系中所有 'bar' 系列生效。

Serie.barMaxWidth

float default: 0 v3.5.0

柱条的最大宽度默认为0为不限制最大宽度。支持设置成相对于类目宽度的百分比。

Serie.barPercentStack

bool default: false

柱形图是否为百分比堆积。相同stack的serie只要有一个barPercentStack为true则就显示成百分比堆叠柱状图。

Serie.barType

BarType

柱形图类型。

可选:

  • Normal: 普通柱形图。
  • Zebra: 斑马柱形图。
  • Capsule: 胶囊柱形图。

Serie.barWidth

float default: 0

柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。

Serie.barZebraGap

float default: 2f

斑马线的间距。

Serie.barZebraWidth

float default: 4f

斑马线的粗细。

Serie.bottom

float

组件离容器下侧的距离。

Serie.center

float[]

中心点。

Serie.clickOffset

bool default: true

鼠标点击时是否开启偏移一般用在PieChart图表中。

Serie.clip

bool default: false

是否裁剪超出坐标系部分的图形。

Serie.clockwise

bool default: true

是否顺时针。

Serie.colorBy

SerieColorBy v3.2.0

从主题中取色的策略。

可选:

  • Default: 默认策略。每种Serie都有自己的默认的取颜色策略。比如Line默认是Series策略Pie默认是Data策略。
  • Serie: 按照系列分配调色盘中的颜色,同一系列中的所有数据都是用相同的颜色。
  • Data: 按照数据项分配调色盘中的颜色,每个数据项都使用不同的颜色。

Serie.coordSystem

string

使用的坐标系。

Serie.data

List<SerieData>

系列中的数据内容数组。SerieData可以设置1到n维数据。

Serie.dataSortType

SerieDataSortType

组件的数据排序。

可选:

  • None: 按数据的顺序。
  • Ascending: 升序。
  • Descending: 降序。

Serie.endAngle

float

结束角度。和时钟一样12点钟位置是0度顺时针到360度。

Serie.gap

float

间距。

Serie.gridIndex

int default: -1 v3.8.0

所使用的 layout 组件的 index。 默认为-1不指定index, 当为大于或等于0时, 为第一个layout组件的第index个格子。

Serie.ignore

bool default: false

是否开启忽略数据。当为 true 时,数据值为 ignoreValue 时不进行绘制。

Serie.ignoreLineBreak

bool default: false

忽略数据时折线是断开还是连接。默认false为连接。

Serie.ignoreValue

double default: 0

忽略数据的默认值。当ignore为true才有效。

Serie.index

int

系列索引。

Serie.insertDataToHead

bool

添加新数据时是在列表的头部还是尾部加入。

Serie.itemStyle

ItemStyle

图形样式。 ItemStyle

Serie.large

bool default: true

是否开启大数据量优化,在数据图形特别多而出现卡顿时候可以开启。 开启后配合 largeThreshold 在数据量大于指定阈值的时候对绘制进行优化。 缺点优化后不能自定义设置单个数据项的样式不能显示Label。

Serie.largeThreshold

int default: 200

开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。

Serie.left

float

组件离容器左侧的距离。

Serie.lineStyle

LineStyle

线条样式。 LineStyle

Serie.lineType

LineType

折线图样式类型。

可选:

  • Normal: 普通折线图。
  • Smooth: 平滑曲线。
  • StepStart: 阶梯线图:当前点。
  • StepMiddle: 阶梯线图:当前点和下一个点的中间。
  • StepEnd: 阶梯线图:下一个拐点。

List<SerieDataLink>

数据节点的边。

Serie.max

float

最大值。

Serie.maxCache

int

系列中可缓存的最大数据量。默认为0没有限制大于0时超过指定值会移除旧数据再插入新数据。

Serie.maxShow

int

系列所显示数据的最大索引

Serie.maxSize

float default: 1f

数据最大值 max 映射的宽度。

Serie.min

float

最小值。

Serie.minAngle

float

最小的扇区角度0-360。用于防止某个值过小导致扇区太小影响交互。

Serie.minRadius

float default: 0f v3.8.0

最小半径。可用于限制玫瑰图的最小半径。

Serie.minShow

int

系列所显示数据的最小索引

Serie.minShowLabel

bool default: false v3.10.0

是否开启值小于指定值minShowLabelValue时不显示标签。

Serie.minShowLabelValue

double default: 0 v3.10.0

当开启minShowLabel时,值小于该值时不显示标签。

Serie.minSize

float default: 0f

数据最小值 min 映射的宽度。

Serie.orient

Orient

组件的朝向。

可选:

  • Horizonal: 水平
  • Vertical: 垂直

Serie.parallelIndex

int default: 0

所使用的 parallel coord 组件的 index。

Serie.placeHolder

bool default: false

占位模式。占位模式时,数据有效但不参与渲染和显示。

Serie.polarIndex

int default: 0

所使用的 polar 组件的 index。

Serie.radarIndex

int default: 0

雷达图所使用的 radar 组件的 index。

Serie.radarType

RadarType

雷达图类型。

可选:

  • Multiple: 多圈雷达图。此时可一个雷达里绘制多个圈一个serieData就可组成一个圈多维数据
  • Single: 单圈雷达图。此时一个雷达只能绘制一个圈多个serieData组成一个圈数据取自data[1]

Serie.radius

float[]

半径。radius[0]表示内径radius[1]表示外径。

Serie.right

float

组件离容器右侧的距离。

Serie.roseType

RoseType

是否展示成南丁格尔图,通过半径区分数据大小。

可选:

  • None: 不展示成南丁格尔玫瑰图。
  • Radius: 扇区圆心角展现数据的百分比,半径展现数据的大小。
  • Area: 所有扇区圆心角相同,仅通过半径展现数据大小。

Serie.roundCap

bool

是否开启圆弧效果。

Serie.sampleAverage

float default: 0

设定的采样平均值。当sampleType 为 Peak 时用于和过滤数据的平均值做对比是取最大值还是最小值。默认为0时会实时计算所有数据的平均值。

Serie.sampleDist

float default: 0

采样的最小像素距离默认为0时不采样。当两个数据点间的水平距离小于改值时开启采样保证两点间的水平距离不小于改值。

Serie.sampleType

SampleType

采样类型。当sampleDist大于0时有效。

可选:

  • Peak: 取峰值。
  • Average: 取过滤点的平均值。
  • Max: 取过滤点的最大值。
  • Min: 取过滤点的最小值。
  • Sum: 取过滤点的和。

Serie.serieName

string

系列名称,用于 tooltip 的显示legend 的图例筛选。

Serie.serieType

string

系列类型。

Serie.show

bool default: true

系列是否显示在图表上。

Serie.showAsPositiveNumber

bool default: false

将负数数值显示为正数。一般和AxisLabelshowAsPositiveNumber配合使用。仅在折线图和柱状图中有效。

Serie.showDataDimension

int

数据项里的数据维数。

Serie.showDataName

bool

在Editor的inpsector上是否显示name参数

Serie.singleAxisIndex

int default: 0

所使用的 singleAxis 组件的 index。

Serie.smoothLimit

bool default: false v3.4.0

是否限制曲线。当为true时两个连续相同数值的数据间的曲线会限制为不超出数据点和数据点是平直的。

Serie.splitNumber

int

刻度分割段数。最大可设置36。

Serie.stack

string

数据堆叠同个类目轴上系列配置相同的stack值后后一个系列的值会在前一个系列的值上相加。

Serie.startAngle

float

起始角度。和时钟一样12点钟位置是0度顺时针到360度。

Serie.state

SerieState v3.2.0

系列的默认状态。

可选:

  • Normal: 正常状态。
  • Emphasis: 高亮状态。
  • Blur: 淡出状态。
  • Select: 选中状态。
  • Auto: 自动保持和父节点一致。一般用在SerieData。

Serie.symbol

SerieSymbol

标记的图形。 SerieSymbol

Serie.top

float

组件离容器上侧的距离。

Serie.vesselIndex

int default: 0

水位图所使用的 vessel 组件的 index。

Serie.xAxisIndex

int default: 0

使用X轴的index。

Serie.yAxisIndex

int default: 0

使用Y轴的index。

SerieData

class in XCharts.Runtime / 继承自: ChildComponent

系列中的一个数据项。可存储数据名和1-n维个数据。

SerieData.data

List<double>

可指定任意维数的数值列表。

SerieData.id

string

数据项的唯一id。唯一id不是必须设置的。

SerieData.ignore

bool

是否忽略数据。当为 true 时,数据不进行绘制。

SerieData.index

int

数据项索引。

SerieData.name

string

数据项名称。

SerieData.parentId

string

父节点id。父节点id不是必须设置的。

SerieData.radius

float

自定义半径。可用在饼图中自定义某个数据项的半径。

SerieData.selected

bool

该数据项是否被选中。

SerieData.state

SerieState v3.2.0

数据项的默认状态。

可选:

  • Normal: 正常状态。
  • Emphasis: 高亮状态。
  • Blur: 淡出状态。
  • Select: 选中状态。
  • Auto: 自动保持和父节点一致。一般用在SerieData。

class in XCharts.Runtime / 继承自: ChildComponent

v3.10.0 开始支持

数据节点之间的连线。可用于桑基图等,桑基图只支持有向无环图,请保证数据的连线是有向无环图。

SerieDataLink.source

string

边的源节点名称。

SerieDataLink.target

string

边的目标节点名称。

SerieDataLink.value

double

边的值。决定边的宽度。

SerieSymbol

class in XCharts.Runtime / 继承自: SymbolStyle, ISerieDataComponent

系列数据项的标记的图形

SerieSymbol.dataIndex

int default: 1

当sizeType指定为FromData时指定的数据源索引。

SerieSymbol.dataScale

float default: 1

当sizeType指定为FromData时指定的倍数系数。

SerieSymbol.forceShowLast

bool default: false

是否强制显示最后一个图形标记。

SerieSymbol.interval

int

显示图形标记的间隔。0表示显示所有标签1表示隔一个隔显示一个标签以此类推。

SerieSymbol.maxSize

float default: 0f v3.3.0

图形最大尺寸。只在sizeType为SymbolSizeType.FromData时有效。

SerieSymbol.minSize

float default: 0f v3.3.0

图形最小尺寸。只在sizeType为SymbolSizeType.FromData时有效。

SerieSymbol.repeat

bool default: false

图形是否重复。

SerieSymbol.sizeFunction

SymbolSizeFunction

当sizeType指定为Function时指定的委托函数。

SerieSymbol.sizeType

SymbolSizeType

标记图形的大小获取方式。

可选:

  • Custom: 自定义大小。
  • FromData: 通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。
  • Function: 通过委托函数获取。

SerieSymbol.startIndex

int

开始显示图形标记的索引。

SerieTheme

class in XCharts.Runtime / 继承自: ChildComponent

SerieTheme.candlestickBorderColor

Color32 default: Color32(235, 84, 84, 255)

K线图阳线边框色

SerieTheme.candlestickBorderColor0

Color32 default: Color32(71, 178, 98, 255)

K线图阴线边框色

SerieTheme.candlestickBorderWidth

float default: 1

K线图边框宽度

SerieTheme.candlestickColor

Color32 default: Color32(235, 84, 84, 255)

K线图阳线填充色

SerieTheme.candlestickColor0

Color32 default: Color32(71, 178, 98, 255)

K线图阴线填充色

SerieTheme.lineSymbolSize

float

折线图的Symbol大小。

SerieTheme.lineWidth

float

文本颜色。

SerieTheme.scatterSymbolSize

float

散点图的Symbol大小。

Settings

class in XCharts.Runtime / 继承自: MainComponent

全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。

Settings.axisMaxSplitNumber

float default: 50 v3.1.0

坐标轴最大分隔段数。段数过大时可能会生成较多的label节点。

Settings.basePainterMaterial

Material

Base Pointer 材质球设置后会影响Axis等。

Settings.cicleSmoothness

float default: 2f

圆形的平滑度。数越小圆越平滑,但顶点数也会随之增加。

Settings.legendIconCornerRadius

float[]

图例圆角半径。用数组分别指定4个圆角半径顺时针左上右上右下左下

Settings.legendIconLineWidth

float default: 2

Line类型图例图标的线条宽度。

Settings.lineSegmentDistance

float default: 3f

线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。

Settings.lineSmoothness

float default: 2f

When the area with gradient is filled, the larger the value, the worse the transition effect.

Settings.lineSmoothStyle

float default: 2.5f

曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。

Settings.maxPainter

int default: 10

设定的painter数量。

Settings.reversePainter

bool default: false

Painter是否逆序。逆序时index大的serie最先绘制。

Settings.seriePainterMaterial

Material

Serie Pointer 材质球设置后会影响所有Serie。

Settings.show

bool default: true

Settings.topPainterMaterial

Material

Top Pointer 材质球。

Settings.upperPainterMaterial

Material

Upper Pointer 材质球。

SimplifiedBar

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer, ISimplifiedSerie

SimplifiedCandlestick

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer, ISimplifiedSerie

SimplifiedLine

class in XCharts.Runtime / 继承自: Serie, INeedSerieContainer, ISimplifiedSerie

SingleAxis

class in XCharts.Runtime / 继承自: Axis, IUpdateRuntimeData

单轴。

SingleAxis.bottom

float default: 0.2f

组件离容器下侧的距离。

SingleAxis.height

float default: 50

坐标轴高。

SingleAxis.left

float default: 0.1f

组件离容器左侧的距离。

SingleAxis.orient

Orient

坐标轴朝向。默认为水平朝向。

可选:

  • Horizonal: 水平
  • Vertical: 垂直

SingleAxis.right

float default: 0.1f

组件离容器右侧的距离。

SingleAxis.top

float default: 0f

组件离容器上侧的距离。

SingleAxis.width

float default: 0

坐标轴宽。

SingleAxisCoord

class in XCharts.Runtime / 继承自: CoordSystem

StageColor

class in XCharts.Runtime / 继承自: ChildComponent

StageColor.color

Color32

颜色。

StageColor.percent

float

结束位置百分比。

StateStyle

class in XCharts.Runtime / 继承自: ChildComponent / 子类: BlurStyle, EmphasisStyle, SelectStyle

v3.2.0 开始支持

Serie的状态样式。Serie的状态有正常高亮淡出选中四种状态。

StateStyle.areaStyle

AreaStyle

区域样式。 AreaStyle

StateStyle.itemStyle

ItemStyle

图形样式。 ItemStyle

StateStyle.label

LabelStyle

图形文本标签。 LabelStyle

StateStyle.labelLine

LabelLine

图形文本引导线样式。 LabelLine

StateStyle.lineStyle

LineStyle

折线样式。 LineStyle

StateStyle.show

bool default: true

是否启用高亮样式。

StateStyle.symbol

SerieSymbol

标记样式。 SerieSymbol

SubTitleTheme

class in XCharts.Runtime / 继承自: ComponentTheme

SymbolStyle

class in XCharts.Runtime / 继承自: ChildComponent / 子类: SerieSymbol

系列数据项的标记的图形

SymbolStyle.color

Color32

图形的颜色。

SymbolStyle.gap

float default: 0

图形标记和线条的间隙距离。

SymbolStyle.height

float default: 0f

图形的高。

SymbolStyle.image

Sprite

自定义的标记图形。

SymbolStyle.imageType

Image.Type

图形填充类型。

SymbolStyle.offset

Vector2 default: Vector2.zero

图形的偏移。

SymbolStyle.show

bool default: true

是否显示标记。

SymbolStyle.size

float default: 0f

标记的大小。

SymbolStyle.type

SymbolType

标记类型。

可选:

  • None: 不显示标记。
  • Custom: 自定义标记。
  • Circle: 圆形。
  • EmptyCircle: 空心圆。
  • Rect: 正方形。可通过设置itemStylecornerRadius变成圆角矩形。
  • EmptyRect: 空心正方形。
  • Triangle: 三角形。
  • EmptyTriangle: 空心三角形。
  • Diamond: 菱形。
  • EmptyDiamond: 空心菱形。
  • Arrow: 箭头。
  • EmptyArrow: 空心箭头。
  • Plus: 加号。
  • Minus: 减号。

SymbolStyle.width

float default: 0f

图形的宽。

TextLimit

class in XCharts.Runtime / 继承自: ChildComponent

文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。

TextLimit.enable

bool default: false

是否启用文本自适应。 [default:true]

TextLimit.gap

float default: 1

两边留白像素距离。 [default:10f]

TextLimit.maxWidth

float default: 0

Clipping occurs when the width of the text is greater than this value.

TextLimit.suffix

string

长度超出时的后缀。 [default: "..."]

TextPadding

class in XCharts.Runtime / 继承自: Padding

文本的内边距设置。

TextStyle

class in XCharts.Runtime / 继承自: ChildComponent

文本的相关设置。

TextStyle.alignment

TextAnchor

对齐方式。

TextStyle.autoAlign

bool default: true

文本是否让系统自动选对齐方式。为false时才会用alignment。

TextStyle.autoColor

bool default: false

是否开启自动颜色。当开启时,会自动设置颜色。

TextStyle.autoWrap

bool default: false

是否自动换行。

TextStyle.color

Color

文本的颜色。 [default: Color.clear]

TextStyle.font

Font

文本字体。 [default: null]

TextStyle.fontSize

int default: 0

文本字体大小。 [default: 18]

TextStyle.fontStyle

FontStyle

文本字体的风格。 [default: FontStyle.Normal]

TextStyle.lineSpacing

float default: 1f

行间距。 [default: 1f]

TextStyle.rotate

float default: 0

文本的旋转。 [default: 0f]

TextStyle.show

bool default: true

文本的相关设置。

TextStyle.tMPAlignment

TextAlignmentOptions

TextStyle.tMPFont

TMP_FontAsset

TextMeshPro字体。

TextStyle.tMPFontStyle

FontStyles

TextStyle.tMPSpriteAsset

TMP_SpriteAsset v3.1.0

Theme

class in XCharts.Runtime / 继承自: ScriptableObject

主题相关配置。

Theme.axis

AxisTheme

AxisTheme

Theme.backgroundColor

Color32

背景颜色。

Theme.colorPalette

List<Color32>

调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。

Theme.common

ComponentTheme

ComponentTheme

Theme.contrastColor

Color32

对比色。

Theme.dataZoom

DataZoomTheme

DataZoomTheme

Theme.font

Font

主题字体。

Theme.legend

LegendTheme

LegendTheme

Theme.serie

SerieTheme

SerieTheme

Theme.subTitle

SubTitleTheme

SubTitleTheme

Theme.themeName

string

主题名称。

Theme.themeType

ThemeType

主题类型。

可选:

  • Default: 默认主题。
  • Light: 亮主题。
  • Dark: 暗主题。
  • Custom: 自定义主题。

Theme.title

TitleTheme

TitleTheme

Theme.tMPFont

TMP_FontAsset

主题字体。

Theme.tooltip

TooltipTheme

TooltipTheme

Theme.visualMap

VisualMapTheme

VisualMapTheme

ThemeStyle

class in XCharts.Runtime / 继承自: ChildComponent

主题相关配置。

ThemeStyle.customBackgroundColor

Color32

自定义的背景颜色。

ThemeStyle.customColorPalette

List<Color32>

ThemeStyle.customFont

Font

ThemeStyle.enableCustomTheme

bool default: false

是否自定义主题颜色。当设置为true时可以用sync color to custom同步主题的颜色到自定义颜色。也可以手动设置。

ThemeStyle.sharedTheme

Theme

主题配置。 Theme

ThemeStyle.show

bool default: true

ThemeStyle.transparentBackground

bool default: false

是否透明背景颜色。当设置为true时不绘制背景颜色。

Title

class in XCharts.Runtime / 继承自: MainComponent, IPropertyChanged

标题组件,包含主标题和副标题。

Title.itemGap

float default: 0

主副标题之间的间距。

Title.labelStyle

LabelStyle

主标题文本样式。 LabelStyle

Title.location

Location

标题显示位置。 Location

Title.show

bool default: true

是否显示标题组件。

Title.subLabelStyle

LabelStyle

副标题文本样式。 LabelStyle

Title.subText

string

副标题文本,支持使用 \n 换行。

Title.text

string

主标题文本,支持使用 \n 换行。

TitleStyle

class in XCharts.Runtime / 继承自: LabelStyle, ISerieDataComponent, ISerieComponent

标题相关设置。

TitleTheme

class in XCharts.Runtime / 继承自: ComponentTheme

Tooltip

class in XCharts.Runtime / 继承自: MainComponent

提示框组件。

Tooltip.alwayShowContent

bool default: false

是否触发后一直显示提示框浮层。

Tooltip.backgroundColor

Color

提示框的背景颜色。

Tooltip.backgroundImage

Sprite

提示框的背景图片。

Tooltip.backgroundType

Image.Type

提示框的背景图片显示类型。

Tooltip.borderColor

Color32 default: Color32(230, 230, 230, 255)

边框颜色。

Tooltip.borderWidth

float default: 2f

边框线宽。

Tooltip.contentLabelStyles

List<LabelStyle>

内容部分的文本样式列表。和列一一对应。

Tooltip.fixedHeight

float default: 0

固定高度。比 minHeight 优先。

Tooltip.fixedWidth

float default: 0

固定宽度。比 minWidth 优先。

Tooltip.fixedX

float default: 0f

固定X位置的坐标。

Tooltip.fixedY

float default: 0.7f

固定Y位置的坐标。

Tooltip.ignoreDataDefaultContent

string

被忽略数据的默认显示字符信息。如果设置为空,则表示完全不显示忽略数据。

Tooltip.ignoreDataShow

bool default: false

是否显示忽略数据在tooltip上。

Tooltip.itemFormatter

string

提示框单个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.itemHeight

float default: 25f

数据项文本的高。

Tooltip.lineStyle

LineStyle

指示线样式。 LineStyle

Tooltip.marker

string

serie的符号标志。

Tooltip.minHeight

float default: 0

最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。

Tooltip.minWidth

float default: 0

最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。

Tooltip.numericFormatter

string

标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。
数字格式使用Axx的形式A是格式说明符的单字符支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明从0-99。如F1, E2
日期格式:以date开头用来格式化DateTime常见格式有yyyy年MM月dd日HH时mm分ss秒fff毫秒。如date:yyyy-MM-dd HH:mm:ss
时间格式:以time开头用来格式化TimeSpan常见格式有d日HH时mm分ss秒fffffff小数部分。 需要Unity2018以上版本才支持格式化并且里面的字符要转义。如time:d.HH:mm:ss
数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings
日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings
时间格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-timespan-format-strings
注意date和time格式需要v3.12.0以上版本才支持。

Tooltip.offset

Vector2 default: Vector2(18f, -25f)

提示框相对于鼠标位置的偏移。

Tooltip.paddingLeftRight

int default: 10

左右边距。

Tooltip.paddingTopBottom

int default: 10

上下边距。

Tooltip.position

Tooltip.Position v3.3.0

显示位置类型。

可选:

  • Auto: 自适应。移动平台靠顶部显示,非移动平台跟随鼠标位置。
  • Custom: 自定义。完全自定义显示位置(x,y)。
  • FixedX: 只固定坐标X。Y跟随鼠标位置。
  • FixedY:

Tooltip.show

bool default: true

是否显示提示框组件。

Tooltip.showContent

bool default: true

是否显示提示框浮层默认显示。只需tooltip触发事件或显示axisPointer而不需要显示内容时可配置该项为false。

Tooltip.titleFormatter

string

提示框标题内容的字符串模版格式器。支持用 \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.titleHeight

float default: 25f

标题文本的高。

Tooltip.titleLabelStyle

LabelStyle

标题的文本样式。 LabelStyle

Tooltip.trigger

Tooltip.Trigger

触发类型。

可选:

  • Item: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。
  • Axis: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。
  • None: 什么都不触发。
  • Auto: 根据serie的类型自动选择触发类型。

Tooltip.triggerOn

Tooltip.TriggerOn v3.11.0

触发条件。

可选:

  • MouseMove: 鼠标移动时触发。
  • Click: 鼠标点击时触发。

Tooltip.type

Tooltip.Type

提示框指示器类型。

可选:

  • Line: 直线指示器
  • Shadow: 阴影指示器
  • None: 无指示器
  • Cross: 十字准星指示器。坐标轴显示Label和交叉线。
  • Auto: 根据serie的类型自动选择显示指示器。

TooltipTheme

class in XCharts.Runtime / 继承自: ComponentTheme

TooltipTheme.areaColor

Color32

区域指示的颜色。

TooltipTheme.labelBackgroundColor

Color32

十字指示器坐标轴标签的背景颜色。

TooltipTheme.labelTextColor

Color32

十字指示器坐标轴标签的文本颜色。

TooltipTheme.lineColor

Color32

指示线颜色。

TooltipTheme.lineType

LineStyle.Type

坐标轴线类型。

可选:

  • Solid: 实线
  • Dashed: 虚线
  • Dotted: 点线
  • DashDot: 点划线
  • DashDotDot: 双点划线
  • None: 双点划线

TooltipTheme.lineWidth

float default: 1f

指示线线宽。

UIComponentTheme

class in XCharts.Runtime / 继承自: ChildComponent

UIComponentTheme.sharedTheme

Theme

主题配置。 Theme

UIComponentTheme.show

bool default: true

UIComponentTheme.transparentBackground

bool default: false

ViewControl

class in XCharts.Runtime / 继承自: ChildComponent

v3.11.0 开始支持

3D视角控制组件。

ViewControl.alpha

float default: 90f

视角在x-z平面的角度。

ViewControl.beta

float default: 55f

视角在y-z平面的角度。

VisualMap

class in XCharts.Runtime / 继承自: MainComponent

视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。

VisualMap.autoMinMax

bool default: true

Automatically set min, Max value 自动设置minmax的值

VisualMap.borderWidth

float default: 0

边框线宽单位px。

VisualMap.calculable

bool default: false

是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。

VisualMap.dimension

int default: -1

Starting at 1, the default is 0 to take the last dimension in data.

bool default: true

Conversely, when the mouse hovers over a graphic element in a diagram, the corresponding value of the visualMap component is triangulated in the corresponding position.

VisualMap.inRange

List<VisualMapRange>

分段式每一段的相关配置。

VisualMap.itemGap

float default: 10f

每个图元之间的间隔距离。

VisualMap.itemHeight

float default: 140f

图形的高度,即颜色条的高度。

VisualMap.itemWidth

float default: 20f

图形的宽度,即颜色条的宽度。

VisualMap.location

Location

组件显示的位置。 Location

VisualMap.max

double default: 0

范围最大值

VisualMap.min

double default: 0

范围最小值

VisualMap.orient

Orient

布局方式是横还是竖。

可选:

  • Horizonal: 水平
  • Vertical: 垂直

VisualMap.outOfRange

List<VisualMapRange>

定义 在选中范围外 的视觉颜色。

VisualMap.range

double[]

指定手柄对应数值的位置。range 应在[min,max]范围内。

VisualMap.realtime

bool default: true

拖拽时,是否实时更新。

VisualMap.selectedMode

VisualMap.SelectedMode

选择模式。

可选:

  • Multiple: 多选。
  • Single: 单选。

VisualMap.serieIndex

int default: 0

影响的serie索引。

VisualMap.show

bool default: true

组件是否生效。

VisualMap.showUI

bool default: false

是否显示组件。如果设置为 false不会显示但是数据映射的功能还存在。

VisualMap.splitNumber

int default: 5

对于连续型数据自动平均切分成几段默认为0时自动匹配inRange颜色列表大小。

VisualMap.text

string[]

两端的文本,如 ['High', 'Low']。

VisualMap.textGap

float[]

两端文字主体之间的距离单位为px。

VisualMap.type

VisualMap.Type

组件类型。

可选:

  • Continuous: 连续型。
  • Piecewise: 分段型。

VisualMap.workOnArea

bool default: false

组件是否对LineChart的AreaStyle有效。

VisualMap.workOnLine

bool default: true

组件是否对LineChart的LineStyle有效。

VisualMapRange

class in XCharts.Runtime / 继承自: ChildComponent

VisualMapRange.color

Color32

颜色

VisualMapRange.label

string

文字描述

VisualMapRange.max

double

范围最大值

VisualMapRange.min

double

范围最小值

VisualMapTheme

class in XCharts.Runtime / 继承自: ComponentTheme

VisualMapTheme.backgroundColor

Color32

背景颜色。

VisualMapTheme.borderColor

Color32

边框颜色。

VisualMapTheme.borderWidth

float

边框线宽。

VisualMapTheme.triangeLen

float default: 20f

可视化组件的调节三角形边长。

Wrapper<T>

class in XCharts.Runtime

XAxis

class in XCharts.Runtime / 继承自: Axis

直角坐标系 grid 中的 x 轴。

XAxis3D

class in XCharts.Runtime / 继承自: Axis

v3.11.0 开始支持

直角坐标系 grid 中的 x 轴。

XCResourcesImporter

class in XCharts.Runtime

XCSettings

class in XCharts.Runtime / 继承自: ScriptableObject

XCSettings.axisLineType

LineStyle.Type

可选:

  • Solid: 实线
  • Dashed: 虚线
  • Dotted: 点线
  • DashDot: 点划线
  • DashDotDot: 双点划线
  • None: 双点划线

XCSettings.axisLineWidth

float default: 0.8f

XCSettings.axisSplitLineType

LineStyle.Type

可选:

  • Solid: 实线
  • Dashed: 虚线
  • Dotted: 点线
  • DashDot: 点划线
  • DashDotDot: 双点划线
  • None: 双点划线

XCSettings.axisSplitLineWidth

float default: 0.8f

XCSettings.axisTickLength

float default: 5f

XCSettings.axisTickWidth

float default: 0.8f

XCSettings.cicleSmoothness

float default: 2f

XCSettings.customThemes

List<Theme>

XCSettings.dataZoomBorderWidth

float default: 0.5f

XCSettings.dataZoomDataLineWidth

float default: 0.5f

XCSettings.editorShowAllListData

bool default: false

XCSettings.font

Font

XCSettings.fontSizeLv1

int default: 28

一级字体大小。

XCSettings.fontSizeLv2

int default: 24

XCSettings.fontSizeLv3

int default: 20

XCSettings.fontSizeLv4

int default: 18

XCSettings.gaugeAxisLineWidth

float default: 15f

XCSettings.gaugeAxisSplitLineLength

float default: 15f

XCSettings.gaugeAxisSplitLineWidth

float default: 0.8f

XCSettings.gaugeAxisTickLength

float default: 5f

XCSettings.gaugeAxisTickWidth

float default: 0.8f

XCSettings.lang

Lang

Lang

XCSettings.lineSegmentDistance

float default: 3f

XCSettings.lineSmoothness

float default: 2f

XCSettings.lineSmoothStyle

float default: 3f

XCSettings.maxPainter

int default: 10

XCSettings.serieCandlestickBorderWidth

float default: 1f

XCSettings.serieLineSymbolSize

float default: 5f

XCSettings.serieLineWidth

float default: 1.8f

XCSettings.serieScatterSymbolSize

float default: 20f

XCSettings.serieSelectedRate

float default: 1.3f

XCSettings.tMPFont

TMP_FontAsset

XCSettings.tootipLineWidth

float default: 0.8f

XCSettings.visualMapBorderWidth

float default: 0f

XCSettings.visualMapTriangeLen

float default: 20f

YAxis

class in XCharts.Runtime / 继承自: Axis

直角坐标系 grid 中的 y 轴。

YAxis3D

class in XCharts.Runtime / 继承自: Axis

v3.11.0 开始支持

直角坐标系 grid 中的 y 轴。

ZAxis3D

class in XCharts.Runtime / 继承自: Axis

v3.11.0 开始支持

直角坐标系 grid 中的 y 轴。