diff --git a/Documentation~/en/api.md b/Documentation~/en/api.md index 599effa0..6a052e11 100644 --- a/Documentation~/en/api.md +++ b/Documentation~/en/api.md @@ -7,14 +7,46 @@ slug: /api ## All Class +- [AngleAxis](#angleaxis) +- [AngleAxisTheme](#angleaxistheme) +- [AnimationAddition](#animationaddition) +- [AnimationChange](#animationchange) +- [AnimationFadeIn](#animationfadein) +- [AnimationFadeOut](#animationfadeout) +- [AnimationHiding](#animationhiding) +- [AnimationInfo](#animationinfo) - [AnimationInfoContext](#animationinfocontext) +- [AnimationInteraction](#animationinteraction) +- [AnimationStyle](#animationstyle) - [AnimationStyleHelper](#animationstylehelper) +- [AreaStyle](#areastyle) +- [ArrowStyle](#arrowstyle) +- [Axis](#axis) +- [AxisAnimation](#axisanimation) - [AxisContext](#axiscontext) - [AxisHandler<T>](#axishandlert) - [AxisHelper](#axishelper) +- [AxisLabel](#axislabel) +- [AxisLine](#axisline) +- [AxisMinorSplitLine](#axisminorsplitline) +- [AxisMinorTick](#axisminortick) +- [AxisName](#axisname) +- [AxisSplitArea](#axissplitarea) +- [AxisSplitLine](#axissplitline) +- [AxisTheme](#axistheme) +- [AxisTick](#axistick) +- [Background](#background) +- [Bar](#bar) - [BarChart](#barchart) +- [BaseAxisTheme](#baseaxistheme) - [BaseChart](#basechart) - [BaseGraph](#basegraph) +- [BaseLine](#baseline) +- [BaseScatter](#basescatter) +- [BaseSerie](#baseserie) +- [BlurStyle](#blurstyle) +- [CalendarCoord](#calendarcoord) +- [Candlestick](#candlestick) - [CandlestickChart](#candlestickchart) - [ChartCached](#chartcached) - [ChartConst](#chartconst) @@ -22,22 +54,41 @@ slug: /api - [ChartHelper](#charthelper) - [ChartLabel](#chartlabel) - [ChartObject](#chartobject) +- [ChartText](#charttext) - [CheckHelper](#checkhelper) +- [ChildComponent](#childcomponent) - [ColorUtil](#colorutil) +- [Comment](#comment) +- [CommentItem](#commentitem) +- [CommentMarkStyle](#commentmarkstyle) - [ComponentHandlerAttribute](#componenthandlerattribute) - [ComponentHelper](#componenthelper) +- [ComponentTheme](#componenttheme) - [CoordOptionsAttribute](#coordoptionsattribute) +- [CoordSystem](#coordsystem) +- [DataZoom](#datazoom) - [DataZoomContext](#datazoomcontext) - [DataZoomHelper](#datazoomhelper) +- [DataZoomTheme](#datazoomtheme) - [DateTimeUtil](#datetimeutil) +- [DebugInfo](#debuginfo) - [DefaultAnimationAttribute](#defaultanimationattribute) - [DefaultTooltipAttribute](#defaulttooltipattribute) - [DefineSymbolsUtil](#definesymbolsutil) +- [EffectScatter](#effectscatter) +- [EmphasisStyle](#emphasisstyle) +- [EndLabelStyle](#endlabelstyle) - [FormatterHelper](#formatterhelper) +- [GridCoord](#gridcoord) - [GridCoordContext](#gridcoordcontext) +- [GridLayout](#gridlayout) - [GridLayoutContext](#gridlayoutcontext) +- [Heatmap](#heatmap) - [HeatmapChart](#heatmapchart) +- [IconStyle](#iconstyle) - [IgnoreDoc](#ignoredoc) +- [ImageStyle](#imagestyle) +- [Indicator](#indicator) - [INeedSerieContainer](#ineedseriecontainer) - [InputHelper](#inputhelper) - [InteractData](#interactdata) @@ -46,37 +97,75 @@ slug: /api - [ISerieContainer](#iseriecontainer) - [ISerieDataComponent](#iseriedatacomponent) - [ISimplifiedSerie](#isimplifiedserie) +- [ItemStyle](#itemstyle) - [IUpdateRuntimeData](#iupdateruntimedata) +- [LabelLine](#labelline) +- [LabelStyle](#labelstyle) +- [Lang](#lang) +- [LangCandlestick](#langcandlestick) +- [LangTime](#langtime) - [LayerHelper](#layerhelper) +- [Legend](#legend) - [LegendContext](#legendcontext) - [LegendHelper](#legendhelper) - [LegendItem](#legenditem) +- [LegendTheme](#legendtheme) +- [Level](#level) +- [LevelStyle](#levelstyle) +- [Line](#line) +- [LineArrow](#linearrow) - [LineChart](#linechart) +- [LineStyle](#linestyle) - [ListFor](#listfor) - [ListForComponent](#listforcomponent) - [ListForSerie](#listforserie) +- [Location](#location) +- [MainComponent](#maincomponent) - [MainComponentContext](#maincomponentcontext) - [MainComponentHandler](#maincomponenthandler) - [MainComponentHandler<T>](#maincomponenthandlert) +- [MarkArea](#markarea) +- [MarkAreaData](#markareadata) +- [MarkLine](#markline) +- [MarkLineData](#marklinedata) +- [MarqueeStyle](#marqueestyle) - [MathUtil](#mathutil) +- [MLValue](#mlvalue) - [MonoBehaviour](#monobehaviour) +- [Padding](#padding) - [Painter](#painter) +- [Parallel](#parallel) +- [ParallelAxis](#parallelaxis) - [ParallelChart](#parallelchart) +- [ParallelCoord](#parallelcoord) - [ParallelCoordContext](#parallelcoordcontext) +- [Pie](#pie) - [PieChart](#piechart) +- [PolarAxisTheme](#polaraxistheme) - [PolarChart](#polarchart) +- [PolarCoord](#polarcoord) - [PolarCoordContext](#polarcoordcontext) - [PropertyUtil](#propertyutil) +- [Radar](#radar) +- [RadarAxisTheme](#radaraxistheme) - [RadarChart](#radarchart) +- [RadarCoord](#radarcoord) - [RadarCoordContext](#radarcoordcontext) +- [RadiusAxis](#radiusaxis) +- [RadiusAxisTheme](#radiusaxistheme) - [ReflectionUtil](#reflectionutil) - [RequireChartComponentAttribute](#requirechartcomponentattribute) +- [Ring](#ring) - [RingChart](#ringchart) - [RuntimeUtil](#runtimeutil) +- [Scatter](#scatter) - [ScatterChart](#scatterchart) +- [SelectStyle](#selectstyle) +- [Serie](#serie) - [SerieComponentAttribute](#seriecomponentattribute) - [SerieContext](#seriecontext) - [SerieConvertAttribute](#serieconvertattribute) +- [SerieData](#seriedata) - [SerieDataComponentAttribute](#seriedatacomponentattribute) - [SerieDataContext](#seriedatacontext) - [SerieDataExtraFieldAttribute](#seriedataextrafieldattribute) @@ -90,39 +179,208 @@ slug: /api - [SerieLabelPool](#serielabelpool) - [SerieParams](#serieparams) - [SeriesHelper](#serieshelper) +- [SerieSymbol](#seriesymbol) +- [SerieTheme](#serietheme) +- [Settings](#settings) +- [SimplifiedBar](#simplifiedbar) - [SimplifiedBarChart](#simplifiedbarchart) +- [SimplifiedCandlestick](#simplifiedcandlestick) - [SimplifiedCandlestickChart](#simplifiedcandlestickchart) +- [SimplifiedLine](#simplifiedline) - [SimplifiedLineChart](#simplifiedlinechart) - [Since](#since) +- [SingleAxis](#singleaxis) +- [SingleAxisCoord](#singleaxiscoord) +- [StageColor](#stagecolor) +- [StateStyle](#statestyle) +- [SubTitleTheme](#subtitletheme) - [SVG](#svg) - [SVGImage](#svgimage) - [SVGPath](#svgpath) - [SVGPathSeg](#svgpathseg) +- [SymbolStyle](#symbolstyle) +- [TextLimit](#textlimit) +- [TextPadding](#textpadding) +- [TextStyle](#textstyle) +- [Theme](#theme) +- [ThemeStyle](#themestyle) +- [Title](#title) +- [TitleStyle](#titlestyle) +- [TitleTheme](#titletheme) +- [Tooltip](#tooltip) - [TooltipContext](#tooltipcontext) - [TooltipData](#tooltipdata) - [TooltipHelper](#tooltiphelper) +- [TooltipTheme](#tooltiptheme) - [TooltipView](#tooltipview) - [TooltipViewItem](#tooltipviewitem) - [UGL](#ugl) - [UGLExample](#uglexample) - [UGLHelper](#uglhelper) - [UIComponent](#uicomponent) +- [UIComponentTheme](#uicomponenttheme) - [UIHelper](#uihelper) +- [VisualMap](#visualmap) - [VisualMapContext](#visualmapcontext) - [VisualMapHelper](#visualmaphelper) +- [VisualMapRange](#visualmaprange) +- [VisualMapTheme](#visualmaptheme) +- [XAxis](#xaxis) - [XChartsMgr](#xchartsmgr) - [XCResourceImporterWindow](#xcresourceimporterwindow) +- [XCResourcesImporter](#xcresourcesimporter) +- [XCSettings](#xcsettings) - [XCThemeMgr](#xcthememgr) - [XLog](#xlog) +- [YAxis](#yaxis) +## AngleAxis + +> class in XCharts.Runtime / Inherits from: [Axis](#axis) + +Angle axis of Polar Coordinate. + +|public method|since|description| +|--|--|--| +|GetValueAngle()||public float GetValueAngle(double value)| +|GetValueAngle()||public float GetValueAngle(float value)| +|SetDefaultValue()||public override void SetDefaultValue()| + +## AngleAxisTheme + +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) + + +|public method|since|description| +|--|--|--| +|AngleAxisTheme()||public AngleAxisTheme(ThemeType theme) : base(theme) { }| + +## AnimationAddition + +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) + +> Since `v3.8.0` + +Data addition animation. + +## AnimationChange + +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) + +> Since `v3.8.0` + +Data change animation. + +## AnimationFadeIn + +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) + +> Since `v3.8.0` + +Fade in animation. + +## AnimationFadeOut + +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) + +> Since `v3.8.0` + +Fade out animation. + +## AnimationHiding + +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) + +> Since `v3.8.0` + +Data hiding animation. + +## AnimationInfo + +> class in XCharts.Runtime / Subclasses: [AnimationFadeIn](#animationfadein),[AnimationFadeOut](#animationfadeout),[AnimationChange](#animationchange),[AnimationAddition](#animationaddition),[AnimationHiding](#animationhiding),[AnimationInteraction](#animationinteraction) + +> Since `v3.8.0` + +the animation info. + +|public method|since|description| +|--|--|--| +|End()||public void End()
End animation. | +|GetIndexDelay()||public float GetIndexDelay(int dataIndex)
Get animation delay. | +|Init()||public bool Init(float curr, float dest, int totalPointIndex)
Initialize animation. | +|IsFinish()||public bool IsFinish()
Whether animation is finish. | +|IsInDelay()||public bool IsInDelay()
Whether animation is in delay. | +|IsInIndexDelay()||public bool IsInIndexDelay(int dataIndex)
Whether animation is in index delay. | +|Pause()||public void Pause()
Pause animation. | +|Reset()||public void Reset()
Reset animation. | +|Resume()||public void Resume()
Resume animation. | +|Start()||public void Start(bool reset = true)
Start animation. | + ## AnimationInfoContext -> XCharts.Runtime.AnimationInfoContext +> class in XCharts.Runtime + + +## AnimationInteraction + +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) + +> Since `v3.8.0` + +Interactive animation of charts. + +|public method|since|description| +|--|--|--| +|GetOffset()||public float GetOffset()| +|GetOffset()||public float GetOffset(float total)| +|GetRadius()||public float GetRadius(float radius)| +|GetWidth()||public float GetWidth(float width)| + +## AnimationStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +the animation of serie. support animation type: fadeIn, fadeOut, change, addition. + +|public method|since|description| +|--|--|--| +|Addition()||public void Addition()
Start additon animation. | +|CanCheckInteract()||public bool CanCheckInteract()| +|CheckDetailBreak()||public bool CheckDetailBreak(float detail)| +|CheckDetailBreak()||public bool CheckDetailBreak(Vector3 pos, bool isYAxis)| +|CheckProgress()||public void CheckProgress()| +|CheckProgress()||public void CheckProgress(double total)| +|CheckSymbol()||public void CheckSymbol(float dest)| +|FadeIn()||public void FadeIn()
Start fadein animation. | +|FadeOut()||public void FadeOut()
Start fadeout animation. | +|GetAdditionDuration()||public float GetAdditionDuration()| +|GetChangeDuration()||public float GetChangeDuration()| +|GetCurrDetail()||public float GetCurrDetail()| +|GetCurrIndex()||public int GetCurrIndex()| +|GetCurrRate()||public float GetCurrRate()| +|GetInteractionDuration()||public float GetInteractionDuration()| +|GetInteractionRadius()||public float GetInteractionRadius(float radius)| +|GetSysmbolSize()||public float GetSysmbolSize(float dest)| +|HasFadeOut()||public bool HasFadeOut()| +|InitProgress()||public void InitProgress(float curr, float dest)
Initialize animation configuration. | +|InitProgress()||public void InitProgress(List<Vector3> paths, bool isY)
Initialize animation configuration. | +|IsDataAnimation()||public bool IsDataAnimation()
whther animaiton is data animation. BottomToTop and InsideOut are data animation. | +|IsEnd()||public bool IsEnd()| +|IsFadeIn()||public bool IsFadeIn()| +|IsFadeOut()||public bool IsFadeOut()| +|IsFinish()||public bool IsFinish()| +|IsInDelay()||public bool IsInDelay()| +|IsSerieAnimation()||public bool IsSerieAnimation()
whther animaiton is serie animation. LeftToRight, AlongPath and Clockwise are serie animation. | +|Pause()||public void Pause()
Pause all animations. | +|Reset()||public void Reset()
Reset all animations. | +|Restart()||public void Restart()
Restart the actived animation. | +|Resume()||public void Resume()
Resume all animations. | ## AnimationStyleHelper -> XCharts.Runtime.AnimationStyleHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -131,17 +389,96 @@ slug: /api |UpdateAnimationType()||public static void UpdateAnimationType(AnimationStyle animation, AnimationType defaultType, bool enableSerieDataAnimation)| |UpdateSerieAnimation()||public static void UpdateSerieAnimation(Serie serie)| +## AreaStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +The style of area. + +|public method|since|description| +|--|--|--| +|GetColor()||public Color32 GetColor()| +|GetColor()||public Color32 GetColor(Color32 themeColor)| + +## ArrowStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +|public method|since|description| +|--|--|--| +|Clone()||public ArrowStyle Clone()| +|Copy()||public void Copy(ArrowStyle arrow)| +|GetColor()||public Color32 GetColor(Color32 defaultColor)| + +## Axis + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) / Subclasses: [AngleAxis](#angleaxis),[ParallelAxis](#parallelaxis),[RadiusAxis](#radiusaxis),[SingleAxis](#singleaxis),[XAxis](#xaxis),[YAxis](#yaxis) + +The axis in rectangular coordinate. + +|public method|since|description| +|--|--|--| +|AddData()||public void AddData(string category)
添加一个类目到类目数据列表 | +|AddIcon()||public void AddIcon(Sprite icon)
添加图标 | +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()
清空类目数据 | +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public Axis Clone()| +|Copy()||public void Copy(Axis axis)| +|GetData()||public string GetData(int index)
获得指定索引的类目数据 | +|GetData()||public string GetData(int index, DataZoom dataZoom)
获得在dataZoom范围内指定索引的类目数据 | +|GetDistance()||public float GetDistance(double value, float axisLength)
获得值在坐标轴上的距离 | +|GetIcon()||public Sprite GetIcon(int index)| +|GetLabelValue()||public double GetLabelValue(int index)| +|GetLastLabelValue()||public double GetLastLabelValue()| +|GetLogMaxIndex()||public double GetLogMaxIndex()| +|GetLogMinIndex()||public double GetLogMinIndex()| +|GetLogValue()||public float GetLogValue(double value)| +|GetValueLength()||public float GetValueLength(double value, float axisLength)| +|IsBottom()||public bool IsBottom()| +|IsCategory()||public bool IsCategory()
是否为类目轴。 | +|IsLeft()||public bool IsLeft()| +|IsLog()||public bool IsLog()
是否为对数轴。 | +|IsNeedShowLabel()||public bool IsNeedShowLabel(int index, int total = 0)| +|IsRight()||public bool IsRight()| +|IsTime()||public bool IsTime()
是否为时间轴。 | +|IsTop()||public bool IsTop()| +|IsValue()||public bool IsValue()
是否为数值轴。 | +|RemoveData()||public void RemoveData(int dataIndex)| +|SetComponentDirty()||public override void SetComponentDirty()| +|SetNeedUpdateFilterData()||public void SetNeedUpdateFilterData()| +|UpdateData()||public void UpdateData(int index, string category)
更新类目数据 | +|UpdateIcon()||public void UpdateIcon(int index, Sprite icon)
更新图标 | +|UpdateZeroOffset()||public void UpdateZeroOffset(float axisLength)| + +## AxisAnimation + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +> Since `v3.9.0` + +animation style of axis. + +|public method|since|description| +|--|--|--| +|Clone()||public AxisAnimation Clone()| +|Copy()||public void Copy(AxisAnimation animation)| + ## AxisContext -> XCharts.Runtime.AxisContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + ## AxisHandler<T> -> XCharts.AxisHandler<T> : [MainComponentHandler](#maincomponenthandler) +> class in XCharts / Inherits from: [MainComponentHandler](#maincomponenthandler) + ## AxisHelper -> XCharts.Runtime.AxisHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -167,13 +504,155 @@ slug: /api |GetYAxisXOrY()||public static float GetYAxisXOrY(GridCoord grid, Axis yAxis, Axis relativedAxis)| |NeedShowSplit()||public static bool NeedShowSplit(Axis axis)| +## AxisLabel + +> class in XCharts.Runtime / Inherits from: [LabelStyle](#labelstyle) + +Settings related to axis label. + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|Clone()||public new AxisLabel Clone()| +|Copy()||public void Copy(AxisLabel axisLabel)| +|GetFormatterContent()||public override string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false)| +|GetFormatterContent()||public override string GetFormatterContent(int labelIndex, string category)| +|IsNeedShowLabel()||public bool IsNeedShowLabel(int index, int total)| +|SetRelatedText()||public void SetRelatedText(ChartText txt, float labelWidth)| + +## AxisLine + +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) + +Settings related to axis line. + +|public method|since|description| +|--|--|--| +|Clone()||public AxisLine Clone()| +|Copy()||public void Copy(AxisLine axisLine)| + +## AxisMinorSplitLine + +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) + +> Since `v3.2.0` + +Minor split line of axis in grid area. + +|public method|since|description| +|--|--|--| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public AxisMinorSplitLine Clone()| +|Copy()||public void Copy(AxisMinorSplitLine splitLine)| + +## AxisMinorTick + +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) + +> Since `v3.2.0` + +Settings related to axis minor tick. + +|public method|since|description| +|--|--|--| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public AxisMinorTick Clone()| +|Copy()||public void Copy(AxisMinorTick axisTick)| + +## AxisName + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +the name of axis. + +|public method|since|description| +|--|--|--| +|Clone()||public AxisName Clone()| +|Copy()||public void Copy(AxisName axisName)| + +## AxisSplitArea + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +Split area of axis in grid area, not shown by default. + +|public method|since|description| +|--|--|--| +|Clone()||public AxisSplitArea Clone()| +|Copy()||public void Copy(AxisSplitArea splitArea)| +|GetColor()||public Color32 GetColor(int index, BaseAxisTheme theme)| + +## AxisSplitLine + +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) + +Split line of axis in grid area. + +|public method|since|description| +|--|--|--| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public AxisSplitLine Clone()| +|Copy()||public void Copy(AxisSplitLine splitLine)| + +## AxisTheme + +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) + + +|public method|since|description| +|--|--|--| +|AxisTheme()||public AxisTheme(ThemeType theme) : base(theme) { }| + +## AxisTick + +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) + +Settings related to axis tick. + +|public method|since|description| +|--|--|--| +|Clone()||public AxisTick Clone()| +|Copy()||public void Copy(AxisTick axisTick)| + +## Background + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) + +Background component. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + +## Bar + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static Bar ConvertSerie(Serie serie)| + ## BarChart -> XCharts.Runtime.BarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## BaseAxisTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) / Subclasses: [AxisTheme](#axistheme),[RadiusAxisTheme](#radiusaxistheme),[AngleAxisTheme](#angleaxistheme),[PolarAxisTheme](#polaraxistheme),[RadarAxisTheme](#radaraxistheme) + + +|public method|since|description| +|--|--|--| +|BaseAxisTheme()||public BaseAxisTheme(ThemeType theme) : base(theme)| +|Copy()||public void Copy(BaseAxisTheme theme)| ## BaseChart -> XCharts.Runtime.BaseChart : [BaseGraph](#basegraph),[ISerializationCallbackReceiver](https://docs.unity3d.com/ScriptReference/30_search.html?q=iserializationcallbackreceiver) / Subclasses: [BarChart](#barchart),[CandlestickChart](#candlestickchart),[HeatmapChart](#heatmapchart),[LineChart](#linechart),[ParallelChart](#parallelchart),[PieChart](#piechart),[PolarChart](#polarchart),[RadarChart](#radarchart),[RingChart](#ringchart),[ScatterChart](#scatterchart),[SimplifiedBarChart](#simplifiedbarchart),[SimplifiedCandlestickChart](#simplifiedcandlestickchart),[SimplifiedLineChart](#simplifiedlinechart) +> class in XCharts.Runtime / Inherits from: [BaseGraph](#basegraph),[ISerializationCallbackReceiver](https://docs.unity3d.com/ScriptReference/30_search.html?q=iserializationcallbackreceiver) / Subclasses: [BarChart](#barchart),[CandlestickChart](#candlestickchart),[HeatmapChart](#heatmapchart),[LineChart](#linechart),[ParallelChart](#parallelchart),[PieChart](#piechart),[PolarChart](#polarchart),[RadarChart](#radarchart),[RingChart](#ringchart),[ScatterChart](#scatterchart),[SimplifiedBarChart](#simplifiedbarchart),[SimplifiedCandlestickChart](#simplifiedcandlestickchart),[SimplifiedLineChart](#simplifiedlinechart) + |public method|since|description| |--|--|--| @@ -364,7 +843,8 @@ slug: /api ## BaseGraph -> XCharts.Runtime.BaseGraph : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic),[IPointerDownHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointerdownhandler),[IPointerUpHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointeruphandler),[](#) / Subclasses: [BaseChart](#basechart),[UIComponent](#uicomponent) +> class in XCharts.Runtime / Inherits from: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic),[IPointerDownHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointerdownhandler),[IPointerUpHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointeruphandler),[](#) / Subclasses: [BaseChart](#basechart),[UIComponent](#uicomponent) + |public method|since|description| |--|--|--| @@ -397,13 +877,87 @@ slug: /api |SetPainterDirty()||public void SetPainterDirty()
重新初始化Painter | |SetSize()||public virtual void SetSize(float width, float height)
设置图形的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform) | +## BaseLine + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [AxisLine](#axisline),[AxisMinorSplitLine](#axisminorsplitline),[AxisMinorTick](#axisminortick),[AxisSplitLine](#axissplitline),[AxisTick](#axistick) + +Settings related to base line. + +|public method|since|description| +|--|--|--| +|BaseLine()||public BaseLine()| +|BaseLine()||public BaseLine(bool show) : base()| +|Copy()||public void Copy(BaseLine axisLine)| +|GetColor()||public Color32 GetColor(Color32 themeColor)| +|GetLength()||public float GetLength(float themeLength)| +|GetType()||public LineStyle.Type GetType(LineStyle.Type themeType)| +|GetWidth()||public float GetWidth(float themeWidth)| + +## BaseScatter + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) / Subclasses: [EffectScatter](#effectscatter),[Scatter](#scatter) + + +## BaseSerie + +> class in XCharts.Runtime / Subclasses: [Serie](#serie) + + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public static void ClearComponentDirty(ChildComponent component)| +|ClearComponentDirty()||public virtual void ClearComponentDirty()| +|ClearData()||public virtual void ClearData() { }| +|ClearDirty()||public virtual void ClearDirty()| +|ClearVerticesDirty()||public static void ClearVerticesDirty(ChildComponent component)| +|ClearVerticesDirty()||public virtual void ClearVerticesDirty()| +|IsComponentDirty()||public static bool IsComponentDirty(ChildComponent component)| +|IsVertsDirty()||public static bool IsVertsDirty(ChildComponent component)| +|OnAfterDeserialize()||public virtual void OnAfterDeserialize()| +|OnBeforeSerialize()||public virtual void OnBeforeSerialize() { }| +|OnDataUpdate()||public virtual void OnDataUpdate() { }| +|OnRemove()||public virtual void OnRemove()| +|RefreshLabel()||public void RefreshLabel()| +|SetAllDirty()||public virtual void SetAllDirty()| +|SetComponentDirty()||public virtual void SetComponentDirty()| +|SetVerticesDirty()||public virtual void SetVerticesDirty()| + +## BlurStyle + +> class in XCharts.Runtime / Inherits from: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +> Since `v3.2.0` + +Configurations of blur state. + +## CalendarCoord + +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem),[IUpdateRuntimeData](#iupdateruntimedata),[ISerieContainer](#iseriecontainer) + + +|public method|since|description| +|--|--|--| +|IsPointerEnter()||public bool IsPointerEnter()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + +## Candlestick + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + ## CandlestickChart -> XCharts.Runtime.CandlestickChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + ## ChartCached -> XCharts.Runtime.ChartCached +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -411,20 +965,24 @@ slug: /api |ColorToStr()||public static string ColorToStr(Color color)| |FloatToStr()||public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0)| |GetSerieLabelName()||public static string GetSerieLabelName(string prefix, int i, int j)| +|GetString()||public static string GetString(string prefix, int suffix)| |IntToStr()||public static string IntToStr(int value, string numericFormatter = "")| |NumberToStr()||public static string NumberToStr(double value, string formatter)| ## ChartConst -> XCharts.Runtime.ChartConst +> class in XCharts.Runtime + ## ChartDrawer -> XCharts.Runtime.ChartDrawer +> class in XCharts.Runtime + ## ChartHelper -> XCharts.Runtime.ChartHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -493,7 +1051,8 @@ slug: /api ## ChartLabel -> XCharts.Runtime.ChartLabel : [Image](https://docs.unity3d.com/ScriptReference/30_search.html?q=image) +> class in XCharts.Runtime / Inherits from: [Image](https://docs.unity3d.com/ScriptReference/30_search.html?q=image) + |public method|since|description| |--|--|--| @@ -522,32 +1081,107 @@ slug: /api ## ChartObject -> XCharts.Runtime.ChartObject +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |Destroy()||public virtual void Destroy()| +## ChartText + +> class in XCharts.Runtime + + +|public method|since|description| +|--|--|--| +|ChartText()||public ChartText()| +|ChartText()||public ChartText(GameObject textParent)| +|GetPreferredHeight()||public float GetPreferredHeight()| +|GetPreferredText()||public string GetPreferredText(string content, string suffix, float maxWidth)| +|GetPreferredWidth()||public float GetPreferredWidth()| +|GetPreferredWidth()||public float GetPreferredWidth(string content)| +|GetText()||public string GetText()| +|SetActive()||public void SetActive(bool flag)| +|SetAlignment()||public void SetAlignment(TextAnchor alignment)| +|SetColor()||public void SetColor(Color color)| +|SetFont()||public void SetFont(Font font)| +|SetFont()||public void SetFont(TMP_FontAsset font)| +|SetFontAndSizeAndStyle()||public void SetFontAndSizeAndStyle(TextStyle textStyle, ComponentTheme theme)| +|SetFontSize()||public void SetFontSize(float fontSize)| +|SetFontStyle()||public void SetFontStyle(FontStyle fontStyle)| +|SetLineSpacing()||public void SetLineSpacing(float lineSpacing)| +|SetLocalEulerAngles()||public void SetLocalEulerAngles(Vector3 position)| +|SetLocalPosition()||public void SetLocalPosition(Vector3 position)| +|SetRectPosition()||public void SetRectPosition(Vector3 position)| +|SetSizeDelta()||public void SetSizeDelta(Vector2 sizeDelta)| +|SetText()||public void SetText(string text)| + ## CheckHelper -> XCharts.Runtime.CheckHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |CheckChart()||public static string CheckChart(BaseChart chart)| |CheckChart()||public static string CheckChart(BaseGraph chart)| +## ChildComponent + +> class in XCharts.Runtime / Subclasses: [AnimationStyle](#animationstyle),[AxisAnimation](#axisanimation),[AxisName](#axisname),[AxisSplitArea](#axissplitarea),[AreaStyle](#areastyle),[ArrowStyle](#arrowstyle),[BaseLine](#baseline),[IconStyle](#iconstyle),[ImageStyle](#imagestyle),[ItemStyle](#itemstyle),[Level](#level),[LevelStyle](#levelstyle),[LineArrow](#linearrow),[LineStyle](#linestyle),[Location](#location),[MLValue](#mlvalue),[MarqueeStyle](#marqueestyle),[Padding](#padding),[StageColor](#stagecolor),[SymbolStyle](#symbolstyle),[TextLimit](#textlimit),[TextStyle](#textstyle),[CommentItem](#commentitem),[CommentMarkStyle](#commentmarkstyle),[LabelLine](#labelline),[LabelStyle](#labelstyle),[MarkAreaData](#markareadata),[MarkLineData](#marklinedata),[StateStyle](#statestyle),[VisualMapRange](#visualmaprange),[UIComponentTheme](#uicomponenttheme),[SerieData](#seriedata),[ComponentTheme](#componenttheme),[SerieTheme](#serietheme),[ThemeStyle](#themestyle) + + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public static void ClearComponentDirty(ChildComponent component)| +|ClearComponentDirty()||public virtual void ClearComponentDirty()| +|ClearDirty()||public virtual void ClearDirty()| +|ClearVerticesDirty()||public static void ClearVerticesDirty(ChildComponent component)| +|ClearVerticesDirty()||public virtual void ClearVerticesDirty()| +|IsComponentDirty()||public static bool IsComponentDirty(ChildComponent component)| +|IsVertsDirty()||public static bool IsVertsDirty(ChildComponent component)| +|SetAllDirty()||public virtual void SetAllDirty()| +|SetComponentDirty()||public virtual void SetComponentDirty()| +|SetVerticesDirty()||public virtual void SetVerticesDirty()| + ## ColorUtil -> XCharts.Runtime.ColorUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |GetColor()||public static Color32 GetColor(string hexColorStr)
Convert the html string to color. | +## Comment + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged) + +comment of chart. + +|public method|since|description| +|--|--|--| +|GetLabelStyle()||public LabelStyle GetLabelStyle(int index)| +|GetMarkStyle()||public CommentMarkStyle GetMarkStyle(int index)| +|OnChanged()||public void OnChanged()
Callback handling when parameters change. | + +## CommentItem + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +comment of chart. + +## CommentMarkStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +the comment mark style. + ## ComponentHandlerAttribute -> XCharts.Runtime.ComponentHandlerAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -556,7 +1190,8 @@ slug: /api ## ComponentHelper -> XCharts.Runtime.ComponentHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -566,9 +1201,21 @@ slug: /api |GetYAxisOnZeroOffset()||public static float GetYAxisOnZeroOffset(List<MainComponent> components, YAxis axis)| |IsAnyCategoryOfYAxis()||public static bool IsAnyCategoryOfYAxis(List<MainComponent> components)| +## ComponentTheme + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [BaseAxisTheme](#baseaxistheme),[DataZoomTheme](#datazoomtheme),[LegendTheme](#legendtheme),[SubTitleTheme](#subtitletheme),[TitleTheme](#titletheme),[TooltipTheme](#tooltiptheme),[VisualMapTheme](#visualmaptheme) + + +|public method|since|description| +|--|--|--| +|ComponentTheme()||public ComponentTheme(ThemeType theme)| +|Copy()||public virtual void Copy(ComponentTheme theme)| +|Reset()||public virtual void Reset(ComponentTheme defaultTheme)| + ## CoordOptionsAttribute -> XCharts.Runtime.CoordOptionsAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -578,22 +1225,65 @@ slug: /api |CoordOptionsAttribute()||public CoordOptionsAttribute(Type coord, Type coord2, Type coord3)| |CoordOptionsAttribute()||public CoordOptionsAttribute(Type coord, Type coord2, Type coord3, Type coord4)| +## CoordSystem + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) / Subclasses: [RadarCoord](#radarcoord),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[ParallelCoord](#parallelcoord),[PolarCoord](#polarcoord),[SingleAxisCoord](#singleaxiscoord) + +Coordinate system component. + +## DataZoom + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent),[IUpdateRuntimeData](#iupdateruntimedata) + +DataZoom component is used for zooming a specific area, which enables user to investigate data in detail, or get an overview of the data, or get rid of outlier points. + +|public method|since|description| +|--|--|--| +|GetBackgroundColor()||public Color32 GetBackgroundColor(Color32 themeColor)| +|GetBorderColor()||public Color32 GetBorderColor(Color32 themeColor)| +|GetFillerColor()||public Color32 GetFillerColor(Color32 themeColor)| +|IsContainsAxis()||public bool IsContainsAxis(Axis axis)| +|IsContainsXAxis()||public bool IsContainsXAxis(int index)| +|IsContainsYAxis()||public bool IsContainsYAxis(int index)| +|IsInEndZoom()||public bool IsInEndZoom(Vector2 pos)
给定的坐标是否在结束活动条触发区域内 | +|IsInMarqueeArea()||public bool IsInMarqueeArea(SerieData serieData)| +|IsInMarqueeArea()||public bool IsInMarqueeArea(Vector2 pos)| +|IsInSelectedZoom()||public bool IsInSelectedZoom(int totalIndex, int index, bool invert)| +|IsInSelectedZoom()||public bool IsInSelectedZoom(Vector2 pos)
给定的坐标是否在选中区域内 | +|IsInStartZoom()||public bool IsInStartZoom(Vector2 pos)
给定的坐标是否在开始活动条触发区域内 | +|IsInZoom()||public bool IsInZoom(Vector2 pos)
给定的坐标是否在缩放区域内 | +|SetDefaultValue()||public override void SetDefaultValue()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + ## DataZoomContext -> XCharts.Runtime.DataZoomContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + ## DataZoomHelper -> XCharts.Runtime.DataZoomHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |UpdateDataZoomRuntimeStartEndValue()||public static void UpdateDataZoomRuntimeStartEndValue(DataZoom dataZoom, Serie serie)| |UpdateDataZoomRuntimeStartEndValue<T>()||public static void UpdateDataZoomRuntimeStartEndValue<T>(BaseChart chart) where T : Serie| +## DataZoomTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) + + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(DataZoomTheme theme)| +|DataZoomTheme()||public DataZoomTheme(ThemeType theme) : base(theme)| + ## DateTimeUtil -> XCharts.Runtime.DateTimeUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -601,9 +1291,20 @@ slug: /api |GetTimestamp()||public static int GetTimestamp()| |GetTimestamp()||public static int GetTimestamp(DateTime time)| +## DebugInfo + +> class in XCharts.Runtime + + +|public method|since|description| +|--|--|--| +|Init()||public void Init(BaseChart chart)| +|Update()||public void Update()| + ## DefaultAnimationAttribute -> XCharts.Runtime.DefaultAnimationAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -612,7 +1313,8 @@ slug: /api ## DefaultTooltipAttribute -> XCharts.Runtime.DefaultTooltipAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -620,16 +1322,44 @@ slug: /api ## DefineSymbolsUtil -> XCharts.Runtime.DefineSymbolsUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |AddGlobalDefine()||public static void AddGlobalDefine(string symbol)| |RemoveGlobalDefine()||public static void RemoveGlobalDefine(string symbol)| +## EffectScatter + +> class in XCharts.Runtime / Inherits from: [BaseScatter](#basescatter) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + +## EmphasisStyle + +> class in XCharts.Runtime / Inherits from: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +> Since `v3.2.0` + +Configurations of emphasis state. + +## EndLabelStyle + +> class in XCharts.Runtime / Inherits from: [LabelStyle](#labelstyle) + + +|public method|since|description| +|--|--|--| +|EndLabelStyle()||public EndLabelStyle()| + ## FormatterHelper -> XCharts.Runtime.FormatterHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -639,33 +1369,128 @@ slug: /api |TrimAndReplaceLine()||public static string TrimAndReplaceLine(string content)| |TrimAndReplaceLine()||public static string TrimAndReplaceLine(StringBuilder sb)| +## GridCoord + +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem),[IUpdateRuntimeData](#iupdateruntimedata),[ISerieContainer](#iseriecontainer) + +Grid component. + +|public method|since|description| +|--|--|--| +|BoundaryPoint()||public bool BoundaryPoint(Vector3 sp, Vector3 ep, ref List<Vector3> point)
给定的线段和Grid边界的交点 | +|BoundaryPoint()||public bool BoundaryPoint(Vector3 sp, Vector3 ep, ref Vector3 point)
给定的线段和Grid边界的交点 | +|Clamp()|v3.7.0|public void Clamp(ref Vector3 pos)
Clamp the position of pos to the grid. | +|ClampX()|v3.7.0|public void ClampX(ref Vector3 pos)
Clamp the x position of pos to the grid. | +|ClampY()|v3.7.0|public void ClampY(ref Vector3 pos)
Clamp the y position of pos to the grid. | +|Contains()||public bool Contains(float x, float y)
Whether the given position is in the grid. | +|Contains()||public bool Contains(Vector3 pos)
Whether the given position is in the grid. | +|Contains()|v3.7.0|public bool Contains(Vector3 pos, bool isYAxis)
Whether the given position is in the grid. | +|ContainsX()|v3.7.0|public bool ContainsX(float x)
Whether the given x is in the grid. | +|ContainsY()|v3.7.0|public bool ContainsY(float y)
Whether the given y is in the grid. | +|IsPointerEnter()||public bool IsPointerEnter()
Whether the pointer is in the grid. | +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + ## GridCoordContext -> XCharts.Runtime.GridCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + + +## GridLayout + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent),[IUpdateRuntimeData](#iupdateruntimedata) + +> Since `v3.8.0` + +Grid layout component. Used to manage the layout of multiple `GridCoord`, and the number of rows and columns of the grid can be controlled by `row` and `column`. + +|public method|since|description| +|--|--|--| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| ## GridLayoutContext -> XCharts.Runtime.GridLayoutContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + + +## Heatmap + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| ## HeatmapChart -> XCharts.Runtime.HeatmapChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## IconStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +|public method|since|description| +|--|--|--| +|Clone()||public IconStyle Clone()| +|Copy()||public void Copy(IconStyle iconStyle)| +|Reset()||public void Reset()| ## IgnoreDoc -> XCharts.Runtime.IgnoreDoc : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| |IgnoreDoc()||public IgnoreDoc()| +## ImageStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + + +|public method|since|description| +|--|--|--| +|Clone()||public ImageStyle Clone()| +|Copy()||public void Copy(ImageStyle imageStyle)| +|Reset()||public void Reset()| + +## Indicator + +> class in XCharts.Runtime + +Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart. + +|public method|since|description| +|--|--|--| +|AddIndicator()||public RadarCoord.Indicator AddIndicator(string name, double min, double max)| +|AddIndicator()||public void AddIndicator(RadarCoord.Indicator indicator)| +|AddIndicatorList()|v3.3.0|public void AddIndicatorList(List<string> nameList, double min = 0, double max = 0)| +|ClearData()||public override void ClearData()| +|GetFormatterIndicatorContent()||public string GetFormatterIndicatorContent(int indicatorIndex)| +|GetFormatterIndicatorContent()||public string GetFormatterIndicatorContent(string indicatorName)| +|GetIndicator()||public RadarCoord.Indicator GetIndicator(int indicatorIndex)| +|GetIndicatorMax()||public double GetIndicatorMax(int index)| +|GetIndicatorMin()||public double GetIndicatorMin(int index)| +|GetIndicatorName()||public string GetIndicatorName(int indicatorIndex)| +|GetIndicatorPosition()||public Vector3 GetIndicatorPosition(int index)| +|IsInIndicatorRange()||public bool IsInIndicatorRange(int index, double value)| +|IsInRange()||public bool IsInRange(double value)| +|IsPointerEnter()||public bool IsPointerEnter()| +|SetDefaultValue()||public override void SetDefaultValue()| +|UpdateIndicator()||public bool UpdateIndicator(int indicatorIndex, string name, double min, double max)| + ## INeedSerieContainer -> XCharts.Runtime.INeedSerieContainer / Subclasses: [Bar](#bar),[SimplifiedBar](#simplifiedbar),[Candlestick](#candlestick),[SimplifiedCandlestick](#simplifiedcandlestick),[Heatmap](#heatmap),[Line](#line),[SimplifiedLine](#simplifiedline),[Parallel](#parallel),[Radar](#radar),[BaseScatter](#basescatter) +> class in XCharts.Runtime / Subclasses: [Bar](#bar),[SimplifiedBar](#simplifiedbar),[Candlestick](#candlestick),[SimplifiedCandlestick](#simplifiedcandlestick),[Heatmap](#heatmap),[Line](#line),[SimplifiedLine](#simplifiedline),[Parallel](#parallel),[Radar](#radar),[BaseScatter](#basescatter) + ## InputHelper -> XCharts.Runtime.InputHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -674,7 +1499,8 @@ slug: /api ## InteractData -> XCharts.Runtime.InteractData +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -697,47 +1523,163 @@ slug: /api ## IPropertyChanged -> XCharts.Runtime.IPropertyChanged / Subclasses: [Location](#location),[Comment](#comment),[Legend](#legend),[Title](#title) +> class in XCharts.Runtime / Subclasses: [Location](#location),[Comment](#comment),[Legend](#legend),[Title](#title) + 属性变更接口 ## ISerieComponent -> XCharts.Runtime.ISerieComponent / Subclasses: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[LineArrow](#linearrow),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) +> class in XCharts.Runtime / Subclasses: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[LineArrow](#linearrow),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) + The interface for serie component. ## ISerieContainer -> XCharts.Runtime.ISerieContainer / Subclasses: [RadarCoord](#radarcoord),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[ParallelCoord](#parallelcoord),[PolarCoord](#polarcoord) +> class in XCharts.Runtime / Subclasses: [RadarCoord](#radarcoord),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[ParallelCoord](#parallelcoord),[PolarCoord](#polarcoord) + ## ISerieDataComponent -> XCharts.Runtime.ISerieDataComponent / Subclasses: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[ItemStyle](#itemstyle),[LineStyle](#linestyle),[SerieSymbol](#seriesymbol),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) +> class in XCharts.Runtime / Subclasses: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[ItemStyle](#itemstyle),[LineStyle](#linestyle),[SerieSymbol](#seriesymbol),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) + The interface for serie data component. ## ISimplifiedSerie -> XCharts.Runtime.ISimplifiedSerie / Subclasses: [SimplifiedBar](#simplifiedbar),[SimplifiedCandlestick](#simplifiedcandlestick),[SimplifiedLine](#simplifiedline) +> class in XCharts.Runtime / Subclasses: [SimplifiedBar](#simplifiedbar),[SimplifiedCandlestick](#simplifiedcandlestick),[SimplifiedLine](#simplifiedline) + + +## ItemStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieDataComponent](#iseriedatacomponent) + +图形样式。 + +|public method|since|description| +|--|--|--| +|GetBorderColor()||public Color32 GetBorderColor(Color32 defaultColor)| +|GetBorderColor0()||public Color32 GetBorderColor0(Color32 defaultColor)| +|GetColor()||public Color32 GetColor()| +|GetColor()||public Color32 GetColor(Color32 defaultColor)| +|GetColor0()||public Color32 GetColor0()| +|GetColor0()||public Color32 GetColor0(Color32 defaultColor)| +|GetGradientColor()||public Color32 GetGradientColor(float value, Color32 defaultColor)| +|GetToColor()||public Color32 GetToColor()| +|IsNeedCorner()||public bool IsNeedCorner()| +|IsNeedGradient()||public bool IsNeedGradient()| +|NeedShowBorder()||public bool NeedShowBorder()
是否需要显示边框。 | +|Reset()||public void Reset()| ## IUpdateRuntimeData -> XCharts.Runtime.IUpdateRuntimeData / Subclasses: [SingleAxis](#singleaxis),[DataZoom](#datazoom),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[GridLayout](#gridlayout),[ParallelCoord](#parallelcoord) +> class in XCharts.Runtime / Subclasses: [SingleAxis](#singleaxis),[DataZoom](#datazoom),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[GridLayout](#gridlayout),[ParallelCoord](#parallelcoord) + + +## LabelLine + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +标签的引导线 + +|public method|since|description| +|--|--|--| +|GetEndSymbolOffset()||public Vector3 GetEndSymbolOffset()| +|GetStartSymbolOffset()||public Vector3 GetStartSymbolOffset()| +|Reset()||public void Reset()| + +## LabelStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) / Subclasses: [AxisLabel](#axislabel),[EndLabelStyle](#endlabelstyle),[TitleStyle](#titlestyle) + +Text label of chart, to explain some data information about graphic item like value, name and so on. + +|public method|since|description| +|--|--|--| +|Clone()||public virtual LabelStyle Clone()| +|Copy()||public virtual void Copy(LabelStyle label)| +|GetColor()||public Color GetColor(Color defaultColor)| +|GetFormatterContent()||public virtual string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false)| +|GetFormatterContent()||public virtual string GetFormatterContent(int labelIndex, string category)| +|GetFormatterDateTime()||public string GetFormatterDateTime(int labelIndex, double value, double minValue, double maxValue)| +|GetOffset()||public Vector3 GetOffset(float radius)| +|IsAutoSize()||public bool IsAutoSize()| +|IsDefaultPosition()||public bool IsDefaultPosition(Position position)| +|IsInside()||public bool IsInside()
whether the label is inside. | +|Reset()||public void Reset()| + +## Lang + +> class in XCharts.Runtime / Inherits from: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=scriptableobject) + +Language. + +|public method|since|description| +|--|--|--| +|GetCandlestickDimensionName()||public string GetCandlestickDimensionName(int i)| +|GetDay()||public string GetDay(int day)| +|GetMonthAbbr()||public string GetMonthAbbr(int month)| + +## LangCandlestick + +> class in XCharts.Runtime + + +## LangTime + +> class in XCharts.Runtime + + +|public method|since|description| +|--|--|--| +|List<string>()||public List<string> dayOfMonth = new List<string>()| +|List<string>()||public List<string> dayOfWeek = new List<string>()| +|List<string>()||public List<string> dayOfWeekAbbr = new List<string>()| +|List<string>()||public List<string> monthAbbr = new List<string>()| +|List<string>()||public List<string> months = new List<string>()| ## LayerHelper -> XCharts.Runtime.LayerHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |IsFixedWidthHeight()||public static bool IsFixedWidthHeight(RectTransform rt)| |IsStretchPivot()||public static bool IsStretchPivot(RectTransform rt)| +## Legend + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged) + +Legend component.The legend component shows different sets of tags, colors, and names. You can control which series are not displayed by clicking on the legend. + +|public method|since|description| +|--|--|--| +|AddData()||public void AddData(string name)
Add legend data. | +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()
Clear legend data. | +|ContainsData()||public bool ContainsData(string name)
Whether include in legend data by the specified name. | +|GetColor()||public Color GetColor(int index)| +|GetData()||public string GetData(int index)
Gets the legend for the specified index. | +|GetIcon()||public Sprite GetIcon(int index)
Gets the legend button for the specified index. | +|GetIndex()||public int GetIndex(string legendName)
Gets the index of the specified legend. | +|GetPosition()||public Vector3 GetPosition(int index, Vector3 defaultPos)| +|OnChanged()||public void OnChanged()
Callback handling when parameters change. | +|RemoveButton()||public void RemoveButton()
Remove all legend buttons. | +|RemoveData()||public void RemoveData(string name)
Removes the legend with the specified name. | +|SetButton()||public void SetButton(string name, LegendItem item, int total)
Bind buttons to legends. | +|UpdateButtonColor()||public void UpdateButtonColor(string name, Color color)
Update the legend button color. | +|UpdateContentColor()||public void UpdateContentColor(string name, Color color)
Update the text color of legend. | + ## LegendContext -> XCharts.Runtime.LegendContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + ## LegendHelper -> XCharts.Runtime.LegendHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -750,7 +1692,8 @@ The interface for serie data component. ## LegendItem -> XCharts.Runtime.LegendItem +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -773,13 +1716,73 @@ The interface for serie data component. |SetText()||public void SetText(ChartText text)| |SetTextBackground()||public void SetTextBackground(Image image)| +## LegendTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) + + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(LegendTheme theme)| +|LegendTheme()||public LegendTheme(ThemeType theme) : base(theme)| + +## Level + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +## LevelStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +## Line + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static Line ConvertSerie(Serie serie)| + +## LineArrow + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent) + + ## LineChart -> XCharts.Runtime.LineChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## LineStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[ISerieDataComponent](#iseriedatacomponent) + +The style of line. + +|public method|since|description| +|--|--|--| +|Clone()||public LineStyle Clone()| +|Copy()||public void Copy(LineStyle lineStyle)| +|GetColor()||public Color32 GetColor()| +|GetColor()||public Color32 GetColor(Color32 themeColor)| +|GetGradientColor()||public Color32 GetGradientColor(float value, Color32 defaultColor)| +|GetLength()||public float GetLength(float themeLength)| +|GetType()||public Type GetType(Type themeType)| +|GetWidth()||public float GetWidth(float themeWidth)| +|IsNeedGradient()||public bool IsNeedGradient()| +|IsNotSolidLine()||public bool IsNotSolidLine()| +|LineStyle()||public LineStyle()| +|LineStyle()||public LineStyle(float width)| +|LineStyle()||public LineStyle(LineStyle.Type type)| +|LineStyle()||public LineStyle(LineStyle.Type type, float width)| ## ListFor -> XCharts.Runtime.ListFor : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) / Subclasses: [ListForComponent](#listforcomponent),[ListForSerie](#listforserie) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) / Subclasses: [ListForComponent](#listforcomponent),[ListForSerie](#listforserie) + |public method|since|description| |--|--|--| @@ -787,7 +1790,8 @@ The interface for serie data component. ## ListForComponent -> XCharts.Runtime.ListForComponent : [ListFor](#listfor) +> class in XCharts.Runtime / Inherits from: [ListFor](#listfor) + |public method|since|description| |--|--|--| @@ -795,22 +1799,60 @@ The interface for serie data component. ## ListForSerie -> XCharts.Runtime.ListForSerie : [ListFor](#listfor) +> class in XCharts.Runtime / Inherits from: [ListFor](#listfor) + |public method|since|description| |--|--|--| |ListForSerie()||public ListForSerie(Type type) : base(type)| -## MainComponentContext +## Location -> XCharts.Runtime.MainComponentContext / Subclasses: [AxisContext](#axiscontext),[DataZoomContext](#datazoomcontext),[LegendContext](#legendcontext),[RadarCoordContext](#radarcoordcontext),[VisualMapContext](#visualmapcontext),[GridCoordContext](#gridcoordcontext),[GridLayoutContext](#gridlayoutcontext),[ParallelCoordContext](#parallelcoordcontext),[PolarCoordContext](#polarcoordcontext) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent),[IPropertyChanged](#ipropertychanged) -## MainComponentHandler - -> XCharts.Runtime.MainComponentHandler / Subclasses: [AxisHandler<T>](#axishandlert),[MainComponentHandler<T>](#maincomponenthandlert) +Location type. Quick to set the general location. |public method|since|description| |--|--|--| +|GetPosition()||public Vector3 GetPosition(float chartWidth, float chartHeight)
返回在坐标系中的具体位置 | +|IsBottom()||public bool IsBottom()| +|IsCenter()||public bool IsCenter()| +|IsTop()||public bool IsTop()| +|OnChanged()||public void OnChanged()
属性变更时更新textAnchor,minAnchor,maxAnchor,pivot | +|UpdateRuntimeData()||public void UpdateRuntimeData(float chartWidth, float chartHeight)| + +## MainComponent + +> class in XCharts.Runtime / Inherits from: [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=icomparable) / Subclasses: [Axis](#axis),[Background](#background),[Comment](#comment),[DataZoom](#datazoom),[Legend](#legend),[MarkArea](#markarea),[MarkLine](#markline),[Settings](#settings),[Title](#title),[Tooltip](#tooltip),[VisualMap](#visualmap),[GridLayout](#gridlayout),[CoordSystem](#coordsystem) + + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public virtual void ClearComponentDirty()| +|ClearData()||public virtual void ClearData() { }| +|ClearDirty()||public virtual void ClearDirty()| +|ClearVerticesDirty()||public virtual void ClearVerticesDirty()| +|CompareTo()||public int CompareTo(object obj)| +|OnRemove()||public virtual void OnRemove()| +|Reset()||public virtual void Reset() { }| +|SetAllDirty()||public virtual void SetAllDirty()| +|SetComponentDirty()||public virtual void SetComponentDirty()| +|SetDefaultValue()||public virtual void SetDefaultValue() { }| +|SetVerticesDirty()||public virtual void SetVerticesDirty()| + +## MainComponentContext + +> class in XCharts.Runtime / Subclasses: [AxisContext](#axiscontext),[DataZoomContext](#datazoomcontext),[LegendContext](#legendcontext),[RadarCoordContext](#radarcoordcontext),[VisualMapContext](#visualmapcontext),[GridCoordContext](#gridcoordcontext),[GridLayoutContext](#gridlayoutcontext),[ParallelCoordContext](#parallelcoordcontext),[PolarCoordContext](#polarcoordcontext) + + +## MainComponentHandler + +> class in XCharts.Runtime / Subclasses: [AxisHandler<T>](#axishandlert),[MainComponentHandler<T>](#maincomponenthandlert) + + +|public method|since|description| +|--|--|--| +|BeforceSerieUpdate()||public virtual void BeforceSerieUpdate() { }| |CheckComponent()||public virtual void CheckComponent(StringBuilder sb) { }| |DrawBase()||public virtual void DrawBase(VertexHelper vh) { }| |DrawTop()||public virtual void DrawTop(VertexHelper vh) { }| @@ -831,11 +1873,61 @@ The interface for serie data component. ## MainComponentHandler<T> -> XCharts.Runtime.MainComponentHandler<T> : [MainComponentHandler](#maincomponenthandler) +> class in XCharts.Runtime / Inherits from: [MainComponentHandler](#maincomponenthandler) + + +## MarkArea + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) + +Used to mark an area in chart. For example, mark a time interval. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + +## MarkAreaData + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +标域的数据。 + +## MarkLine + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) + +Use a line in the chart to illustrate. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + +## MarkLineData + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +> Since `v3.9.0` + +Data of marking line. + +## MarqueeStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +> Since `v3.5.0` + +Marquee style. It can be used for the DataZoom component. 选取框样式。可用于DataZoom组件。 + +|public method|since|description| +|--|--|--| +|onEnd||public Action<DataZoom> onEnd
Customize the callback at the end of the selection. | +|onGoing||public Action<DataZoom> onGoing
Custom checkboxes select ongoing callbacks. | +|onStart||public Action<DataZoom> onStart
Customize the callback to the start of the selection of the checkbox. | ## MathUtil -> XCharts.Runtime.MathUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -847,13 +1939,29 @@ The interface for serie data component. |IsInteger()||public static bool IsInteger(double value)| |Lerp()||public static double Lerp(double a, double b, double t)| +## MLValue + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +> Since `v3.8.0` + +多样式数值。 + +|public method|since|description| +|--|--|--| +|GetValue()||public float GetValue(float total)
Get the value by type. | +|MLValue()||public MLValue(float value)| +|MLValue()||public MLValue(Type type, float value)| + ## MonoBehaviour -> .MonoBehaviour / Subclasses: [XLog](#xlog) +> class in / Subclasses: [XLog](#xlog) + ## ObjectPool<T> where T -> XCharts.Runtime.ObjectPool<T> where T : [new()](#new()) +> class in XCharts.Runtime / Inherits from: [new()](#new()) + |public method|since|description| |--|--|--| @@ -863,9 +1971,22 @@ The interface for serie data component. |ObjectPool()||public ObjectPool(UnityAction<T> actionOnGet, UnityAction<T> actionOnRelease, bool newIfEmpty = true)| |Release()||public void Release(T element)| +## Padding + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [TextPadding](#textpadding) + +padding setting of item or text. + +|public method|since|description| +|--|--|--| +|Padding()||public Padding() { }| +|Padding()||public Padding(float top, float right, float bottom, float left)| +|SetPadding()||public void SetPadding(float top, float right, float bottom, float left)| + ## Painter -> XCharts.Runtime.Painter : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) +> class in XCharts.Runtime / Inherits from: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) + |public method|since|description| |--|--|--| @@ -875,29 +1996,96 @@ The interface for serie data component. |Refresh()||public void Refresh()| |SetActive()||public void SetActive(bool flag, bool isDebugMode = false)| +## Parallel + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + +## ParallelAxis + +> class in XCharts.Runtime / Inherits from: [Axis](#axis) + + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + ## ParallelChart -> XCharts.Runtime.ParallelChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## ParallelCoord + +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem),[IUpdateRuntimeData](#iupdateruntimedata),[ISerieContainer](#iseriecontainer) + +Grid component. + +|public method|since|description| +|--|--|--| +|Contains()||public bool Contains(float x, float y)| +|Contains()||public bool Contains(Vector3 pos)| +|IsPointerEnter()||public bool IsPointerEnter()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| ## ParallelCoordContext -> XCharts.Runtime.ParallelCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + + +## Pie + +> class in XCharts.Runtime / Inherits from: [Serie](#serie) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static Pie ConvertSerie(Serie serie)| ## PieChart -> XCharts.Runtime.PieChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## PolarAxisTheme + +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) + + +|public method|since|description| +|--|--|--| +|PolarAxisTheme()||public PolarAxisTheme(ThemeType theme) : base(theme) { }| ## PolarChart -> XCharts.Runtime.PolarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## PolarCoord + +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem),[ISerieContainer](#iseriecontainer) + +Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis. + +|public method|since|description| +|--|--|--| +|Contains()||public bool Contains(Vector3 pos)| +|IsPointerEnter()||public bool IsPointerEnter()| ## PolarCoordContext -> XCharts.Runtime.PolarCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + ## PropertyUtil -> XCharts.Runtime.PropertyUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -906,17 +2094,63 @@ The interface for serie data component. |SetColor()||public static bool SetColor(ref Color32 currentValue, Color32 newValue)| |SetStruct<T>()||public static bool SetStruct<T>(ref T currentValue, T newValue) where T : struct| +## Radar + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + +## RadarAxisTheme + +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) + + +|public method|since|description| +|--|--|--| +|RadarAxisTheme()||public RadarAxisTheme(ThemeType theme) : base(theme)| + ## RadarChart -> XCharts.Runtime.RadarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## RadarCoord + +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem),[ISerieContainer](#iseriecontainer) + +Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。 ## RadarCoordContext -> XCharts.Runtime.RadarCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + + +## RadiusAxis + +> class in XCharts.Runtime / Inherits from: [Axis](#axis) + +Radial axis of polar coordinate. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()
Radial axis of polar coordinate. | + +## RadiusAxisTheme + +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) + + +|public method|since|description| +|--|--|--| +|RadiusAxisTheme()||public RadiusAxisTheme(ThemeType theme) : base(theme) { }| ## ReflectionUtil -> XCharts.Runtime.ReflectionUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -929,7 +2163,8 @@ The interface for serie data component. ## RequireChartComponentAttribute -> XCharts.Runtime.RequireChartComponentAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -937,13 +2172,25 @@ The interface for serie data component. |RequireChartComponentAttribute()||public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2)| |RequireChartComponentAttribute()||public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2, Type requiredComponent3)| +## Ring + +> class in XCharts.Runtime / Inherits from: [Serie](#serie) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|GetDataTotal()||public override double GetDataTotal(int dimension, SerieData serieData = null)| + ## RingChart -> XCharts.Runtime.RingChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + ## RuntimeUtil -> XCharts.Runtime.RuntimeUtil +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -954,13 +2201,114 @@ The interface for serie data component. |GetAttribute<T>()||public static T GetAttribute<T>(this Type type, bool check = true) where T : Attribute| |HasSubclass()||public static bool HasSubclass(Type type)| +## Scatter + +> class in XCharts.Runtime / Inherits from: [BaseScatter](#basescatter) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + ## ScatterChart -> XCharts.Runtime.ScatterChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## SelectStyle + +> class in XCharts.Runtime / Inherits from: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +> Since `v3.2.0` + +Configurations of select state. + +## Serie + +> class in XCharts.Runtime / Inherits from: [BaseSerie](#baseserie),[IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=icomparable) / Subclasses: [SerieHandler<T>](#seriehandlert),[Bar](#bar),[SimplifiedBar](#simplifiedbar),[Candlestick](#candlestick),[SimplifiedCandlestick](#simplifiedcandlestick),[Heatmap](#heatmap),[Line](#line),[SimplifiedLine](#simplifiedline),[Parallel](#parallel),[Pie](#pie),[Radar](#radar),[Ring](#ring),[BaseScatter](#basescatter) + +系列。系列一般由数据和配置组成,用来表示具体的图表图形,如折线图的一条折线,柱图的一组柱子等。一个图表中可以包含多个不同类型的系列。 + +|public method|since|description| +|--|--|--| +|onClick||public Action<SerieEventData> onClick
event callback when click serie. | +|onDown||public Action<SerieEventData> onDown
event callback when mouse down on serie. | +|onEnter||public Action<SerieEventData> onEnter
event callback when mouse enter serie. | +|onExit||public Action<SerieEventData> onExit
event callback when mouse leave serie. | +|AddChildData()||public SerieData AddChildData(SerieData parent, double value, string name, string id)| +|AddChildData()||public SerieData AddChildData(SerieData parent, List<double> value, string name, string id)| +|AddChildData()||public void AddChildData(SerieData parent, SerieData serieData)| +|AddData()||public SerieData AddData(double indexOrTimestamp, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)
添加 (open, close, lowest, heighest) 数据 | +|AddData()||public SerieData AddData(List<double> valueList, string dataName = null, string dataId = null)
将一组数据添加到系列中。 如果数据只有一个,默认添加到维度Y中。 | +|AddData()||public SerieData AddData(params double[] values)
添加任意维数据到系列中。 | +|AddExtraComponent<T>()||public T AddExtraComponent<T>() where T : ChildComponent, ISerieComponent| +|AddSerieData()||public void AddSerieData(SerieData serieData)| +|AddXYData()||public SerieData AddXYData(double xValue, double yValue, string dataName = null, string dataId = null)
添加(x,y)数据到维度X和维度Y | +|AddYData()||public SerieData AddYData(double value, string dataName = null, string dataId = null)
添加一个数据到维度Y(此时维度X对应的数据是索引) | +|AnimationEnable()||public void AnimationEnable(bool flag)
启用或取消初始动画 | +|AnimationFadeIn()||public void AnimationFadeIn()
渐入动画 | +|AnimationFadeOut()||public void AnimationFadeOut()
渐出动画 | +|AnimationPause()||public void AnimationPause()
暂停动画 | +|AnimationReset()||public void AnimationReset()
重置动画 | +|AnimationRestart()||public void AnimationRestart()
重置动画 | +|AnimationResume()||public void AnimationResume()
继续动画 | +|CanAddComponent()||public bool CanAddComponent(Type type)| +|CanAddComponent<T>()||public bool CanAddComponent<T>() where T : ChildComponent, ISerieComponent| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()
清空所有数据 | +|ClearDirty()||public override void ClearDirty()| +|ClearHighlight()||public void ClearHighlight()
清除所有数据的高亮标志 | +|ClearSerieNameDirty()||public void ClearSerieNameDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public Serie Clone()| +|Clone<T>()||public T Clone<T>() where T : Serie| +|CompareTo()||public int CompareTo(object obj)| +|EnsureComponent()||public ISerieComponent EnsureComponent(Type type)| +|EnsureComponent<T>()||public T EnsureComponent<T>() where T : ChildComponent, ISerieComponent
Ensure the serie has the component. If not, add it. | +|GetBarWidth()||public float GetBarWidth(float categoryWidth, int barCount = 0)| +|GetComponent()||public ISerieComponent GetComponent(Type type)| +|GetComponent<T>()||public T GetComponent<T>() where T : ChildComponent, ISerieComponent| +|GetData()||public double GetData(int index, int dimension, DataZoom dataZoom = null)
获得指定index指定维数的数据 | +|GetDataList()||public List<SerieData> GetDataList(DataZoom dataZoom = null)
获得系列的数据列表 | +|GetDataTotal()||public virtual double GetDataTotal(int dimension, SerieData serieData = null)| +|GetSerieData()||public SerieData GetSerieData(int index, DataZoom dataZoom = null)
获得指定索引的数据项 | +|GetSerieData()||public SerieData GetSerieData(SerieData parent, string id)| +|GetSerieData()||public SerieData GetSerieData(string id, DataZoom dataZoom = null)| +|GetXYData()||public void GetXYData(int index, DataZoom dataZoom, out double xValue, out double yVlaue)
获得指定索引的维度X和维度Y的数据 | +|GetYCurrData()||public double GetYCurrData(int index, DataZoom dataZoom = null)| +|GetYData()||public double GetYData(int index, DataZoom dataZoom = null)
获得维度Y索引对应的数据 | +|GetYData()||public void GetYData(int index, out double yData, out string dataName, DataZoom dataZoom = null)
获得维度Y索引对应的数据和数据名 | +|IsIgnoreIndex()||public bool IsIgnoreIndex(int index, int dimension = 1)| +|IsIgnorePoint()||public bool IsIgnorePoint(int index)| +|IsIgnoreValue()||public bool IsIgnoreValue(double value)| +|IsIgnoreValue()||public bool IsIgnoreValue(SerieData serieData, double value)| +|IsIgnoreValue()||public bool IsIgnoreValue(SerieData serieData, int dimension = 1)| +|IsLegendName()||public bool IsLegendName(string legendName)| +|IsPerformanceMode()||public bool IsPerformanceMode()
是否为性能模式。性能模式下不绘制Symbol,不刷新Label,不单独设置数据项配置。 | +|IsSerie<T>()||public bool IsSerie<T>() where T : Serie| +|IsSerieDataLegendName()||public bool IsSerieDataLegendName(string legendName)| +|IsSerieLegendName()||public bool IsSerieLegendName(string legendName)| +|IsUseCoord<T>()||public bool IsUseCoord<T>() where T : CoordSystem| +|RemoveAllComponents()||public void RemoveAllComponents()
Remove all extra components. | +|RemoveComponent()||public void RemoveComponent(Type type)| +|RemoveComponent<T>()||public void RemoveComponent<T>() where T : ISerieComponent| +|RemoveData()||public void RemoveData(int index)
移除指定索引的数据 | +|ResetDataIndex()||public bool ResetDataIndex()
重置数据项索引。避免部分数据项的索引异常。 | +|ResetInteract()||public void ResetInteract()| +|SetAllDirty()||public override void SetAllDirty()| +|SetCoord<T>()||public bool SetCoord<T>() where T : CoordSystem| +|SetHighlight()||public void SetHighlight(int index, bool flag)
设置指定索引的数据为高亮状态 | +|SetVerticesDirty()||public override void SetVerticesDirty()| +|UpdateData()||public bool UpdateData(int index, int dimension, double value)
更新指定索引指定维数的数据 | +|UpdateData()||public bool UpdateData(int index, List<double> values)
更新指定索引的数据项数据列表 | +|UpdateDataName()||public bool UpdateDataName(int index, string name)| +|UpdateXYData()||public bool UpdateXYData(int index, double xValue, double yValue)
更新指定索引的维度X和维度Y的数据 | +|UpdateYData()||public bool UpdateYData(int index, double value)
更新指定索引的维度Y数据 | ## SerieComponentAttribute -> XCharts.Runtime.SerieComponentAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + The attribute for serie component. |public method|since|description| @@ -978,11 +2326,13 @@ The attribute for serie component. ## SerieContext -> XCharts.Runtime.SerieContext +> class in XCharts.Runtime + ## SerieConvertAttribute -> XCharts.Runtime.SerieConvertAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + The attribute for which serie types can be converted to. |public method|since|description| @@ -994,9 +2344,56 @@ The attribute for which serie types can be converted to. |SerieConvertAttribute()||public SerieConvertAttribute(Type serie, Type serie2, Type serie3)| |SerieConvertAttribute()||public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)| +## SerieData + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +A data item of serie. + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|EnsureComponent()|v3.6.0|public ISerieDataComponent EnsureComponent(Type type)
Ensure the serie data has the component, if not, add it. | +|EnsureComponent<T>()|v3.6.0|public T EnsureComponent<T>() where T : ChildComponent, ISerieDataComponent
Ensure the serie data has the component, if not, add it. | +|GetAddAnimationData()||public double GetAddAnimationData(double min, double max, float animationDuration = 500f, bool unscaledTime = false)| +|GetComponent<T>()||public T GetComponent<T>() where T : ChildComponent, ISerieDataComponent
Get the component of the serie data. return null if not exist. | +|GetCurrData()||public double GetCurrData(int index, AnimationStyle animation, bool inverse = false, bool loop = false)| +|GetCurrData()||public double GetCurrData(int index, AnimationStyle animation, bool inverse, double min, double max, bool loop = false)| +|GetCurrData()||public double GetCurrData(int index, float dataAddDuration = 500f, float animationDuration = 500f, bool unscaledTime = false, bool inverse = false)| +|GetCurrData()||public double GetCurrData(int index, float dataAddDuration, float animationDuration, bool inverse, double min, double max, bool unscaledTime, bool loop = false)| +|GetData()||public double GetData(int index, bool inverse = false)| +|GetData()||public double GetData(int index, double min, double max)| +|GetFirstData()||public double GetFirstData(bool unscaledTime, float animationDuration = 500f)| +|GetLabelHeight()||public float GetLabelHeight()| +|GetLabelWidth()||public float GetLabelWidth()| +|GetLastData()||public double GetLastData()| +|GetMaxData()||public double GetMaxData(bool inverse = false)
the maxinum value. | +|GetMinData()||public double GetMinData(bool inverse = false)
the mininum value. | +|GetMinMaxData()||public void GetMinMaxData(int startDimensionIndex, bool inverse, out double min, out double max)| +|GetOrAddComponent<T>()||public T GetOrAddComponent<T>() where T : ChildComponent, ISerieDataComponent| +|GetPreviousData()||public double GetPreviousData(int index, bool inverse = false)| +|GetTotalData()||public double GetTotalData()| +|IsDataChanged()||public bool IsDataChanged()| +|IsInPolygon()||public bool IsInPolygon(Vector2 p)| +|List<string>()||public static List<string> extraFieldList = new List<string>()
A data item of serie. | +|OnAdd()||public void OnAdd(AnimationStyle animation, double startValue = 0)| +|RemoveAllComponent()||public void RemoveAllComponent()| +|RemoveComponent()||public void RemoveComponent(Type type)| +|RemoveComponent<T>()||public void RemoveComponent<T>() where T : ISerieDataComponent| +|Reset()||public void Reset()| +|SetIconActive()||public void SetIconActive(bool flag)| +|SetLabelActive()||public void SetLabelActive(bool flag)| +|SetPolygon()||public void SetPolygon(params Vector2[] points)| +|SetPolygon()||public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)| +|SetPolygon()||public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5)| +|UpdateData()||public bool UpdateData(int dimension, double value)| +|UpdateData()||public bool UpdateData(int dimension, double value, bool updateAnimation, bool unscaledTime, float animationDuration = 500f)| + ## SerieDataComponentAttribute -> XCharts.Runtime.SerieDataComponentAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + The attribute for serie data component. |public method|since|description| @@ -1014,7 +2411,8 @@ The attribute for serie data component. ## SerieDataContext -> XCharts.Runtime.SerieDataContext +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1022,7 +2420,8 @@ The attribute for serie data component. ## SerieDataExtraFieldAttribute -> XCharts.Runtime.SerieDataExtraFieldAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -1038,7 +2437,8 @@ The attribute for serie data component. ## SerieEventData -> XCharts.Runtime.SerieEventData +> class in XCharts.Runtime + the data of serie event. |public method|since|description| @@ -1047,7 +2447,8 @@ the data of serie event. ## SerieEventDataPool -> XCharts.Runtime.SerieEventDataPool +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1056,7 +2457,8 @@ the data of serie event. ## SerieHandler -> XCharts.Runtime.SerieHandler +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1089,11 +2491,13 @@ the data of serie event. ## SerieHandler where T -> .SerieHandler where T / Subclasses: [SerieHandler<T>](#seriehandlert) +> class in / Subclasses: [SerieHandler<T>](#seriehandlert) + ## SerieHandler<T> -> XCharts.Runtime.SerieHandler<T> : [SerieHandler where T](#seriehandler where t),[Serie](#serie) +> class in XCharts.Runtime / Inherits from: [SerieHandler where T](#seriehandler where t),[Serie](#serie) + |public method|since|description| |--|--|--| @@ -1121,7 +2525,8 @@ the data of serie event. ## SerieHandlerAttribute -> XCharts.Runtime.SerieHandlerAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| @@ -1130,7 +2535,8 @@ the data of serie event. ## SerieHelper -> XCharts.Runtime.SerieHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1174,7 +2580,8 @@ the data of serie event. ## SerieLabelHelper -> XCharts.Runtime.SerieLabelHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1184,7 +2591,8 @@ the data of serie event. ## SerieLabelPool -> XCharts.Runtime.SerieLabelPool +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1194,17 +2602,20 @@ the data of serie event. ## SerieParams -> XCharts.Runtime.SerieParams +> class in XCharts.Runtime + ## SeriesHelper -> XCharts.Runtime.SeriesHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| |GetLastStackSerie()||public static Serie GetLastStackSerie(List<Serie> series, Serie serie)
获得上一个同堆叠且显示的serie。 | |GetLegalSerieNameList()||public static List<string> GetLegalSerieNameList(List<Serie> series)| |GetMaxSerieDataCount()||public static int GetMaxSerieDataCount(List<Serie> series)| +|GetMinAnimationDuration()||public static float GetMinAnimationDuration(List<Serie> series)| |GetNameColor()||public static Color GetNameColor(BaseChart chart, int index, string name)| |GetStackSeries()||public static void GetStackSeries(List<Serie> series, ref Dictionary<int, List<Serie>> stackSeries)
获得堆叠系列列表 | |IsAnyClipSerie()||public static bool IsAnyClipSerie(List<Serie> series)
是否有需裁剪的serie。 | @@ -1216,29 +2627,145 @@ the data of serie event. |UpdateSerieNameList()||public static void UpdateSerieNameList(BaseChart chart, ref List<string> serieNameList)
获得所有系列名,不包含空名字。 | |UpdateStackDataList()||public static void UpdateStackDataList(List<Serie> series, Serie currSerie, DataZoom dataZoom, List<List<SerieData>> dataList)| +## SerieSymbol + +> class in XCharts.Runtime / Inherits from: [SymbolStyle](#symbolstyle),[ISerieDataComponent](#iseriedatacomponent) + +系列数据项的标记的图形 + +|public method|since|description| +|--|--|--| +|GetSize()||public float GetSize(List<double> data, float themeSize)
根据指定的sizeType获得标记的大小 | +|Reset()||public override void Reset()| +|ShowSymbol()||public bool ShowSymbol(int dataIndex, int dataCount)| + +## SerieTheme + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(SerieTheme theme)| +|SerieTheme()||public SerieTheme(ThemeType theme)| + +## Settings + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) + +Global parameter setting component. The default value can be used in general, and can be adjusted when necessary. + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(Settings settings)| +|Reset()||public override void Reset()| + +## SimplifiedBar + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer),[ISimplifiedSerie](#isimplifiedserie) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static SimplifiedBar ConvertSerie(Serie serie)| + ## SimplifiedBarChart -> XCharts.Runtime.SimplifiedBarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## SimplifiedCandlestick + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer),[ISimplifiedSerie](#isimplifiedserie) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static SimplifiedCandlestick ConvertSerie(Serie serie)| ## SimplifiedCandlestickChart -> XCharts.Runtime.SimplifiedCandlestickChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + + +## SimplifiedLine + +> class in XCharts.Runtime / Inherits from: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer),[ISimplifiedSerie](#isimplifiedserie) + + +|public method|since|description| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static SimplifiedLine ConvertSerie(Serie serie)| ## SimplifiedLineChart -> XCharts.Runtime.SimplifiedLineChart : [BaseChart](#basechart) +> class in XCharts.Runtime / Inherits from: [BaseChart](#basechart) + ## Since -> XCharts.Runtime.Since : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / Inherits from: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + |public method|since|description| |--|--|--| |Since()||public Since(string version)| +## SingleAxis + +> class in XCharts.Runtime / Inherits from: [Axis](#axis),[IUpdateRuntimeData](#iupdateruntimedata) + +Single axis. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + +## SingleAxisCoord + +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem) + + +## StageColor + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +|public method|since|description| +|--|--|--| +|StageColor()||public StageColor(float percent, Color32 color)| + +## StateStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle) + +> Since `v3.2.0` + +the state style of serie. + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Reset()||public void Reset()| + +## SubTitleTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) + + +|public method|since|description| +|--|--|--| +|SubTitleTheme()||public SubTitleTheme(ThemeType theme) : base(theme)| + ## SVG -> XUGL.SVG +> class in XUGL + |public method|since|description| |--|--|--| @@ -1248,11 +2775,13 @@ the data of serie event. ## SVGImage -> XCharts.Runtime.SVGImage : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) +> class in XCharts.Runtime / Inherits from: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) + ## SVGPath -> XUGL.SVGPath +> class in XUGL + |public method|since|description| |--|--|--| @@ -1262,23 +2791,170 @@ the data of serie event. ## SVGPathSeg -> XUGL.SVGPathSeg +> class in XUGL + |public method|since|description| |--|--|--| |SVGPathSeg()||public SVGPathSeg(SVGPathSegType type)| +## SymbolStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [SerieSymbol](#seriesymbol) + +系列数据项的标记的图形 + +|public method|since|description| +|--|--|--| +|GetColor()||public Color32 GetColor(Color32 defaultColor)| +|Reset()||public virtual void Reset()| + +## TextLimit + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end.Only valid in the category axis. + +|public method|since|description| +|--|--|--| +|Clone()||public TextLimit Clone()| +|Copy()||public void Copy(TextLimit textLimit)| +|GetLimitContent()||public string GetLimitContent(string content)| +|SetRelatedText()||public void SetRelatedText(ChartText txt, float labelWidth)| + +## TextPadding + +> class in XCharts.Runtime / Inherits from: [Padding](#padding) + +Settings related to text. + +|public method|since|description| +|--|--|--| +|TextPadding()||public TextPadding() { }| +|TextPadding()||public TextPadding(float top, float right, float bottom, float left)| + +## TextStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +Settings related to text. + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(TextStyle textStyle)| +|GetAlignment()||public TextAnchor GetAlignment(TextAnchor defaultAlignment)| +|GetColor()||public Color GetColor(Color defaultColor)| +|GetFontSize()||public int GetFontSize(ComponentTheme defaultTheme)| +|TextStyle()||public TextStyle() { }| +|TextStyle()||public TextStyle(int fontSize)| +|TextStyle()||public TextStyle(int fontSize, FontStyle fontStyle)| +|TextStyle()||public TextStyle(int fontSize, FontStyle fontStyle, Color color)| +|TextStyle()||public TextStyle(int fontSize, FontStyle fontStyle, Color color, int rorate)| +|UpdateAlignmentByLocation()||public void UpdateAlignmentByLocation(Location location)| + +## Theme + +> class in XCharts.Runtime / Inherits from: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=scriptableobject) + +Theme. + +|public method|since|description| +|--|--|--| +|CheckWarning()||public void CheckWarning(StringBuilder sb)| +|CloneTheme()||public Theme CloneTheme()
克隆主题。 | +|CopyTheme()||public bool CopyTheme(ThemeType theme)| +|CopyTheme()||public void CopyTheme(Theme theme)
copy all configurations from theme. | +|GetColor()||public Color32 GetColor(int index)
Gets the color of the specified index from the palette. | +|GetColor()||public static Color32 GetColor(string hexColorStr)
Convert the html string to color. | +|GetColorStr()||public string GetColorStr(int index)
Gets the hexadecimal color string of the specified index from the palette. | +|GetHashCode()||public override int GetHashCode()| +|ResetTheme()||public bool ResetTheme()
Clear all custom configurations. | +|ResetToDarkTheme()||public static void ResetToDarkTheme(Theme theme)
dark theme. | +|ResetToDefaultTheme()||public static void ResetToDefaultTheme(Theme theme)
default theme. | +|SetColorPalette()||public void SetColorPalette(List<string> hexColorStringList)| +|SetDefaultFont()||public void SetDefaultFont()| +|SyncFontToSubComponent()||public void SyncFontToSubComponent()| +|SyncTMPFontToSubComponent()||public void SyncTMPFontToSubComponent()| + +## ThemeStyle + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +Theme. + +|public method|since|description| +|--|--|--| +|CheckWarning()||public void CheckWarning(StringBuilder sb)| +|GetBackgroundColor()||public Color32 GetBackgroundColor(Background background)| +|GetColor()||public Color32 GetColor(int index)
Gets the color of the specified index from the palette. | +|GetColor()||public static Color32 GetColor(string hexColorStr)
Convert the html string to color. | +|GetColorStr()||public string GetColorStr(int index)
Gets the hexadecimal color string of the specified index from the palette. | +|SyncSharedThemeColorToCustom()||public void SyncSharedThemeColorToCustom()| + +## Title + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged) + +Title component, including main title and subtitle. + +|public method|since|description| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|OnChanged()||public void OnChanged()| + +## TitleStyle + +> class in XCharts.Runtime / Inherits from: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieComponent](#iseriecomponent) + +the title of serie. + +## TitleTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) + + +|public method|since|description| +|--|--|--| +|TitleTheme()||public TitleTheme(ThemeType theme) : base(theme)| + +## Tooltip + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) + +Tooltip component. + +|public method|since|description| +|--|--|--| +|AddSerieDataIndex()||public void AddSerieDataIndex(int serieIndex, int dataIndex)| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()| +|ClearSerieDataIndex()||public void ClearSerieDataIndex()| +|GetContentLabelStyle()||public LabelStyle GetContentLabelStyle(int index)| +|IsActive()||public bool IsActive()
提示框是否显示 | +|isAnySerieDataIndex()||public bool isAnySerieDataIndex()| +|IsSelected()||public bool IsSelected()
当前提示框是否选中数据项 | +|IsSelected()||public bool IsSelected(int index)
指定索引的数据项是否被提示框选中 | +|IsTriggerAxis()||public bool IsTriggerAxis()| +|IsTriggerItem()||public bool IsTriggerItem()| +|KeepTop()||public void KeepTop()
Keep Tooltiop displayed at the top. | +|SetActive()||public void SetActive(bool flag)
设置Tooltip组件是否显示 | +|SetContentActive()||public void SetContentActive(bool flag)
设置文本框是否显示 | +|UpdateContentPos()||public void UpdateContentPos(Vector2 pos, float width, float height)
更新文本框位置 | + ## TooltipContext -> XCharts.Runtime.TooltipContext +> class in XCharts.Runtime + ## TooltipData -> XCharts.Runtime.TooltipData +> class in XCharts.Runtime + ## TooltipHelper -> XCharts.Runtime.TooltipHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1287,9 +2963,20 @@ the data of serie event. |IsIgnoreFormatter()||public static bool IsIgnoreFormatter(string itemFormatter)| |LimitInRect()||public static void LimitInRect(Tooltip tooltip, Rect chartRect)| +## TooltipTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) + + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(TooltipTheme theme)| +|TooltipTheme()||public TooltipTheme(ThemeType theme) : base(theme)| + ## TooltipView -> XCharts.Runtime.TooltipView +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1303,11 +2990,13 @@ the data of serie event. ## TooltipViewItem -> XCharts.Runtime.TooltipViewItem +> class in XCharts.Runtime + ## UGL -> XUGL.UGL +> class in XUGL + UGUI Graphics Library. |public method|since|description| @@ -1338,11 +3027,13 @@ UGUI Graphics Library. ## UGLExample -> XUGL.UGLExample : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) +> class in XUGL / Inherits from: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) + ## UGLHelper -> XUGL.UGLHelper +> class in XUGL + |public method|since|description| |--|--|--| @@ -1372,29 +3063,63 @@ UGUI Graphics Library. ## UIComponent -> XCharts.Runtime.UIComponent : [BaseGraph](#basegraph) +> class in XCharts.Runtime / Inherits from: [BaseGraph](#basegraph) + UI组件基类。 |public method|since|description| |--|--|--| +|SetAllDirty()||public override void SetAllDirty()| +|SetDataDirty()|v3.9.0|public void SetDataDirty()| +|SetVerticesDirty()||public override void SetVerticesDirty()| |UpdateTheme()||public bool UpdateTheme(ThemeType theme)
Update chart theme. | +## UIComponentTheme + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + ## UIHelper -> XCharts.Runtime.UIHelper +> class in XCharts.Runtime + UI帮助类。 |public method|since|description| |--|--|--| |GetBackgroundColor()||public static Color32 GetBackgroundColor(UIComponent component)| +## VisualMap + +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) + +VisualMap component. Mapping data to visual elements such as colors. + +|public method|since|description| +|--|--|--| +|AddColors()||public void AddColors(List<Color32> colors)| +|AddColors()||public void AddColors(List<string> colors)| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|GetColor()||public Color32 GetColor(double value)| +|GetIndex()||public int GetIndex(double value)| +|GetValue()||public double GetValue(Vector3 pos, Rect chartRect)| +|IsInRangeMaxRect()||public bool IsInRangeMaxRect(Vector3 local, Rect chartRect, float triangleLen)| +|IsInRangeMinRect()||public bool IsInRangeMinRect(Vector3 local, Rect chartRect, float triangleLen)| +|IsInRangeRect()||public bool IsInRangeRect(Vector3 local, Rect chartRect)| +|IsInRect()||public bool IsInRect(Vector3 local, Rect chartRect, float triangleLen = 20)| +|IsInSelectedValue()||public bool IsInSelectedValue(double value)| +|IsPiecewise()||public bool IsPiecewise()| + ## VisualMapContext -> XCharts.Runtime.VisualMapContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / Inherits from: [MainComponentContext](#maincomponentcontext) + ## VisualMapHelper -> XCharts.Runtime.VisualMapHelper +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1405,9 +3130,39 @@ UI帮助类。 |IsNeedLineGradient()||public static bool IsNeedLineGradient(VisualMap visualMap)| |SetMinMax()||public static void SetMinMax(VisualMap visualMap, double min, double max)| +## VisualMapRange + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + + +|public method|since|description| +|--|--|--| +|Contains()||public bool Contains(double value, double minMaxRange)| + +## VisualMapTheme + +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) + + +|public method|since|description| +|--|--|--| +|Copy()||public void Copy(VisualMapTheme theme)| +|VisualMapTheme()||public VisualMapTheme(ThemeType theme) : base(theme)| + +## XAxis + +> class in XCharts.Runtime / Inherits from: [Axis](#axis) + +The x axis in cartesian(rectangular) coordinate. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()
The x axis in cartesian(rectangular) coordinate. | + ## XChartsMgr -> XCharts.Runtime.XChartsMgr +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1424,15 +3179,39 @@ UI帮助类。 ## XCResourceImporterWindow -> XCharts.Runtime.XCResourceImporterWindow : [UnityEditor.EditorWindow](https://docs.unity3d.com/ScriptReference/30_search.html?q=unityeditor.editorwindow) +> class in XCharts.Runtime / Inherits from: [UnityEditor.EditorWindow](https://docs.unity3d.com/ScriptReference/30_search.html?q=unityeditor.editorwindow) + |public method|since|description| |--|--|--| |ShowPackageImporterWindow()||public static void ShowPackageImporterWindow()| +## XCResourcesImporter + +> class in XCharts.Runtime + + +|public method|since|description| +|--|--|--| +|OnDestroy()||public void OnDestroy() { }| +|OnGUI()||public void OnGUI()| +|XCResourcesImporter()||public XCResourcesImporter() { }| + +## XCSettings + +> class in XCharts.Runtime / Inherits from: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=scriptableobject) + + +|public method|since|description| +|--|--|--| +|AddCustomTheme()||public static bool AddCustomTheme(Theme theme)| +|ExistAssetFile()||public static bool ExistAssetFile()| +|GetSettingAssetPath()||public static string GetSettingAssetPath()| + ## XCThemeMgr -> XCharts.Runtime.XCThemeMgr +> class in XCharts.Runtime + |public method|since|description| |--|--|--| @@ -1453,7 +3232,8 @@ UI帮助类。 ## XLog -> XCharts.Runtime.XLog : [MonoBehaviour](#monobehaviour) +> class in XCharts.Runtime / Inherits from: [MonoBehaviour](#monobehaviour) + Log system. Used to output logs with date and log type, support output to file, support custom output log type. |public method|since|description| @@ -1474,3 +3254,13 @@ Log system. Used to output logs with date and log type, support output to file, |Vital()||public static void Vital(string log)| |Warning()||public static void Warning(string log)| +## YAxis + +> class in XCharts.Runtime / Inherits from: [Axis](#axis) + +The x axis in cartesian(rectangular) coordinate. + +|public method|since|description| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()
The x axis in cartesian(rectangular) coordinate. | + diff --git a/Documentation~/en/changelog.md b/Documentation~/en/changelog.md index 5d64d0f9..8e22b6d6 100644 --- a/Documentation~/en/changelog.md +++ b/Documentation~/en/changelog.md @@ -2,6 +2,7 @@ # 更新日志 [master](#master) +[v3.9.0](#v390) [v3.8.1](#v381) [v3.8.0](#v380) [v3.7.0](#v370) @@ -64,6 +65,46 @@ ## master +## v3.9.0 + +Highlights: + +* Added `Animation` in `Axis` to improve the animation effect of data changes +* Added `minorTick` for `Log` type of `Axis` +* Added MarkLine's `onTop` setting to displayed at the top level +* Perfect code comments and documentation +* Fixed several issues + +Extended features: + +* `UITable` adds the carousel function +* `UITable` adds data api and callback functions +* `Pie3DChart` optimizes rendering performance + +Log details: + +* (2023.12.01) Release `v3.9.0` +* (2023.12.01) Fixed inaccurate display of Tooltip's `titleFormatter` set to `{b}` +* (2023.11.30) Added support for `SerieData` to add `Label` separately +* (2023.11.28) Fix to `Tooltip` incorrectly indicating the number line +* (2023.11.24) fixed inaccurate return values in Chart's `UpdateData()` interface +* (2023.11.24) Fix to `Axis` not working smoothly when updating data +* (2023.11.23) Added Animation support for Axis +* (2023.11.16) Cancel `Legend`'s `formatter` and replace it with `LabelStyle` +* (2023.11.14) Improved annotation and documentation for LabelStyle's formatter (#291) +* (2023.11.11) Fix to comments Documentation for some comments in `Documentation` (#290) +* (2023.11.11) fixed an issue where Legend's formatter didn't refresh automatically when data was changed +* (2023.11.05) Fix to SerieEventData's value always being 0 (#287) +* (2023.11.03) Fix to abnormal mouse movement when setting `Bar` gradient (#285) +* (2023.11.02) Optimizes ignoring of formatter when SerieData is set to ignore +* (2023.11.01) Added whether MarkLine's `onTop` setting is displayed at the top level +* (2023.10.21) Fix to `Label` location exception when `Pie` has 0 data +* (2023.10.21) Added subscale support for `Axis` +* (2023.10.19) Fixed abnormal lead line when `Pie` set rose chart +* (2023.10.15) Fixed Animation exception when `Line` was set to `AlongPath` (#281) +* (2023.10.12) Fixed invalid value axis when `MarkLine` specified `yValue` +* (2023.10.11) Fixed invalid setting of `Serie` `showDataDimension` + ## v3.8.1 * (2023.10.02) Release `v3.8.1` version @@ -104,7 +145,7 @@ Log details: * (2023.08.22) Fixed `Bar` display hidden drawing performance exception * (2023.08.22) Improved Zebra histogram rendering performance (#276) * (2023.08.16) Added Daemon daemon to resolve an error after TMP is enabled locally -* (2023.08.15) Fixed `Data` displaying axes incorrectly when data is between -1 and 1 (#273) (by __Ambitroc__) +* (2023.08.15) Fixed `Data` displaying axes incorrectly when data is between -1 and 1 (#273) (by **Ambitroc**) * (2023.08.14) Fixed `XCharts` updating error after` TextMeshPro `and` NewInputSystem `are enabled locally (#272) * (2023.08.12) Fixed `Chart` error when deleted at runtime (#269) * (2023.08.11) Fixed an issue where data could not be added when DataZoom was enabled @@ -145,7 +186,7 @@ Log details: * (2022.06.08) Release v3.7.0 * (2023.06.04) Added `HelpDoc` help document skip -* (2023.05.30) Fixed Serie name with `_` line causing `Legend` to not fire (#252) (by __svr2kos2__) +* (2023.05.30) Fixed Serie name with `_` line causing `Legend` to not fire (#252) (by **svr2kos2**) * (2023.05.10) Added `MinMaxAuto` range type for `Axis` * (2023.05.10) Added support for `Clip` for `Line` * (2023.05.04) Fixed `Axis` setting` CeilRate `not taking effect in range -1 to 1 @@ -164,9 +205,9 @@ Log details: * (2023.04.01) Release `v3.6.0` version * (2023.03.14) Fix for Tooltip's `titleFormater` setting `{b}` may not take effect -* (2023.03.14) Fix for `BarChart` not drawing bar background when data is 0 (#250) (by __Ambitroc__) +* (2023.03.14) Fix for `BarChart` not drawing bar background when data is 0 (#250) (by **Ambitroc**) * (2023.03.12) Added `LabelStyle` `autoRotate` to set automatic rotation of angled vertical text -* (2023.03.10) Added `VR` and other non-mouse input for Point location acquisition (#248) (by __Ambitroc__) +* (2023.03.10) Added `VR` and other non-mouse input for Point location acquisition (#248) (by **Ambitroc**) * (2023.03.09) Adds callbacks to Chart's `onSerieClick`, `onSerieDown`, `onSerieEnter` and `onSerieExit` * (2023.03.09) Fixed click-check offset for `Pie` not taking effect * (2023.03.04) Added Positions for Legend to customize legend positions @@ -180,7 +221,7 @@ Log details: * (2023.02.02) Fixed bug where datazoom xaxis label could be displayed off-chart when datazoom is turned on * (2023.02.02) Optimizes the `ignore` setting of `SerieData` to ignore data * (2023.02.01) Fix `XChartsMgr.ContainsChart()` interface exception -* (2023.01.31) Added support for `InputSystem` (#242) (by __Bian-Sh__) +* (2023.01.31) Added support for `InputSystem` (#242) (by **Bian-Sh**) * (2023.01.11) Fixed chart not refreshing after removing Component from Inspector (#241) * (2023.01.06) Fixed bug with `Pie` displaying abnormal Label when the last few values are 0 (#240) * (2023.01.03) deletes serie `MarkColor` and adds ItemStyle `MarkColor` diff --git a/Documentation~/en/configuration.md b/Documentation~/en/configuration.md index 1e5c6e26..6a1674d9 100644 --- a/Documentation~/en/configuration.md +++ b/Documentation~/en/configuration.md @@ -81,6 +81,7 @@ import APITable from '@site/src/components/APITable'; - [AnimationStyle](#animationstyle) - [AreaStyle](#areastyle) - [ArrowStyle](#arrowstyle) +- [AxisAnimation](#axisanimation) - [AxisLabel](#axislabel) - [AxisLine](#axisline) - [AxisMinorSplitLine](#axisminorsplitline) @@ -197,7 +198,7 @@ import APITable from '@site/src/components/APITable'; ## AngleAxis -> XCharts.Runtime.AngleAxis : [Axis](#axis) +> class in XCharts.Runtime / Inherits from: [Axis](#axis) Angle axis of Polar Coordinate. @@ -216,11 +217,11 @@ Angle axis of Polar Coordinate. ## AngleAxisTheme -> XCharts.Runtime.AngleAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) ## AnimationAddition -> XCharts.Runtime.AnimationAddition : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) > Since `v3.8.0` @@ -228,7 +229,7 @@ Data addition animation. ## AnimationChange -> XCharts.Runtime.AnimationChange : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) > Since `v3.8.0` @@ -236,7 +237,7 @@ Data change animation. ## AnimationFadeIn -> XCharts.Runtime.AnimationFadeIn : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) > Since `v3.8.0` @@ -244,7 +245,7 @@ Fade in animation. ## AnimationFadeOut -> XCharts.Runtime.AnimationFadeOut : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) > Since `v3.8.0` @@ -252,7 +253,7 @@ Fade out animation. ## AnimationHiding -> XCharts.Runtime.AnimationHiding : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) > Since `v3.8.0` @@ -260,7 +261,7 @@ Data hiding animation. ## AnimationInfo -> XCharts.Runtime.AnimationInfo / Subclasses: [AnimationFadeIn](#animationfadein), [AnimationFadeOut](#animationfadeout), [AnimationChange](#animationchange), [AnimationAddition](#animationaddition), [AnimationHiding](#animationhiding), [AnimationInteraction](#animationinteraction) +> class in XCharts.Runtime / Subclasses: [AnimationFadeIn](#animationfadein), [AnimationFadeOut](#animationfadeout), [AnimationChange](#animationchange), [AnimationAddition](#animationaddition), [AnimationHiding](#animationhiding), [AnimationInteraction](#animationinteraction) > Since `v3.8.0` @@ -284,7 +285,7 @@ the animation info. ## AnimationInteraction -> XCharts.Runtime.AnimationInteraction : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / Inherits from: [AnimationInfo](#animationinfo) > Since `v3.8.0` @@ -307,7 +308,7 @@ Interactive animation of charts. ## AnimationStyle -> XCharts.Runtime.AnimationStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) the animation of serie. support animation type: fadeIn, fadeOut, change, addition. @@ -336,7 +337,7 @@ the animation of serie. support animation type: fadeIn, fadeOut, change, additio ## AreaStyle -> XCharts.Runtime.AreaStyle : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) The style of area. @@ -361,7 +362,7 @@ The style of area. ## ArrowStyle -> XCharts.Runtime.ArrowStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -382,7 +383,7 @@ The style of area. ## Axis -> XCharts.Runtime.Axis : [MainComponent](#maincomponent) / Subclasses: [AngleAxis](#angleaxis), [ParallelAxis](#parallelaxis), [RadiusAxis](#radiusaxis), [SingleAxis](#singleaxis), [XAxis](#xaxis), [YAxis](#yaxis) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) / Subclasses: [AngleAxis](#angleaxis), [ParallelAxis](#parallelaxis), [RadiusAxis](#radiusaxis), [SingleAxis](#singleaxis), [XAxis](#xaxis), [YAxis](#yaxis) The axis in rectangular coordinate. @@ -421,6 +422,7 @@ The axis in rectangular coordinate. |axisLabel|||axis label. [AxisLabel](#axislabel)| |splitLine|||axis split line. [AxisSplitLine](#axissplitline)| |splitArea|||axis split area. [AxisSplitArea](#axissplitarea)| +|animation|||animation of axis. [AxisAnimation](#axisanimation)| |minorTick||v3.2.0|axis minor tick. [AxisMinorTick](#axisminortick)| |minorSplitLine||v3.2.0|axis minor split line. [AxisMinorSplitLine](#axisminorsplitline)| |indicatorLabel||v3.4.0|Style of axis tooltip indicator label. [LabelStyle](#labelstyle)| @@ -429,9 +431,32 @@ The axis in rectangular coordinate. ``` +## AxisAnimation + +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +> Since `v3.9.0` + +animation style of axis. + +```mdx-code-block + +``` + + +|field|default|since|comment| +|--|--|--|--| +|show|true||whether to enable animation. +|duration|||the duration of animation (ms). When it is set to 0, the animation duration will be automatically calculated according to the serie. +|unscaledTime|||Animation updates independently of Time.timeScale. + +```mdx-code-block + +``` + ## AxisLabel -> XCharts.Runtime.AxisLabel : [LabelStyle](#labelstyle) +> class in XCharts.Runtime / Inherits from: [LabelStyle](#labelstyle) Settings related to axis label. @@ -456,7 +481,7 @@ Settings related to axis label. ## AxisLine -> XCharts.Runtime.AxisLine : [BaseLine](#baseline) +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) Settings related to axis line. @@ -477,7 +502,7 @@ Settings related to axis line. ## AxisMinorSplitLine -> XCharts.Runtime.AxisMinorSplitLine : [BaseLine](#baseline) +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) > Since `v3.2.0` @@ -499,7 +524,7 @@ Minor split line of axis in grid area. ## AxisMinorTick -> XCharts.Runtime.AxisMinorTick : [BaseLine](#baseline) +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) > Since `v3.2.0` @@ -521,7 +546,7 @@ Settings related to axis minor tick. ## AxisName -> XCharts.Runtime.AxisName : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) the name of axis. @@ -543,7 +568,7 @@ the name of axis. ## AxisSplitArea -> XCharts.Runtime.AxisSplitArea : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) Split area of axis in grid area, not shown by default. @@ -563,7 +588,7 @@ Split area of axis in grid area, not shown by default. ## AxisSplitLine -> XCharts.Runtime.AxisSplitLine : [BaseLine](#baseline) +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) Split line of axis in grid area. @@ -586,11 +611,11 @@ Split line of axis in grid area. ## AxisTheme -> XCharts.Runtime.AxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) ## AxisTick -> XCharts.Runtime.AxisTick : [BaseLine](#baseline) +> class in XCharts.Runtime / Inherits from: [BaseLine](#baseline) Settings related to axis tick. @@ -615,7 +640,7 @@ Settings related to axis tick. ## Background -> XCharts.Runtime.Background : [MainComponent](#maincomponent) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) Background component. @@ -638,11 +663,11 @@ Background component. ## Bar -> XCharts.Runtime.Bar : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## BaseAxisTheme -> XCharts.Runtime.BaseAxisTheme : [ComponentTheme](#componenttheme) / Subclasses: [AxisTheme](#axistheme), [RadiusAxisTheme](#radiusaxistheme), [AngleAxisTheme](#angleaxistheme), [PolarAxisTheme](#polaraxistheme), [RadarAxisTheme](#radaraxistheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) / Subclasses: [AxisTheme](#axistheme), [RadiusAxisTheme](#radiusaxistheme), [AngleAxisTheme](#angleaxistheme), [PolarAxisTheme](#polaraxistheme), [RadarAxisTheme](#radaraxistheme) ```mdx-code-block @@ -671,7 +696,7 @@ Background component. ## BaseLine -> XCharts.Runtime.BaseLine : [ChildComponent](#childcomponent) / Subclasses: [AxisLine](#axisline), [AxisMinorSplitLine](#axisminorsplitline), [AxisMinorTick](#axisminortick), [AxisSplitLine](#axissplitline), [AxisTick](#axistick) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [AxisLine](#axisline), [AxisMinorSplitLine](#axisminorsplitline), [AxisMinorTick](#axisminortick), [AxisSplitLine](#axissplitline), [AxisTick](#axistick) Settings related to base line. @@ -691,15 +716,15 @@ Settings related to base line. ## BaseScatter -> XCharts.Runtime.BaseScatter : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) / Subclasses: [EffectScatter](#effectscatter), [Scatter](#scatter) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) / Subclasses: [EffectScatter](#effectscatter), [Scatter](#scatter) ## BaseSerie -> XCharts.Runtime.BaseSerie / Subclasses: [Serie](#serie) +> class in XCharts.Runtime / Subclasses: [Serie](#serie) ## BlurStyle -> XCharts.Runtime.BlurStyle : [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) > Since `v3.2.0` @@ -707,23 +732,23 @@ Configurations of blur state. ## CalendarCoord -> XCharts.Runtime.CalendarCoord : [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) ## Candlestick -> XCharts.Runtime.Candlestick : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## ChartText -> XCharts.Runtime.ChartText +> class in XCharts.Runtime ## ChildComponent -> XCharts.Runtime.ChildComponent / Subclasses: [AnimationStyle](#animationstyle), [AxisName](#axisname), [AxisSplitArea](#axissplitarea), [AreaStyle](#areastyle), [ArrowStyle](#arrowstyle), [BaseLine](#baseline), [IconStyle](#iconstyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [Level](#level), [LevelStyle](#levelstyle), [LineArrow](#linearrow), [LineStyle](#linestyle), [Location](#location), [MLValue](#mlvalue), [MarqueeStyle](#marqueestyle), [Padding](#padding), [StageColor](#stagecolor), [SymbolStyle](#symbolstyle), [TextLimit](#textlimit), [TextStyle](#textstyle), [CommentItem](#commentitem), [CommentMarkStyle](#commentmarkstyle), [LabelLine](#labelline), [LabelStyle](#labelstyle), [MarkAreaData](#markareadata), [MarkLineData](#marklinedata), [StateStyle](#statestyle), [VisualMapRange](#visualmaprange), [UIComponentTheme](#uicomponenttheme), [SerieData](#seriedata), [ComponentTheme](#componenttheme), [SerieTheme](#serietheme), [ThemeStyle](#themestyle) +> class in XCharts.Runtime / Subclasses: [AnimationStyle](#animationstyle), [AxisAnimation](#axisanimation), [AxisName](#axisname), [AxisSplitArea](#axissplitarea), [AreaStyle](#areastyle), [ArrowStyle](#arrowstyle), [BaseLine](#baseline), [IconStyle](#iconstyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [Level](#level), [LevelStyle](#levelstyle), [LineArrow](#linearrow), [LineStyle](#linestyle), [Location](#location), [MLValue](#mlvalue), [MarqueeStyle](#marqueestyle), [Padding](#padding), [StageColor](#stagecolor), [SymbolStyle](#symbolstyle), [TextLimit](#textlimit), [TextStyle](#textstyle), [CommentItem](#commentitem), [CommentMarkStyle](#commentmarkstyle), [LabelLine](#labelline), [LabelStyle](#labelstyle), [MarkAreaData](#markareadata), [MarkLineData](#marklinedata), [StateStyle](#statestyle), [VisualMapRange](#visualmaprange), [UIComponentTheme](#uicomponenttheme), [SerieData](#seriedata), [ComponentTheme](#componenttheme), [SerieTheme](#serietheme), [ThemeStyle](#themestyle) ## Comment -> XCharts.Runtime.Comment : [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) comment of chart. @@ -745,7 +770,7 @@ comment of chart. ## CommentItem -> XCharts.Runtime.CommentItem : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) comment of chart. @@ -769,7 +794,7 @@ comment of chart. ## CommentMarkStyle -> XCharts.Runtime.CommentMarkStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) the comment mark style. @@ -789,7 +814,7 @@ the comment mark style. ## ComponentTheme -> XCharts.Runtime.ComponentTheme : [ChildComponent](#childcomponent) / Subclasses: [BaseAxisTheme](#baseaxistheme), [DataZoomTheme](#datazoomtheme), [LegendTheme](#legendtheme), [SubTitleTheme](#subtitletheme), [TitleTheme](#titletheme), [TooltipTheme](#tooltiptheme), [VisualMapTheme](#visualmaptheme) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [BaseAxisTheme](#baseaxistheme), [DataZoomTheme](#datazoomtheme), [LegendTheme](#legendtheme), [SubTitleTheme](#subtitletheme), [TitleTheme](#titletheme), [TooltipTheme](#tooltiptheme), [VisualMapTheme](#visualmaptheme) ```mdx-code-block @@ -810,13 +835,13 @@ the comment mark style. ## CoordSystem -> XCharts.Runtime.CoordSystem : [MainComponent](#maincomponent) / Subclasses: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord), [SingleAxisCoord](#singleaxiscoord) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) / Subclasses: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord), [SingleAxisCoord](#singleaxiscoord) Coordinate system component. ## DataZoom -> XCharts.Runtime.DataZoom : [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) DataZoom component is used for zooming a specific area, which enables user to investigate data in detail, or get an overview of the data, or get rid of outlier points. @@ -866,7 +891,7 @@ DataZoom component is used for zooming a specific area, which enables user to in ## DataZoomTheme -> XCharts.Runtime.DataZoomTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) ```mdx-code-block @@ -889,7 +914,7 @@ DataZoom component is used for zooming a specific area, which enables user to in ## DebugInfo -> XCharts.Runtime.DebugInfo +> class in XCharts.Runtime ```mdx-code-block @@ -910,11 +935,11 @@ DataZoom component is used for zooming a specific area, which enables user to in ## EffectScatter -> XCharts.Runtime.EffectScatter : [BaseScatter](#basescatter) +> class in XCharts.Runtime / Inherits from: [BaseScatter](#basescatter) ## EmphasisStyle -> XCharts.Runtime.EmphasisStyle : [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) > Since `v3.2.0` @@ -937,11 +962,11 @@ Configurations of emphasis state. ## EndLabelStyle -> XCharts.Runtime.EndLabelStyle : [LabelStyle](#labelstyle) +> class in XCharts.Runtime / Inherits from: [LabelStyle](#labelstyle) ## GridCoord -> XCharts.Runtime.GridCoord : [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) Grid component. @@ -969,7 +994,7 @@ Grid component. ## GridLayout -> XCharts.Runtime.GridLayout : [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) > Since `v3.8.0` @@ -998,7 +1023,7 @@ Grid layout component. Used to manage the layout of multiple `GridCoord`, and th ## Heatmap -> XCharts.Runtime.Heatmap : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ```mdx-code-block @@ -1015,7 +1040,7 @@ Grid layout component. Used to manage the layout of multiple `GridCoord`, and th ## IconStyle -> XCharts.Runtime.IconStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -1041,7 +1066,7 @@ Grid layout component. Used to manage the layout of multiple `GridCoord`, and th ## ImageStyle -> XCharts.Runtime.ImageStyle : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) ```mdx-code-block @@ -1064,7 +1089,7 @@ Grid layout component. Used to manage the layout of multiple `GridCoord`, and th ## Indicator -> XCharts.Runtime.Indicator +> class in XCharts.Runtime Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart. @@ -1106,37 +1131,37 @@ Indicator of radar chart, which is used to assign multiple variables(dimensions) ## INeedSerieContainer -> XCharts.Runtime.INeedSerieContainer / Subclasses: [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Radar](#radar), [BaseScatter](#basescatter) +> class in XCharts.Runtime / Subclasses: [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Radar](#radar), [BaseScatter](#basescatter) ## IPropertyChanged -> XCharts.Runtime.IPropertyChanged / Subclasses: [Location](#location), [Comment](#comment), [Legend](#legend), [Title](#title) +> class in XCharts.Runtime / Subclasses: [Location](#location), [Comment](#comment), [Legend](#legend), [Title](#title) 属性变更接口 ## ISerieComponent -> XCharts.Runtime.ISerieComponent / Subclasses: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [LineArrow](#linearrow), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) +> class in XCharts.Runtime / Subclasses: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [LineArrow](#linearrow), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) The interface for serie component. ## ISerieContainer -> XCharts.Runtime.ISerieContainer / Subclasses: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord) +> class in XCharts.Runtime / Subclasses: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord) ## ISerieDataComponent -> XCharts.Runtime.ISerieDataComponent / Subclasses: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [LineStyle](#linestyle), [SerieSymbol](#seriesymbol), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) +> class in XCharts.Runtime / Subclasses: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [LineStyle](#linestyle), [SerieSymbol](#seriesymbol), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) The interface for serie data component. ## ISimplifiedSerie -> XCharts.Runtime.ISimplifiedSerie / Subclasses: [SimplifiedBar](#simplifiedbar), [SimplifiedCandlestick](#simplifiedcandlestick), [SimplifiedLine](#simplifiedline) +> class in XCharts.Runtime / Subclasses: [SimplifiedBar](#simplifiedbar), [SimplifiedCandlestick](#simplifiedcandlestick), [SimplifiedLine](#simplifiedline) ## ItemStyle -> XCharts.Runtime.ItemStyle : [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) 图形样式。 @@ -1174,11 +1199,11 @@ The interface for serie data component. ## IUpdateRuntimeData -> XCharts.Runtime.IUpdateRuntimeData / Subclasses: [SingleAxis](#singleaxis), [DataZoom](#datazoom), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [GridLayout](#gridlayout), [ParallelCoord](#parallelcoord) +> class in XCharts.Runtime / Subclasses: [SingleAxis](#singleaxis), [DataZoom](#datazoom), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [GridLayout](#gridlayout), [ParallelCoord](#parallelcoord) ## LabelLine -> XCharts.Runtime.LabelLine : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) 标签的引导线 @@ -1207,7 +1232,7 @@ The interface for serie data component. ## LabelStyle -> XCharts.Runtime.LabelStyle : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) / Subclasses: [AxisLabel](#axislabel), [EndLabelStyle](#endlabelstyle), [TitleStyle](#titlestyle) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) / Subclasses: [AxisLabel](#axislabel), [EndLabelStyle](#endlabelstyle), [TitleStyle](#titlestyle) Text label of chart, to explain some data information about graphic item like value, name and so on. @@ -1220,13 +1245,13 @@ Text label of chart, to explain some data information about graphic item like va |--|--|--|--| |show|true||Whether the label is showed. |Position|||The position of label. -|autoOffset|false||是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 +|autoOffset|false||Whether to automatically offset. When turned on, the Y offset will automatically determine the opening of the curve to determine whether to offset up or down. |offset|||offset to the host graphic element. |rotate|||Rotation of label. |autoRotate|false|v3.6.0|auto rotate of label. -|distance|||距离轴线的距离。 -|formatter|||formatter of label. -|numericFormatter|||Standard numeric format strings. +|distance|||the distance of label to axis line. +|formatter|||label content string template formatter. \n line wrapping is supported. Formatters for some components will not take effect.
Template placeholder have the following, some of which apply only to fixed components:
`{.}` : indicates the dot mark.
`{a}` : indicates the series name.
`{b}` : category value or data name.
`{c}` : data value.
`{d}` : percentage.
`{e}` : indicates the data name.
`{f}` : data sum.
`{g}` : indicates the total number of data.
`{h}` : hexadecimal color value.
`{value}` : The value of the axis or legend.
The following placeholder apply to `UITable` components:
`{name}` : indicates the row name of the table.
`{index}` : indicates the row number of the table.
The following placeholder apply to `UIStatistc` components:
`{title}` : title text.
`{dd}` : day.
`{hh}` : hours.
`{mm}` : minutes.
`{ss}` : second.
`{fff}` : milliseconds.
`{d}` : day.
`{h}` : hours.
`{m}` : minutes.
`{s}` : second.
`{f}` : milliseconds.
Example :{b}:{c}
+|numericFormatter|||Standard number and date format string. Used to format a Double value or a DateTime date as a string. numericFormatter is used as an argument to either `Double.ToString ()` or `DateTime.ToString()`.
The number format uses the Axx format: A is a single-character format specifier that supports C currency, D decimal, E exponent, F fixed-point number, G regular, N digit, P percentage, R round trip, and X hexadecimal. xx is precision specification, from 0-99. E.g. F1, E2
Date format Common date formats are: yyyy year, MM month, dd day, HH hour, mm minute, ss second, fff millisecond. For example: yyyy-MM-dd HH:mm:ss
number format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
date format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
|width|0||the width of label. If set as default value 0, it means than the label width auto set as the text width. |height|0||the height of label. If set as default value 0, it means than the label height auto set as the text height. |icon|||the sytle of icon. [IconStyle](#iconstyle)| @@ -1240,21 +1265,21 @@ Text label of chart, to explain some data information about graphic item like va ## Lang -> XCharts.Runtime.Lang : [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) +> class in XCharts.Runtime / Inherits from: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) Language. ## LangCandlestick -> XCharts.Runtime.LangCandlestick +> class in XCharts.Runtime ## LangTime -> XCharts.Runtime.LangTime +> class in XCharts.Runtime ## Legend -> XCharts.Runtime.Legend : [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) Legend component.The legend component shows different sets of tags, colors, and names. You can control which series are not displayed by clicking on the legend. @@ -1275,8 +1300,7 @@ Legend component.The legend component shows different sets of tags, colors, and |itemGap|10f||The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout. |itemAutoColor|true||Whether the legend symbol matches the color automatically. |itemOpacity|1||the opacity of item color. -|formatter|||Legend content string template formatter. Support for wrapping lines with \n. Template:{value}. -|numericFormatter|||Standard numeric format strings. +|formatter|||No longer used, the use of LabelStyle.formatter instead. |labelStyle|||the style of text. [LabelStyle](#labelstyle)| |data|||Data array of legend. An array item is usually a name representing string. (If it is a pie chart, it could also be the name of a single data in the pie chart) of a series. If data is not specified, it will be auto collected from series. |icons|||自定义的图例标记图形。 @@ -1291,7 +1315,7 @@ Legend component.The legend component shows different sets of tags, colors, and ## LegendTheme -> XCharts.Runtime.LegendTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) ```mdx-code-block @@ -1308,7 +1332,7 @@ Legend component.The legend component shows different sets of tags, colors, and ## Level -> XCharts.Runtime.Level : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -1327,7 +1351,7 @@ Legend component.The legend component shows different sets of tags, colors, and ## LevelStyle -> XCharts.Runtime.LevelStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -1345,11 +1369,11 @@ Legend component.The legend component shows different sets of tags, colors, and ## Line -> XCharts.Runtime.Line : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## LineArrow -> XCharts.Runtime.LineArrow : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent) ```mdx-code-block @@ -1368,7 +1392,7 @@ Legend component.The legend component shows different sets of tags, colors, and ## LineStyle -> XCharts.Runtime.LineStyle : [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) The style of line. @@ -1397,7 +1421,7 @@ The style of line. ## Location -> XCharts.Runtime.Location : [ChildComponent](#childcomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent), [IPropertyChanged](#ipropertychanged) Location type. Quick to set the general location. @@ -1420,11 +1444,11 @@ Location type. Quick to set the general location. ## MainComponent -> XCharts.Runtime.MainComponent : [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / Subclasses: [Axis](#axis), [Background](#background), [Comment](#comment), [DataZoom](#datazoom), [Legend](#legend), [MarkArea](#markarea), [MarkLine](#markline), [Settings](#settings), [Title](#title), [Tooltip](#tooltip), [VisualMap](#visualmap), [GridLayout](#gridlayout), [CoordSystem](#coordsystem) +> class in XCharts.Runtime / Inherits from: [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / Subclasses: [Axis](#axis), [Background](#background), [Comment](#comment), [DataZoom](#datazoom), [Legend](#legend), [MarkArea](#markarea), [MarkLine](#markline), [Settings](#settings), [Title](#title), [Tooltip](#tooltip), [VisualMap](#visualmap), [GridLayout](#gridlayout), [CoordSystem](#coordsystem) ## MarkArea -> XCharts.Runtime.MarkArea : [MainComponent](#maincomponent) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) Used to mark an area in chart. For example, mark a time interval. @@ -1449,7 +1473,7 @@ Used to mark an area in chart. For example, mark a time interval. ## MarkAreaData -> XCharts.Runtime.MarkAreaData : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) 标域的数据。 @@ -1474,7 +1498,7 @@ Used to mark an area in chart. For example, mark a time interval. ## MarkLine -> XCharts.Runtime.MarkLine : [MainComponent](#maincomponent) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) Use a line in the chart to illustrate. @@ -1487,6 +1511,7 @@ Use a line in the chart to illustrate. |--|--|--|--| |show|true||Whether to display the marking line. |serieIndex|0||The serie index of markLine. +|onTop|true|v3.9.0|whether the markline is on top. |animation|||The animation of markline. [AnimationStyle](#animationstyle)| |data|||A list of marked data. When the group of data item is 0, each data item represents a line; When the group is not 0, two data items of the same group represent the starting point and the ending point of the line respectively to form a line. In this case, the relevant style parameters of the line are the parameters of the starting point. @@ -1496,7 +1521,9 @@ Use a line in the chart to illustrate. ## MarkLineData -> XCharts.Runtime.MarkLineData : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) + +> Since `v3.9.0` Data of marking line. @@ -1527,7 +1554,7 @@ Data of marking line. ## MarqueeStyle -> XCharts.Runtime.MarqueeStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) > Since `v3.5.0` @@ -1551,7 +1578,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 ## MLValue -> XCharts.Runtime.MLValue : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) > Since `v3.8.0` @@ -1573,7 +1600,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 ## Padding -> XCharts.Runtime.Padding : [ChildComponent](#childcomponent) / Subclasses: [TextPadding](#textpadding) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [TextPadding](#textpadding) padding setting of item or text. @@ -1596,15 +1623,15 @@ padding setting of item or text. ## Parallel -> XCharts.Runtime.Parallel : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## ParallelAxis -> XCharts.Runtime.ParallelAxis : [Axis](#axis) +> class in XCharts.Runtime / Inherits from: [Axis](#axis) ## ParallelCoord -> XCharts.Runtime.ParallelCoord : [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) Grid component. @@ -1629,7 +1656,7 @@ Grid component. ## Pie -> XCharts.Runtime.Pie : [Serie](#serie) +> class in XCharts.Runtime / Inherits from: [Serie](#serie) ```mdx-code-block @@ -1646,11 +1673,11 @@ Grid component. ## PolarAxisTheme -> XCharts.Runtime.PolarAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) ## PolarCoord -> XCharts.Runtime.PolarCoord : [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis. @@ -1673,7 +1700,7 @@ Polar coordinate can be used in scatter and line chart. Every polar coordinate h ## Radar -> XCharts.Runtime.Radar : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ```mdx-code-block @@ -1690,35 +1717,35 @@ Polar coordinate can be used in scatter and line chart. Every polar coordinate h ## RadarAxisTheme -> XCharts.Runtime.RadarAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) ## RadarCoord -> XCharts.Runtime.RadarCoord : [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。 ## RadiusAxis -> XCharts.Runtime.RadiusAxis : [Axis](#axis) +> class in XCharts.Runtime / Inherits from: [Axis](#axis) Radial axis of polar coordinate. ## RadiusAxisTheme -> XCharts.Runtime.RadiusAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / Inherits from: [BaseAxisTheme](#baseaxistheme) ## Ring -> XCharts.Runtime.Ring : [Serie](#serie) +> class in XCharts.Runtime / Inherits from: [Serie](#serie) ## Scatter -> XCharts.Runtime.Scatter : [BaseScatter](#basescatter) +> class in XCharts.Runtime / Inherits from: [BaseScatter](#basescatter) ## SelectStyle -> XCharts.Runtime.SelectStyle : [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) > Since `v3.2.0` @@ -1726,7 +1753,7 @@ Configurations of select state. ## Serie -> XCharts.Runtime.Serie : [BaseSerie](#baseserie), [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / Subclasses: [SerieHandler<T>](#seriehandlert), [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Pie](#pie), [Radar](#radar), [Ring](#ring), [BaseScatter](#basescatter) +> class in XCharts.Runtime / Inherits from: [BaseSerie](#baseserie), [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / Subclasses: [SerieHandler<T>](#seriehandlert), [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Pie](#pie), [Radar](#radar), [Ring](#ring), [BaseScatter](#basescatter) 系列。系列一般由数据和配置组成,用来表示具体的图表图形,如折线图的一条折线,柱图的一组柱子等。一个图表中可以包含多个不同类型的系列。 @@ -1816,7 +1843,7 @@ Configurations of select state. ## SerieData -> XCharts.Runtime.SerieData : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) A data item of serie. @@ -1843,7 +1870,7 @@ A data item of serie. ## SerieSymbol -> XCharts.Runtime.SerieSymbol : [SymbolStyle](#symbolstyle), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / Inherits from: [SymbolStyle](#symbolstyle), [ISerieDataComponent](#iseriedatacomponent) 系列数据项的标记的图形 @@ -1871,7 +1898,7 @@ A data item of serie. ## SerieTheme -> XCharts.Runtime.SerieTheme : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -1895,7 +1922,7 @@ A data item of serie. ## Settings -> XCharts.Runtime.Settings : [MainComponent](#maincomponent) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) Global parameter setting component. The default value can be used in general, and can be adjusted when necessary. @@ -1927,19 +1954,19 @@ Global parameter setting component. The default value can be used in general, an ## SimplifiedBar -> XCharts.Runtime.SimplifiedBar : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) ## SimplifiedCandlestick -> XCharts.Runtime.SimplifiedCandlestick : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) ## SimplifiedLine -> XCharts.Runtime.SimplifiedLine : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) +> class in XCharts.Runtime / Inherits from: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) ## SingleAxis -> XCharts.Runtime.SingleAxis : [Axis](#axis), [IUpdateRuntimeData](#iupdateruntimedata) +> class in XCharts.Runtime / Inherits from: [Axis](#axis), [IUpdateRuntimeData](#iupdateruntimedata) Single axis. @@ -1964,11 +1991,11 @@ Single axis. ## SingleAxisCoord -> XCharts.Runtime.SingleAxisCoord : [CoordSystem](#coordsystem) +> class in XCharts.Runtime / Inherits from: [CoordSystem](#coordsystem) ## StageColor -> XCharts.Runtime.StageColor : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -1986,7 +2013,7 @@ Single axis. ## StateStyle -> XCharts.Runtime.StateStyle : [ChildComponent](#childcomponent) / Subclasses: [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle) > Since `v3.2.0` @@ -2013,11 +2040,11 @@ the state style of serie. ## SubTitleTheme -> XCharts.Runtime.SubTitleTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) ## SymbolStyle -> XCharts.Runtime.SymbolStyle : [ChildComponent](#childcomponent) / Subclasses: [SerieSymbol](#seriesymbol) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) / Subclasses: [SerieSymbol](#seriesymbol) 系列数据项的标记的图形 @@ -2045,7 +2072,7 @@ the state style of serie. ## TextLimit -> XCharts.Runtime.TextLimit : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) Text character limitation and adaptation component. When the length of the text exceeds the set length, it is cropped and suffixes are appended to the end.Only valid in the category axis. @@ -2067,13 +2094,13 @@ Text character limitation and adaptation component. When the length of the text ## TextPadding -> XCharts.Runtime.TextPadding : [Padding](#padding) +> class in XCharts.Runtime / Inherits from: [Padding](#padding) Settings related to text. ## TextStyle -> XCharts.Runtime.TextStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) Settings related to text. @@ -2106,7 +2133,7 @@ Settings related to text. ## Theme -> XCharts.Runtime.Theme : [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) +> class in XCharts.Runtime / Inherits from: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) Theme. @@ -2140,7 +2167,7 @@ Theme. ## ThemeStyle -> XCharts.Runtime.ThemeStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) Theme. @@ -2165,7 +2192,7 @@ Theme. ## Title -> XCharts.Runtime.Title : [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) Title component, including main title and subtitle. @@ -2190,17 +2217,17 @@ Title component, including main title and subtitle. ## TitleStyle -> XCharts.Runtime.TitleStyle : [LabelStyle](#labelstyle), [ISerieDataComponent](#iseriedatacomponent), [ISerieComponent](#iseriecomponent) +> class in XCharts.Runtime / Inherits from: [LabelStyle](#labelstyle), [ISerieDataComponent](#iseriedatacomponent), [ISerieComponent](#iseriecomponent) the title of serie. ## TitleTheme -> XCharts.Runtime.TitleTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) ## Tooltip -> XCharts.Runtime.Tooltip : [MainComponent](#maincomponent) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) Tooltip component. @@ -2216,13 +2243,13 @@ Tooltip component. |trigger|||Type of triggering.
`Tooltip.Trigger`:
- `Item`: Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts.
- `Axis`: Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts.
- `None`: Trigger nothing.
- `Auto`: Auto select trigger according to serie type.
| |position||v3.3.0|Type of position.
`Tooltip.Position`:
- `Auto`: Auto. The mobile platform is displayed at the top, and the non-mobile platform follows the mouse position.
- `Custom`: Custom. Fully customize display position (x,y).
- `FixedX`: Just fix the coordinate X. Y follows the mouse position.
- `FixedY`:
| |itemFormatter|||a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. Template variables are {.}, {a}, {b}, {c}, {d}.
{.} is the dot of the corresponding color of a Serie that is currently indicated or whose index is 0.
{a} is the series name of the serie that is currently indicated or whose index is 0.
{b} is the name of the data item serieData that is currently indicated or whose index is 0, or a category value (such as the X-axis of a line chart).
{c} is the value of a Y-dimension (dimesion is 1) from a Serie that is currently indicated or whose index is 0.
{d} is the percentage value of Y-dimensions (dimesion is 1) from serie that is currently indicated or whose index is 0, with no % sign.
{e} is the name of the data item serieData that is currently indicated or whose index is 0.
{f} is sum of data.
{.1} represents a dot from serie corresponding color that specifies index as 1.
1 in {a1}, {b1}, {c1} represents a serie that specifies an index of 1.
{c1:2} represents the third data from serie's current indication data item indexed to 1 (a data item has multiple data, index 2 represents the third data).
{c1:2-2} represents the third data item from serie's third data item indexed to 1 (i.e., which data item must be specified to specify).
{d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).
{d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).
Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"
-|titleFormatter|||The string template formatter for the tooltip title content. Support for wrapping lines with \n. The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. Template see itemFormatter. +|titleFormatter|||String template formatter for tooltip title content. \n line wrapping is supported. The placeholder {i} can be set separately to indicate that title is ignored and not displayed. Template variables are {.}, {a}, {b}, {c}, {d}, {e}, {f}, and {g}.
{.} is the dot of the corresponding color of serie currently indicated or index 0.
{a} is the series name name of serie currently indicated or index 0.
{b} is the name of the serie data item serieData currently indicated or index 0, or the category value (such as the X-axis of a line chart).
{c} is the value of the serie y-dimension (dimesion is 1) currently indicated or index is 0.
{d} is the serie y-dimensional (dimesion 1) percentage value of the currently indicated or index 0, note without the % sign.
{e} is the name of the serie data item serieData currently indicated or whose index is 0.
{h} is the hexadecimal color value of serieData for the serie data item currently indicated or index 0.
{f} is the sum of data.
{g} indicates the total number of data.
{.1} represents a dot of the corresponding color with serie specified as index 1.
The 1 in {a1}, {b1}, {c1} represents serie where index is specified as 1.
{c1:2} represents the third data of the current indicator data item in serie with index 1 (one data item has multiple data, index 2 represents the third data).
{c1:2-2} represents the third data of serie third data item with index 1 (that is, the number of data items must be specified when specifying the number of data items).
{d1:2:f2} indicates that a format string with a single value is f2 (numericFormatter is used if no value is specified).
{d:0.##} indicates that the format string with a value specified alone is 0.## # (for percentages, preserving a 2-digit significant number while avoiding the "100.00%" situation with f2).
example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1}, {c1:1-1: f1}" |marker|||the marker of serie. |fixedWidth|0||Fixed width. Higher priority than minWidth. |fixedHeight|0||Fixed height. Higher priority than minHeight. |minWidth|0||Minimum width. If fixedWidth has a value, get fixedWidth first. |minHeight|0||Minimum height. If fixedHeight has a value, take priority over fixedHeight. -|numericFormatter|||Standard numeric format string. Used to format numeric values to display as strings. Using 'Axx' form: 'A' is the single character of the format specifier, supporting 'C' currency, 'D' decimal, 'E' exponent, 'F' number of vertices, 'G' regular, 'N' digits, 'P' percentage, 'R' round tripping, 'X' hex etc. 'XX' is the precision specification, from '0' - '99'. +|numericFormatter|||Standard number and date format string. Used to format a Double value or a DateTime date as a string. numericFormatter is used as an argument to either `Double.ToString ()` or `DateTime.ToString()`.
The number format uses the Axx format: A is a single-character format specifier that supports C currency, D decimal, E exponent, F fixed-point number, G regular, N digit, P percentage, R round trip, and X hexadecimal. xx is precision specification, from 0-99. E.g. F1, E2
Date format Common date formats are: yyyy year, MM month, dd day, HH hour, mm minute, ss second, fff millisecond. For example: yyyy-MM-dd HH:mm:ss
number format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
date format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings
|paddingLeftRight|10||the text padding of left and right. defaut:5. |paddingTopBottom|10||the text padding of top and bottom. defaut:5. |ignoreDataShow|false||Whether to show ignored data on tooltip. @@ -2249,7 +2276,7 @@ Tooltip component. ## TooltipTheme -> XCharts.Runtime.TooltipTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) ```mdx-code-block @@ -2271,7 +2298,7 @@ Tooltip component. ## UIComponentTheme -> XCharts.Runtime.UIComponentTheme : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -2290,7 +2317,7 @@ Tooltip component. ## VisualMap -> XCharts.Runtime.VisualMap : [MainComponent](#maincomponent) +> class in XCharts.Runtime / Inherits from: [MainComponent](#maincomponent) VisualMap component. Mapping data to visual elements such as colors. @@ -2334,7 +2361,7 @@ VisualMap component. Mapping data to visual elements such as colors. ## VisualMapRange -> XCharts.Runtime.VisualMapRange : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / Inherits from: [ChildComponent](#childcomponent) ```mdx-code-block @@ -2354,7 +2381,7 @@ VisualMap component. Mapping data to visual elements such as colors. ## VisualMapTheme -> XCharts.Runtime.VisualMapTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / Inherits from: [ComponentTheme](#componenttheme) ```mdx-code-block @@ -2374,17 +2401,17 @@ VisualMap component. Mapping data to visual elements such as colors. ## XAxis -> XCharts.Runtime.XAxis : [Axis](#axis) +> class in XCharts.Runtime / Inherits from: [Axis](#axis) The x axis in cartesian(rectangular) coordinate. ## XCResourcesImporter -> XCharts.Runtime.XCResourcesImporter +> class in XCharts.Runtime ## XCSettings -> XCharts.Runtime.XCSettings : [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) +> class in XCharts.Runtime / Inherits from: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) ```mdx-code-block @@ -2435,7 +2462,7 @@ The x axis in cartesian(rectangular) coordinate. ## YAxis -> XCharts.Runtime.YAxis : [Axis](#axis) +> class in XCharts.Runtime / Inherits from: [Axis](#axis) The x axis in cartesian(rectangular) coordinate. diff --git a/Documentation~/en/faq.md b/Documentation~/en/faq.md index f615f2ca..31543977 100644 --- a/Documentation~/en/faq.md +++ b/Documentation~/en/faq.md @@ -1,9 +1,5 @@ # XCharts FAQ -[XCharts Homepage](https://github.com/XCharts-Team/XCharts)
-[XCharts API](XChartsAPI-EN.md)
-[XCharts Configuration](XChartsConfiguration-EN.md) - [QA 1: How to adjust the margin between the axis and the background?](#How-to-adjust-the-margin-between-the-axis-and-the=-background) [QA 2: How to play agian the fadeIn animation?](#How-to-play-agian-the-fadeIn-animation) [QA 3: How to customize the color of data item in line chart and pie chart?](#How-to-customize-the-color-of-data-item-in-line-chart-and-pie-chart) @@ -144,7 +140,3 @@ A: This is the limit of `UGUI` on the number of vertices for a single `Graphic`. ## Why-are-the-parameters-set-in-Serie-reset-after-they-run A: Check whether `RemoveData()` and add new `Serie` in the code. If you want to keep the configuration of `Serie`, you can only `ClearData()` which just clear data and then readd the data to the old serie. - -[XCharts Homepage](https://github.com/XCharts-Team/XCharts)
-[XCharts API](XChartsAPI-EN.md)
-[XCharts Configuration](XChartsConfiguration-EN.md) \ No newline at end of file diff --git a/Documentation~/en/tutorial01.md b/Documentation~/en/tutorial01.md index bf2e710f..9dd66ef8 100644 --- a/Documentation~/en/tutorial01.md +++ b/Documentation~/en/tutorial01.md @@ -99,7 +99,7 @@ Usually, `0000` indicates the theme default color, and 0 or null indicates the t Attach the `LineChart` script to the gameObject: -```C# +```csharp var chart = gameObject.GetComponent(); if (chart == null) { @@ -110,20 +110,20 @@ if (chart == null) Resize: -```C# +```csharp chart.SetSize(580, 300);//代码动态设置尺寸,或直接操作chart.rectTransform,或直接在Inspector上改 ``` Set the title: -```C# +```csharp var title = chart.EnsureChartComponent(); title.text = "Simple Line"; ``` Set whether prompt boxes and legends are displayed: -```C# +```csharp var tooltip = chart.EnsureChartComponent<Tooltip>(); tooltip.show = true; @@ -133,7 +133,7 @@ legend.show = false; Set axes: -```C# +```csharp var xAxis = chart.EnsureChartComponent<XAxis>(); xAxis.splitNumber = 10; xAxis.boundaryGap = true; @@ -145,14 +145,14 @@ yAxis.type = Axis.AxisType.Value; Clear default data and add `Line` type `Serie` for receiving data: -```C# +```csharp chart.RemoveData(); chart.AddSerie<Line>("line"); ``` Add 10 data: -```C# +```csharp for (int i = 0; i < 10; i++) { chart.AddXAxisData("x" + i); @@ -214,7 +214,7 @@ All parameters seen on Inspector can be modified with code, the key is to identi You need to obtain the component first, and then modify the parameters in it: -```C# +```csharp var title = chart.EnsureChartComponent<Title>(); title.text = "Simple LineChart"; title.subText = "normal line"; @@ -231,7 +231,7 @@ xAxis.type = Axis.AxisType.Category; For newly added Serie: -```C# +```csharp var serie = chart.AddSerie<Pie>(); serie.center[0] = 0.5f; serie.center[1] = 0.5f; @@ -243,7 +243,7 @@ serie.roundCap = true; For existing Serie: -```C# +```csharp var serie = chart.GetSerie<Pie>(); serie.center[0] = 0.5f; serie.center[1] = 0.5f; @@ -255,7 +255,7 @@ serie.roundCap = true; Add additional components to Serie: -```C# +```csharp serie.EnsureComponent<AreaStyle>(); var label = serie1.EnsureComponent<LabelStyle>(); @@ -264,7 +264,7 @@ label.offset = new Vector3(0,20,0); ### Change the parameter on the data item SerieData -```C# +```csharp var serieData = chart.AddData(0, 20); //var serieData = serie.GetSerieData(0); //从已有数据中获取 serieData.radius = 10; diff --git a/Documentation~/zh/api.md b/Documentation~/zh/api.md index 6acc461a..1e41b181 100644 --- a/Documentation~/zh/api.md +++ b/Documentation~/zh/api.md @@ -7,14 +7,46 @@ slug: /api ## 所有类 +- [AngleAxis](#angleaxis) +- [AngleAxisTheme](#angleaxistheme) +- [AnimationAddition](#animationaddition) +- [AnimationChange](#animationchange) +- [AnimationFadeIn](#animationfadein) +- [AnimationFadeOut](#animationfadeout) +- [AnimationHiding](#animationhiding) +- [AnimationInfo](#animationinfo) - [AnimationInfoContext](#animationinfocontext) +- [AnimationInteraction](#animationinteraction) +- [AnimationStyle](#animationstyle) - [AnimationStyleHelper](#animationstylehelper) +- [AreaStyle](#areastyle) +- [ArrowStyle](#arrowstyle) +- [Axis](#axis) +- [AxisAnimation](#axisanimation) - [AxisContext](#axiscontext) - [AxisHandler<T>](#axishandlert) - [AxisHelper](#axishelper) +- [AxisLabel](#axislabel) +- [AxisLine](#axisline) +- [AxisMinorSplitLine](#axisminorsplitline) +- [AxisMinorTick](#axisminortick) +- [AxisName](#axisname) +- [AxisSplitArea](#axissplitarea) +- [AxisSplitLine](#axissplitline) +- [AxisTheme](#axistheme) +- [AxisTick](#axistick) +- [Background](#background) +- [Bar](#bar) - [BarChart](#barchart) +- [BaseAxisTheme](#baseaxistheme) - [BaseChart](#basechart) - [BaseGraph](#basegraph) +- [BaseLine](#baseline) +- [BaseScatter](#basescatter) +- [BaseSerie](#baseserie) +- [BlurStyle](#blurstyle) +- [CalendarCoord](#calendarcoord) +- [Candlestick](#candlestick) - [CandlestickChart](#candlestickchart) - [ChartCached](#chartcached) - [ChartConst](#chartconst) @@ -22,22 +54,41 @@ slug: /api - [ChartHelper](#charthelper) - [ChartLabel](#chartlabel) - [ChartObject](#chartobject) +- [ChartText](#charttext) - [CheckHelper](#checkhelper) +- [ChildComponent](#childcomponent) - [ColorUtil](#colorutil) +- [Comment](#comment) +- [CommentItem](#commentitem) +- [CommentMarkStyle](#commentmarkstyle) - [ComponentHandlerAttribute](#componenthandlerattribute) - [ComponentHelper](#componenthelper) +- [ComponentTheme](#componenttheme) - [CoordOptionsAttribute](#coordoptionsattribute) +- [CoordSystem](#coordsystem) +- [DataZoom](#datazoom) - [DataZoomContext](#datazoomcontext) - [DataZoomHelper](#datazoomhelper) +- [DataZoomTheme](#datazoomtheme) - [DateTimeUtil](#datetimeutil) +- [DebugInfo](#debuginfo) - [DefaultAnimationAttribute](#defaultanimationattribute) - [DefaultTooltipAttribute](#defaulttooltipattribute) - [DefineSymbolsUtil](#definesymbolsutil) +- [EffectScatter](#effectscatter) +- [EmphasisStyle](#emphasisstyle) +- [EndLabelStyle](#endlabelstyle) - [FormatterHelper](#formatterhelper) +- [GridCoord](#gridcoord) - [GridCoordContext](#gridcoordcontext) +- [GridLayout](#gridlayout) - [GridLayoutContext](#gridlayoutcontext) +- [Heatmap](#heatmap) - [HeatmapChart](#heatmapchart) +- [IconStyle](#iconstyle) - [IgnoreDoc](#ignoredoc) +- [ImageStyle](#imagestyle) +- [Indicator](#indicator) - [INeedSerieContainer](#ineedseriecontainer) - [InputHelper](#inputhelper) - [InteractData](#interactdata) @@ -46,37 +97,75 @@ slug: /api - [ISerieContainer](#iseriecontainer) - [ISerieDataComponent](#iseriedatacomponent) - [ISimplifiedSerie](#isimplifiedserie) +- [ItemStyle](#itemstyle) - [IUpdateRuntimeData](#iupdateruntimedata) +- [LabelLine](#labelline) +- [LabelStyle](#labelstyle) +- [Lang](#lang) +- [LangCandlestick](#langcandlestick) +- [LangTime](#langtime) - [LayerHelper](#layerhelper) +- [Legend](#legend) - [LegendContext](#legendcontext) - [LegendHelper](#legendhelper) - [LegendItem](#legenditem) +- [LegendTheme](#legendtheme) +- [Level](#level) +- [LevelStyle](#levelstyle) +- [Line](#line) +- [LineArrow](#linearrow) - [LineChart](#linechart) +- [LineStyle](#linestyle) - [ListFor](#listfor) - [ListForComponent](#listforcomponent) - [ListForSerie](#listforserie) +- [Location](#location) +- [MainComponent](#maincomponent) - [MainComponentContext](#maincomponentcontext) - [MainComponentHandler](#maincomponenthandler) - [MainComponentHandler<T>](#maincomponenthandlert) +- [MarkArea](#markarea) +- [MarkAreaData](#markareadata) +- [MarkLine](#markline) +- [MarkLineData](#marklinedata) +- [MarqueeStyle](#marqueestyle) - [MathUtil](#mathutil) +- [MLValue](#mlvalue) - [MonoBehaviour](#monobehaviour) +- [Padding](#padding) - [Painter](#painter) +- [Parallel](#parallel) +- [ParallelAxis](#parallelaxis) - [ParallelChart](#parallelchart) +- [ParallelCoord](#parallelcoord) - [ParallelCoordContext](#parallelcoordcontext) +- [Pie](#pie) - [PieChart](#piechart) +- [PolarAxisTheme](#polaraxistheme) - [PolarChart](#polarchart) +- [PolarCoord](#polarcoord) - [PolarCoordContext](#polarcoordcontext) - [PropertyUtil](#propertyutil) +- [Radar](#radar) +- [RadarAxisTheme](#radaraxistheme) - [RadarChart](#radarchart) +- [RadarCoord](#radarcoord) - [RadarCoordContext](#radarcoordcontext) +- [RadiusAxis](#radiusaxis) +- [RadiusAxisTheme](#radiusaxistheme) - [ReflectionUtil](#reflectionutil) - [RequireChartComponentAttribute](#requirechartcomponentattribute) +- [Ring](#ring) - [RingChart](#ringchart) - [RuntimeUtil](#runtimeutil) +- [Scatter](#scatter) - [ScatterChart](#scatterchart) +- [SelectStyle](#selectstyle) +- [Serie](#serie) - [SerieComponentAttribute](#seriecomponentattribute) - [SerieContext](#seriecontext) - [SerieConvertAttribute](#serieconvertattribute) +- [SerieData](#seriedata) - [SerieDataComponentAttribute](#seriedatacomponentattribute) - [SerieDataContext](#seriedatacontext) - [SerieDataExtraFieldAttribute](#seriedataextrafieldattribute) @@ -90,60 +179,308 @@ slug: /api - [SerieLabelPool](#serielabelpool) - [SerieParams](#serieparams) - [SeriesHelper](#serieshelper) +- [SerieSymbol](#seriesymbol) +- [SerieTheme](#serietheme) +- [Settings](#settings) +- [SimplifiedBar](#simplifiedbar) - [SimplifiedBarChart](#simplifiedbarchart) +- [SimplifiedCandlestick](#simplifiedcandlestick) - [SimplifiedCandlestickChart](#simplifiedcandlestickchart) +- [SimplifiedLine](#simplifiedline) - [SimplifiedLineChart](#simplifiedlinechart) - [Since](#since) +- [SingleAxis](#singleaxis) +- [SingleAxisCoord](#singleaxiscoord) +- [StageColor](#stagecolor) +- [StateStyle](#statestyle) +- [SubTitleTheme](#subtitletheme) - [SVG](#svg) - [SVGImage](#svgimage) - [SVGPath](#svgpath) - [SVGPathSeg](#svgpathseg) +- [SymbolStyle](#symbolstyle) +- [TextLimit](#textlimit) +- [TextPadding](#textpadding) +- [TextStyle](#textstyle) +- [Theme](#theme) +- [ThemeStyle](#themestyle) +- [Title](#title) +- [TitleStyle](#titlestyle) +- [TitleTheme](#titletheme) +- [Tooltip](#tooltip) - [TooltipContext](#tooltipcontext) - [TooltipData](#tooltipdata) - [TooltipHelper](#tooltiphelper) +- [TooltipTheme](#tooltiptheme) - [TooltipView](#tooltipview) - [TooltipViewItem](#tooltipviewitem) - [UGL](#ugl) - [UGLExample](#uglexample) - [UGLHelper](#uglhelper) - [UIComponent](#uicomponent) +- [UIComponentTheme](#uicomponenttheme) - [UIHelper](#uihelper) +- [VisualMap](#visualmap) - [VisualMapContext](#visualmapcontext) - [VisualMapHelper](#visualmaphelper) +- [VisualMapRange](#visualmaprange) +- [VisualMapTheme](#visualmaptheme) +- [XAxis](#xaxis) - [XChartsMgr](#xchartsmgr) - [XCResourceImporterWindow](#xcresourceimporterwindow) +- [XCResourcesImporter](#xcresourcesimporter) +- [XCSettings](#xcsettings) - [XCThemeMgr](#xcthememgr) - [XLog](#xlog) +- [YAxis](#yaxis) +## AngleAxis + +> class in XCharts.Runtime / 继承自: [Axis](#axis) + +极坐标系的角度轴。 + +|API|版本|描述| +|--|--|--| +|GetValueAngle()||public float GetValueAngle(double value)| +|GetValueAngle()||public float GetValueAngle(float value)| +|SetDefaultValue()||public override void SetDefaultValue()| + +## AngleAxisTheme + +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) + + +|API|版本|描述| +|--|--|--| +|AngleAxisTheme()||public AngleAxisTheme(ThemeType theme) : base(theme) { }| + +## AnimationAddition + +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) + +> 从 `v3.8.0` 开始支持 + +数据新增动画。 + +## AnimationChange + +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) + +> 从 `v3.8.0` 开始支持 + +数据变更动画。 + +## AnimationFadeIn + +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) + +> 从 `v3.8.0` 开始支持 + +淡入动画。 + +## AnimationFadeOut + +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) + +> 从 `v3.8.0` 开始支持 + +淡出动画。 + +## AnimationHiding + +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) + +> 从 `v3.8.0` 开始支持 + +数据隐藏动画。 + +## AnimationInfo + +> class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein),[AnimationFadeOut](#animationfadeout),[AnimationChange](#animationchange),[AnimationAddition](#animationaddition),[AnimationHiding](#animationhiding),[AnimationInteraction](#animationinteraction) + +> 从 `v3.8.0` 开始支持 + +动画配置参数。 + +|API|版本|描述| +|--|--|--| +|End()||public void End()<br/>结束动画。 | +|GetIndexDelay()||public float GetIndexDelay(int dataIndex)<br/>获取动画延迟。 | +|Init()||public bool Init(float curr, float dest, int totalPointIndex)<br/>初始化动画。 | +|IsFinish()||public bool IsFinish()<br/>动画是否结束。 | +|IsInDelay()||public bool IsInDelay()<br/>动画是否在延迟中。 | +|IsInIndexDelay()||public bool IsInIndexDelay(int dataIndex)<br/>动画是否在索引延迟中。 | +|Pause()||public void Pause()<br/>暂停动画。 | +|Reset()||public void Reset()<br/>重置动画。 | +|Resume()||public void Resume()<br/>恢复动画。 | +|Start()||public void Start(bool reset = true)<br/>开始动画。 | + ## AnimationInfoContext -> XCharts.Runtime.AnimationInfoContext +> class in XCharts.Runtime + + +## AnimationInteraction + +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) + +> 从 `v3.8.0` 开始支持 + +交互动画。 + +|API|版本|描述| +|--|--|--| +|GetOffset()||public float GetOffset()| +|GetOffset()||public float GetOffset(float total)| +|GetRadius()||public float GetRadius(float radius)| +|GetWidth()||public float GetWidth(float width)| + +## AnimationStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +动画组件,用于控制图表的动画播放。支持配置五种动画表现:FadeIn(渐入动画),FadeOut(渐出动画),Change(变更动画),Addition(新增动画),Interaction(交互动画)。 按作用的对象可以分为两类:SerieAnimation(系列动画)和DataAnimation(数据动画)。 + +|API|版本|描述| +|--|--|--| +|Addition()||public void Addition()<br/>开始数据新增动画。 | +|CanCheckInteract()||public bool CanCheckInteract()| +|CheckDetailBreak()||public bool CheckDetailBreak(float detail)| +|CheckDetailBreak()||public bool CheckDetailBreak(Vector3 pos, bool isYAxis)| +|CheckProgress()||public void CheckProgress()| +|CheckProgress()||public void CheckProgress(double total)| +|CheckSymbol()||public void CheckSymbol(float dest)| +|FadeIn()||public void FadeIn()<br/>开始渐入动画。 | +|FadeOut()||public void FadeOut()<br/>开始渐出动画。 | +|GetAdditionDuration()||public float GetAdditionDuration()| +|GetChangeDuration()||public float GetChangeDuration()| +|GetCurrDetail()||public float GetCurrDetail()| +|GetCurrIndex()||public int GetCurrIndex()| +|GetCurrRate()||public float GetCurrRate()| +|GetInteractionDuration()||public float GetInteractionDuration()| +|GetInteractionRadius()||public float GetInteractionRadius(float radius)| +|GetSysmbolSize()||public float GetSysmbolSize(float dest)| +|HasFadeOut()||public bool HasFadeOut()| +|InitProgress()||public void InitProgress(float curr, float dest)<br/>初始化动画配置。 | +|InitProgress()||public void InitProgress(List<Vector3> paths, bool isY)<br/>初始化动画配置。 | +|IsDataAnimation()||public bool IsDataAnimation()<br/>是否为数据动画。BottomToTop和InsideOut类型的为数据动画。 | +|IsEnd()||public bool IsEnd()| +|IsFadeIn()||public bool IsFadeIn()| +|IsFadeOut()||public bool IsFadeOut()| +|IsFinish()||public bool IsFinish()| +|IsInDelay()||public bool IsInDelay()| +|IsSerieAnimation()||public bool IsSerieAnimation()<br/>是否为系列动画。LeftToRight、AlongPath和Clockwise类型的为系列动画。 | +|Pause()||public void Pause()<br/>暂停所有动画。 | +|Reset()||public void Reset()<br/>Reset all animations. | +|Restart()||public void Restart()<br/>重启当前激活的动画。 | +|Resume()||public void Resume()<br/>恢复所有动画。 | ## AnimationStyleHelper -> XCharts.Runtime.AnimationStyleHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |CheckDataAnimation()||public static float CheckDataAnimation(BaseChart chart, Serie serie, int dataIndex, float destProgress, float startPorgress = 0)| |GetAnimationPosition()||public static bool GetAnimationPosition(AnimationStyle animation, bool isY, Vector3 lp, Vector3 cp, float progress, ref Vector3 ip)| |UpdateAnimationType()||public static void UpdateAnimationType(AnimationStyle animation, AnimationType defaultType, bool enableSerieDataAnimation)| |UpdateSerieAnimation()||public static void UpdateSerieAnimation(Serie serie)| +## AreaStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +区域填充样式。 + +|API|版本|描述| +|--|--|--| +|GetColor()||public Color32 GetColor()| +|GetColor()||public Color32 GetColor(Color32 themeColor)| + +## ArrowStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +|API|版本|描述| +|--|--|--| +|Clone()||public ArrowStyle Clone()| +|Copy()||public void Copy(ArrowStyle arrow)| +|GetColor()||public Color32 GetColor(Color32 defaultColor)| + +## Axis + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) / 子类: [AngleAxis](#angleaxis),[ParallelAxis](#parallelaxis),[RadiusAxis](#radiusaxis),[SingleAxis](#singleaxis),[XAxis](#xaxis),[YAxis](#yaxis) + +直角坐标系的坐标轴组件。 + +|API|版本|描述| +|--|--|--| +|AddData()||public void AddData(string category)<br/>添加一个类目到类目数据列表 | +|AddIcon()||public void AddIcon(Sprite icon)<br/>添加图标 | +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()<br/>清空类目数据 | +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public Axis Clone()| +|Copy()||public void Copy(Axis axis)| +|GetData()||public string GetData(int index)<br/>获得指定索引的类目数据 | +|GetData()||public string GetData(int index, DataZoom dataZoom)<br/>获得在dataZoom范围内指定索引的类目数据 | +|GetDistance()||public float GetDistance(double value, float axisLength)<br/>获得值在坐标轴上的距离 | +|GetIcon()||public Sprite GetIcon(int index)| +|GetLabelValue()||public double GetLabelValue(int index)| +|GetLastLabelValue()||public double GetLastLabelValue()| +|GetLogMaxIndex()||public double GetLogMaxIndex()| +|GetLogMinIndex()||public double GetLogMinIndex()| +|GetLogValue()||public float GetLogValue(double value)| +|GetValueLength()||public float GetValueLength(double value, float axisLength)| +|IsBottom()||public bool IsBottom()| +|IsCategory()||public bool IsCategory()<br/>是否为类目轴。 | +|IsLeft()||public bool IsLeft()| +|IsLog()||public bool IsLog()<br/>是否为对数轴。 | +|IsNeedShowLabel()||public bool IsNeedShowLabel(int index, int total = 0)| +|IsRight()||public bool IsRight()| +|IsTime()||public bool IsTime()<br/>是否为时间轴。 | +|IsTop()||public bool IsTop()| +|IsValue()||public bool IsValue()<br/>是否为数值轴。 | +|RemoveData()||public void RemoveData(int dataIndex)| +|SetComponentDirty()||public override void SetComponentDirty()| +|SetNeedUpdateFilterData()||public void SetNeedUpdateFilterData()| +|UpdateData()||public void UpdateData(int index, string category)<br/>更新类目数据 | +|UpdateIcon()||public void UpdateIcon(int index, Sprite icon)<br/>更新图标 | +|UpdateZeroOffset()||public void UpdateZeroOffset(float axisLength)| + +## AxisAnimation + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +> 从 `v3.9.0` 开始支持 + +坐标轴动画配置。 + +|API|版本|描述| +|--|--|--| +|Clone()||public AxisAnimation Clone()| +|Copy()||public void Copy(AxisAnimation animation)| + ## AxisContext -> XCharts.Runtime.AxisContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + ## AxisHandler<T> -> XCharts.AxisHandler<T> : [MainComponentHandler](#maincomponenthandler) +> class in XCharts / 继承自: [MainComponentHandler](#maincomponenthandler) + ## AxisHelper -> XCharts.Runtime.AxisHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |AdjustCircleLabelPos()||public static void AdjustCircleLabelPos(ChartLabel txt, Vector3 pos, Vector3 cenPos, float txtHig, Vector3 offset)| |AdjustMinMaxValue()||public static void AdjustMinMaxValue(Axis axis, ref double minValue, ref double maxValue, bool needFormat, double ceilRate = 0)<br/>调整最大最小值 | @@ -167,15 +504,157 @@ slug: /api |GetYAxisXOrY()||public static float GetYAxisXOrY(GridCoord grid, Axis yAxis, Axis relativedAxis)| |NeedShowSplit()||public static bool NeedShowSplit(Axis axis)| +## AxisLabel + +> class in XCharts.Runtime / 继承自: [LabelStyle](#labelstyle) + +坐标轴刻度标签的相关设置。 + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|Clone()||public new AxisLabel Clone()| +|Copy()||public void Copy(AxisLabel axisLabel)| +|GetFormatterContent()||public override string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false)| +|GetFormatterContent()||public override string GetFormatterContent(int labelIndex, string category)| +|IsNeedShowLabel()||public bool IsNeedShowLabel(int index, int total)| +|SetRelatedText()||public void SetRelatedText(ChartText txt, float labelWidth)| + +## AxisLine + +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) + +坐标轴轴线。 + +|API|版本|描述| +|--|--|--| +|Clone()||public AxisLine Clone()| +|Copy()||public void Copy(AxisLine axisLine)| + +## AxisMinorSplitLine + +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) + +> 从 `v3.2.0` 开始支持 + +坐标轴在 grid 区域中的次分隔线。次分割线会对齐次刻度线 minorTick。 + +|API|版本|描述| +|--|--|--| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public AxisMinorSplitLine Clone()| +|Copy()||public void Copy(AxisMinorSplitLine splitLine)| + +## AxisMinorTick + +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) + +> 从 `v3.2.0` 开始支持 + +坐标轴次刻度相关设置。注意:次刻度无法在类目轴中使用。 + +|API|版本|描述| +|--|--|--| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public AxisMinorTick Clone()| +|Copy()||public void Copy(AxisMinorTick axisTick)| + +## AxisName + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +坐标轴名称。 + +|API|版本|描述| +|--|--|--| +|Clone()||public AxisName Clone()| +|Copy()||public void Copy(AxisName axisName)| + +## AxisSplitArea + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +坐标轴在 grid 区域中的分隔区域,默认不显示。 + +|API|版本|描述| +|--|--|--| +|Clone()||public AxisSplitArea Clone()| +|Copy()||public void Copy(AxisSplitArea splitArea)| +|GetColor()||public Color32 GetColor(int index, BaseAxisTheme theme)| + +## AxisSplitLine + +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) + +坐标轴在 grid 区域中的分隔线。 + +|API|版本|描述| +|--|--|--| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public AxisSplitLine Clone()| +|Copy()||public void Copy(AxisSplitLine splitLine)| + +## AxisTheme + +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) + + +|API|版本|描述| +|--|--|--| +|AxisTheme()||public AxisTheme(ThemeType theme) : base(theme) { }| + +## AxisTick + +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) + +坐标轴刻度相关设置。 + +|API|版本|描述| +|--|--|--| +|Clone()||public AxisTick Clone()| +|Copy()||public void Copy(AxisTick axisTick)| + +## Background + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) + +背景组件。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + +## Bar + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static Bar ConvertSerie(Serie serie)| + ## BarChart -> XCharts.Runtime.BarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## BaseAxisTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) / 子类: [AxisTheme](#axistheme),[RadiusAxisTheme](#radiusaxistheme),[AngleAxisTheme](#angleaxistheme),[PolarAxisTheme](#polaraxistheme),[RadarAxisTheme](#radaraxistheme) + + +|API|版本|描述| +|--|--|--| +|BaseAxisTheme()||public BaseAxisTheme(ThemeType theme) : base(theme)| +|Copy()||public void Copy(BaseAxisTheme theme)| ## BaseChart -> XCharts.Runtime.BaseChart : [BaseGraph](#basegraph),[ISerializationCallbackReceiver](https://docs.unity3d.com/ScriptReference/30_search.html?q=iserializationcallbackreceiver) / Subclasses: [BarChart](#barchart),[CandlestickChart](#candlestickchart),[HeatmapChart](#heatmapchart),[LineChart](#linechart),[ParallelChart](#parallelchart),[PieChart](#piechart),[PolarChart](#polarchart),[RadarChart](#radarchart),[RingChart](#ringchart),[ScatterChart](#scatterchart),[SimplifiedBarChart](#simplifiedbarchart),[SimplifiedCandlestickChart](#simplifiedcandlestickchart),[SimplifiedLineChart](#simplifiedlinechart) +> class in XCharts.Runtime / 继承自: [BaseGraph](#basegraph),[ISerializationCallbackReceiver](https://docs.unity3d.com/ScriptReference/30_search.html?q=iserializationcallbackreceiver) / 子类: [BarChart](#barchart),[CandlestickChart](#candlestickchart),[HeatmapChart](#heatmapchart),[LineChart](#linechart),[ParallelChart](#parallelchart),[PieChart](#piechart),[PolarChart](#polarchart),[RadarChart](#radarchart),[RingChart](#ringchart),[ScatterChart](#scatterchart),[SimplifiedBarChart](#simplifiedbarchart),[SimplifiedCandlestickChart](#simplifiedcandlestickchart),[SimplifiedLineChart](#simplifiedlinechart) -|public method|since|description| + +|API|版本|描述| |--|--|--| |onAxisPointerValueChanged||public Action<Axis, double> onAxisPointerValueChanged<br/>坐标轴变更数据索引时回调。参数:axis, dataIndex/dataValue | |onDraw||public Action<VertexHelper> onDraw<br/>自定义绘制回调。在绘制Serie前调用。 | @@ -364,9 +843,10 @@ slug: /api ## BaseGraph -> XCharts.Runtime.BaseGraph : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic),[IPointerDownHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointerdownhandler),[IPointerUpHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointeruphandler),[](#) / Subclasses: [BaseChart](#basechart),[UIComponent](#uicomponent) +> class in XCharts.Runtime / 继承自: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic),[IPointerDownHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointerdownhandler),[IPointerUpHandler](https://docs.unity3d.com/ScriptReference/30_search.html?q=ipointeruphandler),[](#) / 子类: [BaseChart](#basechart),[UIComponent](#uicomponent) -|public method|since|description| + +|API|版本|描述| |--|--|--| |onBeginDrag||public Action<PointerEventData, BaseGraph> onBeginDrag<br/>鼠标开始拖拽回调。 | |onDrag||public Action<PointerEventData, BaseGraph> onDrag<br/>鼠标拖拽回调。 | @@ -397,36 +877,114 @@ slug: /api |SetPainterDirty()||public void SetPainterDirty()<br/>重新初始化Painter | |SetSize()||public virtual void SetSize(float width, float height)<br/>设置图形的宽高(在非stretch pivot下才有效,其他情况需要自己调整RectTransform) | +## BaseLine + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [AxisLine](#axisline),[AxisMinorSplitLine](#axisminorsplitline),[AxisMinorTick](#axisminortick),[AxisSplitLine](#axissplitline),[AxisTick](#axistick) + +线条基础配置。 + +|API|版本|描述| +|--|--|--| +|BaseLine()||public BaseLine()| +|BaseLine()||public BaseLine(bool show) : base()| +|Copy()||public void Copy(BaseLine axisLine)| +|GetColor()||public Color32 GetColor(Color32 themeColor)| +|GetLength()||public float GetLength(float themeLength)| +|GetType()||public LineStyle.Type GetType(LineStyle.Type themeType)| +|GetWidth()||public float GetWidth(float themeWidth)| + +## BaseScatter + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) / 子类: [EffectScatter](#effectscatter),[Scatter](#scatter) + + +## BaseSerie + +> class in XCharts.Runtime / 子类: [Serie](#serie) + + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public static void ClearComponentDirty(ChildComponent component)| +|ClearComponentDirty()||public virtual void ClearComponentDirty()| +|ClearData()||public virtual void ClearData() { }| +|ClearDirty()||public virtual void ClearDirty()| +|ClearVerticesDirty()||public static void ClearVerticesDirty(ChildComponent component)| +|ClearVerticesDirty()||public virtual void ClearVerticesDirty()| +|IsComponentDirty()||public static bool IsComponentDirty(ChildComponent component)| +|IsVertsDirty()||public static bool IsVertsDirty(ChildComponent component)| +|OnAfterDeserialize()||public virtual void OnAfterDeserialize()| +|OnBeforeSerialize()||public virtual void OnBeforeSerialize() { }| +|OnDataUpdate()||public virtual void OnDataUpdate() { }| +|OnRemove()||public virtual void OnRemove()| +|RefreshLabel()||public void RefreshLabel()| +|SetAllDirty()||public virtual void SetAllDirty()| +|SetComponentDirty()||public virtual void SetComponentDirty()| +|SetVerticesDirty()||public virtual void SetVerticesDirty()| + +## BlurStyle + +> class in XCharts.Runtime / 继承自: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +> 从 `v3.2.0` 开始支持 + +淡出状态样式。 + +## CalendarCoord + +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem),[IUpdateRuntimeData](#iupdateruntimedata),[ISerieContainer](#iseriecontainer) + + +|API|版本|描述| +|--|--|--| +|IsPointerEnter()||public bool IsPointerEnter()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + +## Candlestick + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + ## CandlestickChart -> XCharts.Runtime.CandlestickChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + ## ChartCached -> XCharts.Runtime.ChartCached +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |ColorToDotStr()||public static string ColorToDotStr(Color color)| |ColorToStr()||public static string ColorToStr(Color color)| |FloatToStr()||public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0)| |GetSerieLabelName()||public static string GetSerieLabelName(string prefix, int i, int j)| +|GetString()||public static string GetString(string prefix, int suffix)| |IntToStr()||public static string IntToStr(int value, string numericFormatter = "")| |NumberToStr()||public static string NumberToStr(double value, string formatter)| ## ChartConst -> XCharts.Runtime.ChartConst +> class in XCharts.Runtime + ## ChartDrawer -> XCharts.Runtime.ChartDrawer +> class in XCharts.Runtime + ## ChartHelper -> XCharts.Runtime.ChartHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |ActiveAllObject()||public static void ActiveAllObject(Transform parent, bool active, string match = null)| |AddIcon()||public static Image AddIcon(string name, Transform parent, IconStyle iconStyle)| @@ -493,9 +1051,10 @@ slug: /api ## ChartLabel -> XCharts.Runtime.ChartLabel : [Image](https://docs.unity3d.com/ScriptReference/30_search.html?q=image) +> class in XCharts.Runtime / 继承自: [Image](https://docs.unity3d.com/ScriptReference/30_search.html?q=image) -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetHeight()||public float GetHeight()| |GetPosition()||public Vector3 GetPosition()| @@ -522,43 +1081,119 @@ slug: /api ## ChartObject -> XCharts.Runtime.ChartObject +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |Destroy()||public virtual void Destroy()| +## ChartText + +> class in XCharts.Runtime + + +|API|版本|描述| +|--|--|--| +|ChartText()||public ChartText()| +|ChartText()||public ChartText(GameObject textParent)| +|GetPreferredHeight()||public float GetPreferredHeight()| +|GetPreferredText()||public string GetPreferredText(string content, string suffix, float maxWidth)| +|GetPreferredWidth()||public float GetPreferredWidth()| +|GetPreferredWidth()||public float GetPreferredWidth(string content)| +|GetText()||public string GetText()| +|SetActive()||public void SetActive(bool flag)| +|SetAlignment()||public void SetAlignment(TextAnchor alignment)| +|SetColor()||public void SetColor(Color color)| +|SetFont()||public void SetFont(Font font)| +|SetFont()||public void SetFont(TMP_FontAsset font)| +|SetFontAndSizeAndStyle()||public void SetFontAndSizeAndStyle(TextStyle textStyle, ComponentTheme theme)| +|SetFontSize()||public void SetFontSize(float fontSize)| +|SetFontStyle()||public void SetFontStyle(FontStyle fontStyle)| +|SetLineSpacing()||public void SetLineSpacing(float lineSpacing)| +|SetLocalEulerAngles()||public void SetLocalEulerAngles(Vector3 position)| +|SetLocalPosition()||public void SetLocalPosition(Vector3 position)| +|SetRectPosition()||public void SetRectPosition(Vector3 position)| +|SetSizeDelta()||public void SetSizeDelta(Vector2 sizeDelta)| +|SetText()||public void SetText(string text)| + ## CheckHelper -> XCharts.Runtime.CheckHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |CheckChart()||public static string CheckChart(BaseChart chart)| |CheckChart()||public static string CheckChart(BaseGraph chart)| +## ChildComponent + +> class in XCharts.Runtime / 子类: [AnimationStyle](#animationstyle),[AxisAnimation](#axisanimation),[AxisName](#axisname),[AxisSplitArea](#axissplitarea),[AreaStyle](#areastyle),[ArrowStyle](#arrowstyle),[BaseLine](#baseline),[IconStyle](#iconstyle),[ImageStyle](#imagestyle),[ItemStyle](#itemstyle),[Level](#level),[LevelStyle](#levelstyle),[LineArrow](#linearrow),[LineStyle](#linestyle),[Location](#location),[MLValue](#mlvalue),[MarqueeStyle](#marqueestyle),[Padding](#padding),[StageColor](#stagecolor),[SymbolStyle](#symbolstyle),[TextLimit](#textlimit),[TextStyle](#textstyle),[CommentItem](#commentitem),[CommentMarkStyle](#commentmarkstyle),[LabelLine](#labelline),[LabelStyle](#labelstyle),[MarkAreaData](#markareadata),[MarkLineData](#marklinedata),[StateStyle](#statestyle),[VisualMapRange](#visualmaprange),[UIComponentTheme](#uicomponenttheme),[SerieData](#seriedata),[ComponentTheme](#componenttheme),[SerieTheme](#serietheme),[ThemeStyle](#themestyle) + + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public static void ClearComponentDirty(ChildComponent component)| +|ClearComponentDirty()||public virtual void ClearComponentDirty()| +|ClearDirty()||public virtual void ClearDirty()| +|ClearVerticesDirty()||public static void ClearVerticesDirty(ChildComponent component)| +|ClearVerticesDirty()||public virtual void ClearVerticesDirty()| +|IsComponentDirty()||public static bool IsComponentDirty(ChildComponent component)| +|IsVertsDirty()||public static bool IsVertsDirty(ChildComponent component)| +|SetAllDirty()||public virtual void SetAllDirty()| +|SetComponentDirty()||public virtual void SetComponentDirty()| +|SetVerticesDirty()||public virtual void SetVerticesDirty()| + ## ColorUtil -> XCharts.Runtime.ColorUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetColor()||public static Color32 GetColor(string hexColorStr)<br/>将字符串颜色值转成Color。 | +## Comment + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged) + +图表注解组件。 + +|API|版本|描述| +|--|--|--| +|GetLabelStyle()||public LabelStyle GetLabelStyle(int index)| +|GetMarkStyle()||public CommentMarkStyle GetMarkStyle(int index)| +|OnChanged()||public void OnChanged()<br/>参数变更时的回调处理。 | + +## CommentItem + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +注解项。 + +## CommentMarkStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +注解项区域样式。 + ## ComponentHandlerAttribute -> XCharts.Runtime.ComponentHandlerAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |ComponentHandlerAttribute()||public ComponentHandlerAttribute(Type handler)| |ComponentHandlerAttribute()||public ComponentHandlerAttribute(Type handler, bool allowMultiple)| ## ComponentHelper -> XCharts.Runtime.ComponentHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetAngleAxis()||public static AngleAxis GetAngleAxis(List<MainComponent> components, int polarIndex)| |GetRadiusAxis()||public static RadiusAxis GetRadiusAxis(List<MainComponent> components, int polarIndex)| @@ -566,11 +1201,23 @@ slug: /api |GetYAxisOnZeroOffset()||public static float GetYAxisOnZeroOffset(List<MainComponent> components, YAxis axis)| |IsAnyCategoryOfYAxis()||public static bool IsAnyCategoryOfYAxis(List<MainComponent> components)| +## ComponentTheme + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [BaseAxisTheme](#baseaxistheme),[DataZoomTheme](#datazoomtheme),[LegendTheme](#legendtheme),[SubTitleTheme](#subtitletheme),[TitleTheme](#titletheme),[TooltipTheme](#tooltiptheme),[VisualMapTheme](#visualmaptheme) + + +|API|版本|描述| +|--|--|--| +|ComponentTheme()||public ComponentTheme(ThemeType theme)| +|Copy()||public virtual void Copy(ComponentTheme theme)| +|Reset()||public virtual void Reset(ComponentTheme defaultTheme)| + ## CoordOptionsAttribute -> XCharts.Runtime.CoordOptionsAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |Contains<T>()||public bool Contains<T>() where T : CoordSystem| |CoordOptionsAttribute()||public CoordOptionsAttribute(Type coord)| @@ -578,60 +1225,143 @@ slug: /api |CoordOptionsAttribute()||public CoordOptionsAttribute(Type coord, Type coord2, Type coord3)| |CoordOptionsAttribute()||public CoordOptionsAttribute(Type coord, Type coord2, Type coord3, Type coord4)| +## CoordSystem + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) / 子类: [RadarCoord](#radarcoord),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[ParallelCoord](#parallelcoord),[PolarCoord](#polarcoord),[SingleAxisCoord](#singleaxiscoord) + +坐标系系统。 + +## DataZoom + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent),[IUpdateRuntimeData](#iupdateruntimedata) + +DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 + +|API|版本|描述| +|--|--|--| +|GetBackgroundColor()||public Color32 GetBackgroundColor(Color32 themeColor)| +|GetBorderColor()||public Color32 GetBorderColor(Color32 themeColor)| +|GetFillerColor()||public Color32 GetFillerColor(Color32 themeColor)| +|IsContainsAxis()||public bool IsContainsAxis(Axis axis)| +|IsContainsXAxis()||public bool IsContainsXAxis(int index)| +|IsContainsYAxis()||public bool IsContainsYAxis(int index)| +|IsInEndZoom()||public bool IsInEndZoom(Vector2 pos)<br/>给定的坐标是否在结束活动条触发区域内 | +|IsInMarqueeArea()||public bool IsInMarqueeArea(SerieData serieData)| +|IsInMarqueeArea()||public bool IsInMarqueeArea(Vector2 pos)| +|IsInSelectedZoom()||public bool IsInSelectedZoom(int totalIndex, int index, bool invert)| +|IsInSelectedZoom()||public bool IsInSelectedZoom(Vector2 pos)<br/>给定的坐标是否在选中区域内 | +|IsInStartZoom()||public bool IsInStartZoom(Vector2 pos)<br/>给定的坐标是否在开始活动条触发区域内 | +|IsInZoom()||public bool IsInZoom(Vector2 pos)<br/>给定的坐标是否在缩放区域内 | +|SetDefaultValue()||public override void SetDefaultValue()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + ## DataZoomContext -> XCharts.Runtime.DataZoomContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + ## DataZoomHelper -> XCharts.Runtime.DataZoomHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |UpdateDataZoomRuntimeStartEndValue()||public static void UpdateDataZoomRuntimeStartEndValue(DataZoom dataZoom, Serie serie)| |UpdateDataZoomRuntimeStartEndValue<T>()||public static void UpdateDataZoomRuntimeStartEndValue<T>(BaseChart chart) where T : Serie| +## DataZoomTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) + + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(DataZoomTheme theme)| +|DataZoomTheme()||public DataZoomTheme(ThemeType theme) : base(theme)| + ## DateTimeUtil -> XCharts.Runtime.DateTimeUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetDateTime()||public static DateTime GetDateTime(int timestamp)| |GetTimestamp()||public static int GetTimestamp()| |GetTimestamp()||public static int GetTimestamp(DateTime time)| +## DebugInfo + +> class in XCharts.Runtime + + +|API|版本|描述| +|--|--|--| +|Init()||public void Init(BaseChart chart)| +|Update()||public void Update()| + ## DefaultAnimationAttribute -> XCharts.Runtime.DefaultAnimationAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |DefaultAnimationAttribute()||public DefaultAnimationAttribute(AnimationType handler)| |DefaultAnimationAttribute()||public DefaultAnimationAttribute(AnimationType handler, bool enableSerieDataAddedAnimation)| ## DefaultTooltipAttribute -> XCharts.Runtime.DefaultTooltipAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |DefaultTooltipAttribute()||public DefaultTooltipAttribute(Tooltip.Type type, Tooltip.Trigger trigger)| ## DefineSymbolsUtil -> XCharts.Runtime.DefineSymbolsUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |AddGlobalDefine()||public static void AddGlobalDefine(string symbol)| |RemoveGlobalDefine()||public static void RemoveGlobalDefine(string symbol)| +## EffectScatter + +> class in XCharts.Runtime / 继承自: [BaseScatter](#basescatter) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + +## EmphasisStyle + +> class in XCharts.Runtime / 继承自: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +> 从 `v3.2.0` 开始支持 + +高亮状态样式。 + +## EndLabelStyle + +> class in XCharts.Runtime / 继承自: [LabelStyle](#labelstyle) + + +|API|版本|描述| +|--|--|--| +|EndLabelStyle()||public EndLabelStyle()| + ## FormatterHelper -> XCharts.Runtime.FormatterHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |NeedFormat()||public static bool NeedFormat(string content)| |ReplaceAxisLabelContent()||public static void ReplaceAxisLabelContent(ref string content, string numericFormatter, double value)| @@ -639,44 +1369,140 @@ slug: /api |TrimAndReplaceLine()||public static string TrimAndReplaceLine(string content)| |TrimAndReplaceLine()||public static string TrimAndReplaceLine(StringBuilder sb)| +## GridCoord + +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem),[IUpdateRuntimeData](#iupdateruntimedata),[ISerieContainer](#iseriecontainer) + +Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. + +|API|版本|描述| +|--|--|--| +|BoundaryPoint()||public bool BoundaryPoint(Vector3 sp, Vector3 ep, ref List<Vector3> point)<br/>给定的线段和Grid边界的交点 | +|BoundaryPoint()||public bool BoundaryPoint(Vector3 sp, Vector3 ep, ref Vector3 point)<br/>给定的线段和Grid边界的交点 | +|Clamp()|v3.7.0|public void Clamp(ref Vector3 pos)<br/>将位置限制在网格内。 | +|ClampX()|v3.7.0|public void ClampX(ref Vector3 pos)<br/>将位置的X限制在网格内。 | +|ClampY()|v3.7.0|public void ClampY(ref Vector3 pos)<br/>将位置的Y限制在网格内。 | +|Contains()||public bool Contains(float x, float y)<br/>给定的位置是否在网格内。 | +|Contains()||public bool Contains(Vector3 pos)<br/>给定的位置是否在网格内。 | +|Contains()|v3.7.0|public bool Contains(Vector3 pos, bool isYAxis)<br/>给定的位置是否在网格内。 | +|ContainsX()|v3.7.0|public bool ContainsX(float x)<br/>给定的x是否在网格内。 | +|ContainsY()|v3.7.0|public bool ContainsY(float y)<br/>给定的y是否在网格内。 | +|IsPointerEnter()||public bool IsPointerEnter()<br/>指针是否在网格内。 | +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + ## GridCoordContext -> XCharts.Runtime.GridCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + + +## GridLayout + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent),[IUpdateRuntimeData](#iupdateruntimedata) + +> 从 `v3.8.0` 开始支持 + +网格布局组件。用于管理多个`GridCoord`的布局,可以通过`row`和`column`来控制网格的行列数。 + +|API|版本|描述| +|--|--|--| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| ## GridLayoutContext -> XCharts.Runtime.GridLayoutContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + + +## Heatmap + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| ## HeatmapChart -> XCharts.Runtime.HeatmapChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## IconStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +|API|版本|描述| +|--|--|--| +|Clone()||public IconStyle Clone()| +|Copy()||public void Copy(IconStyle iconStyle)| +|Reset()||public void Reset()| ## IgnoreDoc -> XCharts.Runtime.IgnoreDoc : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |IgnoreDoc()||public IgnoreDoc()| +## ImageStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + + +|API|版本|描述| +|--|--|--| +|Clone()||public ImageStyle Clone()| +|Copy()||public void Copy(ImageStyle imageStyle)| +|Reset()||public void Reset()| + +## Indicator + +> class in XCharts.Runtime + +雷达图的指示器,用来指定雷达图中的多个变量(维度)。 + +|API|版本|描述| +|--|--|--| +|AddIndicator()||public RadarCoord.Indicator AddIndicator(string name, double min, double max)| +|AddIndicator()||public void AddIndicator(RadarCoord.Indicator indicator)| +|AddIndicatorList()|v3.3.0|public void AddIndicatorList(List<string> nameList, double min = 0, double max = 0)| +|ClearData()||public override void ClearData()| +|GetFormatterIndicatorContent()||public string GetFormatterIndicatorContent(int indicatorIndex)| +|GetFormatterIndicatorContent()||public string GetFormatterIndicatorContent(string indicatorName)| +|GetIndicator()||public RadarCoord.Indicator GetIndicator(int indicatorIndex)| +|GetIndicatorMax()||public double GetIndicatorMax(int index)| +|GetIndicatorMin()||public double GetIndicatorMin(int index)| +|GetIndicatorName()||public string GetIndicatorName(int indicatorIndex)| +|GetIndicatorPosition()||public Vector3 GetIndicatorPosition(int index)| +|IsInIndicatorRange()||public bool IsInIndicatorRange(int index, double value)| +|IsInRange()||public bool IsInRange(double value)| +|IsPointerEnter()||public bool IsPointerEnter()| +|SetDefaultValue()||public override void SetDefaultValue()| +|UpdateIndicator()||public bool UpdateIndicator(int indicatorIndex, string name, double min, double max)| + ## INeedSerieContainer -> XCharts.Runtime.INeedSerieContainer / Subclasses: [Bar](#bar),[SimplifiedBar](#simplifiedbar),[Candlestick](#candlestick),[SimplifiedCandlestick](#simplifiedcandlestick),[Heatmap](#heatmap),[Line](#line),[SimplifiedLine](#simplifiedline),[Parallel](#parallel),[Radar](#radar),[BaseScatter](#basescatter) +> class in XCharts.Runtime / 子类: [Bar](#bar),[SimplifiedBar](#simplifiedbar),[Candlestick](#candlestick),[SimplifiedCandlestick](#simplifiedcandlestick),[Heatmap](#heatmap),[Line](#line),[SimplifiedLine](#simplifiedline),[Parallel](#parallel),[Radar](#radar),[BaseScatter](#basescatter) + ## InputHelper -> XCharts.Runtime.InputHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetKeyDown()||public static bool GetKeyDown(KeyCode keyCode)| |GetTouch()||public static Touch GetTouch(int v)| ## InteractData -> XCharts.Runtime.InteractData +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |Reset()||public void Reset()| |SetColor()||public void SetColor(ref bool needInteract, Color32 color)| @@ -697,49 +1523,165 @@ slug: /api ## IPropertyChanged -> XCharts.Runtime.IPropertyChanged / Subclasses: [Location](#location),[Comment](#comment),[Legend](#legend),[Title](#title) +> class in XCharts.Runtime / 子类: [Location](#location),[Comment](#comment),[Legend](#legend),[Title](#title) + 属性变更接口 ## ISerieComponent -> XCharts.Runtime.ISerieComponent / Subclasses: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[LineArrow](#linearrow),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) +> class in XCharts.Runtime / 子类: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[LineArrow](#linearrow),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) + 可用于Serie的组件。 ## ISerieContainer -> XCharts.Runtime.ISerieContainer / Subclasses: [RadarCoord](#radarcoord),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[ParallelCoord](#parallelcoord),[PolarCoord](#polarcoord) +> class in XCharts.Runtime / 子类: [RadarCoord](#radarcoord),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[ParallelCoord](#parallelcoord),[PolarCoord](#polarcoord) + ## ISerieDataComponent -> XCharts.Runtime.ISerieDataComponent / Subclasses: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[ItemStyle](#itemstyle),[LineStyle](#linestyle),[SerieSymbol](#seriesymbol),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) +> class in XCharts.Runtime / 子类: [AreaStyle](#areastyle),[ImageStyle](#imagestyle),[ItemStyle](#itemstyle),[LineStyle](#linestyle),[SerieSymbol](#seriesymbol),[LabelLine](#labelline),[LabelStyle](#labelstyle),[BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle),[TitleStyle](#titlestyle) + 可用于SerieData的组件。 ## ISimplifiedSerie -> XCharts.Runtime.ISimplifiedSerie / Subclasses: [SimplifiedBar](#simplifiedbar),[SimplifiedCandlestick](#simplifiedcandlestick),[SimplifiedLine](#simplifiedline) +> class in XCharts.Runtime / 子类: [SimplifiedBar](#simplifiedbar),[SimplifiedCandlestick](#simplifiedcandlestick),[SimplifiedLine](#simplifiedline) + + +## ItemStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieDataComponent](#iseriedatacomponent) + +图形样式。 + +|API|版本|描述| +|--|--|--| +|GetBorderColor()||public Color32 GetBorderColor(Color32 defaultColor)| +|GetBorderColor0()||public Color32 GetBorderColor0(Color32 defaultColor)| +|GetColor()||public Color32 GetColor()| +|GetColor()||public Color32 GetColor(Color32 defaultColor)| +|GetColor0()||public Color32 GetColor0()| +|GetColor0()||public Color32 GetColor0(Color32 defaultColor)| +|GetGradientColor()||public Color32 GetGradientColor(float value, Color32 defaultColor)| +|GetToColor()||public Color32 GetToColor()| +|IsNeedCorner()||public bool IsNeedCorner()| +|IsNeedGradient()||public bool IsNeedGradient()| +|NeedShowBorder()||public bool NeedShowBorder()<br/>是否需要显示边框。 | +|Reset()||public void Reset()| ## IUpdateRuntimeData -> XCharts.Runtime.IUpdateRuntimeData / Subclasses: [SingleAxis](#singleaxis),[DataZoom](#datazoom),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[GridLayout](#gridlayout),[ParallelCoord](#parallelcoord) +> class in XCharts.Runtime / 子类: [SingleAxis](#singleaxis),[DataZoom](#datazoom),[CalendarCoord](#calendarcoord),[GridCoord](#gridcoord),[GridLayout](#gridlayout),[ParallelCoord](#parallelcoord) + + +## LabelLine + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +标签的引导线 + +|API|版本|描述| +|--|--|--| +|GetEndSymbolOffset()||public Vector3 GetEndSymbolOffset()| +|GetStartSymbolOffset()||public Vector3 GetStartSymbolOffset()| +|Reset()||public void Reset()| + +## LabelStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) / 子类: [AxisLabel](#axislabel),[EndLabelStyle](#endlabelstyle),[TitleStyle](#titlestyle) + +图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 + +|API|版本|描述| +|--|--|--| +|Clone()||public virtual LabelStyle Clone()| +|Copy()||public virtual void Copy(LabelStyle label)| +|GetColor()||public Color GetColor(Color defaultColor)| +|GetFormatterContent()||public virtual string GetFormatterContent(int labelIndex, double value, double minValue, double maxValue, bool isLog = false)| +|GetFormatterContent()||public virtual string GetFormatterContent(int labelIndex, string category)| +|GetFormatterDateTime()||public string GetFormatterDateTime(int labelIndex, double value, double minValue, double maxValue)| +|GetOffset()||public Vector3 GetOffset(float radius)| +|IsAutoSize()||public bool IsAutoSize()| +|IsDefaultPosition()||public bool IsDefaultPosition(Position position)| +|IsInside()||public bool IsInside()<br/>是否在内部。 | +|Reset()||public void Reset()| + +## Lang + +> class in XCharts.Runtime / 继承自: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=scriptableobject) + +国际化语言表。 + +|API|版本|描述| +|--|--|--| +|GetCandlestickDimensionName()||public string GetCandlestickDimensionName(int i)| +|GetDay()||public string GetDay(int day)| +|GetMonthAbbr()||public string GetMonthAbbr(int month)| + +## LangCandlestick + +> class in XCharts.Runtime + + +## LangTime + +> class in XCharts.Runtime + + +|API|版本|描述| +|--|--|--| +|List<string>()||public List<string> dayOfMonth = new List<string>()| +|List<string>()||public List<string> dayOfWeek = new List<string>()| +|List<string>()||public List<string> dayOfWeekAbbr = new List<string>()| +|List<string>()||public List<string> monthAbbr = new List<string>()| +|List<string>()||public List<string> months = new List<string>()| ## LayerHelper -> XCharts.Runtime.LayerHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |IsFixedWidthHeight()||public static bool IsFixedWidthHeight(RectTransform rt)| |IsStretchPivot()||public static bool IsStretchPivot(RectTransform rt)| +## Legend + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged) + +图例组件。 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。 + +|API|版本|描述| +|--|--|--| +|AddData()||public void AddData(string name)<br/>添加图例。 | +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()<br/>清空。 | +|ContainsData()||public bool ContainsData(string name)<br/>是否包括由指定名字的图例 | +|GetColor()||public Color GetColor(int index)| +|GetData()||public string GetData(int index)<br/>获得指定索引的图例。 | +|GetIcon()||public Sprite GetIcon(int index)<br/>获得指定索引的图例按钮。 | +|GetIndex()||public int GetIndex(string legendName)<br/>获得指定图例的索引。 | +|GetPosition()||public Vector3 GetPosition(int index, Vector3 defaultPos)| +|OnChanged()||public void OnChanged()<br/>参数变更时的回调处理。 | +|RemoveButton()||public void RemoveButton()<br/>移除所有图例按钮。 | +|RemoveData()||public void RemoveData(string name)<br/>移除指定名字的图例。 | +|SetButton()||public void SetButton(string name, LegendItem item, int total)<br/>给图例绑定按钮。 | +|UpdateButtonColor()||public void UpdateButtonColor(string name, Color color)<br/>更新图例按钮颜色。 | +|UpdateContentColor()||public void UpdateContentColor(string name, Color color)<br/>更新图例文字颜色。 | + ## LegendContext -> XCharts.Runtime.LegendContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + ## LegendHelper -> XCharts.Runtime.LegendHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |CheckDataHighlighted()||public static int CheckDataHighlighted(Serie serie, string legendName, bool heighlight)| |CheckDataShow()||public static bool CheckDataShow(Serie serie, string legendName, bool show)| @@ -750,9 +1692,10 @@ slug: /api ## LegendItem -> XCharts.Runtime.LegendItem +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetIconColor()||public Color GetIconColor()| |GetIconRect()||public Rect GetIconRect()| @@ -773,44 +1716,143 @@ slug: /api |SetText()||public void SetText(ChartText text)| |SetTextBackground()||public void SetTextBackground(Image image)| +## LegendTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) + + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(LegendTheme theme)| +|LegendTheme()||public LegendTheme(ThemeType theme) : base(theme)| + +## Level + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +## LevelStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +## Line + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static Line ConvertSerie(Serie serie)| + +## LineArrow + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent) + + ## LineChart -> XCharts.Runtime.LineChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## LineStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[ISerieDataComponent](#iseriedatacomponent) + +线条样式。 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle.color,线条颜色默认也会取该颜色。 toColor,toColor2可设置水平方向的渐变,如需要设置垂直方向的渐变,可使用VisualMap。 + +|API|版本|描述| +|--|--|--| +|Clone()||public LineStyle Clone()| +|Copy()||public void Copy(LineStyle lineStyle)| +|GetColor()||public Color32 GetColor()| +|GetColor()||public Color32 GetColor(Color32 themeColor)| +|GetGradientColor()||public Color32 GetGradientColor(float value, Color32 defaultColor)| +|GetLength()||public float GetLength(float themeLength)| +|GetType()||public Type GetType(Type themeType)| +|GetWidth()||public float GetWidth(float themeWidth)| +|IsNeedGradient()||public bool IsNeedGradient()| +|IsNotSolidLine()||public bool IsNotSolidLine()| +|LineStyle()||public LineStyle()| +|LineStyle()||public LineStyle(float width)| +|LineStyle()||public LineStyle(LineStyle.Type type)| +|LineStyle()||public LineStyle(LineStyle.Type type, float width)| ## ListFor -> XCharts.Runtime.ListFor : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) / Subclasses: [ListForComponent](#listforcomponent),[ListForSerie](#listforserie) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) / 子类: [ListForComponent](#listforcomponent),[ListForSerie](#listforserie) -|public method|since|description| + +|API|版本|描述| |--|--|--| |ListFor()||public ListFor(Type type)| ## ListForComponent -> XCharts.Runtime.ListForComponent : [ListFor](#listfor) +> class in XCharts.Runtime / 继承自: [ListFor](#listfor) -|public method|since|description| + +|API|版本|描述| |--|--|--| |ListForComponent()||public ListForComponent(Type type) : base(type)| ## ListForSerie -> XCharts.Runtime.ListForSerie : [ListFor](#listfor) +> class in XCharts.Runtime / 继承自: [ListFor](#listfor) -|public method|since|description| + +|API|版本|描述| |--|--|--| |ListForSerie()||public ListForSerie(Type type) : base(type)| +## Location + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent),[IPropertyChanged](#ipropertychanged) + +位置类型。通过Align快速设置大体位置,再通过left,right,top,bottom微调具体位置。 + +|API|版本|描述| +|--|--|--| +|GetPosition()||public Vector3 GetPosition(float chartWidth, float chartHeight)<br/>返回在坐标系中的具体位置 | +|IsBottom()||public bool IsBottom()| +|IsCenter()||public bool IsCenter()| +|IsTop()||public bool IsTop()| +|OnChanged()||public void OnChanged()<br/>属性变更时更新textAnchor,minAnchor,maxAnchor,pivot | +|UpdateRuntimeData()||public void UpdateRuntimeData(float chartWidth, float chartHeight)| + +## MainComponent + +> class in XCharts.Runtime / 继承自: [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=icomparable) / 子类: [Axis](#axis),[Background](#background),[Comment](#comment),[DataZoom](#datazoom),[Legend](#legend),[MarkArea](#markarea),[MarkLine](#markline),[Settings](#settings),[Title](#title),[Tooltip](#tooltip),[VisualMap](#visualmap),[GridLayout](#gridlayout),[CoordSystem](#coordsystem) + + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public virtual void ClearComponentDirty()| +|ClearData()||public virtual void ClearData() { }| +|ClearDirty()||public virtual void ClearDirty()| +|ClearVerticesDirty()||public virtual void ClearVerticesDirty()| +|CompareTo()||public int CompareTo(object obj)| +|OnRemove()||public virtual void OnRemove()| +|Reset()||public virtual void Reset() { }| +|SetAllDirty()||public virtual void SetAllDirty()| +|SetComponentDirty()||public virtual void SetComponentDirty()| +|SetDefaultValue()||public virtual void SetDefaultValue() { }| +|SetVerticesDirty()||public virtual void SetVerticesDirty()| + ## MainComponentContext -> XCharts.Runtime.MainComponentContext / Subclasses: [AxisContext](#axiscontext),[DataZoomContext](#datazoomcontext),[LegendContext](#legendcontext),[RadarCoordContext](#radarcoordcontext),[VisualMapContext](#visualmapcontext),[GridCoordContext](#gridcoordcontext),[GridLayoutContext](#gridlayoutcontext),[ParallelCoordContext](#parallelcoordcontext),[PolarCoordContext](#polarcoordcontext) +> class in XCharts.Runtime / 子类: [AxisContext](#axiscontext),[DataZoomContext](#datazoomcontext),[LegendContext](#legendcontext),[RadarCoordContext](#radarcoordcontext),[VisualMapContext](#visualmapcontext),[GridCoordContext](#gridcoordcontext),[GridLayoutContext](#gridlayoutcontext),[ParallelCoordContext](#parallelcoordcontext),[PolarCoordContext](#polarcoordcontext) + ## MainComponentHandler -> XCharts.Runtime.MainComponentHandler / Subclasses: [AxisHandler<T>](#axishandlert),[MainComponentHandler<T>](#maincomponenthandlert) +> class in XCharts.Runtime / 子类: [AxisHandler<T>](#axishandlert),[MainComponentHandler<T>](#maincomponenthandlert) -|public method|since|description| + +|API|版本|描述| |--|--|--| +|BeforceSerieUpdate()||public virtual void BeforceSerieUpdate() { }| |CheckComponent()||public virtual void CheckComponent(StringBuilder sb) { }| |DrawBase()||public virtual void DrawBase(VertexHelper vh) { }| |DrawTop()||public virtual void DrawTop(VertexHelper vh) { }| @@ -831,13 +1873,63 @@ slug: /api ## MainComponentHandler<T> -> XCharts.Runtime.MainComponentHandler<T> : [MainComponentHandler](#maincomponenthandler) +> class in XCharts.Runtime / 继承自: [MainComponentHandler](#maincomponenthandler) + + +## MarkArea + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) + +图表标域,常用于标记图表中某个范围的数据。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + +## MarkAreaData + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +标域的数据。 + +## MarkLine + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) + +图表标线。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + +## MarkLineData + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +> 从 `v3.9.0` 开始支持 + +图表标线的数据。 + +## MarqueeStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +> 从 `v3.5.0` 开始支持 + +Marquee style. It can be used for the DataZoom component. 选取框样式。可用于DataZoom组件。 + +|API|版本|描述| +|--|--|--| +|onEnd||public Action<DataZoom> onEnd<br/>自定义选取框结束选取时的回调。 | +|onGoing||public Action<DataZoom> onGoing<br/>自定义选取框选取进行时的回调。 | +|onStart||public Action<DataZoom> onStart<br/>自定义选取框开始选取时的回调。 | ## MathUtil -> XCharts.Runtime.MathUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |Abs()||public static double Abs(double d)| |Approximately()||public static bool Approximately(double a, double b)| @@ -847,15 +1939,31 @@ slug: /api |IsInteger()||public static bool IsInteger(double value)| |Lerp()||public static double Lerp(double a, double b, double t)| +## MLValue + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +> 从 `v3.8.0` 开始支持 + +多样式数值。 + +|API|版本|描述| +|--|--|--| +|GetValue()||public float GetValue(float total)<br/>根据类型获取值。 | +|MLValue()||public MLValue(float value)| +|MLValue()||public MLValue(Type type, float value)| + ## MonoBehaviour -> .MonoBehaviour / Subclasses: [XLog](#xlog) +> class in / 子类: [XLog](#xlog) + ## ObjectPool<T> where T -> XCharts.Runtime.ObjectPool<T> where T : [new()](#new()) +> class in XCharts.Runtime / 继承自: [new()](#new()) -|public method|since|description| + +|API|版本|描述| |--|--|--| |ClearAll()||public void ClearAll()| |Get()||public T Get()| @@ -863,11 +1971,24 @@ slug: /api |ObjectPool()||public ObjectPool(UnityAction<T> actionOnGet, UnityAction<T> actionOnRelease, bool newIfEmpty = true)| |Release()||public void Release(T element)| +## Padding + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [TextPadding](#textpadding) + +边距设置。 + +|API|版本|描述| +|--|--|--| +|Padding()||public Padding() { }| +|Padding()||public Padding(float top, float right, float bottom, float left)| +|SetPadding()||public void SetPadding(float top, float right, float bottom, float left)| + ## Painter -> XCharts.Runtime.Painter : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) +> class in XCharts.Runtime / 继承自: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) -|public method|since|description| + +|API|版本|描述| |--|--|--| |onPopulateMesh||public Action<VertexHelper, Painter> onPopulateMesh| |CheckRefresh()||public void CheckRefresh()| @@ -875,50 +1996,163 @@ slug: /api |Refresh()||public void Refresh()| |SetActive()||public void SetActive(bool flag, bool isDebugMode = false)| +## Parallel + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + +## ParallelAxis + +> class in XCharts.Runtime / 继承自: [Axis](#axis) + + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| + ## ParallelChart -> XCharts.Runtime.ParallelChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## ParallelCoord + +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem),[IUpdateRuntimeData](#iupdateruntimedata),[ISerieContainer](#iseriecontainer) + +Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. + +|API|版本|描述| +|--|--|--| +|Contains()||public bool Contains(float x, float y)| +|Contains()||public bool Contains(Vector3 pos)| +|IsPointerEnter()||public bool IsPointerEnter()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| ## ParallelCoordContext -> XCharts.Runtime.ParallelCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + + +## Pie + +> class in XCharts.Runtime / 继承自: [Serie](#serie) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static Pie ConvertSerie(Serie serie)| ## PieChart -> XCharts.Runtime.PieChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## PolarAxisTheme + +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) + + +|API|版本|描述| +|--|--|--| +|PolarAxisTheme()||public PolarAxisTheme(ThemeType theme) : base(theme) { }| ## PolarChart -> XCharts.Runtime.PolarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## PolarCoord + +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem),[ISerieContainer](#iseriecontainer) + +极坐标系组件。 极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。 + +|API|版本|描述| +|--|--|--| +|Contains()||public bool Contains(Vector3 pos)| +|IsPointerEnter()||public bool IsPointerEnter()| ## PolarCoordContext -> XCharts.Runtime.PolarCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + ## PropertyUtil -> XCharts.Runtime.PropertyUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |SetClass<T>()||public static bool SetClass<T>(ref T currentValue, T newValue, bool notNull = false) where T : class| |SetColor()||public static bool SetColor(ref Color currentValue, Color newValue)| |SetColor()||public static bool SetColor(ref Color32 currentValue, Color32 newValue)| |SetStruct<T>()||public static bool SetStruct<T>(ref T currentValue, T newValue) where T : struct| +## Radar + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + +## RadarAxisTheme + +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) + + +|API|版本|描述| +|--|--|--| +|RadarAxisTheme()||public RadarAxisTheme(ThemeType theme) : base(theme)| + ## RadarChart -> XCharts.Runtime.RadarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## RadarCoord + +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem),[ISerieContainer](#iseriecontainer) + +Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。 ## RadarCoordContext -> XCharts.Runtime.RadarCoordContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + + +## RadiusAxis + +> class in XCharts.Runtime / 继承自: [Axis](#axis) + +极坐标系的径向轴。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()<br/>极坐标系的径向轴。 | + +## RadiusAxisTheme + +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) + + +|API|版本|描述| +|--|--|--| +|RadiusAxisTheme()||public RadiusAxisTheme(ThemeType theme) : base(theme) { }| ## ReflectionUtil -> XCharts.Runtime.ReflectionUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |DeepCloneSerializeField()||public static object DeepCloneSerializeField(object obj)| |InvokeListAdd()||public static void InvokeListAdd(object obj, FieldInfo field, object item)| @@ -929,23 +2163,36 @@ slug: /api ## RequireChartComponentAttribute -> XCharts.Runtime.RequireChartComponentAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |RequireChartComponentAttribute()||public RequireChartComponentAttribute(Type requiredComponent)| |RequireChartComponentAttribute()||public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2)| |RequireChartComponentAttribute()||public RequireChartComponentAttribute(Type requiredComponent, Type requiredComponent2, Type requiredComponent3)| +## Ring + +> class in XCharts.Runtime / 继承自: [Serie](#serie) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|GetDataTotal()||public override double GetDataTotal(int dimension, SerieData serieData = null)| + ## RingChart -> XCharts.Runtime.RingChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + ## RuntimeUtil -> XCharts.Runtime.RuntimeUtil +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetAllAssemblyTypes()||public static IEnumerable<Type> GetAllAssemblyTypes()| |GetAllTypesDerivedFrom()||public static IEnumerable<Type> GetAllTypesDerivedFrom(Type type)| @@ -954,16 +2201,117 @@ slug: /api |GetAttribute<T>()||public static T GetAttribute<T>(this Type type, bool check = true) where T : Attribute| |HasSubclass()||public static bool HasSubclass(Type type)| +## Scatter + +> class in XCharts.Runtime / 继承自: [BaseScatter](#basescatter) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| + ## ScatterChart -> XCharts.Runtime.ScatterChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## SelectStyle + +> class in XCharts.Runtime / 继承自: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent) + +> 从 `v3.2.0` 开始支持 + +选中状态样式。 + +## Serie + +> class in XCharts.Runtime / 继承自: [BaseSerie](#baseserie),[IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=icomparable) / 子类: [SerieHandler<T>](#seriehandlert),[Bar](#bar),[SimplifiedBar](#simplifiedbar),[Candlestick](#candlestick),[SimplifiedCandlestick](#simplifiedcandlestick),[Heatmap](#heatmap),[Line](#line),[SimplifiedLine](#simplifiedline),[Parallel](#parallel),[Pie](#pie),[Radar](#radar),[Ring](#ring),[BaseScatter](#basescatter) + +系列。系列一般由数据和配置组成,用来表示具体的图表图形,如折线图的一条折线,柱图的一组柱子等。一个图表中可以包含多个不同类型的系列。 + +|API|版本|描述| +|--|--|--| +|onClick||public Action<SerieEventData> onClick<br/>点击系列时的回调。 | +|onDown||public Action<SerieEventData> onDown<br/>鼠标按下时的回调。 | +|onEnter||public Action<SerieEventData> onEnter<br/>鼠标进入时的回调。 | +|onExit||public Action<SerieEventData> onExit<br/>鼠标离开时的回调。 | +|AddChildData()||public SerieData AddChildData(SerieData parent, double value, string name, string id)| +|AddChildData()||public SerieData AddChildData(SerieData parent, List<double> value, string name, string id)| +|AddChildData()||public void AddChildData(SerieData parent, SerieData serieData)| +|AddData()||public SerieData AddData(double indexOrTimestamp, double open, double close, double lowest, double heighest, string dataName = null, string dataId = null)<br/>添加 (open, close, lowest, heighest) 数据 | +|AddData()||public SerieData AddData(List<double> valueList, string dataName = null, string dataId = null)<br/>将一组数据添加到系列中。 如果数据只有一个,默认添加到维度Y中。 | +|AddData()||public SerieData AddData(params double[] values)<br/>添加任意维数据到系列中。 | +|AddExtraComponent<T>()||public T AddExtraComponent<T>() where T : ChildComponent, ISerieComponent| +|AddSerieData()||public void AddSerieData(SerieData serieData)| +|AddXYData()||public SerieData AddXYData(double xValue, double yValue, string dataName = null, string dataId = null)<br/>添加(x,y)数据到维度X和维度Y | +|AddYData()||public SerieData AddYData(double value, string dataName = null, string dataId = null)<br/>添加一个数据到维度Y(此时维度X对应的数据是索引) | +|AnimationEnable()||public void AnimationEnable(bool flag)<br/>启用或取消初始动画 | +|AnimationFadeIn()||public void AnimationFadeIn()<br/>渐入动画 | +|AnimationFadeOut()||public void AnimationFadeOut()<br/>渐出动画 | +|AnimationPause()||public void AnimationPause()<br/>暂停动画 | +|AnimationReset()||public void AnimationReset()<br/>重置动画 | +|AnimationRestart()||public void AnimationRestart()<br/>重置动画 | +|AnimationResume()||public void AnimationResume()<br/>继续动画 | +|CanAddComponent()||public bool CanAddComponent(Type type)| +|CanAddComponent<T>()||public bool CanAddComponent<T>() where T : ChildComponent, ISerieComponent| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()<br/>清空所有数据 | +|ClearDirty()||public override void ClearDirty()| +|ClearHighlight()||public void ClearHighlight()<br/>清除所有数据的高亮标志 | +|ClearSerieNameDirty()||public void ClearSerieNameDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Clone()||public Serie Clone()| +|Clone<T>()||public T Clone<T>() where T : Serie| +|CompareTo()||public int CompareTo(object obj)| +|EnsureComponent()||public ISerieComponent EnsureComponent(Type type)| +|EnsureComponent<T>()||public T EnsureComponent<T>() where T : ChildComponent, ISerieComponent<br/>确保系列有该组件。如果没有,则添加。 | +|GetBarWidth()||public float GetBarWidth(float categoryWidth, int barCount = 0)| +|GetComponent()||public ISerieComponent GetComponent(Type type)| +|GetComponent<T>()||public T GetComponent<T>() where T : ChildComponent, ISerieComponent| +|GetData()||public double GetData(int index, int dimension, DataZoom dataZoom = null)<br/>获得指定index指定维数的数据 | +|GetDataList()||public List<SerieData> GetDataList(DataZoom dataZoom = null)<br/>获得系列的数据列表 | +|GetDataTotal()||public virtual double GetDataTotal(int dimension, SerieData serieData = null)| +|GetSerieData()||public SerieData GetSerieData(int index, DataZoom dataZoom = null)<br/>获得指定索引的数据项 | +|GetSerieData()||public SerieData GetSerieData(SerieData parent, string id)| +|GetSerieData()||public SerieData GetSerieData(string id, DataZoom dataZoom = null)| +|GetXYData()||public void GetXYData(int index, DataZoom dataZoom, out double xValue, out double yVlaue)<br/>获得指定索引的维度X和维度Y的数据 | +|GetYCurrData()||public double GetYCurrData(int index, DataZoom dataZoom = null)| +|GetYData()||public double GetYData(int index, DataZoom dataZoom = null)<br/>获得维度Y索引对应的数据 | +|GetYData()||public void GetYData(int index, out double yData, out string dataName, DataZoom dataZoom = null)<br/>获得维度Y索引对应的数据和数据名 | +|IsIgnoreIndex()||public bool IsIgnoreIndex(int index, int dimension = 1)| +|IsIgnorePoint()||public bool IsIgnorePoint(int index)| +|IsIgnoreValue()||public bool IsIgnoreValue(double value)| +|IsIgnoreValue()||public bool IsIgnoreValue(SerieData serieData, double value)| +|IsIgnoreValue()||public bool IsIgnoreValue(SerieData serieData, int dimension = 1)| +|IsLegendName()||public bool IsLegendName(string legendName)| +|IsPerformanceMode()||public bool IsPerformanceMode()<br/>是否为性能模式。性能模式下不绘制Symbol,不刷新Label,不单独设置数据项配置。 | +|IsSerie<T>()||public bool IsSerie<T>() where T : Serie| +|IsSerieDataLegendName()||public bool IsSerieDataLegendName(string legendName)| +|IsSerieLegendName()||public bool IsSerieLegendName(string legendName)| +|IsUseCoord<T>()||public bool IsUseCoord<T>() where T : CoordSystem| +|RemoveAllComponents()||public void RemoveAllComponents()<br/>移除所有额外组件。 | +|RemoveComponent()||public void RemoveComponent(Type type)| +|RemoveComponent<T>()||public void RemoveComponent<T>() where T : ISerieComponent| +|RemoveData()||public void RemoveData(int index)<br/>移除指定索引的数据 | +|ResetDataIndex()||public bool ResetDataIndex()<br/>重置数据项索引。避免部分数据项的索引异常。 | +|ResetInteract()||public void ResetInteract()| +|SetAllDirty()||public override void SetAllDirty()| +|SetCoord<T>()||public bool SetCoord<T>() where T : CoordSystem| +|SetHighlight()||public void SetHighlight(int index, bool flag)<br/>设置指定索引的数据为高亮状态 | +|SetVerticesDirty()||public override void SetVerticesDirty()| +|UpdateData()||public bool UpdateData(int index, int dimension, double value)<br/>更新指定索引指定维数的数据 | +|UpdateData()||public bool UpdateData(int index, List<double> values)<br/>更新指定索引的数据项数据列表 | +|UpdateDataName()||public bool UpdateDataName(int index, string name)| +|UpdateXYData()||public bool UpdateXYData(int index, double xValue, double yValue)<br/>更新指定索引的维度X和维度Y的数据 | +|UpdateYData()||public bool UpdateYData(int index, double value)<br/>更新指定索引的维度Y数据 | ## SerieComponentAttribute -> XCharts.Runtime.SerieComponentAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + 可添加到Serie的组件。 -|public method|since|description| +|API|版本|描述| |--|--|--| |Contains()||public bool Contains(Type type)| |Contains<T>()||public bool Contains<T>() where T : ISerieComponent| @@ -978,14 +2326,16 @@ slug: /api ## SerieContext -> XCharts.Runtime.SerieContext +> class in XCharts.Runtime + ## SerieConvertAttribute -> XCharts.Runtime.SerieConvertAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + 可转化为哪些Serie类型。 -|public method|since|description| +|API|版本|描述| |--|--|--| |Contains()||public bool Contains(Type type)| |Contains<T>()||public bool Contains<T>() where T : Serie| @@ -994,12 +2344,59 @@ slug: /api |SerieConvertAttribute()||public SerieConvertAttribute(Type serie, Type serie2, Type serie3)| |SerieConvertAttribute()||public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)| +## SerieData + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +系列中的一个数据项。可存储数据名和1-n维个数据。 + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|EnsureComponent()|v3.6.0|public ISerieDataComponent EnsureComponent(Type type)<br/>确保数据项有指定类型的组件,如果没有则添加。 | +|EnsureComponent<T>()|v3.6.0|public T EnsureComponent<T>() where T : ChildComponent, ISerieDataComponent<br/>确保数据项有指定类型的组件,如果没有则添加。 | +|GetAddAnimationData()||public double GetAddAnimationData(double min, double max, float animationDuration = 500f, bool unscaledTime = false)| +|GetComponent<T>()||public T GetComponent<T>() where T : ChildComponent, ISerieDataComponent<br/>获取数据项的指定类型的组件,如果不存在则返回null。 | +|GetCurrData()||public double GetCurrData(int index, AnimationStyle animation, bool inverse = false, bool loop = false)| +|GetCurrData()||public double GetCurrData(int index, AnimationStyle animation, bool inverse, double min, double max, bool loop = false)| +|GetCurrData()||public double GetCurrData(int index, float dataAddDuration = 500f, float animationDuration = 500f, bool unscaledTime = false, bool inverse = false)| +|GetCurrData()||public double GetCurrData(int index, float dataAddDuration, float animationDuration, bool inverse, double min, double max, bool unscaledTime, bool loop = false)| +|GetData()||public double GetData(int index, bool inverse = false)| +|GetData()||public double GetData(int index, double min, double max)| +|GetFirstData()||public double GetFirstData(bool unscaledTime, float animationDuration = 500f)| +|GetLabelHeight()||public float GetLabelHeight()| +|GetLabelWidth()||public float GetLabelWidth()| +|GetLastData()||public double GetLastData()| +|GetMaxData()||public double GetMaxData(bool inverse = false)<br/>最大值。 | +|GetMinData()||public double GetMinData(bool inverse = false)<br/>最小值。 | +|GetMinMaxData()||public void GetMinMaxData(int startDimensionIndex, bool inverse, out double min, out double max)| +|GetOrAddComponent<T>()||public T GetOrAddComponent<T>() where T : ChildComponent, ISerieDataComponent| +|GetPreviousData()||public double GetPreviousData(int index, bool inverse = false)| +|GetTotalData()||public double GetTotalData()| +|IsDataChanged()||public bool IsDataChanged()| +|IsInPolygon()||public bool IsInPolygon(Vector2 p)| +|List<string>()||public static List<string> extraFieldList = new List<string>()<br/>系列中的一个数据项。可存储数据名和1-n维个数据。 | +|OnAdd()||public void OnAdd(AnimationStyle animation, double startValue = 0)| +|RemoveAllComponent()||public void RemoveAllComponent()| +|RemoveComponent()||public void RemoveComponent(Type type)| +|RemoveComponent<T>()||public void RemoveComponent<T>() where T : ISerieDataComponent| +|Reset()||public void Reset()| +|SetIconActive()||public void SetIconActive(bool flag)| +|SetLabelActive()||public void SetLabelActive(bool flag)| +|SetPolygon()||public void SetPolygon(params Vector2[] points)| +|SetPolygon()||public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4)| +|SetPolygon()||public void SetPolygon(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 p5)| +|UpdateData()||public bool UpdateData(int dimension, double value)| +|UpdateData()||public bool UpdateData(int dimension, double value, bool updateAnimation, bool unscaledTime, float animationDuration = 500f)| + ## SerieDataComponentAttribute -> XCharts.Runtime.SerieDataComponentAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) + 可添加到SerieData的组件。 -|public method|since|description| +|API|版本|描述| |--|--|--| |Contains()||public bool Contains(Type type)| |Contains<T>()||public bool Contains<T>() where T : ISerieComponent| @@ -1014,17 +2411,19 @@ slug: /api ## SerieDataContext -> XCharts.Runtime.SerieDataContext +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |Reset()||public void Reset()| ## SerieDataExtraFieldAttribute -> XCharts.Runtime.SerieDataExtraFieldAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |Contains()||public bool Contains(string field)| |SerieDataExtraFieldAttribute()||public SerieDataExtraFieldAttribute()| @@ -1038,27 +2437,30 @@ slug: /api ## SerieEventData -> XCharts.Runtime.SerieEventData +> class in XCharts.Runtime + serie事件的数据。 -|public method|since|description| +|API|版本|描述| |--|--|--| |Reset()||public void Reset()| ## SerieEventDataPool -> XCharts.Runtime.SerieEventDataPool +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |Get()||public static SerieEventData Get(Vector3 pos, int serieIndex, int dataIndex, int dimension, double value)| |Release()||public static void Release(SerieEventData toRelease)| ## SerieHandler -> XCharts.Runtime.SerieHandler +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |AfterUpdate()||public virtual void AfterUpdate() { }| |BeforeUpdate()||public virtual void BeforeUpdate() { }| @@ -1089,13 +2491,15 @@ serie事件的数据。 ## SerieHandler where T -> .SerieHandler where T / Subclasses: [SerieHandler<T>](#seriehandlert) +> class in / 子类: [SerieHandler<T>](#seriehandlert) + ## SerieHandler<T> -> XCharts.Runtime.SerieHandler<T> : [SerieHandler where T](#seriehandler where t),[Serie](#serie) +> class in XCharts.Runtime / 继承自: [SerieHandler where T](#seriehandler where t),[Serie](#serie) -|public method|since|description| + +|API|版本|描述| |--|--|--| |AfterUpdate()||public override void AfterUpdate()| |BeforeUpdate()||public override void BeforeUpdate()| @@ -1121,18 +2525,20 @@ serie事件的数据。 ## SerieHandlerAttribute -> XCharts.Runtime.SerieHandlerAttribute : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |SerieHandlerAttribute()||public SerieHandlerAttribute(Type handler)| |SerieHandlerAttribute()||public SerieHandlerAttribute(Type handler, bool allowMultiple)| ## SerieHelper -> XCharts.Runtime.SerieHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |CloneSerie<T>()||public static T CloneSerie<T>(Serie serie) where T : Serie| |CopySerie()||public static void CopySerie(Serie oldSerie, Serie newSerie)| @@ -1174,9 +2580,10 @@ serie事件的数据。 ## SerieLabelHelper -> XCharts.Runtime.SerieLabelHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |CanShowLabel()||public static bool CanShowLabel(Serie serie, SerieData serieData, LabelStyle label, int dimesion)| |GetLabelColor()||public static Color GetLabelColor(Serie serie, ThemeStyle theme, int index)| @@ -1184,9 +2591,10 @@ serie事件的数据。 ## SerieLabelPool -> XCharts.Runtime.SerieLabelPool +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |ClearAll()||public static void ClearAll()| |Release()||public static void Release(GameObject element)| @@ -1194,17 +2602,20 @@ serie事件的数据。 ## SerieParams -> XCharts.Runtime.SerieParams +> class in XCharts.Runtime + ## SeriesHelper -> XCharts.Runtime.SeriesHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetLastStackSerie()||public static Serie GetLastStackSerie(List<Serie> series, Serie serie)<br/>获得上一个同堆叠且显示的serie。 | |GetLegalSerieNameList()||public static List<string> GetLegalSerieNameList(List<Serie> series)| |GetMaxSerieDataCount()||public static int GetMaxSerieDataCount(List<Serie> series)| +|GetMinAnimationDuration()||public static float GetMinAnimationDuration(List<Serie> series)| |GetNameColor()||public static Color GetNameColor(BaseChart chart, int index, string name)| |GetStackSeries()||public static void GetStackSeries(List<Serie> series, ref Dictionary<int, List<Serie>> stackSeries)<br/>获得堆叠系列列表 | |IsAnyClipSerie()||public static bool IsAnyClipSerie(List<Serie> series)<br/>是否有需裁剪的serie。 | @@ -1216,31 +2627,147 @@ serie事件的数据。 |UpdateSerieNameList()||public static void UpdateSerieNameList(BaseChart chart, ref List<string> serieNameList)<br/>获得所有系列名,不包含空名字。 | |UpdateStackDataList()||public static void UpdateStackDataList(List<Serie> series, Serie currSerie, DataZoom dataZoom, List<List<SerieData>> dataList)| +## SerieSymbol + +> class in XCharts.Runtime / 继承自: [SymbolStyle](#symbolstyle),[ISerieDataComponent](#iseriedatacomponent) + +系列数据项的标记的图形 + +|API|版本|描述| +|--|--|--| +|GetSize()||public float GetSize(List<double> data, float themeSize)<br/>根据指定的sizeType获得标记的大小 | +|Reset()||public override void Reset()| +|ShowSymbol()||public bool ShowSymbol(int dataIndex, int dataCount)| + +## SerieTheme + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(SerieTheme theme)| +|SerieTheme()||public SerieTheme(ThemeType theme)| + +## Settings + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) + +全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(Settings settings)| +|Reset()||public override void Reset()| + +## SimplifiedBar + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer),[ISimplifiedSerie](#isimplifiedserie) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static SimplifiedBar ConvertSerie(Serie serie)| + ## SimplifiedBarChart -> XCharts.Runtime.SimplifiedBarChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## SimplifiedCandlestick + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer),[ISimplifiedSerie](#isimplifiedserie) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static SimplifiedCandlestick ConvertSerie(Serie serie)| ## SimplifiedCandlestickChart -> XCharts.Runtime.SimplifiedCandlestickChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + + +## SimplifiedLine + +> class in XCharts.Runtime / 继承自: [Serie](#serie),[INeedSerieContainer](#ineedseriecontainer),[ISimplifiedSerie](#isimplifiedserie) + + +|API|版本|描述| +|--|--|--| +|AddDefaultSerie()||public static Serie AddDefaultSerie(BaseChart chart, string serieName)| +|ConvertSerie()||public static SimplifiedLine ConvertSerie(Serie serie)| ## SimplifiedLineChart -> XCharts.Runtime.SimplifiedLineChart : [BaseChart](#basechart) +> class in XCharts.Runtime / 继承自: [BaseChart](#basechart) + ## Since -> XCharts.Runtime.Since : [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) +> class in XCharts.Runtime / 继承自: [Attribute](https://docs.unity3d.com/ScriptReference/30_search.html?q=attribute) -|public method|since|description| + +|API|版本|描述| |--|--|--| |Since()||public Since(string version)| +## SingleAxis + +> class in XCharts.Runtime / 继承自: [Axis](#axis),[IUpdateRuntimeData](#iupdateruntimedata) + +单轴。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()| +|UpdateRuntimeData()||public void UpdateRuntimeData(BaseChart chart)| + +## SingleAxisCoord + +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem) + + +## StageColor + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +|API|版本|描述| +|--|--|--| +|StageColor()||public StageColor(float percent, Color32 color)| + +## StateStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [BlurStyle](#blurstyle),[EmphasisStyle](#emphasisstyle),[SelectStyle](#selectstyle) + +> 从 `v3.2.0` 开始支持 + +Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种状态。 + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|Reset()||public void Reset()| + +## SubTitleTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) + + +|API|版本|描述| +|--|--|--| +|SubTitleTheme()||public SubTitleTheme(ThemeType theme) : base(theme)| + ## SVG -> XUGL.SVG +> class in XUGL -|public method|since|description| + +|API|版本|描述| |--|--|--| |DrawPath()||public static void DrawPath(VertexHelper vh, string path)| |DrawPath()||public static void DrawPath(VertexHelper vh, SVGPath path)| @@ -1248,13 +2775,15 @@ serie事件的数据。 ## SVGImage -> XCharts.Runtime.SVGImage : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) +> class in XCharts.Runtime / 继承自: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) + ## SVGPath -> XUGL.SVGPath +> class in XUGL -|public method|since|description| + +|API|版本|描述| |--|--|--| |AddSegment()||public void AddSegment(SVGPathSeg seg)| |Draw()||public void Draw(VertexHelper vh)| @@ -1262,36 +2791,194 @@ serie事件的数据。 ## SVGPathSeg -> XUGL.SVGPathSeg +> class in XUGL -|public method|since|description| + +|API|版本|描述| |--|--|--| |SVGPathSeg()||public SVGPathSeg(SVGPathSegType type)| +## SymbolStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [SerieSymbol](#seriesymbol) + +系列数据项的标记的图形 + +|API|版本|描述| +|--|--|--| +|GetColor()||public Color32 GetColor(Color32 defaultColor)| +|Reset()||public virtual void Reset()| + +## TextLimit + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。 + +|API|版本|描述| +|--|--|--| +|Clone()||public TextLimit Clone()| +|Copy()||public void Copy(TextLimit textLimit)| +|GetLimitContent()||public string GetLimitContent(string content)| +|SetRelatedText()||public void SetRelatedText(ChartText txt, float labelWidth)| + +## TextPadding + +> class in XCharts.Runtime / 继承自: [Padding](#padding) + +文本的内边距设置。 + +|API|版本|描述| +|--|--|--| +|TextPadding()||public TextPadding() { }| +|TextPadding()||public TextPadding(float top, float right, float bottom, float left)| + +## TextStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +文本的相关设置。 + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(TextStyle textStyle)| +|GetAlignment()||public TextAnchor GetAlignment(TextAnchor defaultAlignment)| +|GetColor()||public Color GetColor(Color defaultColor)| +|GetFontSize()||public int GetFontSize(ComponentTheme defaultTheme)| +|TextStyle()||public TextStyle() { }| +|TextStyle()||public TextStyle(int fontSize)| +|TextStyle()||public TextStyle(int fontSize, FontStyle fontStyle)| +|TextStyle()||public TextStyle(int fontSize, FontStyle fontStyle, Color color)| +|TextStyle()||public TextStyle(int fontSize, FontStyle fontStyle, Color color, int rorate)| +|UpdateAlignmentByLocation()||public void UpdateAlignmentByLocation(Location location)| + +## Theme + +> class in XCharts.Runtime / 继承自: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=scriptableobject) + +主题相关配置。 + +|API|版本|描述| +|--|--|--| +|CheckWarning()||public void CheckWarning(StringBuilder sb)| +|CloneTheme()||public Theme CloneTheme()<br/>克隆主题。 | +|CopyTheme()||public bool CopyTheme(ThemeType theme)| +|CopyTheme()||public void CopyTheme(Theme theme)<br/>复制主题的所有配置。 | +|GetColor()||public Color32 GetColor(int index)<br/>获得调色盘对应系列索引的颜色值。 | +|GetColor()||public static Color32 GetColor(string hexColorStr)<br/>将字符串颜色值转成Color。 | +|GetColorStr()||public string GetColorStr(int index)<br/>获得指定索引的十六进制颜色值字符串。 | +|GetHashCode()||public override int GetHashCode()| +|ResetTheme()||public bool ResetTheme()<br/>重置,清除所有自定义配置。 | +|ResetToDarkTheme()||public static void ResetToDarkTheme(Theme theme)<br/>暗主题。 | +|ResetToDefaultTheme()||public static void ResetToDefaultTheme(Theme theme)<br/>默认主题。 | +|SetColorPalette()||public void SetColorPalette(List<string> hexColorStringList)| +|SetDefaultFont()||public void SetDefaultFont()| +|SyncFontToSubComponent()||public void SyncFontToSubComponent()| +|SyncTMPFontToSubComponent()||public void SyncTMPFontToSubComponent()| + +## ThemeStyle + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +主题相关配置。 + +|API|版本|描述| +|--|--|--| +|CheckWarning()||public void CheckWarning(StringBuilder sb)| +|GetBackgroundColor()||public Color32 GetBackgroundColor(Background background)| +|GetColor()||public Color32 GetColor(int index)<br/>获得调色盘对应系列索引的颜色值。 | +|GetColor()||public static Color32 GetColor(string hexColorStr)<br/>将字符串颜色值转成Color。 | +|GetColorStr()||public string GetColorStr(int index)<br/>获得指定索引的十六进制颜色值字符串。 | +|SyncSharedThemeColorToCustom()||public void SyncSharedThemeColorToCustom()| + +## Title + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent),[IPropertyChanged](#ipropertychanged) + +标题组件,包含主标题和副标题。 + +|API|版本|描述| +|--|--|--| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|OnChanged()||public void OnChanged()| + +## TitleStyle + +> class in XCharts.Runtime / 继承自: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieComponent](#iseriecomponent) + +标题相关设置。 + +## TitleTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) + + +|API|版本|描述| +|--|--|--| +|TitleTheme()||public TitleTheme(ThemeType theme) : base(theme)| + +## Tooltip + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) + +提示框组件。 + +|API|版本|描述| +|--|--|--| +|AddSerieDataIndex()||public void AddSerieDataIndex(int serieIndex, int dataIndex)| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearData()||public override void ClearData()| +|ClearSerieDataIndex()||public void ClearSerieDataIndex()| +|GetContentLabelStyle()||public LabelStyle GetContentLabelStyle(int index)| +|IsActive()||public bool IsActive()<br/>提示框是否显示 | +|isAnySerieDataIndex()||public bool isAnySerieDataIndex()| +|IsSelected()||public bool IsSelected()<br/>当前提示框是否选中数据项 | +|IsSelected()||public bool IsSelected(int index)<br/>指定索引的数据项是否被提示框选中 | +|IsTriggerAxis()||public bool IsTriggerAxis()| +|IsTriggerItem()||public bool IsTriggerItem()| +|KeepTop()||public void KeepTop()<br/>保持Tooltiop显示在最顶上 | +|SetActive()||public void SetActive(bool flag)<br/>设置Tooltip组件是否显示 | +|SetContentActive()||public void SetContentActive(bool flag)<br/>设置文本框是否显示 | +|UpdateContentPos()||public void UpdateContentPos(Vector2 pos, float width, float height)<br/>更新文本框位置 | + ## TooltipContext -> XCharts.Runtime.TooltipContext +> class in XCharts.Runtime + ## TooltipData -> XCharts.Runtime.TooltipData +> class in XCharts.Runtime + ## TooltipHelper -> XCharts.Runtime.TooltipHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetItemNumericFormatter()||public static string GetItemNumericFormatter(Tooltip tooltip, Serie serie, SerieData serieData)| |GetLineColor()||public static Color32 GetLineColor(Tooltip tooltip, Color32 defaultColor)| |IsIgnoreFormatter()||public static bool IsIgnoreFormatter(string itemFormatter)| |LimitInRect()||public static void LimitInRect(Tooltip tooltip, Rect chartRect)| +## TooltipTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) + + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(TooltipTheme theme)| +|TooltipTheme()||public TooltipTheme(ThemeType theme) : base(theme)| + ## TooltipView -> XCharts.Runtime.TooltipView +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |CreateView()||public static TooltipView CreateView(Tooltip tooltip, ThemeStyle theme, Transform parent)| |GetCurrentPos()||public Vector3 GetCurrentPos()| @@ -1303,14 +2990,16 @@ serie事件的数据。 ## TooltipViewItem -> XCharts.Runtime.TooltipViewItem +> class in XCharts.Runtime + ## UGL -> XUGL.UGL +> class in XUGL + UGUI 图形库 -|public method|since|description| +|API|版本|描述| |--|--|--| |DrawDiamond()||public static void DrawDiamond(VertexHelper vh, Vector3 center, float size, Color32 color)<br/>Draw a diamond. 画菱形(钻石形状) | |DrawDiamond()||public static void DrawDiamond(VertexHelper vh, Vector3 center, float size, Color32 color, Color32 toColor)<br/>Draw a diamond. 画菱形(钻石形状) | @@ -1338,13 +3027,15 @@ UGUI 图形库 ## UGLExample -> XUGL.UGLExample : [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) +> class in XUGL / 继承自: [MaskableGraphic](https://docs.unity3d.com/ScriptReference/30_search.html?q=maskablegraphic) + ## UGLHelper -> XUGL.UGLHelper +> class in XUGL -|public method|since|description| + +|API|版本|描述| |--|--|--| |GetAngle360()||public static float GetAngle360(Vector2 from, Vector2 to)<br/>获得0-360的角度(12点钟方向为0度) | |GetBezier()||public static Vector3 GetBezier(float t, Vector3 sp, Vector3 cp, Vector3 ep)| @@ -1372,31 +3063,65 @@ UGUI 图形库 ## UIComponent -> XCharts.Runtime.UIComponent : [BaseGraph](#basegraph) +> class in XCharts.Runtime / 继承自: [BaseGraph](#basegraph) + UI组件基类。 -|public method|since|description| +|API|版本|描述| |--|--|--| +|SetAllDirty()||public override void SetAllDirty()| +|SetDataDirty()|v3.9.0|public void SetDataDirty()| +|SetVerticesDirty()||public override void SetVerticesDirty()| |UpdateTheme()||public bool UpdateTheme(ThemeType theme)<br/>切换内置主题。 | +## UIComponentTheme + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + ## UIHelper -> XCharts.Runtime.UIHelper +> class in XCharts.Runtime + UI帮助类。 -|public method|since|description| +|API|版本|描述| |--|--|--| |GetBackgroundColor()||public static Color32 GetBackgroundColor(UIComponent component)| +## VisualMap + +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) + +视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 + +|API|版本|描述| +|--|--|--| +|AddColors()||public void AddColors(List<Color32> colors)| +|AddColors()||public void AddColors(List<string> colors)| +|ClearComponentDirty()||public override void ClearComponentDirty()| +|ClearVerticesDirty()||public override void ClearVerticesDirty()| +|GetColor()||public Color32 GetColor(double value)| +|GetIndex()||public int GetIndex(double value)| +|GetValue()||public double GetValue(Vector3 pos, Rect chartRect)| +|IsInRangeMaxRect()||public bool IsInRangeMaxRect(Vector3 local, Rect chartRect, float triangleLen)| +|IsInRangeMinRect()||public bool IsInRangeMinRect(Vector3 local, Rect chartRect, float triangleLen)| +|IsInRangeRect()||public bool IsInRangeRect(Vector3 local, Rect chartRect)| +|IsInRect()||public bool IsInRect(Vector3 local, Rect chartRect, float triangleLen = 20)| +|IsInSelectedValue()||public bool IsInSelectedValue(double value)| +|IsPiecewise()||public bool IsPiecewise()| + ## VisualMapContext -> XCharts.Runtime.VisualMapContext : [MainComponentContext](#maincomponentcontext) +> class in XCharts.Runtime / 继承自: [MainComponentContext](#maincomponentcontext) + ## VisualMapHelper -> XCharts.Runtime.VisualMapHelper +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |AutoSetLineMinMax()||public static void AutoSetLineMinMax(VisualMap visualMap, Serie serie, bool isY, Axis axis, Axis relativedAxis)| |GetDimension()||public static int GetDimension(VisualMap visualMap, int defaultDimension)| @@ -1405,11 +3130,41 @@ UI帮助类。 |IsNeedLineGradient()||public static bool IsNeedLineGradient(VisualMap visualMap)| |SetMinMax()||public static void SetMinMax(VisualMap visualMap, double min, double max)| +## VisualMapRange + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + + +|API|版本|描述| +|--|--|--| +|Contains()||public bool Contains(double value, double minMaxRange)| + +## VisualMapTheme + +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) + + +|API|版本|描述| +|--|--|--| +|Copy()||public void Copy(VisualMapTheme theme)| +|VisualMapTheme()||public VisualMapTheme(ThemeType theme) : base(theme)| + +## XAxis + +> class in XCharts.Runtime / 继承自: [Axis](#axis) + +直角坐标系 grid 中的 x 轴。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()<br/>直角坐标系 grid 中的 x 轴。 | + ## XChartsMgr -> XCharts.Runtime.XChartsMgr +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |AddChart()||public static void AddChart(BaseChart chart)| |ContainsChart()||public static bool ContainsChart(BaseChart chart)| @@ -1424,17 +3179,41 @@ UI帮助类。 ## XCResourceImporterWindow -> XCharts.Runtime.XCResourceImporterWindow : [UnityEditor.EditorWindow](https://docs.unity3d.com/ScriptReference/30_search.html?q=unityeditor.editorwindow) +> class in XCharts.Runtime / 继承自: [UnityEditor.EditorWindow](https://docs.unity3d.com/ScriptReference/30_search.html?q=unityeditor.editorwindow) -|public method|since|description| + +|API|版本|描述| |--|--|--| |ShowPackageImporterWindow()||public static void ShowPackageImporterWindow()| +## XCResourcesImporter + +> class in XCharts.Runtime + + +|API|版本|描述| +|--|--|--| +|OnDestroy()||public void OnDestroy() { }| +|OnGUI()||public void OnGUI()| +|XCResourcesImporter()||public XCResourcesImporter() { }| + +## XCSettings + +> class in XCharts.Runtime / 继承自: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=scriptableobject) + + +|API|版本|描述| +|--|--|--| +|AddCustomTheme()||public static bool AddCustomTheme(Theme theme)| +|ExistAssetFile()||public static bool ExistAssetFile()| +|GetSettingAssetPath()||public static string GetSettingAssetPath()| + ## XCThemeMgr -> XCharts.Runtime.XCThemeMgr +> class in XCharts.Runtime -|public method|since|description| + +|API|版本|描述| |--|--|--| |AddTheme()||public static void AddTheme(Theme theme)| |CheckReloadTheme()||public static void CheckReloadTheme()| @@ -1453,10 +3232,11 @@ UI帮助类。 ## XLog -> XCharts.Runtime.XLog : [MonoBehaviour](#monobehaviour) +> class in XCharts.Runtime / 继承自: [MonoBehaviour](#monobehaviour) + 日志系统。用于输出带日期和日志类型的日志,支持输出到文件,支持自定义输出的日志类型。 -|public method|since|description| +|API|版本|描述| |--|--|--| |CanLog()||public static bool CanLog(int level)| |ClearAllLog()||public static void ClearAllLog()| @@ -1474,3 +3254,13 @@ UI帮助类。 |Vital()||public static void Vital(string log)| |Warning()||public static void Warning(string log)| +## YAxis + +> class in XCharts.Runtime / 继承自: [Axis](#axis) + +直角坐标系 grid 中的 y 轴。 + +|API|版本|描述| +|--|--|--| +|SetDefaultValue()||public override void SetDefaultValue()<br/>直角坐标系 grid 中的 y 轴。 | + diff --git a/Documentation~/zh/changelog.md b/Documentation~/zh/changelog.md index 0eb30888..088708c3 100644 --- a/Documentation~/zh/changelog.md +++ b/Documentation~/zh/changelog.md @@ -6,6 +6,7 @@ slug: /changelog # 更新日志 [master](#master) +[v3.9.0](#v390) [v3.8.1](#v381) [v3.8.0](#v380) [v3.7.0](#v370) @@ -69,6 +70,46 @@ slug: /changelog ## master +## v3.9.0 + +版本要点: + +* 增加`Axis`的`Animation`,完善数据变更动画效果 +* 增加`Axis`的对数轴子刻度的支持 +* 增加`MarkLine`的`onTop`设置是否显示在最上层 +* 完善代码注释和手册文档 +* 修复若干问题 + +扩展功能: + +* `UITable`增加轮播功能 +* `UITable`增加数据操作接口和回调函数 +* `Pie3DChart`优化绘制表现 + +日志详情: + +* (2023.12.01) 发布`v3.9.0`版本 +* (2023.12.01) 修复`Tooltip`的`titleFormatter`设置为`{b}`后显示不准确的问题 +* (2023.11.30) 增加`SerieData`可单独添加`Label`的支持 +* (2023.11.28) 修复`Tooltip`在对数轴时指示不准确的问题 +* (2023.11.24) 修复`Chart`的`UpdateData()`接口返回值不准确的问题 +* (2023.11.24) 修复`Axis`的更新数据时效果不顺畅的问题 +* (2023.11.23) 增加`Axis`的`Animation`支持动画效果 +* (2023.11.16) 取消`Legend`的`formatter`,用`LabelStyle`的代替 +* (2023.11.14) 完善`LabelStyle`的`formatter`的注释和文档(#291) +* (2023.11.11) 修复`Documentation`部分注释生成文档不完整的问题 (#290) +* (2023.11.11) 修复`Legend`的`formatter`在数据变更时没有自动刷新的问题 +* (2023.11.05) 修复`SerieEventData`的`value`一直是0的问题 (#287) +* (2023.11.03) 修复`Bar`设置渐变色时鼠标移出效果异常的问题 (#285) +* (2023.11.02) 优化`SerieData`设置`ignore`时`formatter`的忽略问题 +* (2023.11.01) 增加`MarkLine`的`onTop`设置是否显示在最上层 +* (2023.10.21) 修复`Pie`有0数据时`Label`的位置异常的问题 +* (2023.10.21) 增加`Axis`的对数轴支持子刻度 +* (2023.10.19) 修复`Pie`设置玫瑰图时引导线异常的问题 +* (2023.10.15) 修复`Line`设置`Animation`为`AlongPath`时动画异常的问题 (#281) +* (2023.10.12) 修复`MarkLine`指定`yValue`时对数值轴无效的问题 +* (2023.10.11) 修复`Serie`的`showDataDimension`设置无效的问题 + ## v3.8.1 * (2023.10.02) 发布`v3.8.1`版本 @@ -109,7 +150,7 @@ slug: /changelog * (2023.08.22) 修复`Bar`显示隐藏时绘制表现异常的问题 * (2023.08.22) 优化`Zebra`斑马柱图的绘制表现 (#276) * (2023.08.16) 增加`Daemon`守护程序,解决本地开启TMP后更新版本报错问题 -* (2023.08.15) 修复`Data`数据在-1到1之间时坐标轴显示错误的问题 (#273) (by __Ambitroc__) +* (2023.08.15) 修复`Data`数据在-1到1之间时坐标轴显示错误的问题 (#273) (by **Ambitroc**) * (2023.08.14) 修复`XCharts`本地开启`TextMeshPro`和 `NewInputSystem`后更新版本会报错的问题 (#272) * (2023.08.12) 修复`Chart`在运行时被删除时会异常报错的问题 (#269) * (2023.08.11) 修复`DataZoom`开启时可能会导致无法添加数据的问题 @@ -150,7 +191,7 @@ slug: /changelog * (2023.06.08) 发布`v3.7.0`版本 * (2023.06.04) 增加`HelpDoc`帮助文档跳转 -* (2023.05.30) 修复`Serie`的名字带`_`线导致`Legend`无法触发的问题 (#259) (by __svr2kos2__) +* (2023.05.30) 修复`Serie`的名字带`_`线导致`Legend`无法触发的问题 (#259) (by **svr2kos2**) * (2023.05.10) 增加`Axis`的`MinMaxAuto`范围类型 * (2023.05.10) 增加`Line`对`Clip`的支持 * (2023.05.04) 优化`Axis`在-1到1范围时设置`CeilRate`不生效的问题 @@ -169,9 +210,9 @@ slug: /changelog 版本要点: -* 增加`InputSystem`支持 (by __Bian-Sh__) -* 增加官网[在线示例](https://xcharts-team.github.io/examples/)多版本支持 (by __SHL-COOL__) -* 完善对`VR`的支持 (by __Ambitroc__) +* 增加`InputSystem`支持 (by **Bian-Sh**) +* 增加官网[在线示例](https://xcharts-team.github.io/examples/)多版本支持 (by **SHL-COOL**) +* 完善对`VR`的支持 (by **Ambitroc**) * 增加`UITable`,`UIStatistic`等[扩展UI组件](https://xcharts-team.github.io/docs/ui) * 增加`ItemStyle`的`MarkColor` * 增加通配符`{h}`的支持 @@ -187,9 +228,9 @@ slug: /changelog * (2023.04.01) 发布`v3.6.0`版本 * (2023.03.14) 修复`Tooltip`的`titleFormater`设置`{b}`可能不生效的问题 -* (2023.03.14) 修复`BarChart`在数据为0时不绘制柱条背景的问题 (#250) (by __Ambitroc__) +* (2023.03.14) 修复`BarChart`在数据为0时不绘制柱条背景的问题 (#250) (by **Ambitroc**) * (2023.03.12) 增加`LabelStyle`的`autoRotate`可设置有角度的竖版文本的自动旋转 -* (2023.03.10) 增加`VR`等其他非鼠标输入方式的Point位置获取 (#248) (by __Ambitroc__) +* (2023.03.10) 增加`VR`等其他非鼠标输入方式的Point位置获取 (#248) (by **Ambitroc**) * (2023.03.09) 增加`Chart`的`onSerieClick`,`onSerieDown`,`onSerieEnter`和`onSerieExit`回调 * (2023.03.09) 修复`Pie`的点击选中偏移不生效的问题 * (2023.03.04) 增加`Legend`的`Positions`可自定义图例的位置 @@ -203,7 +244,7 @@ slug: /changelog * (2023.02.02) 修复`DataZoom`开启时`X轴`的`Label`可能会显示在图表外的问题 * (2023.02.02) 优化`SerieData`的`ignore`设置时的忽略数据判断 * (2023.02.01) 修复`XChartsMgr.ContainsChart()`接口异常 -* (2023.01.31) 增加`InputSystem`的支持 (#242) (by __Bian-Sh__) +* (2023.01.31) 增加`InputSystem`的支持 (#242) (by **Bian-Sh**) * (2023.01.11) 修复`Inspector`上移除`Component`后图表没有及时刷新的问题 (#241) * (2023.01.06) 修复`Pie`在最后的几个数据都为0时`Label`显示不正常的问题 (#240) * (2023.01.03) 删除`Serie`的`MarkColor`,增加`ItemStyle`的`MarkColor` diff --git a/Documentation~/zh/configuration.md b/Documentation~/zh/configuration.md index 4ef05de9..a8e29b40 100644 --- a/Documentation~/zh/configuration.md +++ b/Documentation~/zh/configuration.md @@ -81,6 +81,7 @@ import APITable from '@site/src/components/APITable'; - [AnimationStyle](#animationstyle) - [AreaStyle](#areastyle) - [ArrowStyle](#arrowstyle) +- [AxisAnimation](#axisanimation) - [AxisLabel](#axislabel) - [AxisLine](#axisline) - [AxisMinorSplitLine](#axisminorsplitline) @@ -197,7 +198,7 @@ import APITable from '@site/src/components/APITable'; ## AngleAxis -> XCharts.Runtime.AngleAxis : [Axis](#axis) +> class in XCharts.Runtime / 继承自: [Axis](#axis) 极坐标系的角度轴。 @@ -205,8 +206,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AngleAxis"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |startAngle|0||起始刻度的角度,默认为 0 度,即圆心的正右方。 @@ -216,11 +216,11 @@ import APITable from '@site/src/components/APITable'; ## AngleAxisTheme -> XCharts.Runtime.AngleAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) ## AnimationAddition -> XCharts.Runtime.AnimationAddition : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) > 从 `v3.8.0` 开始支持 @@ -228,7 +228,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationChange -> XCharts.Runtime.AnimationChange : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) > 从 `v3.8.0` 开始支持 @@ -236,7 +236,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationFadeIn -> XCharts.Runtime.AnimationFadeIn : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) > 从 `v3.8.0` 开始支持 @@ -244,7 +244,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationFadeOut -> XCharts.Runtime.AnimationFadeOut : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) > 从 `v3.8.0` 开始支持 @@ -252,7 +252,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationHiding -> XCharts.Runtime.AnimationHiding : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) > 从 `v3.8.0` 开始支持 @@ -260,7 +260,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationInfo -> XCharts.Runtime.AnimationInfo / Subclasses: [AnimationFadeIn](#animationfadein), [AnimationFadeOut](#animationfadeout), [AnimationChange](#animationchange), [AnimationAddition](#animationaddition), [AnimationHiding](#animationhiding), [AnimationInteraction](#animationinteraction) +> class in XCharts.Runtime / 子类: [AnimationFadeIn](#animationfadein), [AnimationFadeOut](#animationfadeout), [AnimationChange](#animationchange), [AnimationAddition](#animationaddition), [AnimationHiding](#animationhiding), [AnimationInteraction](#animationinteraction) > 从 `v3.8.0` 开始支持 @@ -270,8 +270,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AnimationInfo"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |enable|true|v3.8.0|是否开启动画效果。 |reverse|false|v3.8.0|是否开启反向动画效果。 @@ -284,7 +283,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationInteraction -> XCharts.Runtime.AnimationInteraction : [AnimationInfo](#animationinfo) +> class in XCharts.Runtime / 继承自: [AnimationInfo](#animationinfo) > 从 `v3.8.0` 开始支持 @@ -294,8 +293,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AnimationInteraction"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |width||v3.8.0|宽度的多样式数值。 [MLValue](#mlvalue)| |radius||v3.8.0|半径的多样式数值。 [MLValue](#mlvalue)| @@ -307,7 +305,7 @@ import APITable from '@site/src/components/APITable'; ## AnimationStyle -> XCharts.Runtime.AnimationStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 动画组件,用于控制图表的动画播放。支持配置五种动画表现:FadeIn(渐入动画),FadeOut(渐出动画),Change(变更动画),Addition(新增动画),Interaction(交互动画)。 按作用的对象可以分为两类:SerieAnimation(系列动画)和DataAnimation(数据动画)。 @@ -315,8 +313,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AnimationStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |enable|true||是否开启动画效果。 |type|||动画类型。<br/>`AnimationType`:<br/>- `Default`: 默认。内部会根据实际情况选择一种动画播放方式。<br/>- `LeftToRight`: 从左往右播放动画。<br/>- `BottomToTop`: 从下往上播放动画。<br/>- `InsideOut`: 由内到外播放动画。<br/>- `AlongPath`: 沿着路径播放动画。当折线图从左到右无序或有折返时,可以使用该模式。<br/>- `Clockwise`: 顺时针播放动画。<br/>| @@ -336,7 +333,7 @@ import APITable from '@site/src/components/APITable'; ## AreaStyle -> XCharts.Runtime.AreaStyle : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) 区域填充样式。 @@ -344,8 +341,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AreaStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示区域填充。 |origin|||区域填充的起始位置。<br/>`AreaStyle.AreaOrigin`:<br/>- `Auto`: 填充坐标轴轴线到数据间的区域。<br/>- `Start`: 填充坐标轴底部到数据间的区域。<br/>- `End`: 填充坐标轴顶部到数据间的区域。<br/>| @@ -361,14 +357,13 @@ import APITable from '@site/src/components/APITable'; ## ArrowStyle -> XCharts.Runtime.ArrowStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="ArrowStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |width|10||箭头宽。 |height|15||箭头高。 @@ -382,7 +377,7 @@ import APITable from '@site/src/components/APITable'; ## Axis -> XCharts.Runtime.Axis : [MainComponent](#maincomponent) / Subclasses: [AngleAxis](#angleaxis), [ParallelAxis](#parallelaxis), [RadiusAxis](#radiusaxis), [SingleAxis](#singleaxis), [XAxis](#xaxis), [YAxis](#yaxis) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) / 子类: [AngleAxis](#angleaxis), [ParallelAxis](#parallelaxis), [RadiusAxis](#radiusaxis), [SingleAxis](#singleaxis), [XAxis](#xaxis), [YAxis](#yaxis) 直角坐标系的坐标轴组件。 @@ -390,8 +385,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="Axis"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示坐标轴。 |type|||坐标轴类型。<br/>`Axis.AxisType`:<br/>- `Value`: 数值轴。适用于连续数据。<br/>- `Category`: 类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。serie的数据第0维数据对应坐标轴data的index。<br/>- `Log`: 对数轴。适用于对数数据。<br/>- `Time`: 时间轴。适用于连续的时序数据。<br/>| @@ -421,6 +415,7 @@ import APITable from '@site/src/components/APITable'; |axisLabel|||坐标轴刻度标签。 [AxisLabel](#axislabel)| |splitLine|||坐标轴分割线。 [AxisSplitLine](#axissplitline)| |splitArea|||坐标轴分割区域。 [AxisSplitArea](#axissplitarea)| +|animation|||坐标轴动画。 [AxisAnimation](#axisanimation)| |minorTick||v3.2.0|坐标轴次刻度。 [AxisMinorTick](#axisminortick)| |minorSplitLine||v3.2.0|坐标轴次分割线。 [AxisMinorSplitLine](#axisminorsplitline)| |indicatorLabel||v3.4.0|指示器文本的样式。Tooltip为Cross时使用。 [LabelStyle](#labelstyle)| @@ -429,9 +424,31 @@ import APITable from '@site/src/components/APITable'; </APITable> ``` +## AxisAnimation + +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +> 从 `v3.9.0` 开始支持 + +坐标轴动画配置。 + +```mdx-code-block +<APITable name="AxisAnimation"> +``` + +|参数|默认|版本|描述| +|--|--|--|--| +|show|true||是否开启动画。 +|duration|||动画时长(ms)。 默认设置为0时,会自动获取serie的动画时长。 +|unscaledTime|||动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。 + +```mdx-code-block +</APITable> +``` + ## AxisLabel -> XCharts.Runtime.AxisLabel : [LabelStyle](#labelstyle) +> class in XCharts.Runtime / 继承自: [LabelStyle](#labelstyle) 坐标轴刻度标签的相关设置。 @@ -439,8 +456,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisLabel"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |interval|0||坐标轴刻度标签的显示间隔,在类目轴中有效。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 |inside|false||刻度标签是否朝内,默认朝外。 @@ -456,7 +472,7 @@ import APITable from '@site/src/components/APITable'; ## AxisLine -> XCharts.Runtime.AxisLine : [BaseLine](#baseline) +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) 坐标轴轴线。 @@ -464,8 +480,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisLine"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |onZero|||X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一个轴为数值轴且包含 0 刻度时有效。 |showArrow|||是否显示箭头。 @@ -477,7 +492,7 @@ import APITable from '@site/src/components/APITable'; ## AxisMinorSplitLine -> XCharts.Runtime.AxisMinorSplitLine : [BaseLine](#baseline) +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) > 从 `v3.2.0` 开始支持 @@ -487,8 +502,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisMinorSplitLine"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |distance|||刻度线与轴线的距离。 |autoColor|||自动设置颜色。 @@ -499,7 +513,7 @@ import APITable from '@site/src/components/APITable'; ## AxisMinorTick -> XCharts.Runtime.AxisMinorTick : [BaseLine](#baseline) +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) > 从 `v3.2.0` 开始支持 @@ -509,8 +523,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisMinorTick"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |splitNumber|5||分隔线之间分割的刻度数。 |autoColor||| @@ -521,7 +534,7 @@ import APITable from '@site/src/components/APITable'; ## AxisName -> XCharts.Runtime.AxisName : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 坐标轴名称。 @@ -529,8 +542,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisName"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|||是否显示坐标轴名称。 |name|||坐标轴名称。 @@ -543,7 +555,7 @@ import APITable from '@site/src/components/APITable'; ## AxisSplitArea -> XCharts.Runtime.AxisSplitArea : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 坐标轴在 grid 区域中的分隔区域,默认不显示。 @@ -551,8 +563,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisSplitArea"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|||是否显示分隔区域。 |color|||分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 @@ -563,7 +574,7 @@ import APITable from '@site/src/components/APITable'; ## AxisSplitLine -> XCharts.Runtime.AxisSplitLine : [BaseLine](#baseline) +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) 坐标轴在 grid 区域中的分隔线。 @@ -571,8 +582,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisSplitLine"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |interval|||坐标轴分隔线的显示间隔。 |distance|||刻度线与轴线的距离。 @@ -586,11 +596,11 @@ import APITable from '@site/src/components/APITable'; ## AxisTheme -> XCharts.Runtime.AxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) ## AxisTick -> XCharts.Runtime.AxisTick : [BaseLine](#baseline) +> class in XCharts.Runtime / 继承自: [BaseLine](#baseline) 坐标轴刻度相关设置。 @@ -598,8 +608,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="AxisTick"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |alignWithLabel|||类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。 |inside|||坐标轴刻度是否朝内,默认朝外。 @@ -615,7 +624,7 @@ import APITable from '@site/src/components/APITable'; ## Background -> XCharts.Runtime.Background : [MainComponent](#maincomponent) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 背景组件。 @@ -623,8 +632,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="Background"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否启用背景组件。 |image|||背景图。 @@ -638,18 +646,17 @@ import APITable from '@site/src/components/APITable'; ## Bar -> XCharts.Runtime.Bar : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## BaseAxisTheme -> XCharts.Runtime.BaseAxisTheme : [ComponentTheme](#componenttheme) / Subclasses: [AxisTheme](#axistheme), [RadiusAxisTheme](#radiusaxistheme), [AngleAxisTheme](#angleaxistheme), [PolarAxisTheme](#polaraxistheme), [RadarAxisTheme](#radaraxistheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) / 子类: [AxisTheme](#axistheme), [RadiusAxisTheme](#radiusaxistheme), [AngleAxisTheme](#angleaxistheme), [PolarAxisTheme](#polaraxistheme), [RadarAxisTheme](#radaraxistheme) ```mdx-code-block <APITable name="BaseAxisTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |lineType|||坐标轴线类型。<br/>`LineStyle.Type`:<br/>- `Solid`: 实线<br/>- `Dashed`: 虚线<br/>- `Dotted`: 点线<br/>- `DashDot`: 点划线<br/>- `DashDotDot`: 双点划线<br/>- `None`: 双点划线<br/>| |lineWidth|1f||坐标轴线宽。 @@ -671,7 +678,7 @@ import APITable from '@site/src/components/APITable'; ## BaseLine -> XCharts.Runtime.BaseLine : [ChildComponent](#childcomponent) / Subclasses: [AxisLine](#axisline), [AxisMinorSplitLine](#axisminorsplitline), [AxisMinorTick](#axisminortick), [AxisSplitLine](#axissplitline), [AxisTick](#axistick) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [AxisLine](#axisline), [AxisMinorSplitLine](#axisminorsplitline), [AxisMinorTick](#axisminortick), [AxisSplitLine](#axissplitline), [AxisTick](#axistick) 线条基础配置。 @@ -679,8 +686,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="BaseLine"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|||是否显示坐标轴轴线。 |lineStyle|||线条样式 [LineStyle](#linestyle)| @@ -691,15 +697,15 @@ import APITable from '@site/src/components/APITable'; ## BaseScatter -> XCharts.Runtime.BaseScatter : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) / Subclasses: [EffectScatter](#effectscatter), [Scatter](#scatter) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) / 子类: [EffectScatter](#effectscatter), [Scatter](#scatter) ## BaseSerie -> XCharts.Runtime.BaseSerie / Subclasses: [Serie](#serie) +> class in XCharts.Runtime / 子类: [Serie](#serie) ## BlurStyle -> XCharts.Runtime.BlurStyle : [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) > 从 `v3.2.0` 开始支持 @@ -707,23 +713,23 @@ import APITable from '@site/src/components/APITable'; ## CalendarCoord -> XCharts.Runtime.CalendarCoord : [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) ## Candlestick -> XCharts.Runtime.Candlestick : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## ChartText -> XCharts.Runtime.ChartText +> class in XCharts.Runtime ## ChildComponent -> XCharts.Runtime.ChildComponent / Subclasses: [AnimationStyle](#animationstyle), [AxisName](#axisname), [AxisSplitArea](#axissplitarea), [AreaStyle](#areastyle), [ArrowStyle](#arrowstyle), [BaseLine](#baseline), [IconStyle](#iconstyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [Level](#level), [LevelStyle](#levelstyle), [LineArrow](#linearrow), [LineStyle](#linestyle), [Location](#location), [MLValue](#mlvalue), [MarqueeStyle](#marqueestyle), [Padding](#padding), [StageColor](#stagecolor), [SymbolStyle](#symbolstyle), [TextLimit](#textlimit), [TextStyle](#textstyle), [CommentItem](#commentitem), [CommentMarkStyle](#commentmarkstyle), [LabelLine](#labelline), [LabelStyle](#labelstyle), [MarkAreaData](#markareadata), [MarkLineData](#marklinedata), [StateStyle](#statestyle), [VisualMapRange](#visualmaprange), [UIComponentTheme](#uicomponenttheme), [SerieData](#seriedata), [ComponentTheme](#componenttheme), [SerieTheme](#serietheme), [ThemeStyle](#themestyle) +> class in XCharts.Runtime / 子类: [AnimationStyle](#animationstyle), [AxisAnimation](#axisanimation), [AxisName](#axisname), [AxisSplitArea](#axissplitarea), [AreaStyle](#areastyle), [ArrowStyle](#arrowstyle), [BaseLine](#baseline), [IconStyle](#iconstyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [Level](#level), [LevelStyle](#levelstyle), [LineArrow](#linearrow), [LineStyle](#linestyle), [Location](#location), [MLValue](#mlvalue), [MarqueeStyle](#marqueestyle), [Padding](#padding), [StageColor](#stagecolor), [SymbolStyle](#symbolstyle), [TextLimit](#textlimit), [TextStyle](#textstyle), [CommentItem](#commentitem), [CommentMarkStyle](#commentmarkstyle), [LabelLine](#labelline), [LabelStyle](#labelstyle), [MarkAreaData](#markareadata), [MarkLineData](#marklinedata), [StateStyle](#statestyle), [VisualMapRange](#visualmaprange), [UIComponentTheme](#uicomponenttheme), [SerieData](#seriedata), [ComponentTheme](#componenttheme), [SerieTheme](#serietheme), [ThemeStyle](#themestyle) ## Comment -> XCharts.Runtime.Comment : [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) 图表注解组件。 @@ -731,8 +737,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="Comment"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示注解组件。 |labelStyle|||所有组件的文本样式。 [LabelStyle](#labelstyle)| @@ -745,7 +750,7 @@ import APITable from '@site/src/components/APITable'; ## CommentItem -> XCharts.Runtime.CommentItem : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 注解项。 @@ -753,8 +758,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="CommentItem"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示当前注解项。 |content|||注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。 @@ -769,7 +773,7 @@ import APITable from '@site/src/components/APITable'; ## CommentMarkStyle -> XCharts.Runtime.CommentMarkStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 注解项区域样式。 @@ -777,8 +781,7 @@ import APITable from '@site/src/components/APITable'; <APITable name="CommentMarkStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示当前注解项。 |lineStyle|||线条样式。 [LineStyle](#linestyle)| @@ -789,14 +792,13 @@ import APITable from '@site/src/components/APITable'; ## ComponentTheme -> XCharts.Runtime.ComponentTheme : [ChildComponent](#childcomponent) / Subclasses: [BaseAxisTheme](#baseaxistheme), [DataZoomTheme](#datazoomtheme), [LegendTheme](#legendtheme), [SubTitleTheme](#subtitletheme), [TitleTheme](#titletheme), [TooltipTheme](#tooltiptheme), [VisualMapTheme](#visualmaptheme) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [BaseAxisTheme](#baseaxistheme), [DataZoomTheme](#datazoomtheme), [LegendTheme](#legendtheme), [SubTitleTheme](#subtitletheme), [TitleTheme](#titletheme), [TooltipTheme](#tooltiptheme), [VisualMapTheme](#visualmaptheme) ```mdx-code-block <APITable name="ComponentTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |font|||字体。 |textColor|||文本颜色。 @@ -810,13 +812,13 @@ import APITable from '@site/src/components/APITable'; ## CoordSystem -> XCharts.Runtime.CoordSystem : [MainComponent](#maincomponent) / Subclasses: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord), [SingleAxisCoord](#singleaxiscoord) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) / 子类: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord), [SingleAxisCoord](#singleaxiscoord) 坐标系系统。 ## DataZoom -> XCharts.Runtime.DataZoom : [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 @@ -824,8 +826,7 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 <APITable name="DataZoom"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |enable|true||是否显示缩放区域。 |filterMode|||数据过滤类型。<br/>`DataZoom.FilterMode`:<br/>- `Filter`: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。<br/>- `WeakFilter`: 当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。<br/>- `Empty`: 当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。<br/>- `None`: 不过滤数据,只改变数轴范围。<br/>| @@ -866,14 +867,13 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 ## DataZoomTheme -> XCharts.Runtime.DataZoomTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) ```mdx-code-block <APITable name="DataZoomTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |borderWidth|||边框线宽。 |dataLineWidth|||数据阴影线宽。 @@ -889,14 +889,13 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 ## DebugInfo -> XCharts.Runtime.DebugInfo +> class in XCharts.Runtime ```mdx-code-block <APITable name="DebugInfo"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示Debug组件。 |showDebugInfo|false|| @@ -910,11 +909,11 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 ## EffectScatter -> XCharts.Runtime.EffectScatter : [BaseScatter](#basescatter) +> class in XCharts.Runtime / 继承自: [BaseScatter](#basescatter) ## EmphasisStyle -> XCharts.Runtime.EmphasisStyle : [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) > 从 `v3.2.0` 开始支持 @@ -924,8 +923,7 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 <APITable name="EmphasisStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |scale|1.1f||高亮时的缩放倍数。 |focus|||在高亮图形时,是否淡出其它数据的图形已达到聚焦的效果。<br/>`EmphasisStyle.FocusType`:<br/>- `None`: 不淡出其它图形,默认使用该配置。<br/>- `Self`: 只聚焦(不淡出)当前高亮的数据的图形。<br/>- `Series`: 聚焦当前高亮的数据所在的系列的所有图形。<br/>| @@ -937,11 +935,11 @@ DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息 ## EndLabelStyle -> XCharts.Runtime.EndLabelStyle : [LabelStyle](#labelstyle) +> class in XCharts.Runtime / 继承自: [LabelStyle](#labelstyle) ## GridCoord -> XCharts.Runtime.GridCoord : [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. @@ -949,8 +947,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="GridCoord"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示直角坐标系网格。 |layoutIndex|-1|v3.8.0|网格所属的网格布局组件的索引。默认为-1,表示不属于任何网格布局组件。当设置了该值时,left、right、top、bottom属性将失效。 @@ -969,7 +966,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## GridLayout -> XCharts.Runtime.GridLayout : [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IUpdateRuntimeData](#iupdateruntimedata) > 从 `v3.8.0` 开始支持 @@ -979,8 +976,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="GridLayout"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示直角坐标系网格。 |left|0.1f||grid 组件离容器左侧的距离。 @@ -998,14 +994,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Heatmap -> XCharts.Runtime.Heatmap : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ```mdx-code-block <APITable name="Heatmap"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |heatmapType||v3.3.0|热力图类型。通过颜色映射划分。<br/>`HeatmapType`:<br/>- `Data`: 数据映射型。默认用第2维数据作为颜色映射。要求数据至少有3个维度数据。<br/>- `Count`: 个数映射型。统计数据在划分的格子中出现的次数,作为颜色映射。要求数据至少有2个维度数据。<br/>| @@ -1015,14 +1010,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## IconStyle -> XCharts.Runtime.IconStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="IconStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|false||是否显示图标。 |layer|||显示在上层还是在下层。<br/>`IconStyle.Layer`:<br/>- `UnderText`: The icon is display under the label text. 图标在标签文字下<br/>- `AboveText`: The icon is display above the label text. 图标在标签文字上<br/>| @@ -1041,14 +1035,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## ImageStyle -> XCharts.Runtime.ImageStyle : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) ```mdx-code-block <APITable name="ImageStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示图标。 |sprite|||图标的图片。 @@ -1064,7 +1057,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Indicator -> XCharts.Runtime.Indicator +> class in XCharts.Runtime 雷达图的指示器,用来指定雷达图中的多个变量(维度)。 @@ -1072,8 +1065,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="Indicator"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |name|||指示器名称。 |max|||指示器的最大值,默认为 0 无限制。 @@ -1106,37 +1098,37 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## INeedSerieContainer -> XCharts.Runtime.INeedSerieContainer / Subclasses: [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Radar](#radar), [BaseScatter](#basescatter) +> class in XCharts.Runtime / 子类: [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Radar](#radar), [BaseScatter](#basescatter) ## IPropertyChanged -> XCharts.Runtime.IPropertyChanged / Subclasses: [Location](#location), [Comment](#comment), [Legend](#legend), [Title](#title) +> class in XCharts.Runtime / 子类: [Location](#location), [Comment](#comment), [Legend](#legend), [Title](#title) 属性变更接口 ## ISerieComponent -> XCharts.Runtime.ISerieComponent / Subclasses: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [LineArrow](#linearrow), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) +> class in XCharts.Runtime / 子类: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [LineArrow](#linearrow), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) 可用于Serie的组件。 ## ISerieContainer -> XCharts.Runtime.ISerieContainer / Subclasses: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord) +> class in XCharts.Runtime / 子类: [RadarCoord](#radarcoord), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [ParallelCoord](#parallelcoord), [PolarCoord](#polarcoord) ## ISerieDataComponent -> XCharts.Runtime.ISerieDataComponent / Subclasses: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [LineStyle](#linestyle), [SerieSymbol](#seriesymbol), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) +> class in XCharts.Runtime / 子类: [AreaStyle](#areastyle), [ImageStyle](#imagestyle), [ItemStyle](#itemstyle), [LineStyle](#linestyle), [SerieSymbol](#seriesymbol), [LabelLine](#labelline), [LabelStyle](#labelstyle), [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle), [TitleStyle](#titlestyle) 可用于SerieData的组件。 ## ISimplifiedSerie -> XCharts.Runtime.ISimplifiedSerie / Subclasses: [SimplifiedBar](#simplifiedbar), [SimplifiedCandlestick](#simplifiedcandlestick), [SimplifiedLine](#simplifiedline) +> class in XCharts.Runtime / 子类: [SimplifiedBar](#simplifiedbar), [SimplifiedCandlestick](#simplifiedcandlestick), [SimplifiedLine](#simplifiedline) ## ItemStyle -> XCharts.Runtime.ItemStyle : [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) 图形样式。 @@ -1144,8 +1136,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="ItemStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否启用。 |color|||数据项颜色。 @@ -1174,11 +1165,11 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## IUpdateRuntimeData -> XCharts.Runtime.IUpdateRuntimeData / Subclasses: [SingleAxis](#singleaxis), [DataZoom](#datazoom), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [GridLayout](#gridlayout), [ParallelCoord](#parallelcoord) +> class in XCharts.Runtime / 子类: [SingleAxis](#singleaxis), [DataZoom](#datazoom), [CalendarCoord](#calendarcoord), [GridCoord](#gridcoord), [GridLayout](#gridlayout), [ParallelCoord](#parallelcoord) ## LabelLine -> XCharts.Runtime.LabelLine : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) 标签的引导线 @@ -1186,8 +1177,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="LabelLine"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示视觉引导线。 |lineType|||视觉引导线类型。<br/>`LabelLine.LineType`:<br/>- `BrokenLine`: 折线<br/>- `Curves`: 曲线<br/>- `HorizontalLine`: 水平线<br/>| @@ -1207,7 +1197,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## LabelStyle -> XCharts.Runtime.LabelStyle : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) / Subclasses: [AxisLabel](#axislabel), [EndLabelStyle](#endlabelstyle), [TitleStyle](#titlestyle) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) / 子类: [AxisLabel](#axislabel), [EndLabelStyle](#endlabelstyle), [TitleStyle](#titlestyle) 图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 @@ -1215,8 +1205,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="LabelStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示文本标签。 |Position|||标签的位置。 @@ -1225,8 +1214,8 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart |rotate|||文本的旋转。 |autoRotate|false|v3.6.0|是否自动旋转。 |distance|||距离轴线的距离。 -|formatter|||标签内容字符串模版格式器。支持用 \n 换行。 模板变量有: {.}:圆点标记。 {a}:系列名。 {a}:系列名。 {b}:类目值或数据名。 {c}:数据值。 {d}:百分比。 {e}:数据名。 {f}:数据和。 示例:“{b}:{c}” -|numericFormatter|||标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings +|formatter|||标签内容字符串模版格式器。支持用 \n 换行。部分组件的格式器会不生效。<br/> 模板通配符有以下这些,部分只适用于固定的组件:<br/> `{.}`:圆点标记。<br/> `{a}`:系列名。<br/> `{b}`:类目值或数据名。<br/> `{c}`:数据值。<br/> `{d}`:百分比。<br/> `{e}`:数据名。<br/> `{f}`:数据和。<br/> `{g}`:数据总个数。<br/> `{h}`:十六进制颜色值。<br/> `{value}`:坐标轴或图例的值。<br/> 以下通配符适用UITable组件:<br/> `{name}`: 表格的行名。<br/> `{index}`:表格的行号。<br/> 以下通配符适用UIStatistc组件:<br/> `{title}`:标题文本。<br/> `{dd}`:天。<br/> `{hh}`:小时。<br/> `{mm}`:分钟。<br/> `{ss}`:秒。<br/> `{fff}`:毫秒。<br/> `{d}`:天。<br/> `{h}`:小时。<br/> `{m}`:分钟。<br/> `{s}`:秒。<br/> `{f}`:毫秒。<br/> 示例:“{b}:{c}” +|numericFormatter|||标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。<br/> 数字格式使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。如:F1, E2<br/> 日期格式常见的格式:yyyy年,MM月,dd日,HH时,mm分,ss秒,fff毫秒。如:yyyy-MM-dd HH:mm:ss<br/> 数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings <br/> 日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings |width|0||标签的宽度。一般不用指定,不指定时则自动是文字的宽度。 |height|0||标签的高度。一般不用指定,不指定时则自动是文字的高度。 |icon|||图标样式。 [IconStyle](#iconstyle)| @@ -1240,21 +1229,21 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Lang -> XCharts.Runtime.Lang : [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) +> class in XCharts.Runtime / 继承自: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) 国际化语言表。 ## LangCandlestick -> XCharts.Runtime.LangCandlestick +> class in XCharts.Runtime ## LangTime -> XCharts.Runtime.LangTime +> class in XCharts.Runtime ## Legend -> XCharts.Runtime.Legend : [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) 图例组件。 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。 @@ -1262,8 +1251,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="Legend"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示图例组件。 |iconType|||图例类型。<br/>`Legend.Type`:<br/>- `Auto`: 自动匹配。<br/>- `Custom`: 自定义图标。<br/>- `EmptyCircle`: 空心圆。<br/>- `Circle`: 圆形。<br/>- `Rect`: 正方形。可通过Setting的legendIconCornerRadius参数调整圆角。<br/>- `Triangle`: 三角形。<br/>- `Diamond`: 菱形。<br/>- `Candlestick`: 烛台(可用于K线图)。<br/>| @@ -1275,8 +1263,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart |itemGap|10f||图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 |itemAutoColor|true||图例标记的图形是否自动匹配颜色。 |itemOpacity|1||图例标记的图形的颜色透明度。 -|formatter|||图例内容字符串模版格式器。支持用 \n 换行。 模板变量为图例名称 {value}。其他模板变量参考Toolip的itemFormatter。 -|numericFormatter|||标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings +|formatter|||不再使用,使用LabelStyle.formatter代替。 |labelStyle|||文本样式。 [LabelStyle](#labelstyle)| |data|||图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 name(如果是饼图,也可以是饼图单个数据的 name)。 如果 data 没有被指定,会自动从当前系列中获取。指定data时里面的数据项和serie匹配时才会生效。 |icons|||自定义的图例标记图形。 @@ -1291,14 +1278,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## LegendTheme -> XCharts.Runtime.LegendTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) ```mdx-code-block <APITable name="LegendTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |unableColor|||文本颜色。 @@ -1308,14 +1294,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Level -> XCharts.Runtime.Level : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="Level"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |label|||文本标签样式。 [LabelStyle](#labelstyle)| |upperLabel|||上方的文本标签样式。 [LabelStyle](#labelstyle)| @@ -1327,14 +1312,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## LevelStyle -> XCharts.Runtime.LevelStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="LevelStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|false||是否启用LevelStyle |levels|||各层节点对应的配置。当enableLevels为true时生效,levels[0]对应的第一层的配置,levels[1]对应第二层,依次类推。当levels中没有对应层时用默认的设置。 @@ -1345,18 +1329,17 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Line -> XCharts.Runtime.Line : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## LineArrow -> XCharts.Runtime.LineArrow : [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieComponent](#iseriecomponent) ```mdx-code-block <APITable name="LineArrow"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|||是否显示箭头。 |position|||箭头位置。<br/>`LineArrow.Position`:<br/>- `End`: 末端箭头<br/>- `Start`: 头端箭头<br/>| @@ -1368,7 +1351,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## LineStyle -> XCharts.Runtime.LineStyle : [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [ISerieDataComponent](#iseriedatacomponent) 线条样式。 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle.color,线条颜色默认也会取该颜色。 toColor,toColor2可设置水平方向的渐变,如需要设置垂直方向的渐变,可使用VisualMap。 @@ -1376,8 +1359,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="LineStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。 |type|||线的类型。<br/>`LineStyle.Type`:<br/>- `Solid`: 实线<br/>- `Dashed`: 虚线<br/>- `Dotted`: 点线<br/>- `DashDot`: 点划线<br/>- `DashDotDot`: 双点划线<br/>- `None`: 双点划线<br/>| @@ -1397,7 +1379,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Location -> XCharts.Runtime.Location : [ChildComponent](#childcomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent), [IPropertyChanged](#ipropertychanged) 位置类型。通过Align快速设置大体位置,再通过left,right,top,bottom微调具体位置。 @@ -1405,8 +1387,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="Location"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |align|||对齐方式。<br/>`Location.Align`:<br/>- `TopLeft`: 对齐方式<br/>- `TopRight`: 对齐方式<br/>- `TopCenter`: 对齐方式<br/>- `BottomLeft`: 对齐方式<br/>- `BottomRight`: 对齐方式<br/>- `BottomCenter`: 对齐方式<br/>- `Center`: 对齐方式<br/>- `CenterLeft`: 对齐方式<br/>- `CenterRight`: 对齐方式<br/>| |left|||离容器左侧的距离。 @@ -1420,11 +1401,11 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## MainComponent -> XCharts.Runtime.MainComponent : [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / Subclasses: [Axis](#axis), [Background](#background), [Comment](#comment), [DataZoom](#datazoom), [Legend](#legend), [MarkArea](#markarea), [MarkLine](#markline), [Settings](#settings), [Title](#title), [Tooltip](#tooltip), [VisualMap](#visualmap), [GridLayout](#gridlayout), [CoordSystem](#coordsystem) +> class in XCharts.Runtime / 继承自: [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / 子类: [Axis](#axis), [Background](#background), [Comment](#comment), [DataZoom](#datazoom), [Legend](#legend), [MarkArea](#markarea), [MarkLine](#markline), [Settings](#settings), [Title](#title), [Tooltip](#tooltip), [VisualMap](#visualmap), [GridLayout](#gridlayout), [CoordSystem](#coordsystem) ## MarkArea -> XCharts.Runtime.MarkArea : [MainComponent](#maincomponent) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 图表标域,常用于标记图表中某个范围的数据。 @@ -1432,8 +1413,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="MarkArea"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示标域。 |text|||The text of markArea. 标域显示的文本。 @@ -1449,7 +1429,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## MarkAreaData -> XCharts.Runtime.MarkAreaData : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 标域的数据。 @@ -1457,8 +1437,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="MarkAreaData"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |type|||特殊的标域类型,用于标注最大值最小值等。<br/>`MarkAreaType`:<br/>- `None`: 标域类型<br/>- `Min`: 最小值。<br/>- `Max`: 最大值。<br/>- `Average`: 平均值。<br/>- `Median`: 中位数。<br/>| |name|||标注名称。会作为文字显示。 @@ -1474,7 +1453,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## MarkLine -> XCharts.Runtime.MarkLine : [MainComponent](#maincomponent) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 图表标线。 @@ -1482,11 +1461,11 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="MarkLine"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示标线。 |serieIndex|0||标线影响的Serie索引。 +|onTop|true|v3.9.0|是否在最上层。 |animation|||标线的动画样式。 [AnimationStyle](#animationstyle)| |data|||标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 @@ -1496,7 +1475,9 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## MarkLineData -> XCharts.Runtime.MarkLineData : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) + +> 从 `v3.9.0` 开始支持 图表标线的数据。 @@ -1504,8 +1485,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="MarkLineData"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |type|||特殊的标线类型,用于标注最大值最小值等。<br/>`MarkLineType`:<br/>- `None`: 标线类型<br/>- `Min`: 最小值。<br/>- `Max`: 最大值。<br/>- `Average`: 平均值。<br/>- `Median`: 中位数。<br/>| |name|||标线名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 @@ -1527,7 +1507,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## MarqueeStyle -> XCharts.Runtime.MarqueeStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) > 从 `v3.5.0` 开始支持 @@ -1537,8 +1517,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 <APITable name="MarqueeStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |apply|false|v3.5.0|选取框范围是否应用到DataZoom上。当为true时,框选结束后的范围即为DataZoom的选择范围。 |realRect|false|v3.5.0|是否选取实际框选区域。当为true时,以鼠标的其实点和结束点间的实际范围作为框选区域。 @@ -1551,7 +1530,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 ## MLValue -> XCharts.Runtime.MLValue : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) > 从 `v3.8.0` 开始支持 @@ -1561,8 +1540,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 <APITable name="MLValue"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |type|||<br/>`MLValue.Type`:<br/>- `Percent`: 百分比形式。<br/>- `Absolute`: 绝对值形式。<br/>- `Extra`: 额外形式。<br/>| |value||| @@ -1573,7 +1551,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 ## Padding -> XCharts.Runtime.Padding : [ChildComponent](#childcomponent) / Subclasses: [TextPadding](#textpadding) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [TextPadding](#textpadding) 边距设置。 @@ -1581,8 +1559,7 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 <APITable name="Padding"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||show padding. 是否显示。 |top|0||顶部间距。 @@ -1596,15 +1573,15 @@ Marquee style. It can be used for the DataZoom component. 选取框样式。可 ## Parallel -> XCharts.Runtime.Parallel : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ## ParallelAxis -> XCharts.Runtime.ParallelAxis : [Axis](#axis) +> class in XCharts.Runtime / 继承自: [Axis](#axis) ## ParallelCoord -> XCharts.Runtime.ParallelCoord : [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem), [IUpdateRuntimeData](#iupdateruntimedata), [ISerieContainer](#iseriecontainer) Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. @@ -1612,8 +1589,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="ParallelCoord"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示直角坐标系网格。 |orient|||坐标轴朝向。默认为垂直朝向。<br/>`Orient`:<br/>- `Horizonal`: 水平<br/>- `Vertical`: 垂直<br/>| @@ -1629,14 +1605,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Pie -> XCharts.Runtime.Pie : [Serie](#serie) +> class in XCharts.Runtime / 继承自: [Serie](#serie) ```mdx-code-block <APITable name="Pie"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |radiusGradient|false|v3.8.1|是否开启半径方向的渐变效果。 @@ -1646,11 +1621,11 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## PolarAxisTheme -> XCharts.Runtime.PolarAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) ## PolarCoord -> XCharts.Runtime.PolarCoord : [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) 极坐标系组件。 极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。 @@ -1658,8 +1633,7 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart <APITable name="PolarCoord"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示极坐标。 |center|||极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。 当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 @@ -1673,14 +1647,13 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## Radar -> XCharts.Runtime.Radar : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer) ```mdx-code-block <APITable name="Radar"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |smooth|false|v3.2.0|是否平滑曲线。平滑曲线时不支持区域填充颜色。 @@ -1690,35 +1663,35 @@ Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart ## RadarAxisTheme -> XCharts.Runtime.RadarAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) ## RadarCoord -> XCharts.Runtime.RadarCoord : [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem), [ISerieContainer](#iseriecontainer) Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适用于雷达图。 ## RadiusAxis -> XCharts.Runtime.RadiusAxis : [Axis](#axis) +> class in XCharts.Runtime / 继承自: [Axis](#axis) 极坐标系的径向轴。 ## RadiusAxisTheme -> XCharts.Runtime.RadiusAxisTheme : [BaseAxisTheme](#baseaxistheme) +> class in XCharts.Runtime / 继承自: [BaseAxisTheme](#baseaxistheme) ## Ring -> XCharts.Runtime.Ring : [Serie](#serie) +> class in XCharts.Runtime / 继承自: [Serie](#serie) ## Scatter -> XCharts.Runtime.Scatter : [BaseScatter](#basescatter) +> class in XCharts.Runtime / 继承自: [BaseScatter](#basescatter) ## SelectStyle -> XCharts.Runtime.SelectStyle : [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [StateStyle](#statestyle), [ISerieComponent](#iseriecomponent), [ISerieDataComponent](#iseriedatacomponent) > 从 `v3.2.0` 开始支持 @@ -1726,7 +1699,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## Serie -> XCharts.Runtime.Serie : [BaseSerie](#baseserie), [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / Subclasses: [SerieHandler<T>](#seriehandlert), [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Pie](#pie), [Radar](#radar), [Ring](#ring), [BaseScatter](#basescatter) +> class in XCharts.Runtime / 继承自: [BaseSerie](#baseserie), [IComparable](https://docs.unity3d.com/ScriptReference/30_search.html?q=IComparable) / 子类: [SerieHandler<T>](#seriehandlert), [Bar](#bar), [SimplifiedBar](#simplifiedbar), [Candlestick](#candlestick), [SimplifiedCandlestick](#simplifiedcandlestick), [Heatmap](#heatmap), [Line](#line), [SimplifiedLine](#simplifiedline), [Parallel](#parallel), [Pie](#pie), [Radar](#radar), [Ring](#ring), [BaseScatter](#basescatter) 系列。系列一般由数据和配置组成,用来表示具体的图表图形,如折线图的一条折线,柱图的一组柱子等。一个图表中可以包含多个不同类型的系列。 @@ -1734,8 +1707,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 <APITable name="Serie"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |index|||系列索引。 |show|true||系列是否显示在图表上。 @@ -1816,7 +1788,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## SerieData -> XCharts.Runtime.SerieData : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 系列中的一个数据项。可存储数据名和1-n维个数据。 @@ -1824,8 +1796,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 <APITable name="SerieData"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |index|||数据项索引。 |name|||数据项名称。 @@ -1843,7 +1814,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## SerieSymbol -> XCharts.Runtime.SerieSymbol : [SymbolStyle](#symbolstyle), [ISerieDataComponent](#iseriedatacomponent) +> class in XCharts.Runtime / 继承自: [SymbolStyle](#symbolstyle), [ISerieDataComponent](#iseriedatacomponent) 系列数据项的标记的图形 @@ -1851,8 +1822,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 <APITable name="SerieSymbol"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |sizeType|||标记图形的大小获取方式。<br/>`SymbolSizeType`:<br/>- `Custom`: 自定义大小。<br/>- `FromData`: 通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。<br/>- `Function`: 通过委托函数获取。<br/>| |dataIndex|1||当sizeType指定为FromData时,指定的数据源索引。 @@ -1871,14 +1841,13 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## SerieTheme -> XCharts.Runtime.SerieTheme : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="SerieTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |lineWidth|||文本颜色。 |lineSymbolSize|||折线图的Symbol大小。 @@ -1895,7 +1864,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## Settings -> XCharts.Runtime.Settings : [MainComponent](#maincomponent) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 @@ -1903,8 +1872,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 <APITable name="Settings"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true|| |maxPainter|10||设定的painter数量。 @@ -1927,19 +1895,19 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## SimplifiedBar -> XCharts.Runtime.SimplifiedBar : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) ## SimplifiedCandlestick -> XCharts.Runtime.SimplifiedCandlestick : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) ## SimplifiedLine -> XCharts.Runtime.SimplifiedLine : [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) +> class in XCharts.Runtime / 继承自: [Serie](#serie), [INeedSerieContainer](#ineedseriecontainer), [ISimplifiedSerie](#isimplifiedserie) ## SingleAxis -> XCharts.Runtime.SingleAxis : [Axis](#axis), [IUpdateRuntimeData](#iupdateruntimedata) +> class in XCharts.Runtime / 继承自: [Axis](#axis), [IUpdateRuntimeData](#iupdateruntimedata) 单轴。 @@ -1947,8 +1915,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 <APITable name="SingleAxis"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |orient|||坐标轴朝向。默认为水平朝向。<br/>`Orient`:<br/>- `Horizonal`: 水平<br/>- `Vertical`: 垂直<br/>| |left|0.1f||组件离容器左侧的距离。 @@ -1964,18 +1931,17 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## SingleAxisCoord -> XCharts.Runtime.SingleAxisCoord : [CoordSystem](#coordsystem) +> class in XCharts.Runtime / 继承自: [CoordSystem](#coordsystem) ## StageColor -> XCharts.Runtime.StageColor : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="StageColor"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |percent|||结束位置百分比。 |color|||颜色。 @@ -1986,7 +1952,7 @@ Radar coordinate conponnet for radar charts. 雷达图坐标系组件,只适 ## StateStyle -> XCharts.Runtime.StateStyle : [ChildComponent](#childcomponent) / Subclasses: [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [BlurStyle](#blurstyle), [EmphasisStyle](#emphasisstyle), [SelectStyle](#selectstyle) > 从 `v3.2.0` 开始支持 @@ -1996,8 +1962,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="StateStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否启用高亮样式。 |label|||图形文本标签。 [LabelStyle](#labelstyle)| @@ -2013,11 +1978,11 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## SubTitleTheme -> XCharts.Runtime.SubTitleTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) ## SymbolStyle -> XCharts.Runtime.SymbolStyle : [ChildComponent](#childcomponent) / Subclasses: [SerieSymbol](#seriesymbol) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) / 子类: [SerieSymbol](#seriesymbol) 系列数据项的标记的图形 @@ -2025,8 +1990,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="SymbolStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示标记。 |type|||标记类型。<br/>`SymbolType`:<br/>- `None`: 不显示标记。<br/>- `Custom`: 自定义标记。<br/>- `Circle`: 圆形。<br/>- `EmptyCircle`: 空心圆。<br/>- `Rect`: 正方形。可通过设置`itemStyle`的`cornerRadius`变成圆角矩形。<br/>- `EmptyRect`: 空心正方形。<br/>- `Triangle`: 三角形。<br/>- `EmptyTriangle`: 空心三角形。<br/>- `Diamond`: 菱形。<br/>- `EmptyDiamond`: 空心菱形。<br/>- `Arrow`: 箭头。<br/>- `EmptyArrow`: 空心箭头。<br/>- `Plus`: 加号。<br/>- `Minus`: 减号。<br/>| @@ -2045,7 +2009,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## TextLimit -> XCharts.Runtime.TextLimit : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 只在类目轴中有效。 @@ -2053,8 +2017,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="TextLimit"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |enable|false||是否启用文本自适应。 [default:true] |maxWidth|0||Clipping occurs when the width of the text is greater than this value. @@ -2067,13 +2030,13 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## TextPadding -> XCharts.Runtime.TextPadding : [Padding](#padding) +> class in XCharts.Runtime / 继承自: [Padding](#padding) 文本的内边距设置。 ## TextStyle -> XCharts.Runtime.TextStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 文本的相关设置。 @@ -2081,8 +2044,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="TextStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||文本的相关设置。 |font|||文本字体。 [default: null] @@ -2106,7 +2068,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## Theme -> XCharts.Runtime.Theme : [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) +> class in XCharts.Runtime / 继承自: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) 主题相关配置。 @@ -2114,8 +2076,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="Theme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |themeType|||主题类型。<br/>`ThemeType`:<br/>- `Default`: 默认主题。<br/>- `Light`: 亮主题。<br/>- `Dark`: 暗主题。<br/>- `Custom`: 自定义主题。<br/>| |themeName|||主题名称。 @@ -2140,7 +2101,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## ThemeStyle -> XCharts.Runtime.ThemeStyle : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) 主题相关配置。 @@ -2148,8 +2109,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="ThemeStyle"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true|| |sharedTheme|||主题配置。 [Theme](#theme)| @@ -2165,7 +2125,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## Title -> XCharts.Runtime.Title : [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent), [IPropertyChanged](#ipropertychanged) 标题组件,包含主标题和副标题。 @@ -2173,8 +2133,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="Title"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示标题组件。 |text|||主标题文本,支持使用 \n 换行。 @@ -2190,17 +2149,17 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## TitleStyle -> XCharts.Runtime.TitleStyle : [LabelStyle](#labelstyle), [ISerieDataComponent](#iseriedatacomponent), [ISerieComponent](#iseriecomponent) +> class in XCharts.Runtime / 继承自: [LabelStyle](#labelstyle), [ISerieDataComponent](#iseriedatacomponent), [ISerieComponent](#iseriecomponent) 标题相关设置。 ## TitleTheme -> XCharts.Runtime.TitleTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) ## Tooltip -> XCharts.Runtime.Tooltip : [MainComponent](#maincomponent) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 提示框组件。 @@ -2208,21 +2167,20 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="Tooltip"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||是否显示提示框组件。 |type|||提示框指示器类型。<br/>`Tooltip.Type`:<br/>- `Line`: 直线指示器<br/>- `Shadow`: 阴影指示器<br/>- `None`: 无指示器<br/>- `Corss`: 十字准星指示器。坐标轴显示Label和交叉线。<br/>- `Auto`: 根据serie的类型自动选择显示指示器。<br/>| |trigger|||触发类型。<br/>`Tooltip.Trigger`:<br/>- `Item`: 数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。<br/>- `Axis`: 坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。<br/>- `None`: 什么都不触发。<br/>- `Auto`: 根据serie的类型自动选择触发类型。<br/>| |position||v3.3.0|显示位置类型。<br/>`Tooltip.Position`:<br/>- `Auto`: 自适应。移动平台靠顶部显示,非移动平台跟随鼠标位置。<br/>- `Custom`: 自定义。完全自定义显示位置(x,y)。<br/>- `FixedX`: 只固定坐标X。Y跟随鼠标位置。<br/>- `FixedY`: <br/>| -|itemFormatter|||提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。用 +|itemFormatter|||提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。用|来表示多个列的分隔。 模板变量有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}。<br/> {i}或-表示忽略当前项。 {.}为当前所指示的serie或数据项的对应颜色的圆点。<br/> {a}为当前所指示的serie或数据项的系列名name。<br/> {b}为当前所指示的serie或数据项的数据项serieData的name,或者类目值(如折线图的X轴)。<br/> {c}为当前所指示的serie或数据项的y维(dimesion为1)的数值。<br/> {d}为当前所指示的serie或数据项的y维(dimesion为1)百分比值,注意不带%号。<br/> {e}为当前所指示的serie或数据项的数据项serieData的name。<br/> {f}为当前所指示的serie的默认维度的数据总和。<br/> {g}为当前所指示的serie的数据总个数。<br/> {h}为当前所指示的serie的十六进制颜色值。<br/> {c0}表示当前数据项维度为0的数据。<br/> {c1}表示当前数据项维度为1的数据。<br/> {d3}表示维度3的数据的百分比。它的分母是默认维度(一般是1维度)数据。<br/> |表示多个列的分隔。<br/> 示例:"{i}", "{.}|{a}|{c}", "{.}|{b}|{c2:f2}" |titleFormatter|||提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。 模板变量有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}。<br/> {.}为当前所指示或index为0的serie的对应颜色的圆点。<br/> {a}为当前所指示或index为0的serie的系列名name。<br/> {b}为当前所指示或index为0的serie的数据项serieData的name,或者类目值(如折线图的X轴)。<br/> {c}为当前所指示或index为0的serie的y维(dimesion为1)的数值。<br/> {d}为当前所指示或index为0的serie的y维(dimesion为1)百分比值,注意不带%号。<br/> {e}为当前所指示或index为0的serie的数据项serieData的name。<br/> {h}为当前所指示或index为0的serie的数据项serieData的十六进制颜色值。<br/> {f}为数据总和。<br/> {g}为数据总个数。<br/> {.1}表示指定index为1的serie对应颜色的圆点。<br/> {a1}、{b1}、{c1}中的1表示指定index为1的serie。<br/> {c1:2}表示索引为1的serie的当前指示数据项的第3个数据(一个数据项有多个数据,index为2表示第3个数据)。<br/> {c1:2-2}表示索引为1的serie的第3个数据项的第3个数据(也就是要指定第几个数据项时必须要指定第几个数据)。<br/> {d1:2:f2}表示单独指定了数值的格式化字符串为f2(不指定时用numericFormatter)。<br/> {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。<br/> 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}" |marker|||serie的符号标志。 |fixedWidth|0||固定宽度。比 minWidth 优先。 |fixedHeight|0||固定高度。比 minHeight 优先。 |minWidth|0||最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。 |minHeight|0||最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。 -|numericFormatter|||标准数字格式字符串。用于将数值格式化显示为字符串。 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings +|numericFormatter|||标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。<br/> 数字格式使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。如:F1, E2<br/> 日期格式常见的格式:yyyy年,MM月,dd日,HH时,mm分,ss秒,fff毫秒。如:yyyy-MM-dd HH:mm:ss<br/> 数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings <br/> 日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings |paddingLeftRight|10||左右边距。 |paddingTopBottom|10||上下边距。 |ignoreDataShow|false||是否显示忽略数据在tooltip上。 @@ -2249,14 +2207,13 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## TooltipTheme -> XCharts.Runtime.TooltipTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) ```mdx-code-block <APITable name="TooltipTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |lineType|||坐标轴线类型。<br/>`LineStyle.Type`:<br/>- `Solid`: 实线<br/>- `Dashed`: 虚线<br/>- `Dotted`: 点线<br/>- `DashDot`: 点划线<br/>- `DashDotDot`: 双点划线<br/>- `None`: 双点划线<br/>| |lineWidth|1f||指示线线宽。 @@ -2271,14 +2228,13 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## UIComponentTheme -> XCharts.Runtime.UIComponentTheme : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="UIComponentTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true|| |sharedTheme|||主题配置。 [Theme](#theme)| @@ -2290,7 +2246,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## VisualMap -> XCharts.Runtime.VisualMap : [MainComponent](#maincomponent) +> class in XCharts.Runtime / 继承自: [MainComponent](#maincomponent) 视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 @@ -2298,8 +2254,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 <APITable name="VisualMap"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |show|true||组件是否生效。 |showUI|false||是否显示组件。如果设置为 false,不会显示,但是数据映射的功能还存在。 @@ -2334,14 +2289,13 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## VisualMapRange -> XCharts.Runtime.VisualMapRange : [ChildComponent](#childcomponent) +> class in XCharts.Runtime / 继承自: [ChildComponent](#childcomponent) ```mdx-code-block <APITable name="VisualMapRange"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |min|||范围最小值 |max|||范围最大值 @@ -2354,14 +2308,13 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## VisualMapTheme -> XCharts.Runtime.VisualMapTheme : [ComponentTheme](#componenttheme) +> class in XCharts.Runtime / 继承自: [ComponentTheme](#componenttheme) ```mdx-code-block <APITable name="VisualMapTheme"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |borderWidth|||边框线宽。 |borderColor|||边框颜色。 @@ -2374,24 +2327,23 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## XAxis -> XCharts.Runtime.XAxis : [Axis](#axis) +> class in XCharts.Runtime / 继承自: [Axis](#axis) 直角坐标系 grid 中的 x 轴。 ## XCResourcesImporter -> XCharts.Runtime.XCResourcesImporter +> class in XCharts.Runtime ## XCSettings -> XCharts.Runtime.XCSettings : [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) +> class in XCharts.Runtime / 继承自: [ScriptableObject](https://docs.unity3d.com/ScriptReference/30_search.html?q=ScriptableObject) ```mdx-code-block <APITable name="XCSettings"> ``` - -|field|default|since|comment| +|参数|默认|版本|描述| |--|--|--|--| |lang||| [Lang](#lang)| |font||| @@ -2435,7 +2387,7 @@ Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种 ## YAxis -> XCharts.Runtime.YAxis : [Axis](#axis) +> class in XCharts.Runtime / 继承自: [Axis](#axis) 直角坐标系 grid 中的 y 轴。 diff --git a/Documentation~/zh/support.md b/Documentation~/zh/support.md index c981872a..1133eff1 100644 --- a/Documentation~/zh/support.md +++ b/Documentation~/zh/support.md @@ -50,10 +50,11 @@ slug: /support | 扩展UI组件 | | | √ | √ | √ | √ | | 首页赞助展示 | | | | | | √ | | 付费方式 | | | 二维码 | 二维码 | __公对公转账__* | __公对公转账__* | -| 支持开发票 | | | 普票 | 普票 | __专票__ | __专票__ | +| 支持开发票 | | | 普票 | 普票 | __可开专票__ | __可开专票__ | | 扩展图表购买 | | | 按需购买 | __全部免费__* | __全部免费__* | __全部免费__* | | 扩展图表源码 | | | 永久持有 | 永久持有 | 永久持有 | 永久持有 | | 扩展图表更新 | | | 1年更新支持 | 1年更新支持 | 1年更新支持 | 1年更新支持 | +| Github仓库 | XCharts<br/>[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo) | XCharts<br/>[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo) | XCharts<br/>[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo)<br/>[XCharts-UI](https://github.com/XCharts-Team/XCharts-UI) | XCharts<br/>[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo)<br/>[XCharts-UI](https://github.com/XCharts-Team/XCharts-UI)<br/>[XCharts-Pro](https://github.com/XCharts-Team/XCharts-Pro)<br/>[XCharts-Pro-Demo](https://github.com/XCharts-Team/XCharts-Pro-Demo) | XCharts<br/>[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo)<br/>[XCharts-UI](https://github.com/XCharts-Team/XCharts-UI)<br/>[XCharts-Pro](https://github.com/XCharts-Team/XCharts-Pro)<br/>[XCharts-Pro-Demo](https://github.com/XCharts-Team/XCharts-Pro-Demo) | XCharts<br/>[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo)<br/>[XCharts-UI](https://github.com/XCharts-Team/XCharts-UI)<br/>[XCharts-Pro](https://github.com/XCharts-Team/XCharts-Pro)<br/>[XCharts-Pro-Demo](https://github.com/XCharts-Team/XCharts-Pro-Demo) | >备注: >*__`付费定制`__ 用户可根据自己的需求可付费定制不同的图表或新功能,只有`VIP`用户才享有`付费定制`权利。 @@ -64,7 +65,7 @@ slug: /support >*__`次年付费`__ 个人SVIP和企业VIP的首年和次年付费不一样,次年付费都是`298¥`。 >*__`增加席位`__ 企业VIP支持增加席位,每个席位`298¥`一年。 >*__`对公转账`__ 有开专票需求时,可用企业银行帐号进行公对公转账支付。二维码支付不支持开专票,只能开普票。发票默认都是电子发票。 ->*__`登记资料`__ 订阅成功后,需提供手机号和Github帐号进行登记,手机号用于确认归属,Github帐号用于下载源码。 +>*__`登记资料`__ 订阅成功后,需提供手机号和Github帐号进行登记,手机号用于确认归属,Github帐号用于加入Github的Team组织,下载源码。 ## 购买扩展图表 diff --git a/Documentation~/zh/tutorial01.md b/Documentation~/zh/tutorial01.md index 46a74d05..4cdd5105 100644 --- a/Documentation~/zh/tutorial01.md +++ b/Documentation~/zh/tutorial01.md @@ -99,7 +99,7 @@ XCharts经过不断的迭代优化,目前已有多达几十种的主组件和 给`gameObject`挂上`LineChart`脚本: -```C# +```csharp var chart = gameObject.GetComponent<LineChart>(); if (chart == null) { @@ -110,20 +110,20 @@ if (chart == null) 调整大小: -```C# +```csharp chart.SetSize(580, 300);//代码动态设置尺寸,或直接操作chart.rectTransform,或直接在Inspector上改 ``` 设置标题: -```C# +```csharp var title = chart.EnsureChartComponent<Title>(); title.text = "Simple Line"; ``` 设置提示框和图例是否显示: -```C# +```csharp var tooltip = chart.EnsureChartComponent<Tooltip>(); tooltip.show = true; @@ -133,7 +133,7 @@ legend.show = false; 设置坐标轴: -```C# +```csharp var xAxis = chart.EnsureChartComponent<XAxis>(); xAxis.splitNumber = 10; xAxis.boundaryGap = true; @@ -145,14 +145,14 @@ yAxis.type = Axis.AxisType.Value; 清空默认数据,添加`Line`类型的`Serie`用于接收数据: -```C# +```csharp chart.RemoveData(); chart.AddSerie<Line>("line"); ``` 添加10个数据: -```C# +```csharp for (int i = 0; i < 10; i++) { chart.AddXAxisData("x" + i); @@ -214,7 +214,7 @@ XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换 需要先获取组件,再修改里面的参数: -```C# +```csharp var title = chart.EnsureChartComponent<Title>(); title.text = "Simple LineChart"; title.subText = "normal line"; @@ -231,7 +231,7 @@ xAxis.type = Axis.AxisType.Category; 对于新添加的Serie: -```C# +```csharp var serie = chart.AddSerie<Pie>(); serie.center[0] = 0.5f; serie.center[1] = 0.5f; @@ -243,7 +243,7 @@ serie.roundCap = true; 对于已存在的Serie: -```C# +```csharp var serie = chart.GetSerie<Pie>(); serie.center[0] = 0.5f; serie.center[1] = 0.5f; @@ -255,7 +255,7 @@ serie.roundCap = true; 给Serie添加额外组件: -```C# +```csharp serie.EnsureComponent<AreaStyle>(); var label = serie1.EnsureComponent<LabelStyle>(); @@ -264,7 +264,7 @@ label.offset = new Vector3(0,20,0); ### 改数据项SerieData上的参数 -```C# +```csharp var serieData = chart.AddData(0, 20); //var serieData = serie.GetSerieData(0); //从已有数据中获取 serieData.radius = 10; diff --git a/Editor/MainComponents/AxisEditor.cs b/Editor/MainComponents/AxisEditor.cs index 2e2d9224..eb6978e5 100644 --- a/Editor/MainComponents/AxisEditor.cs +++ b/Editor/MainComponents/AxisEditor.cs @@ -12,7 +12,7 @@ namespace XCharts.Editor var m_Type = baseProperty.FindPropertyRelative("m_Type"); var m_LogBase = baseProperty.FindPropertyRelative("m_LogBase"); var m_MinMaxType = baseProperty.FindPropertyRelative("m_MinMaxType"); - var type = (Axis.AxisType) m_Type.enumValueIndex; + var type = (Axis.AxisType)m_Type.enumValueIndex; EditorGUI.indentLevel++; if (component is ParallelAxis) { @@ -40,7 +40,7 @@ namespace XCharts.Editor if (type == Axis.AxisType.Value || type == Axis.AxisType.Time) { PropertyField("m_MinMaxType"); - Axis.AxisMinMaxType minMaxType = (Axis.AxisMinMaxType) m_MinMaxType.enumValueIndex; + Axis.AxisMinMaxType minMaxType = (Axis.AxisMinMaxType)m_MinMaxType.enumValueIndex; switch (minMaxType) { case Axis.AxisMinMaxType.Default: @@ -63,7 +63,6 @@ namespace XCharts.Editor PropertyField("m_SplitNumber"); if (type == Axis.AxisType.Category) { - //PropertyField("m_InsertDataToHead"); PropertyField("m_MaxCache"); PropertyField("m_BoundaryGap"); } @@ -72,6 +71,10 @@ namespace XCharts.Editor PropertyField("m_Interval"); } DrawExtendeds(); + if (type != Axis.AxisType.Category) + { + PropertyField("m_Animation"); + } PropertyField("m_AxisLine"); PropertyField("m_AxisName"); PropertyField("m_AxisTick"); @@ -204,4 +207,21 @@ namespace XCharts.Editor } } } + + [CustomPropertyDrawer(typeof(AxisAnimation), true)] + public class AxisAnimationDrawer : BasePropertyDrawer + { + public override string ClassName { get { return "Animation"; } } + public override void OnGUI(Rect pos, SerializedProperty prop, GUIContent label) + { + base.OnGUI(pos, prop, label); + if (MakeComponentFoldout(prop, "m_Show", true)) + { + ++EditorGUI.indentLevel; + PropertyField(prop, "m_UnscaledTime"); + PropertyField(prop, "m_Duration"); + --EditorGUI.indentLevel; + } + } + } } \ No newline at end of file diff --git a/Editor/MainComponents/LegendEditor.cs b/Editor/MainComponents/LegendEditor.cs index 340b567b..64623f5a 100644 --- a/Editor/MainComponents/LegendEditor.cs +++ b/Editor/MainComponents/LegendEditor.cs @@ -17,7 +17,6 @@ namespace XCharts.Editor PropertyField("m_ItemOpacity"); PropertyField("m_SelectedMode"); PropertyField("m_Orient"); - PropertyField("m_Formatter"); PropertyField("m_Location"); PropertyField("m_LabelStyle"); PropertyField("m_Background"); diff --git a/Editor/MainComponents/MarkLineEditor.cs b/Editor/MainComponents/MarkLineEditor.cs index 6c8530ae..34e5bd96 100644 --- a/Editor/MainComponents/MarkLineEditor.cs +++ b/Editor/MainComponents/MarkLineEditor.cs @@ -11,6 +11,7 @@ namespace XCharts.Editor { ++EditorGUI.indentLevel; PropertyField("m_SerieIndex"); + PropertyField("m_OnTop"); PropertyField("m_Animation"); PropertyListField("m_Data", true); --EditorGUI.indentLevel; diff --git a/Examples/Example01_RandomData.cs b/Examples/Example01_RandomData.cs index e34e8e9a..e8953d3f 100644 --- a/Examples/Example01_RandomData.cs +++ b/Examples/Example01_RandomData.cs @@ -47,6 +47,10 @@ namespace XCharts.Example { UpdateData(); } + else if (Input.GetKeyDown(KeyCode.C)) + { + chart.ClearData(); + } lastAddTime += Time.deltaTime; if (loopAdd && lastAddTime >= loopAddTime) { diff --git a/Examples/Example02_ChartEvent.cs b/Examples/Example02_ChartEvent.cs index 7847cf77..51bbfaad 100644 --- a/Examples/Example02_ChartEvent.cs +++ b/Examples/Example02_ChartEvent.cs @@ -65,17 +65,17 @@ namespace XCharts.Example void OnSerieClick(SerieEventData data) { - Debug.Log("OnSerieClick: " + data.serieIndex + " " + data.dataIndex + " " + data.dimension); + Debug.Log("OnSerieClick: " + data.serieIndex + " " + data.dataIndex + " " + data.dimension + " " + data.value); } void OnSerieEnter(SerieEventData data) { - Debug.Log("OnSerieEnter: " + data.serieIndex + " " + data.dataIndex + " " + data.dimension); + Debug.Log("OnSerieEnter: " + data.serieIndex + " " + data.dataIndex + " " + data.dimension + " " + data.value); } void OnSerieExit(SerieEventData data) { - Debug.Log("OnSerieExit: " + data.serieIndex + " " + data.dataIndex + " " + data.dimension); + Debug.Log("OnSerieExit: " + data.serieIndex + " " + data.dataIndex + " " + data.dimension + " " + data.value); } void OnDraw(VertexHelper vh) @@ -93,7 +93,7 @@ namespace XCharts.Example //Debug.Log("OnDrawAfterSerie: " + serie.index); if (serie.index != 0) return; var dataPoints = serie.context.dataPoints; - if (dataPoints.Count > 0) + if (dataPoints.Count > 4) { var pos = dataPoints[3]; var grid = chart.GetChartComponent<GridCoord>(); diff --git a/Examples/Example_Test.cs b/Examples/Example_Test.cs index 0a7e69e1..31f70f36 100644 --- a/Examples/Example_Test.cs +++ b/Examples/Example_Test.cs @@ -23,11 +23,19 @@ namespace XCharts.Example { AddData(); } - else if(Input.GetKeyDown(KeyCode.R)) + else if (Input.GetKeyDown(KeyCode.R)) { chart.AnimationReset(); chart.AnimationFadeIn(); } + else if (Input.GetKeyDown(KeyCode.U)) + { + chart.UpdateData(0, 2, 99); + } + else if (Input.GetKeyDown(KeyCode.C)) + { + chart.UpdateData(0, 2, 22); + } } void AddData() diff --git a/LICENSE.md b/LICENSE.md index f250a043..c0a74575 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2018 - 2022 monitor1394 +Copyright (c) 2018-present, monitor1394 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README-en.md b/README-en.md index e7b0b9f1..bf6ac6cb 100644 --- a/README-en.md +++ b/README-en.md @@ -96,7 +96,7 @@ A powerful and easy-to-use data visualization library for Unity. It supports mo * Import `XCharts` unitypackage or source code into the project. * Right-click `Hierarchy` view and choose `XCharts->LineChart` to create a default LineChart. * You can adjust the parameters of each component in `Inspector` and see the real-time effects in `Game` view. -* For more details, see [[XCharts Tutorial: 5-minute tutorial]](Documentation~/zh/tutorial01.md) +* For more details, see [[XCharts Tutorial: 5-minute tutorial]](Documentation~/en/tutorial01.md) * For the first time, it is recommended to read the tutorial carefully. ## Branch @@ -120,7 +120,7 @@ A: Support code to dynamically add and modify data, but data needs to be parsed A: It is currently only supported on Unity. Theoretically any version of Unity that supports `UGUI` can run `XCharts`. * What about the jags? What magnitude of data is supported? -A: XCharts is based on UGUI implementation, so the problems encountered in UGUI will also exist in XCharts. For example, the sawtooth problem, such as the number of vertices in `Mesh` exceeds `65535`. Solutions to these two problems can be found in [Q&A 16](Documentation~/zh/faq.md) and [Q&A 27](Documentation~/zh/faq.md). +A: XCharts is based on UGUI implementation, so the problems encountered in UGUI will also exist in XCharts. For example, the sawtooth problem, such as the number of vertices in `Mesh` exceeds `65535`. Solutions to these two problems can be found in [Q&A 16](Documentation~/en/faq.md) and [Q&A 27](Documentation~/en/faq.md). Due to the `Mesh` of the `65535` vertex limit, the current `XCharts` single `Line` supports about `20,000` of data, of course, open sampling can support more data to draw, but at the same time it will consume more CPU. ## Changelog diff --git a/README.md b/README.md index a597108b..30ffe776 100644 --- a/README.md +++ b/README.md @@ -62,21 +62,21 @@ - __纯代码绘制__:图表完全纯代码绘制,无需额外的贴图和Shader资源。 - __可视化配置__:参数可视化配置,效果实时预览,也支持运行时代码动态修改配置和数据。 - __高自由定制__:支持从主题和配置参数上任意调整;支持代码自定义绘制,自定义回调以及自定义实现图表。 -- __多内置图表__:支持线图、状图、饼图、雷达图、散点图、热力图、环形图、K线图、极坐标、平行坐标等多种内置图表。 +- __多内置图表__:支持线图、柱状图、饼图、雷达图、散点图、热力图、环形图、K线图、极坐标、平行坐标等多种内置图表。 - __多扩展图表__:支持3D柱图、3D饼图、漏斗图、金字塔、仪表盘、水位图、象形柱图、甘特图、矩形树图等多种扩展图表。 -- __多扩展功能__:支持表格、统计数值等扩展UI组件。 +- __多扩展组件__:支持表格、统计数值等扩展UI组件。 - __多图表组合__:支持内置图表的任意组合,同一图中可同时显示多个相同或不同类型的图表。 - __多种坐标系__:支持直角坐标系、极坐标系、单轴等多种坐标系。 - __丰富的组件__:支持标题、图例、提示框、标线、标域、数据区域缩放、视觉映射等常用组件。 -- __丰富的线图__:支持直线图、曲线图、虚线图、面积图、阶梯线图等多种线图。 -- __丰富的柱图__:支持并列柱图、堆叠柱图、堆积百分比柱图、斑马柱图、胶囊柱图等多种柱状图。 -- __丰富的饼图__:支持环形图、玫瑰图、环形玫瑰图等多种饼图。 +- __多样式线图__:支持直线图、曲线图、虚线图、面积图、阶梯线图等多种线图。 +- __多样式柱图__:支持并列柱图、堆叠柱图、堆积百分比柱图、斑马柱图、胶囊柱图等多种柱状图。 +- __多样式饼图__:支持环形图、玫瑰图、环形玫瑰图等多种饼图。 - __丰富的线条__:支持实线、曲线、阶梯线、虚线、点线、点划线、双点划线等线条。 - __自定义绘制__:支持自定义图表内容绘制,提供绘制点、线、面等其他图形的强大的绘图API。 - __大数据绘制__:支持万级大数据量绘制;支持采样绘制;特殊的简化图表支持更优的性能。 - __自定义主题__:支持主题定制、导入和导出,内置明暗两种默认主题。 - __动画和交互__:支持渐入动画、渐出动画、变更动画、新增动画、交互动画等多种动画;支持多平台的数据筛选、视图缩放、细节展示等交互操作。 -- __第三方扩展__:支持接入`TexMeshPro`和`New Input System`。 +- __第三方扩展__:支持无缝接入`TexMeshPro`和`New Input System`。 - __版本和兼容__:支持所有`5.6`以上的`Unity`版本;支持全平台运行。 ## 截图 @@ -87,15 +87,43 @@ ## 注意 -- `XCharts3.0` 不完全兼容 `XCharts2.0` 版本,升级`3.0`可能需要调整部分代码,图表部分配置需要重新调整。建议旧项目可以继续使用`XCharts2.0`,新项目推荐使用`XCharts3.0`。 +- `XCharts3.0` 不完全兼容 `XCharts2.0` 版本,升级`3.0`时,部分代码和配置可能需要重新调整。建议旧项目可以继续使用`XCharts2.0`,新项目推荐使用`XCharts3.0`。 - `XCharts2.0` 进入维护阶段,后续只修复严重`bug`,原则上不再加新功能。 - `XCharts` 理论上支持`Unity 5.6`及以上版本,但由于版本测试有限难免疏漏,发现版本兼容问题可提`Issue`。 - 本仓库只包含`XCharts`源码,不包含`Demo`示例部分。需要查看`Demo`示例源码请到[XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo)仓库。也可以在浏览器查看`WebGL`下的运行效果 [在线Demo](https://xcharts-team.github.io/examples/) 。 +## 仓库 + +- [XCharts](https://github.com/XCharts-Team/XCharts):XCharts核心功能,完全免费。 +- [XCharts-Daemon](https://github.com/XCharts-Team/XCharts-Daemon):XCharts的守护程序,用于确保XCharts更新时的编译正常。非必须,但建议使用。 +- [XCharts-Demo](https://github.com/XCharts-Team/XCharts-Demo):XCharts的官方示例,不包含扩展图表部分。订阅VIP的用户购买扩展图表后,可加入对应图表的示例。 +- [XCharts-Pro](https://github.com/XCharts-Team/XCharts-Pro):XCharts完全版,包含所有扩展图表和扩展组件。订阅SVIP可访问。 +- [XCharts-Pro-Demo](https://github.com/XCharts-Team/XCharts-Pro-Demo):XCharts完全版官方示例,包含所有扩展图表和扩展组件的示例。订阅SVIP可访问。 +- [XCharts-UI](https://github.com/XCharts-Team/XCharts-UI):XCharts的扩展UI组件。订阅VIP可访问。 +- [XCharts-Bar3DChart](https://github.com/XCharts-Team/XCharts-Bar3DChart):XCharts扩展图表:3D柱图。订阅VIP后可单独购买。 +- [XCharts-FunnelChart](https://github.com/XCharts-Team/XCharts-FunnelChart):XCharts扩展图表:漏斗图。订阅VIP后可单独购买。 +- [XCharts-GanttChart](https://github.com/XCharts-Team/XCharts-GanttChart):XCharts扩展图表:甘特图。订阅VIP后可单独购买。 +- [XCharts-GaugeChart](https://github.com/XCharts-Team/XCharts-GaugeChart):XCharts扩展图表:仪表盘。订阅VIP后可单独购买。 +- [XCharts-LiquidChart](https://github.com/XCharts-Team/XCharts-LiquidChart):XCharts扩展图表:水位图。订阅VIP后可单独购买。 +- [XCharts-PictorialBarChart](https://github.com/XCharts-Team/XCharts-PictorialBarChart):XCharts扩展图表:象形住图。订阅VIP后可单独购买。 +- [XCharts-Pie3DChart](https://github.com/XCharts-Team/XCharts-Pie3DChart):XCharts扩展图表:3D饼图。订阅VIP后可单独购买。 +- [XCharts-PyramidChart](https://github.com/XCharts-Team/XCharts-PyramidChart):XCharts扩展图表:3D金字塔。订阅VIP后可单独购买。 +- [XCharts-TreemapChart](https://github.com/XCharts-Team/XCharts-TreemapChart):XCharts扩展图表:矩形树图。订阅VIP后可单独购买。 +- [XCharts-Bar3DChart-Demo](https://github.com/XCharts-Team/XCharts-Bar3DChart-Demo):3D柱图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-FunnelChart-Demo](https://github.com/XCharts-Team/XCharts-FunnelChart-Demo):漏斗图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-GanttChart-Demo](https://github.com/XCharts-Team/XCharts-GanttChart-Demo):甘特图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-GaugeChart-Demo](https://github.com/XCharts-Team/XCharts-GaugeChart-Demo):仪表盘的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-LiquidChart-Demo](https://github.com/XCharts-Team/XCharts-LiquidChart-Demo):水位图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-PictorialBarChart-Demo](https://github.com/XCharts-Team/XCharts-PictorialBarChart-Demo):象形住图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-Pie3DChart-Demo](https://github.com/XCharts-Team/XCharts-Pie3DChart-Demo):3D饼图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-PyramidChart-Demo](https://github.com/XCharts-Team/XCharts-PyramidChart-Demo):3D金字塔的示例。订阅VIP可访问,可导入XCharts-Demo使用。 +- [XCharts-TreemapChart-Demo](https://github.com/XCharts-Team/XCharts-TreemapChart-Demo):矩形树图的示例。订阅VIP可访问,可导入XCharts-Demo使用。 + ## 使用 -- 导入`XCharts`的`unitypackage`或者源码到项目。 +- 导入`XCharts`的`unitypackage`或者源码到项目。建议也导入`XCharts`守护程序[XCharts-Daemon](https://github.com/XCharts-Team/XCharts-Daemon)。 - 在`Hierarchy`视图下右键选择`XCharts->LineChart`,即可创建一个默认的折线图。 +- 用`Inspector`视图下的`Add Serie`和`Add Main Component`按钮可以添加`Serie`和`组件`。 - 在`Inspector`视图可以调整各个组件的参数,`Game`视图可看到实时效果。 - 更多细节,请看[【XCharts教程:5分钟上手教程】](Documentation~/zh/tutorial01.md) - 首次使用,建议先认真看一遍教程。 @@ -136,14 +164,13 @@ ## 订阅 -- `XCharts`核心库是开源的,可免费使用的。在此基础上,我们也提供多种订阅服务以满足不同用户的需求,订阅详情[☞ 请看这里](Documentation~/zh/support.md) -- 订阅不是必须的,不影响`XCharts`的常用功能使用。 -- 订阅是按年付费制,部分订阅服务的首年费用比次年要高,是因为包含了购买部分源码。次年的费用基本都是服务费。 -- 订阅到期后,不要求必须续订,但中断订阅期间无法享受技术支持等服务。如需继续服务,可从当日继续续订即可。 +- `XCharts`核心库是开源的,可免费使用的。在此基础上,我们也提供多种订阅服务以满足不同用户的需求,订阅详情[☞ 请看这里](Documentation~/zh/support.md)。 +- 订阅不是必须的,不影响`XCharts`的核心功能使用。 +- 订阅是按年付费,订阅到期后,不要求必须续订,但中断订阅期间无法享受技术支持等服务。如需继续服务,可从当日起续订即可。 ## 其他 - 邮箱:`monitor1394@gmail.com` - QQ群:XCharts交流群(`202030963`) -- VIP群:XCharts技术支持VIP群(`867291970`) +- VIP群:XCharts VIP群(`867291970`) - 捐助、合作、订阅和技术支持:[☞ 看这里](Documentation~/zh/support.md) diff --git a/Runtime/Component/Animation/AnimationInfo.cs b/Runtime/Component/Animation/AnimationInfo.cs index bffabfef..033dc755 100644 --- a/Runtime/Component/Animation/AnimationInfo.cs +++ b/Runtime/Component/Animation/AnimationInfo.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// the animation info. - /// |动画配置参数。 + /// ||动画配置参数。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -20,50 +20,50 @@ namespace XCharts.Runtime /// <summary> /// whether enable animation. - /// |是否开启动画效果。 + /// ||是否开启动画效果。 /// </summary> public bool enable { get { return m_Enable; } set { m_Enable = value; } } /// <summary> /// whether enable reverse animation. - /// |是否开启反向动画效果。 + /// ||是否开启反向动画效果。 /// </summary> public bool reverse { get { return m_Reverse; } set { m_Reverse = value; } } /// <summary> /// the delay time before animation start. - /// |动画开始前的延迟时间。 + /// ||动画开始前的延迟时间。 /// </summary> public float delay { get { return m_Delay; } set { m_Delay = value; } } /// <summary> /// the duration of animation. - /// |动画的时长。 + /// ||动画的时长。 /// </summary> public float duration { get { return m_Duration; } set { m_Duration = value; } } /// <summary> /// the callback function of animation start. - /// |动画开始的回调。 + /// ||动画开始的回调。 /// </summary> public Action OnAnimationStart { get; set; } /// <summary> /// the callback function of animation end. - /// |动画结束的回调。 + /// ||动画结束的回调。 /// </summary> public Action OnAnimationEnd { get; set; } /// <summary> /// the delegate function of animation delay. - /// |动画延迟的委托函数。 + /// ||动画延迟的委托函数。 /// </summary> public AnimationDelayFunction delayFunction { get; set; } /// <summary> /// the delegate function of animation duration. - /// |动画时长的委托函数。 + /// ||动画时长的委托函数。 /// </summary> public AnimationDurationFunction durationFunction { get; set; } /// <summary> /// Reset animation. - /// |重置动画。 + /// ||重置动画。 /// </summary> public void Reset() { @@ -86,7 +86,7 @@ namespace XCharts.Runtime /// <summary> /// Start animation. - /// |开始动画。 + /// ||开始动画。 /// </summary> /// <param name="reset">是否重置上一次的参数</param> public void Start(bool reset = true) @@ -119,7 +119,7 @@ namespace XCharts.Runtime /// <summary> /// Pause animation. - /// |暂停动画。 + /// ||暂停动画。 /// </summary> public void Pause() { @@ -130,7 +130,7 @@ namespace XCharts.Runtime /// <summary> /// Resume animation. - /// |恢复动画。 + /// ||恢复动画。 /// </summary> public void Resume() { @@ -141,7 +141,7 @@ namespace XCharts.Runtime /// <summary> /// End animation. - /// |结束动画。 + /// ||结束动画。 /// </summary> public void End() { @@ -159,7 +159,7 @@ namespace XCharts.Runtime /// <summary> /// Initialize animation. - /// |初始化动画。 + /// ||初始化动画。 /// </summary> /// <param name="curr">当前进度</param> /// <param name="dest">目标进度</param> @@ -187,7 +187,7 @@ namespace XCharts.Runtime /// <summary> /// Whether animation is finish. - /// |动画是否结束。 + /// ||动画是否结束。 /// </summary> public bool IsFinish() { @@ -201,7 +201,7 @@ namespace XCharts.Runtime /// <summary> /// Whether animation is in delay. - /// |动画是否在延迟中。 + /// ||动画是否在延迟中。 /// </summary> public bool IsInDelay() { @@ -213,7 +213,7 @@ namespace XCharts.Runtime /// <summary> /// Whether animation is in index delay. - /// |动画是否在索引延迟中。 + /// ||动画是否在索引延迟中。 /// </summary> /// <param name="dataIndex"></param> /// <returns></returns> @@ -227,7 +227,7 @@ namespace XCharts.Runtime /// <summary> /// Get animation delay. - /// |获取动画延迟。 + /// ||获取动画延迟。 /// </summary> /// <param name="dataIndex"></param> /// <returns></returns> @@ -381,7 +381,7 @@ namespace XCharts.Runtime /// <summary> /// Fade in animation. - /// |淡入动画。 + /// ||淡入动画。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -391,7 +391,7 @@ namespace XCharts.Runtime /// <summary> /// Fade out animation. - /// |淡出动画。 + /// ||淡出动画。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -401,7 +401,7 @@ namespace XCharts.Runtime /// <summary> /// Data change animation. - /// |数据变更动画。 + /// ||数据变更动画。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -411,7 +411,7 @@ namespace XCharts.Runtime /// <summary> /// Data addition animation. - /// |数据新增动画。 + /// ||数据新增动画。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -421,7 +421,7 @@ namespace XCharts.Runtime /// <summary> /// Data hiding animation. - /// |数据隐藏动画。 + /// ||数据隐藏动画。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -431,7 +431,7 @@ namespace XCharts.Runtime /// <summary> /// Interactive animation of charts. - /// |交互动画。 + /// ||交互动画。 /// </summary> [Since("v3.8.0")] [System.Serializable] @@ -443,17 +443,17 @@ namespace XCharts.Runtime /// <summary> /// the mlvalue of width. - /// |宽度的多样式数值。 + /// ||宽度的多样式数值。 /// </summary> public MLValue width { get { return m_Width; } set { m_Width = value; } } /// <summary> /// the mlvalue of radius. - /// |半径的多样式数值。 + /// ||半径的多样式数值。 /// </summary> public MLValue radius { get { return m_Radius; } set { m_Radius = value; } } /// <summary> /// the mlvalue of offset. Such as the offset of the pie chart when the sector is selected. - /// |交互的多样式数值。如饼图的扇形选中时的偏移。 + /// ||交互的多样式数值。如饼图的扇形选中时的偏移。 /// </summary> public MLValue offset { get { return m_Offset; } set { m_Offset = value; } } diff --git a/Runtime/Component/Animation/AnimationStyle.cs b/Runtime/Component/Animation/AnimationStyle.cs index efcb75f8..4ae085a4 100644 --- a/Runtime/Component/Animation/AnimationStyle.cs +++ b/Runtime/Component/Animation/AnimationStyle.cs @@ -8,32 +8,32 @@ namespace XCharts.Runtime { /// <summary> /// he default. An animation playback mode will be selected according to the actual situation. - /// |默认。内部会根据实际情况选择一种动画播放方式。 + /// ||默认。内部会根据实际情况选择一种动画播放方式。 /// </summary> Default, /// <summary> /// Play the animation from left to right. - /// |从左往右播放动画。 + /// ||从左往右播放动画。 /// </summary> LeftToRight, /// <summary> /// Play the animation from bottom to top. - /// |从下往上播放动画。 + /// ||从下往上播放动画。 /// </summary> BottomToTop, /// <summary> /// Play animations from the inside out. - /// |由内到外播放动画。 + /// ||由内到外播放动画。 /// </summary> InsideOut, /// <summary> /// Play the animation along the path. - /// |沿着路径播放动画。当折线图从左到右无序或有折返时,可以使用该模式。 + /// ||沿着路径播放动画。当折线图从左到右无序或有折返时,可以使用该模式。 /// </summary> AlongPath, /// <summary> /// Play the animation clockwise. - /// |顺时针播放动画。 + /// ||顺时针播放动画。 /// </summary> Clockwise, } @@ -45,7 +45,7 @@ namespace XCharts.Runtime /// <summary> /// the animation of serie. support animation type: fadeIn, fadeOut, change, addition. - /// |动画组件,用于控制图表的动画播放。支持配置五种动画表现:FadeIn(渐入动画),FadeOut(渐出动画),Change(变更动画),Addition(新增动画),Interaction(交互动画)。 + /// ||动画组件,用于控制图表的动画播放。支持配置五种动画表现:FadeIn(渐入动画),FadeOut(渐出动画),Change(变更动画),Addition(新增动画),Interaction(交互动画)。 /// 按作用的对象可以分为两类:SerieAnimation(系列动画)和DataAnimation(数据动画)。 /// </summary> [System.Serializable] @@ -79,53 +79,52 @@ namespace XCharts.Runtime /// <summary> /// Whether to enable animation. - /// |是否开启动画效果。 + /// ||是否开启动画效果。 /// </summary> public bool enable { get { return m_Enable; } set { m_Enable = value; } } /// <summary> /// The type of animation. - /// |动画类型。 + /// ||动画类型。 /// </summary> public AnimationType type { get { return m_Type; } set { m_Type = value; } } /// <summary> /// Whether to set graphic number threshold to animation. Animation will be disabled when graphic number is larger than threshold. - /// |是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。 + /// ||是否开启动画的阈值,当单个系列显示的图形数量大于这个阈值时会关闭动画。 /// </summary> public int threshold { get { return m_Threshold; } set { m_Threshold = value; } } /// <summary> /// Animation updates independently of Time.timeScale. - /// |动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。 + /// ||动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。 /// </summary> public bool unscaledTime { get { return m_UnscaledTime; } set { m_UnscaledTime = value; } } /// <summary> /// Fade in animation configuration. - /// |渐入动画配置。 + /// ||渐入动画配置。 /// </summary> public AnimationFadeIn fadeIn { get { return m_FadeIn; } } /// <summary> /// Fade out animation configuration. - /// |渐出动画配置。 + /// ||渐出动画配置。 /// </summary> public AnimationFadeOut fadeOut { get { return m_FadeOut; } } /// <summary> /// Update data animation configuration. - /// |数据变更动画配置。 + /// ||数据变更动画配置。 /// </summary> public AnimationChange change { get { return m_Change; } } /// <summary> /// Add data animation configuration. - /// |数据新增动画配置。 + /// ||数据新增动画配置。 /// </summary> public AnimationAddition addition { get { return m_Addition; } } /// <summary> /// Data hiding animation configuration. - /// |数据隐藏动画配置。 + /// ||数据隐藏动画配置。 /// </summary> - /// <value></value> public AnimationHiding hiding { get { return m_Hiding; } } /// <summary> /// Interaction animation configuration. - /// |交互动画配置。 + /// ||交互动画配置。 /// </summary> public AnimationInteraction interaction { get { return m_Interaction; } } @@ -150,7 +149,7 @@ namespace XCharts.Runtime /// <summary> /// The actived animation. - /// |当前激活的动画。 + /// ||当前激活的动画。 /// </summary> public AnimationInfo activedAnimation { @@ -166,7 +165,7 @@ namespace XCharts.Runtime /// <summary> /// Start fadein animation. - /// |开始渐入动画。 + /// ||开始渐入动画。 /// </summary> public void FadeIn() { @@ -176,7 +175,7 @@ namespace XCharts.Runtime /// <summary> /// Restart the actived animation. - /// |重启当前激活的动画。 + /// ||重启当前激活的动画。 /// </summary> public void Restart() { @@ -190,7 +189,7 @@ namespace XCharts.Runtime /// <summary> /// Start fadeout animation. - /// |开始渐出动画。 + /// ||开始渐出动画。 /// </summary> public void FadeOut() { @@ -199,7 +198,7 @@ namespace XCharts.Runtime /// <summary> /// Start additon animation. - /// |开始数据新增动画。 + /// ||开始数据新增动画。 /// </summary> public void Addition() { @@ -212,7 +211,7 @@ namespace XCharts.Runtime /// <summary> /// Pause all animations. - /// |暂停所有动画。 + /// ||暂停所有动画。 /// </summary> public void Pause() { @@ -224,7 +223,7 @@ namespace XCharts.Runtime /// <summary> /// Resume all animations. - /// |恢复所有动画。 + /// ||恢复所有动画。 /// </summary> public void Resume() { @@ -247,7 +246,7 @@ namespace XCharts.Runtime /// <summary> /// Initialize animation configuration. - /// |初始化动画配置。 + /// ||初始化动画配置。 /// </summary> /// <param name="curr">当前进度</param> /// <param name="dest">目标进度</param> @@ -276,7 +275,7 @@ namespace XCharts.Runtime /// <summary> /// Initialize animation configuration. - /// |初始化动画配置。 + /// ||初始化动画配置。 /// </summary> /// <param name="paths">路径坐标点列表</param> /// <param name="isY">是Y轴还是X轴</param> @@ -304,12 +303,6 @@ namespace XCharts.Runtime } var sp = paths[startIndex]; var ep = paths[paths.Count - 1]; - if (sp == anim.context.currPoint && ep == anim.context.destPoint) - { - return; - } - anim.context.currPoint = sp; - anim.context.destPoint = ep; var currDetailProgress = isY ? sp.y : sp.x; var totalDetailProgress = isY ? ep.y : ep.x; if (context.type == AnimationType.AlongPath) @@ -328,6 +321,12 @@ namespace XCharts.Runtime m_LinePathLastPos = sp; context.currentPathDistance = 0; } + if (sp == anim.context.currPoint && ep == anim.context.destPoint) + { + return; + } + anim.context.currPoint = sp; + anim.context.destPoint = ep; anim.Init(currDetailProgress, totalDetailProgress, paths.Count - 1); } @@ -377,7 +376,7 @@ namespace XCharts.Runtime /// <summary> /// whther animaiton is data animation. BottomToTop and InsideOut are data animation. - /// |是否为数据动画。BottomToTop和InsideOut类型的为数据动画。 + /// ||是否为数据动画。BottomToTop和InsideOut类型的为数据动画。 /// </summary> public bool IsDataAnimation() { @@ -386,7 +385,7 @@ namespace XCharts.Runtime /// <summary> /// whther animaiton is serie animation. LeftToRight, AlongPath and Clockwise are serie animation. - /// |是否为系列动画。LeftToRight、AlongPath和Clockwise类型的为系列动画。 + /// ||是否为系列动画。LeftToRight、AlongPath和Clockwise类型的为系列动画。 /// </summary> public bool IsSerieAnimation() { diff --git a/Runtime/Component/Axis/AngleAxis/AngleAxis.cs b/Runtime/Component/Axis/AngleAxis/AngleAxis.cs index 51436a3c..08929c2f 100644 --- a/Runtime/Component/Axis/AngleAxis/AngleAxis.cs +++ b/Runtime/Component/Axis/AngleAxis/AngleAxis.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Angle axis of Polar Coordinate. - /// |极坐标系的角度轴。 + /// ||极坐标系的角度轴。 /// </summary> [System.Serializable] [RequireChartComponent(typeof(PolarCoord))] @@ -16,7 +16,7 @@ namespace XCharts.Runtime /// <summary> /// Starting angle of axis. 0 degrees by default, standing for right position of center. - /// |起始刻度的角度,默认为 0 度,即圆心的正右方。 + /// ||起始刻度的角度,默认为 0 度,即圆心的正右方。 /// </summary> public float startAngle { diff --git a/Runtime/Component/Axis/AngleAxis/AngleAxisHandler.cs b/Runtime/Component/Axis/AngleAxis/AngleAxisHandler.cs index 41d6658f..8818d016 100644 --- a/Runtime/Component/Axis/AngleAxis/AngleAxisHandler.cs +++ b/Runtime/Component/Axis/AngleAxis/AngleAxisHandler.cs @@ -29,7 +29,7 @@ namespace XCharts.Runtime if (axis.IsCategory() || !axis.show) return; double tempMinValue = 0; double tempMaxValue = 0; - SeriesHelper.GetYMinMaxValue(chart, axis.polarIndex, true, axis.inverse, out tempMinValue, + SeriesHelper.GetYMinMaxValue(chart, axis.polarIndex, axis.inverse, out tempMinValue, out tempMaxValue, true); AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true); if (tempMinValue != axis.context.minValue || tempMaxValue != axis.context.maxValue) diff --git a/Runtime/Component/Axis/Axis.cs b/Runtime/Component/Axis/Axis.cs index 710e50b2..2f7cc9d2 100644 --- a/Runtime/Component/Axis/Axis.cs +++ b/Runtime/Component/Axis/Axis.cs @@ -6,69 +6,69 @@ namespace XCharts.Runtime { /// <summary> /// The axis in rectangular coordinate. - /// |直角坐标系的坐标轴组件。 + /// ||直角坐标系的坐标轴组件。 /// </summary> [System.Serializable] public class Axis : MainComponent { /// <summary> /// the type of axis. - /// |坐标轴类型。 + /// ||坐标轴类型。 /// </summary> public enum AxisType { /// <summary> /// Numerical axis, suitable for continuous data. - /// |数值轴。适用于连续数据。 + /// ||数值轴。适用于连续数据。 /// </summary> Value, /// <summary> /// Category axis, suitable for discrete category data. Data should only be set via data for this type. - /// |类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。serie的数据第0维数据对应坐标轴data的index。 + /// ||类目轴。适用于离散的类目数据,为该类型时必须通过 data 设置类目数据。serie的数据第0维数据对应坐标轴data的index。 /// </summary> Category, /// <summary> /// Log axis, suitable for log data. - /// |对数轴。适用于对数数据。 + /// ||对数轴。适用于对数数据。 /// </summary> Log, /// <summary> /// Time axis, suitable for continuous time series data. - /// |时间轴。适用于连续的时序数据。 + /// ||时间轴。适用于连续的时序数据。 /// </summary> Time } /// <summary> /// the type of axis min and max value. - /// |坐标轴最大最小刻度显示类型。 + /// ||坐标轴最大最小刻度显示类型。 /// </summary> public enum AxisMinMaxType { /// <summary> /// 0 - maximum. - /// |0-最大值。 + /// ||0-最大值。 /// </summary> Default, /// <summary> /// minimum - maximum. - /// |最小值-最大值。 + /// ||最小值-最大值。 /// </summary> MinMax, /// <summary> /// Customize the minimum and maximum. - /// |自定义最小值最大值。 + /// ||自定义最小值最大值。 /// </summary> Custom, /// <summary> /// [since("v3.7.0")]minimum - maximum, automatically calculate the appropriate values. - /// |[since("v3.7.0")]最小值-最大值。自动计算合适的值。 + /// ||[since("v3.7.0")]最小值-最大值。自动计算合适的值。 /// </summary> MinMaxAuto, } /// <summary> /// the position of axis in grid. - /// |坐标轴在Grid中的位置 + /// ||坐标轴在Grid中的位置 /// </summary> public enum AxisPosition { @@ -106,6 +106,7 @@ namespace XCharts.Runtime [SerializeField] protected AxisLabel m_AxisLabel = AxisLabel.defaultAxisLabel; [SerializeField] protected AxisSplitLine m_SplitLine = AxisSplitLine.defaultSplitLine; [SerializeField] protected AxisSplitArea m_SplitArea = AxisSplitArea.defaultSplitArea; + [SerializeField] protected AxisAnimation m_Animation = new AxisAnimation(); [SerializeField][Since("v3.2.0")] protected AxisMinorTick m_MinorTick = AxisMinorTick.defaultMinorTick; [SerializeField][Since("v3.2.0")] protected AxisMinorSplitLine m_MinorSplitLine = AxisMinorSplitLine.defaultMinorSplitLine; [SerializeField][Since("v3.4.0")] protected LabelStyle m_IndicatorLabel = new LabelStyle() { numericFormatter = "f2" }; @@ -114,7 +115,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show axis. - /// |是否显示坐标轴。 + /// ||是否显示坐标轴。 /// </summary> public bool show { @@ -123,7 +124,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of axis. - /// |坐标轴类型。 + /// ||坐标轴类型。 /// </summary> public AxisType type { @@ -132,7 +133,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of axis minmax. - /// |坐标轴刻度最大最小值显示类型。 + /// ||坐标轴刻度最大最小值显示类型。 /// </summary> public AxisMinMaxType minMaxType { @@ -141,7 +142,7 @@ namespace XCharts.Runtime } /// <summary> /// The index of the grid on which the axis are located, by default, is in the first grid. - /// |坐标轴所在的 grid 的索引,默认位于第一个 grid。 + /// ||坐标轴所在的 grid 的索引,默认位于第一个 grid。 /// </summary> public int gridIndex { @@ -150,7 +151,7 @@ namespace XCharts.Runtime } /// <summary> /// The index of the polar on which the axis are located, by default, is in the first polar. - /// |坐标轴所在的 ploar 的索引,默认位于第一个 polar。 + /// ||坐标轴所在的 ploar 的索引,默认位于第一个 polar。 /// </summary> public int polarIndex { @@ -159,7 +160,7 @@ namespace XCharts.Runtime } /// <summary> /// The index of the parallel on which the axis are located, by default, is in the first parallel. - /// |坐标轴所在的 parallel 的索引,默认位于第一个 parallel。 + /// ||坐标轴所在的 parallel 的索引,默认位于第一个 parallel。 /// </summary> public int parallelIndex { @@ -168,7 +169,7 @@ namespace XCharts.Runtime } /// <summary> /// the position of axis in grid. - /// |坐标轴在Grid中的位置。 + /// ||坐标轴在Grid中的位置。 /// </summary> public AxisPosition position { @@ -177,7 +178,7 @@ namespace XCharts.Runtime } /// <summary> /// the offset of axis from the default position. Useful when the same position has multiple axes. - /// |坐标轴相对默认位置的偏移。在相同position有多个坐标轴时有用。 + /// ||坐标轴相对默认位置的偏移。在相同position有多个坐标轴时有用。 /// </summary> public float offset { @@ -186,7 +187,7 @@ namespace XCharts.Runtime } /// <summary> /// The minimun value of axis.Valid when `minMaxType` is `Custom` - /// |设定的坐标轴刻度最小值,当minMaxType为Custom时有效。 + /// ||设定的坐标轴刻度最小值,当minMaxType为Custom时有效。 /// </summary> public double min { @@ -195,7 +196,7 @@ namespace XCharts.Runtime } /// <summary> /// The maximum value of axis.Valid when `minMaxType` is `Custom` - /// |设定的坐标轴刻度最大值,当minMaxType为Custom时有效。 + /// ||设定的坐标轴刻度最大值,当minMaxType为Custom时有效。 /// </summary> public double max { @@ -204,7 +205,7 @@ namespace XCharts.Runtime } /// <summary> /// Number of segments that the axis is split into. - /// |坐标轴的期望的分割段数。默认为0表示自动分割。 + /// ||坐标轴的期望的分割段数。默认为0表示自动分割。 /// </summary> public int splitNumber { @@ -213,7 +214,7 @@ namespace XCharts.Runtime } /// <summary> /// Compulsively set segmentation interval for axis.This is unavailable for category axis. - /// |强制设置坐标轴分割间隔。无法在类目轴中使用。 + /// ||强制设置坐标轴分割间隔。无法在类目轴中使用。 /// </summary> public double interval { @@ -222,7 +223,7 @@ namespace XCharts.Runtime } /// <summary> /// The boundary gap on both sides of a coordinate axis, which is valid only for category axis with type: 'Category'. - /// |坐标轴两边是否留白。只对类目轴有效。 + /// ||坐标轴两边是否留白。只对类目轴有效。 /// </summary> public bool boundaryGap { @@ -231,7 +232,7 @@ namespace XCharts.Runtime } /// <summary> /// Base of logarithm, which is valid only for numeric axes with type: 'Log'. - /// |对数轴的底数,只在对数轴(type:'Log')中有效。 + /// ||对数轴的底数,只在对数轴(type:'Log')中有效。 /// </summary> public float logBase { @@ -244,7 +245,7 @@ namespace XCharts.Runtime } /// <summary> /// On the log axis, if base e is the natural number, and is true, logBase fails. - /// |对数轴是否以自然数 e 为底数,为 true 时 logBase 失效。 + /// ||对数轴是否以自然数 e 为底数,为 true 时 logBase 失效。 /// </summary> public bool logBaseE { @@ -253,8 +254,8 @@ namespace XCharts.Runtime } /// <summary> /// The max number of axis data cache. - /// |The first data will be remove when the size of axis data is larger then maxCache. - /// |可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。 + /// ||The first data will be remove when the size of axis data is larger then maxCache. + /// ||可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。 /// </summary> public int maxCache { @@ -263,7 +264,7 @@ namespace XCharts.Runtime } /// <summary> /// The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated. - /// |最大最小值向上取整的倍率。默认为0时自动计算。 + /// ||最大最小值向上取整的倍率。默认为0时自动计算。 /// </summary> public double ceilRate { @@ -272,7 +273,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the axis are reversed or not. Invalid in `Category` axis. - /// |是否反向坐标轴。在类目轴中无效。 + /// ||是否反向坐标轴。在类目轴中无效。 /// </summary> public bool inverse { @@ -281,7 +282,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the positive position of axis is in clockwise. True for clockwise by default. - /// |刻度增长是否按顺时针,默认顺时针。 + /// ||刻度增长是否按顺时针,默认顺时针。 /// </summary> public bool clockwise { @@ -290,7 +291,7 @@ namespace XCharts.Runtime } /// <summary> /// Category data, available in type: 'Category' axis. - /// |类目数据,在类目轴(type: 'category')中有效。 + /// ||类目数据,在类目轴(type: 'category')中有效。 /// </summary> public List<string> data { @@ -307,7 +308,7 @@ namespace XCharts.Runtime } /// <summary> /// axis Line. - /// |坐标轴轴线。 + /// ||坐标轴轴线。 /// </summary> public AxisLine axisLine { @@ -316,7 +317,7 @@ namespace XCharts.Runtime } /// <summary> /// axis name. - /// |坐标轴名称。 + /// ||坐标轴名称。 /// </summary> public AxisName axisName { @@ -325,7 +326,7 @@ namespace XCharts.Runtime } /// <summary> /// axis tick. - /// |坐标轴刻度。 + /// ||坐标轴刻度。 /// </summary> public AxisTick axisTick { @@ -334,7 +335,7 @@ namespace XCharts.Runtime } /// <summary> /// axis label. - /// |坐标轴刻度标签。 + /// ||坐标轴刻度标签。 /// </summary> public AxisLabel axisLabel { @@ -343,7 +344,7 @@ namespace XCharts.Runtime } /// <summary> /// axis split line. - /// |坐标轴分割线。 + /// ||坐标轴分割线。 /// </summary> public AxisSplitLine splitLine { @@ -352,7 +353,7 @@ namespace XCharts.Runtime } /// <summary> /// axis split area. - /// |坐标轴分割区域。 + /// ||坐标轴分割区域。 /// </summary> public AxisSplitArea splitArea { @@ -361,7 +362,7 @@ namespace XCharts.Runtime } /// <summary> /// axis minor tick. - /// |坐标轴次刻度。 + /// ||坐标轴次刻度。 /// </summary> public AxisMinorTick minorTick { @@ -370,7 +371,7 @@ namespace XCharts.Runtime } /// <summary> /// axis minor split line. - /// |坐标轴次分割线。 + /// ||坐标轴次分割线。 /// </summary> public AxisMinorSplitLine minorSplitLine { @@ -379,7 +380,7 @@ namespace XCharts.Runtime } /// <summary> /// Style of axis tooltip indicator label. - /// |指示器文本的样式。Tooltip为Cross时使用。 + /// ||指示器文本的样式。Tooltip为Cross时使用。 /// </summary> public LabelStyle indicatorLabel { @@ -387,8 +388,17 @@ namespace XCharts.Runtime set { if (value != null) { m_IndicatorLabel = value; SetComponentDirty(); } } } /// <summary> + /// animation of axis. + /// ||坐标轴动画。 + /// </summary> + public AxisAnimation animation + { + get { return m_Animation; } + set { if (value != null) { m_Animation = value; SetComponentDirty(); } } + } + /// <summary> /// Whether to add new data at the head or at the end of the list. - /// |添加新数据时是在列表的头部还是尾部加入。 + /// ||添加新数据时是在列表的头部还是尾部加入。 /// </summary> public bool insertDataToHead { @@ -439,7 +449,7 @@ namespace XCharts.Runtime splitArea.ClearVerticesDirty(); minorTick.ClearVerticesDirty(); minorSplitLine.ClearVerticesDirty(); - indicatorLabel.ClearComponentDirty(); + indicatorLabel.ClearVerticesDirty(); } public override void SetComponentDirty() @@ -474,6 +484,7 @@ namespace XCharts.Runtime axis.minorTick = minorTick.Clone(); axis.minorSplitLine = minorSplitLine.Clone(); axis.indicatorLabel = indicatorLabel.Clone(); + axis.animation = animation.Clone(); axis.icons = new List<Sprite>(); axis.data = new List<string>(); ChartHelper.CopyList(axis.data, data); @@ -505,6 +516,7 @@ namespace XCharts.Runtime minorTick.Copy(axis.minorTick); minorSplitLine.Copy(axis.minorSplitLine); indicatorLabel.Copy(axis.indicatorLabel); + animation.Copy(axis.animation); ChartHelper.CopyList(data, axis.data); ChartHelper.CopyList<Sprite>(icons, axis.icons); } @@ -713,11 +725,18 @@ namespace XCharts.Runtime if (IsCategory() && boundaryGap) { var each = axisLength / data.Count; - return (float) (each * (value + 0.5f)); + return (float)(each * (value + 0.5f)); + } + else if (IsLog()) + { + var logValue = GetLogValue(value); + var logMin = GetLogValue(context.minValue); + var logMax = GetLogValue(context.maxValue); + return axisLength * (float)((logValue - logMin) / (logMax - logMin)); } else { - return axisLength * (float) ((value - context.minValue) / context.minMaxRange); + return axisLength * (float)((value - context.minValue) / context.minMaxRange); } } @@ -725,7 +744,7 @@ namespace XCharts.Runtime { if (context.minMaxRange > 0) { - return axisLength * ((float) (value / context.minMaxRange)); + return axisLength * ((float)(value / context.minMaxRange)); } else { @@ -789,7 +808,7 @@ namespace XCharts.Runtime { if (context.labelObjectList[i] != null) { - var text = AxisHelper.GetLabelName(this, coordinateWidth, i, context.minValue, context.maxValue, dataZoom, forcePercent); + var text = AxisHelper.GetLabelName(this, coordinateWidth, i, context.destMinValue, context.destMaxValue, dataZoom, forcePercent); context.labelObjectList[i].SetText(text); } } @@ -803,10 +822,27 @@ namespace XCharts.Runtime return Vector3.zero; } - internal void UpdateMinMaxValue(double minValue, double maxValue) + internal void UpdateMinMaxValue(double minValue, double maxValue, bool needAnimation = false) { - context.minValue = minValue; - context.maxValue = maxValue; + if (needAnimation) + { + if (context.lastMinValue == 0 && context.lastMaxValue == 0) + { + context.minValue = minValue; + context.maxValue = maxValue; + } + context.lastMinValue = context.minValue; + context.lastMaxValue = context.maxValue; + context.destMinValue = minValue; + context.destMaxValue = maxValue; + } + else + { + context.minValue = minValue; + context.maxValue = maxValue; + context.destMinValue = minValue; + context.destMaxValue = maxValue; + } double tempRange = maxValue - minValue; if (context.minMaxRange != tempRange) { @@ -823,11 +859,13 @@ namespace XCharts.Runtime if (value <= 0 || value == 1) return 0; else - return logBaseE ? (float) Math.Log(value) : (float) Math.Log(value, logBase); + return logBaseE ? (float)Math.Log(value) : (float)Math.Log(value, logBase); } public double GetLogMinIndex() { + if (context.minValue <= 0 || context.minValue == 1) + return 0; return logBaseE ? Math.Log(context.minValue) : Math.Log(context.minValue, logBase); @@ -835,6 +873,8 @@ namespace XCharts.Runtime public double GetLogMaxIndex() { + if (context.maxValue <= 0 || context.maxValue == 1) + return 0; return logBaseE ? Math.Log(context.maxValue) : Math.Log(context.maxValue, logBase); @@ -864,8 +904,7 @@ namespace XCharts.Runtime 0 : (context.maxValue < 0 ? axisLength : - (float) (Math.Abs(context.minValue) * (axisLength / - (Math.Abs(context.minValue) + Math.Abs(context.maxValue)))) + (float)(Math.Abs(context.minValue) * (axisLength / (Math.Abs(context.minValue) + Math.Abs(context.maxValue)))) ); } } diff --git a/Runtime/Component/Axis/AxisAnimation.cs b/Runtime/Component/Axis/AxisAnimation.cs new file mode 100644 index 00000000..51f9ca12 --- /dev/null +++ b/Runtime/Component/Axis/AxisAnimation.cs @@ -0,0 +1,63 @@ +using UnityEngine; + +namespace XCharts.Runtime +{ + /// <summary> + /// animation style of axis. + /// ||坐标轴动画配置。 + /// </summary> + [System.Serializable] + [Since("v3.9.0")] + public class AxisAnimation : ChildComponent + { + [SerializeField] private bool m_Show = true; + [SerializeField] private float m_Duration; + [SerializeField] private bool m_UnscaledTime; + + /// <summary> + /// whether to enable animation. + /// ||是否开启动画。 + /// </summary> + public bool show + { + get { return m_Show; } + set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } + } + /// <summary> + /// the duration of animation (ms). When it is set to 0, the animation duration will be automatically calculated according to the serie. + /// ||动画时长(ms)。 默认设置为0时,会自动获取serie的动画时长。 + /// </summary> + public float duration + { + get { return m_Duration; } + set { if (PropertyUtil.SetStruct(ref m_Duration, value)) SetComponentDirty(); } + } + /// <summary> + /// Animation updates independently of Time.timeScale. + /// ||动画是否受TimeScaled的影响。默认为 false 受TimeScaled的影响。 + /// </summary> + public bool unscaledTime + { + get { return m_UnscaledTime; } + set { if (PropertyUtil.SetStruct(ref m_UnscaledTime, value)) SetComponentDirty(); } + } + + public AxisAnimation Clone() + { + var animation = new AxisAnimation + { + show = show, + duration = duration, + unscaledTime = unscaledTime + }; + return animation; + } + + public void Copy(AxisAnimation animation) + { + show = animation.show; + duration = animation.duration; + unscaledTime = animation.unscaledTime; + } + } +} \ No newline at end of file diff --git a/Runtime/Component/Axis/AxisAnimation.cs.meta b/Runtime/Component/Axis/AxisAnimation.cs.meta new file mode 100644 index 00000000..1d828275 --- /dev/null +++ b/Runtime/Component/Axis/AxisAnimation.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ecce90a24f1e64ce2affa51992d56ac4 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Runtime/Component/Axis/AxisContext.cs b/Runtime/Component/Axis/AxisContext.cs index 89e0296f..056a6cb0 100644 --- a/Runtime/Component/Axis/AxisContext.cs +++ b/Runtime/Component/Axis/AxisContext.cs @@ -32,23 +32,28 @@ namespace XCharts.Runtime public float top; /// <summary> /// the current minimun value. - /// |当前最小值。 + /// ||当前最小值。 /// </summary> public double minValue; + public double lastMinValue { get; internal set; } + public double destMinValue { get; internal set; } /// <summary> /// the current maximum value. - /// |当前最大值。 + /// ||当前最大值。 /// </summary> public double maxValue; + public double lastMaxValue { get; internal set; } + public double destMaxValue { get; internal set; } + public bool needAnimation { get; internal set; } /// <summary> /// the offset of zero position. - /// |坐标轴原点在坐标轴的偏移。 + /// ||坐标轴原点在坐标轴的偏移。 /// </summary> public float offset; public double minMaxRange; /// <summary> /// the tick value of value axis. - /// |数值轴时每个tick的数值。 + /// ||数值轴时每个tick的数值。 /// </summary> public double tickValue; public float scaleWidth; diff --git a/Runtime/Component/Axis/AxisHandler.cs b/Runtime/Component/Axis/AxisHandler.cs index 21cb690e..e09bdd9f 100644 --- a/Runtime/Component/Axis/AxisHandler.cs +++ b/Runtime/Component/Axis/AxisHandler.cs @@ -16,7 +16,7 @@ namespace XCharts internal override void SetComponent(MainComponent component) { - this.component = (T) component; + this.component = (T)component; } protected virtual Vector3 GetLabelPosition(float scaleWid, int i) @@ -109,11 +109,23 @@ namespace XCharts } else { - var xRate = axis.context.minMaxRange / grid.context.width; - var xValue = xRate * (chart.pointerPos.x - grid.context.x - axis.context.offset); - if (axis.context.minValue > 0) - xValue += axis.context.minValue; - + double xValue; + if (axis.IsLog()) + { + var logBase = axis.logBase; + var minLog = Math.Log(axis.context.minValue, logBase); + var maxLog = Math.Log(axis.context.maxValue, logBase); + var logRange = maxLog - minLog; + var pointerLog = minLog + logRange * (chart.pointerPos.x - grid.context.x - axis.context.offset) / grid.context.width; + xValue = Math.Pow(logBase, pointerLog); + } + else + { + var xRate = axis.context.minMaxRange / grid.context.width; + xValue = xRate * (chart.pointerPos.x - grid.context.x - axis.context.offset); + if (axis.context.minValue > 0) + xValue += axis.context.minValue; + } var labelY = axis.GetLabelObjectPosition(0).y; axis.context.pointerValue = xValue; axis.context.pointerLabelPosition = new Vector3(chart.pointerPos.x, labelY); @@ -140,8 +152,9 @@ namespace XCharts return; } - double tempMinValue = 0; - double tempMaxValue = 0; + double tempMinValue; + double tempMaxValue; + axis.context.needAnimation = Application.isPlaying && axis.animation.show; chart.GetSeriesMinMaxValue(axis, axisIndex, out tempMinValue, out tempMaxValue); var dataZoom = chart.GetDataZoomOfAxis(axis); @@ -152,15 +165,15 @@ namespace XCharts else dataZoom.SetYAxisIndexValueInfo(axisIndex, ref tempMinValue, ref tempMaxValue); } - if (tempMinValue != axis.context.minValue || - tempMaxValue != axis.context.maxValue || + + if (tempMinValue != axis.context.destMinValue || + tempMaxValue != axis.context.destMaxValue || m_LastInterval != axis.interval || m_LastSplitNumber != axis.splitNumber) { m_LastSplitNumber = axis.splitNumber; m_LastInterval = axis.interval; - - axis.UpdateMinMaxValue(tempMinValue, tempMaxValue); + axis.UpdateMinMaxValue(tempMinValue, tempMaxValue, axis.context.needAnimation); axis.context.offset = 0; axis.context.lastCheckInverse = axis.inverse; UpdateAxisTickValueList(axis); @@ -184,6 +197,36 @@ namespace XCharts chart.RefreshChart(); } } + + if (axis.context.needAnimation && (axis.context.minValue != axis.context.destMinValue || axis.context.maxValue != axis.context.destMaxValue)) + { + var duration = axis.animation.duration == 0 + ? SeriesHelper.GetMinAnimationDuration(chart.series) / 1000f + : axis.animation.duration / 1000f; + var deltaTime = axis.animation.unscaledTime ? Time.unscaledDeltaTime : Time.deltaTime; + var minDiff = axis.context.destMinValue - axis.context.lastMinValue; + var maxDiff = axis.context.destMaxValue - axis.context.lastMaxValue; + var minDelta = minDiff / duration * deltaTime; + var maxDelta = maxDiff / duration * deltaTime; + axis.context.minValue += minDelta; + axis.context.maxValue += maxDelta; + if ((minDiff > 0 && axis.context.minValue > axis.context.destMinValue) + || (minDiff < 0 && axis.context.minValue < axis.context.destMinValue)) + { + axis.context.minValue = axis.context.destMinValue; + axis.context.lastMinValue = axis.context.destMinValue; + } + if ((maxDiff > 0 && axis.context.maxValue > axis.context.destMaxValue) + || (maxDiff < 0 && axis.context.maxValue < axis.context.destMaxValue)) + { + axis.context.maxValue = axis.context.destMaxValue; + axis.context.lastMaxValue = axis.context.destMaxValue; + } + axis.context.minMaxRange = axis.context.maxValue - axis.context.minValue; + UpdateAxisTickValueList(axis); + UpdateAxisLabelText(axis); + chart.RefreshChart(); + } } internal virtual void UpdateAxisLabelText(Axis axis) @@ -205,7 +248,7 @@ namespace XCharts { var lastCount = axis.context.labelValueList.Count; axis.context.tickValue = DateTimeUtil.UpdateTimeAxisDateTimeList(axis.context.labelValueList, - (int) axis.context.minValue, (int) axis.context.maxValue, axis.splitNumber); + (int)axis.context.minValue, (int)axis.context.maxValue, axis.splitNumber); if (axis.context.labelValueList.Count != lastCount) axis.SetAllDirty(); @@ -242,7 +285,7 @@ namespace XCharts } var value = 0d; axis.context.tickValue = tick; - if (Mathf.Approximately((float) (axis.context.minValue % tick), 0)) + if (Mathf.Approximately((float)(axis.context.minValue % tick), 0)) { value = axis.context.minValue; } @@ -377,8 +420,8 @@ namespace XCharts { var labelWidth = AxisHelper.GetScaleWidth(axis, axisLength, i + 1, dataZoom); var labelName = AxisHelper.GetLabelName(axis, axisLength, i, - axis.context.minValue, - axis.context.maxValue, + axis.context.destMinValue, + axis.context.destMaxValue, dataZoom, isPercentStack); var label = ChartHelper.AddAxisLabelObject(splitNumber, i, @@ -411,7 +454,7 @@ namespace XCharts if (orient == Orient.Horizonal) { var grid = chart.GetChartComponent<GridCoord>(axis.gridIndex); - var posY = !axis.axisName.onZero && grid != null? grid.context.y : GetAxisLineXOrY() + offset.y; + var posY = !axis.axisName.onZero && grid != null ? grid.context.y : GetAxisLineXOrY() + offset.y; switch (axis.axisName.labelStyle.position) { case LabelStyle.Position.Start: @@ -448,7 +491,7 @@ namespace XCharts else { var grid = chart.GetChartComponent<GridCoord>(axis.gridIndex); - var posX = !axis.axisName.onZero && grid != null? grid.context.x : GetAxisLineXOrY() + offset.x; + var posX = !axis.axisName.onZero && grid != null ? grid.context.x : GetAxisLineXOrY() + offset.x; switch (axis.axisName.labelStyle.position) { case LabelStyle.Position.Start: @@ -582,6 +625,7 @@ namespace XCharts var minorTickWidth = axis.minorTick.GetWidth(theme.tickWidth); var minorTickLength = axis.minorTick.GetLength(theme.tickLength * 0.6f); var minorStartIndex = axis.IsTime() ? 0 : 1; + var isLogAxis = axis.IsLog(); for (int i = 0; i < size; i++) { var scaleWidth = AxisHelper.GetScaleWidth(axis, axisLength, i + 1, dataZoom); @@ -616,9 +660,23 @@ namespace XCharts } if (!hideTick) UGL.DrawLine(vh, new Vector3(pX, sY), new Vector3(pX, eY), tickWidth, tickColor); - if (axis.minorTick.show && i >= minorStartIndex && minorTickDistance > 0) + if (axis.minorTick.show && i >= minorStartIndex && (minorTickDistance > 0 || isLogAxis)) { - if (lastTickX <= axis.context.zeroX || (i == minorStartIndex && pX > axis.context.zeroX)) + if (isLogAxis) + { + var count = 0; + var logRange = (axis.logBase - 1f); + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + var tickTotal = lastTickX + minorTickDistance; + while (tickTotal < current && count < minorTickSplitNumber - 1) + { + UGL.DrawLine(vh, new Vector3(tickTotal, sY), new Vector3(tickTotal, mY), minorTickWidth, minorTickColor); + count++; + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + tickTotal = lastTickX + minorTickDistance; + } + } + else if (lastTickX <= axis.context.zeroX || (i == minorStartIndex && pX > axis.context.zeroX)) { var tickTotal = pX - minorTickDistance; while (tickTotal > lastTickX) @@ -675,9 +733,23 @@ namespace XCharts } if (!hideTick) UGL.DrawLine(vh, new Vector3(sX, pY), new Vector3(eX, pY), tickWidth, tickColor); - if (axis.minorTick.show && i >= minorStartIndex && minorTickDistance > 0) + if (axis.minorTick.show && i >= minorStartIndex && (minorTickDistance > 0 || isLogAxis)) { - if (lastTickY <= axis.context.zeroY || (i == minorStartIndex && pY > axis.context.zeroY)) + if (isLogAxis) + { + var count = 0; + var logRange = (axis.logBase - 1f); + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + var tickTotal = lastTickY + minorTickDistance; + while (tickTotal < current && count < minorTickSplitNumber - 1) + { + UGL.DrawLine(vh, new Vector3(sX, tickTotal), new Vector3(mX, tickTotal), minorTickWidth, minorTickColor); + count++; + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + tickTotal = lastTickY + minorTickDistance; + } + } + else if (lastTickY <= axis.context.zeroY || (i == minorStartIndex && pY > axis.context.zeroY)) { var tickTotal = pY - minorTickDistance; while (tickTotal > lastTickY) @@ -789,6 +861,7 @@ namespace XCharts var minorLineWidth = axis.minorSplitLine.GetWidth(theme.lineWidth); var minorLineType = axis.minorSplitLine.GetType(theme.splitLineType); var minorStartIndex = axis.IsTime() ? 0 : 1; + var isLogAxis = axis.IsLog(); for (int i = 0; i < size; i++) { var scaleWidth = AxisHelper.GetScaleWidth(axis, axisLength, axis.IsTime() ? i : i + 1, dataZoom); @@ -832,9 +905,28 @@ namespace XCharts new Vector3(current, startY + splitLength), lineColor); } - if (axis.minorSplitLine.show && i >= minorStartIndex && minorTickDistance > 0) + if (axis.minorSplitLine.show && i >= minorStartIndex && (minorTickDistance > 0 || isLogAxis)) { - if (lastSplitX <= axis.context.zeroX || (i == minorStartIndex && current > axis.context.zeroX)) + if (isLogAxis) + { + var count = 0; + var logRange = axis.logBase - 1f; + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + var tickTotal = lastSplitX + minorTickDistance; + while (tickTotal < current && count < minorTickSplitNumber - 1) + { + ChartDrawer.DrawLineStyle(vh, + minorLineType, + minorLineWidth, + new Vector3(tickTotal, startY), + new Vector3(tickTotal, startY + splitLength), + minorSplitLineColor); + count++; + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + tickTotal = lastSplitX + minorTickDistance; + } + } + else if (lastSplitX <= axis.context.zeroX || (i == minorStartIndex && current > axis.context.zeroX)) { var tickTotal = current - minorTickDistance; var count = 0; @@ -896,9 +988,28 @@ namespace XCharts new Vector3(startX + splitLength, current), lineColor); } - if (axis.minorSplitLine.show && i >= minorStartIndex && minorTickDistance > 0) + if (axis.minorSplitLine.show && i >= minorStartIndex && (minorTickDistance > 0 || isLogAxis)) { - if (lastSplitY <= axis.context.zeroY || (i == minorStartIndex && current > axis.context.zeroY)) + if (isLogAxis) + { + var count = 0; + var logRange = (axis.logBase - 1f); + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + var tickTotal = lastSplitY + minorTickDistance; + while (tickTotal < current && count < minorTickSplitNumber - 1) + { + ChartDrawer.DrawLineStyle(vh, + minorLineType, + minorLineWidth, + new Vector3(startX, tickTotal), + new Vector3(startX + splitLength, tickTotal), + minorSplitLineColor); + count++; + minorTickDistance = scaleWidth * axis.GetLogValue(1 + (count + 1) * logRange / minorTickSplitNumber); + tickTotal = lastSplitY + minorTickDistance; + } + } + else if (lastSplitY <= axis.context.zeroY || (i == minorStartIndex && current > axis.context.zeroY)) { var tickTotal = current - minorTickDistance; var count = 0; diff --git a/Runtime/Component/Axis/AxisHelper.cs b/Runtime/Component/Axis/AxisHelper.cs index ff39cb7b..b70c62b4 100644 --- a/Runtime/Component/Axis/AxisHelper.cs +++ b/Runtime/Component/Axis/AxisHelper.cs @@ -344,7 +344,8 @@ namespace XCharts.Runtime int maxSplit = 0; maxValue = ChartHelper.GetMaxLogValue(maxValue, axis.logBase, axis.logBaseE, out maxSplit); minValue = ChartHelper.GetMinLogValue(minValue, axis.logBase, axis.logBaseE, out minSplit); - var splitNumber = (minSplit > 0 && maxSplit > 0) ? (maxSplit + minSplit - 1) : (maxSplit + minSplit); + + var splitNumber = maxSplit + minSplit; if (splitNumber > 15) splitNumber = 15; axis.splitNumber = splitNumber; diff --git a/Runtime/Component/Axis/AxisLabel.cs b/Runtime/Component/Axis/AxisLabel.cs index 0daf6836..86cc37e4 100644 --- a/Runtime/Component/Axis/AxisLabel.cs +++ b/Runtime/Component/Axis/AxisLabel.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to axis label. - /// |坐标轴刻度标签的相关设置。 + /// ||坐标轴刻度标签的相关设置。 /// </summary> [Serializable] public class AxisLabel : LabelStyle @@ -21,7 +21,7 @@ namespace XCharts.Runtime /// <summary> /// The display interval of the axis label. - /// |坐标轴刻度标签的显示间隔,在类目轴中有效。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 + /// ||坐标轴刻度标签的显示间隔,在类目轴中有效。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 /// </summary> public int interval { @@ -30,7 +30,7 @@ namespace XCharts.Runtime } /// <summary> /// Set this to true so the axis labels face the inside direction. - /// |刻度标签是否朝内,默认朝外。 + /// ||刻度标签是否朝内,默认朝外。 /// </summary> public bool inside { @@ -39,7 +39,7 @@ namespace XCharts.Runtime } /// <summary> /// Show negative number as positive number. - /// |将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。 + /// ||将负数数值显示为正数。一般和`Serie`的`showAsPositiveNumber`配合使用。 /// </summary> public bool showAsPositiveNumber { @@ -57,7 +57,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to display the first label. - /// |是否显示第一个文本。 + /// ||是否显示第一个文本。 /// </summary> public bool showStartLabel { @@ -66,7 +66,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to display the last label. - /// |是否显示最后一个文本。 + /// ||是否显示最后一个文本。 /// </summary> public bool showEndLabel { @@ -106,18 +106,20 @@ namespace XCharts.Runtime public new AxisLabel Clone() { - var axisLabel = new AxisLabel(); - axisLabel.show = show; - axisLabel.formatter = formatter; - axisLabel.interval = interval; - axisLabel.inside = inside; - axisLabel.distance = distance; - axisLabel.numericFormatter = numericFormatter; - axisLabel.width = width; - axisLabel.height = height; - axisLabel.showStartLabel = showStartLabel; - axisLabel.showEndLabel = showEndLabel; - axisLabel.textLimit = textLimit.Clone(); + var axisLabel = new AxisLabel + { + show = show, + formatter = formatter, + interval = interval, + inside = inside, + distance = distance, + numericFormatter = numericFormatter, + width = width, + height = height, + showStartLabel = showStartLabel, + showEndLabel = showEndLabel, + textLimit = textLimit.Clone() + }; axisLabel.textStyle.Copy(textStyle); return axisLabel; } diff --git a/Runtime/Component/Axis/AxisLine.cs b/Runtime/Component/Axis/AxisLine.cs index 289a7ade..acf91d1b 100644 --- a/Runtime/Component/Axis/AxisLine.cs +++ b/Runtime/Component/Axis/AxisLine.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to axis line. - /// |坐标轴轴线。 + /// ||坐标轴轴线。 /// </summary> [System.Serializable] public class AxisLine : BaseLine @@ -15,7 +15,7 @@ namespace XCharts.Runtime /// <summary> /// When mutiple axes exists, this option can be used to specify which axis can be "onZero" to. - /// |X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一个轴为数值轴且包含 0 刻度时有效。 + /// ||X 轴或者 Y 轴的轴线是否在另一个轴的 0 刻度上,只有在另一个轴为数值轴且包含 0 刻度时有效。 /// </summary> public bool onZero { @@ -24,7 +24,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show the arrow symbol of axis. - /// |是否显示箭头。 + /// ||是否显示箭头。 /// </summary> public bool showArrow { @@ -33,7 +33,7 @@ namespace XCharts.Runtime } /// <summary> /// the arrow of line. - /// |轴线箭头。 + /// ||轴线箭头。 /// </summary> public ArrowStyle arrow { diff --git a/Runtime/Component/Axis/AxisMinorSplitLine.cs b/Runtime/Component/Axis/AxisMinorSplitLine.cs index f44c2fb9..1fff97db 100644 --- a/Runtime/Component/Axis/AxisMinorSplitLine.cs +++ b/Runtime/Component/Axis/AxisMinorSplitLine.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Minor split line of axis in grid area. - /// |坐标轴在 grid 区域中的次分隔线。次分割线会对齐次刻度线 minorTick。 + /// ||坐标轴在 grid 区域中的次分隔线。次分割线会对齐次刻度线 minorTick。 /// </summary> [Serializable] [Since("v3.2.0")] @@ -16,12 +16,12 @@ namespace XCharts.Runtime /// <summary> /// The distance between the split line and axis line. - /// |刻度线与轴线的距离。 + /// ||刻度线与轴线的距离。 /// </summary> public float distance { get { return m_Distance; } set { m_Distance = value; } } /// <summary> /// auto color. - /// |自动设置颜色。 + /// ||自动设置颜色。 /// </summary> public bool autoColor { get { return m_AutoColor; } set { m_AutoColor = value; } } diff --git a/Runtime/Component/Axis/AxisMinorTick.cs b/Runtime/Component/Axis/AxisMinorTick.cs index f8f3fc5e..26c321c8 100644 --- a/Runtime/Component/Axis/AxisMinorTick.cs +++ b/Runtime/Component/Axis/AxisMinorTick.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to axis minor tick. - /// |坐标轴次刻度相关设置。注意:次刻度无法在类目轴中使用。 + /// ||坐标轴次刻度相关设置。注意:次刻度无法在类目轴中使用。 /// </summary> [System.Serializable] [Since("v3.2.0")] @@ -15,7 +15,7 @@ namespace XCharts.Runtime /// <summary> /// Number of segments that the axis is split into. - /// |分隔线之间分割的刻度数。 + /// ||分隔线之间分割的刻度数。 /// </summary> public int splitNumber { diff --git a/Runtime/Component/Axis/AxisName.cs b/Runtime/Component/Axis/AxisName.cs index 4c5cf54b..ca06c16d 100644 --- a/Runtime/Component/Axis/AxisName.cs +++ b/Runtime/Component/Axis/AxisName.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// the name of axis. - /// |坐标轴名称。 + /// ||坐标轴名称。 /// </summary> [Serializable] public class AxisName : ChildComponent @@ -17,7 +17,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show axis name. - /// |是否显示坐标轴名称。 + /// ||是否显示坐标轴名称。 /// </summary> public bool show { @@ -26,7 +26,7 @@ namespace XCharts.Runtime } /// <summary> /// the name of axis. - /// |坐标轴名称。 + /// ||坐标轴名称。 /// </summary> public string name { @@ -35,7 +35,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the axis name position are the same with 0 position of YAxis. - /// |坐标轴名称的位置是否保持和Y轴0刻度一致。 + /// ||坐标轴名称的位置是否保持和Y轴0刻度一致。 /// </summary> public bool onZero { @@ -44,7 +44,7 @@ namespace XCharts.Runtime } /// <summary> /// The text style of axis name. - /// |文本样式。 + /// ||文本样式。 /// </summary> public LabelStyle labelStyle { diff --git a/Runtime/Component/Axis/AxisSplitArea.cs b/Runtime/Component/Axis/AxisSplitArea.cs index 1440f856..1faff432 100644 --- a/Runtime/Component/Axis/AxisSplitArea.cs +++ b/Runtime/Component/Axis/AxisSplitArea.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// Split area of axis in grid area, not shown by default. - /// |坐标轴在 grid 区域中的分隔区域,默认不显示。 + /// ||坐标轴在 grid 区域中的分隔区域,默认不显示。 /// </summary> [Serializable] public class AxisSplitArea : ChildComponent @@ -16,7 +16,7 @@ namespace XCharts.Runtime /// <summary> /// Set this to true to show the splitArea. - /// |是否显示分隔区域。 + /// ||是否显示分隔区域。 /// </summary> public bool show { @@ -27,7 +27,7 @@ namespace XCharts.Runtime /// Color of split area. SplitArea color could also be set in color array, /// which the split lines would take as their colors in turns. /// Dark and light colors in turns are used by default. - /// |分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 + /// ||分隔区域颜色。分隔区域会按数组中颜色的顺序依次循环设置颜色。默认是一个深浅的间隔色。 /// </summary> public List<Color32> color { diff --git a/Runtime/Component/Axis/AxisSplitLine.cs b/Runtime/Component/Axis/AxisSplitLine.cs index a9785e3c..acebe148 100644 --- a/Runtime/Component/Axis/AxisSplitLine.cs +++ b/Runtime/Component/Axis/AxisSplitLine.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Split line of axis in grid area. - /// |坐标轴在 grid 区域中的分隔线。 + /// ||坐标轴在 grid 区域中的分隔线。 /// </summary> [Serializable] public class AxisSplitLine : BaseLine @@ -18,17 +18,17 @@ namespace XCharts.Runtime /// <summary> /// The distance between the split line and axis line. - /// |刻度线与轴线的距离。 + /// ||刻度线与轴线的距离。 /// </summary> public float distance { get { return m_Distance; } set { m_Distance = value; } } /// <summary> /// auto color. - /// |自动设置颜色。 + /// ||自动设置颜色。 /// </summary> public bool autoColor { get { return m_AutoColor; } set { m_AutoColor = value; } } /// <summary> /// Interval of Axis splitLine. - /// |坐标轴分隔线的显示间隔。 + /// ||坐标轴分隔线的显示间隔。 /// </summary> public int interval { @@ -37,7 +37,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show the first split line. - /// |是否显示第一条分割线。 + /// ||是否显示第一条分割线。 /// </summary> public bool showStartLine { @@ -46,7 +46,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show the last split line. - /// |是否显示最后一条分割线。 + /// ||是否显示最后一条分割线。 /// </summary> public bool showEndLine { diff --git a/Runtime/Component/Axis/AxisTick.cs b/Runtime/Component/Axis/AxisTick.cs index ff3e7191..eb1f0595 100644 --- a/Runtime/Component/Axis/AxisTick.cs +++ b/Runtime/Component/Axis/AxisTick.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to axis tick. - /// |坐标轴刻度相关设置。 + /// ||坐标轴刻度相关设置。 /// </summary> [System.Serializable] public class AxisTick : BaseLine @@ -19,13 +19,13 @@ namespace XCharts.Runtime /// <summary> /// The distance between the tick line and axis line. - /// |刻度线与轴线的距离。 + /// ||刻度线与轴线的距离。 /// </summary> public float distance { get { return m_Distance; } set { m_Distance = value; } } /// <summary> /// Align axis tick with label, which is available only when boundaryGap is set to be true in category axis. - /// |类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。 + /// ||类目轴中在 boundaryGap 为 true 的时候有效,可以保证刻度线和标签对齐。 /// </summary> public bool alignWithLabel { @@ -34,7 +34,7 @@ namespace XCharts.Runtime } /// <summary> /// Set this to true so the axis labels face the inside direction. - /// |坐标轴刻度是否朝内,默认朝外。 + /// ||坐标轴刻度是否朝内,默认朝外。 /// </summary> public bool inside { @@ -43,7 +43,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to display the first tick. - /// |是否显示第一个刻度。 + /// ||是否显示第一个刻度。 /// </summary> public bool showStartTick { @@ -52,7 +52,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to display the last tick. - /// |是否显示最后一个刻度。 + /// ||是否显示最后一个刻度。 /// </summary> public bool showEndTick { @@ -61,7 +61,7 @@ namespace XCharts.Runtime } /// <summary> /// Number of segments that the axis is split into. - /// |分隔线之间分割的刻度数。 + /// ||分隔线之间分割的刻度数。 /// </summary> public int splitNumber { diff --git a/Runtime/Component/Axis/RadiusAxis/RadiusAxis.cs b/Runtime/Component/Axis/RadiusAxis/RadiusAxis.cs index ab124143..ef949b35 100644 --- a/Runtime/Component/Axis/RadiusAxis/RadiusAxis.cs +++ b/Runtime/Component/Axis/RadiusAxis/RadiusAxis.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Radial axis of polar coordinate. - /// |极坐标系的径向轴。 + /// ||极坐标系的径向轴。 /// </summary> [System.Serializable] [RequireChartComponent(typeof(PolarCoord))] diff --git a/Runtime/Component/Axis/RadiusAxis/RadiusAxisHandler.cs b/Runtime/Component/Axis/RadiusAxis/RadiusAxisHandler.cs index 970ecfeb..76b2ce88 100644 --- a/Runtime/Component/Axis/RadiusAxis/RadiusAxisHandler.cs +++ b/Runtime/Component/Axis/RadiusAxis/RadiusAxisHandler.cs @@ -51,9 +51,9 @@ namespace XCharts.Runtime { if (axis == null) return; if (axis.IsCategory() || !axis.show) return; - double tempMinValue = 0; - double tempMaxValue = 0; - SeriesHelper.GetXMinMaxValue(chart, axis.polarIndex, true, axis.inverse, out tempMinValue, + double tempMinValue; + double tempMaxValue; + SeriesHelper.GetXMinMaxValue(chart, axis.polarIndex, axis.inverse, out tempMinValue, out tempMaxValue, true); AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true); if (tempMinValue != axis.context.minValue || tempMaxValue != axis.context.maxValue) diff --git a/Runtime/Component/Axis/SingleAxis/SingleAxis.cs b/Runtime/Component/Axis/SingleAxis/SingleAxis.cs index 8f29b518..5d3cd726 100644 --- a/Runtime/Component/Axis/SingleAxis/SingleAxis.cs +++ b/Runtime/Component/Axis/SingleAxis/SingleAxis.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Single axis. - /// |单轴。 + /// ||单轴。 /// </summary> [System.Serializable] [ComponentHandler(typeof(SingleAxisHander), true)] @@ -21,7 +21,7 @@ namespace XCharts.Runtime /// <summary> /// Orientation of the axis. By default, it's 'Horizontal'. You can set it to be 'Vertical' to make a vertical axis. - /// |坐标轴朝向。默认为水平朝向。 + /// ||坐标轴朝向。默认为水平朝向。 /// </summary> public Orient orient { @@ -30,7 +30,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the left side of the container. - /// |组件离容器左侧的距离。 + /// ||组件离容器左侧的距离。 /// </summary> public float left { @@ -39,7 +39,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the right side of the container. - /// |组件离容器右侧的距离。 + /// ||组件离容器右侧的距离。 /// </summary> public float right { @@ -48,7 +48,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the top side of the container. - /// |组件离容器上侧的距离。 + /// ||组件离容器上侧的距离。 /// </summary> public float top { @@ -57,7 +57,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the bottom side of the container. - /// |组件离容器下侧的距离。 + /// ||组件离容器下侧的距离。 /// </summary> public float bottom { @@ -66,7 +66,7 @@ namespace XCharts.Runtime } /// <summary> /// width of axis. - /// |坐标轴宽。 + /// ||坐标轴宽。 /// </summary> public float width { @@ -75,7 +75,7 @@ namespace XCharts.Runtime } /// <summary> /// height of axis. - /// |坐标轴高。 + /// ||坐标轴高。 /// </summary> public float height { diff --git a/Runtime/Component/Axis/XAxis/XAxis.cs b/Runtime/Component/Axis/XAxis/XAxis.cs index 448a8395..29ba477e 100644 --- a/Runtime/Component/Axis/XAxis/XAxis.cs +++ b/Runtime/Component/Axis/XAxis/XAxis.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// The x axis in cartesian(rectangular) coordinate. - /// |直角坐标系 grid 中的 x 轴。 + /// ||直角坐标系 grid 中的 x 轴。 /// </summary> [System.Serializable] [RequireChartComponent(typeof(GridCoord))] diff --git a/Runtime/Component/Axis/YAxis/YAxis.cs b/Runtime/Component/Axis/YAxis/YAxis.cs index aee2bd17..d01f8ec1 100644 --- a/Runtime/Component/Axis/YAxis/YAxis.cs +++ b/Runtime/Component/Axis/YAxis/YAxis.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// The x axis in cartesian(rectangular) coordinate. - /// |直角坐标系 grid 中的 y 轴。 + /// ||直角坐标系 grid 中的 y 轴。 /// </summary> [System.Serializable] [RequireChartComponent(typeof(GridCoord), typeof(XAxis))] diff --git a/Runtime/Component/Background/Background.cs b/Runtime/Component/Background/Background.cs index bd230cf4..e91486b8 100644 --- a/Runtime/Component/Background/Background.cs +++ b/Runtime/Component/Background/Background.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// Background component. - /// |背景组件。 + /// ||背景组件。 /// </summary> [Serializable] [DisallowMultipleComponent] @@ -21,7 +21,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to enable the background component. - /// |是否启用背景组件。 + /// ||是否启用背景组件。 /// </summary> public bool show { @@ -30,7 +30,7 @@ namespace XCharts.Runtime } /// <summary> /// the image of background. - /// |背景图。 + /// ||背景图。 /// </summary> public Sprite image { @@ -40,7 +40,7 @@ namespace XCharts.Runtime /// <summary> /// the fill type of background image. - /// |背景图填充类型。 + /// ||背景图填充类型。 /// </summary> public Image.Type imageType { @@ -59,7 +59,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to use theme background color for component color when the background component is on. - /// |当background组件开启时,是否自动使用主题背景色作为backgrounnd组件的颜色。当设置为false时,用imageColor作为颜色。 + /// ||当background组件开启时,是否自动使用主题背景色作为backgrounnd组件的颜色。当设置为false时,用imageColor作为颜色。 /// </summary> public bool autoColor { diff --git a/Runtime/Component/Child/AreaStyle.cs b/Runtime/Component/Child/AreaStyle.cs index 783555ac..9cd9a184 100644 --- a/Runtime/Component/Child/AreaStyle.cs +++ b/Runtime/Component/Child/AreaStyle.cs @@ -4,30 +4,30 @@ namespace XCharts.Runtime { /// <summary> /// The style of area. - /// |区域填充样式。 + /// ||区域填充样式。 /// </summary> [System.Serializable] public class AreaStyle : ChildComponent, ISerieComponent, ISerieDataComponent { /// <summary> /// Origin position of area. - /// |图形区域的起始位置。默认情况下,图形会从坐标轴轴线到数据间进行填充。如果需要填充的区域是坐标轴最大值到数据间,或者坐标轴最小值到数据间,则可以通过这个配置项进行设置。 + /// ||图形区域的起始位置。默认情况下,图形会从坐标轴轴线到数据间进行填充。如果需要填充的区域是坐标轴最大值到数据间,或者坐标轴最小值到数据间,则可以通过这个配置项进行设置。 /// </summary> public enum AreaOrigin { /// <summary> /// to fill between axis line to data. - /// |填充坐标轴轴线到数据间的区域。 + /// ||填充坐标轴轴线到数据间的区域。 /// </summary> Auto, /// <summary> /// to fill between min axis value (when not inverse) to data. - /// |填充坐标轴底部到数据间的区域。 + /// ||填充坐标轴底部到数据间的区域。 /// </summary> Start, /// <summary> /// to fill between max axis value (when not inverse) to data. - /// |填充坐标轴顶部到数据间的区域。 + /// ||填充坐标轴顶部到数据间的区域。 /// </summary> End } @@ -42,7 +42,7 @@ namespace XCharts.Runtime /// <summary> /// Set this to false to prevent the areafrom showing. - /// |是否显示区域填充。 + /// ||是否显示区域填充。 /// </summary> public bool show { @@ -51,7 +51,7 @@ namespace XCharts.Runtime } /// <summary> /// the origin of area. - /// |区域填充的起始位置。 + /// ||区域填充的起始位置。 /// </summary> public AreaOrigin origin { @@ -60,7 +60,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of area,default use serie color. - /// |区域填充的颜色,如果toColor不是默认值,则表示渐变色的起点颜色。 + /// ||区域填充的颜色,如果toColor不是默认值,则表示渐变色的起点颜色。 /// </summary> public Color32 color { @@ -69,7 +69,7 @@ namespace XCharts.Runtime } /// <summary> /// Gradient color, start color to toColor. - /// |渐变色的终点颜色。 + /// ||渐变色的终点颜色。 /// </summary> public Color32 toColor { @@ -78,7 +78,7 @@ namespace XCharts.Runtime } /// <summary> /// Opacity of the component. Supports value from 0 to 1, and the component will not be drawn when set to 0. - /// |图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 + /// ||图形透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 /// </summary> public float opacity { @@ -87,7 +87,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to fill only polygonal areas. Currently, only convex polygons are supported. - /// |是否只填充多边形区域。目前只支持凸多边形。 + /// ||是否只填充多边形区域。目前只支持凸多边形。 /// </summary> public bool innerFill { @@ -97,7 +97,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to fill the gradient color to the top. The default is true, which means that the gradient color is filled to the top. /// If it is false, the gradient color is filled to the actual position. - /// |渐变色是到顶部还是到实际位置。默认为true到顶部。 + /// ||渐变色是到顶部还是到实际位置。默认为true到顶部。 /// </summary> public bool toTop { diff --git a/Runtime/Component/Child/ArrowStyle.cs b/Runtime/Component/Child/ArrowStyle.cs index 1b782339..24e74c18 100644 --- a/Runtime/Component/Child/ArrowStyle.cs +++ b/Runtime/Component/Child/ArrowStyle.cs @@ -16,7 +16,7 @@ namespace XCharts.Runtime /// <summary> /// The widht of arrow. - /// |箭头宽。 + /// ||箭头宽。 /// </summary> public float width { @@ -25,7 +25,7 @@ namespace XCharts.Runtime } /// <summary> /// The height of arrow. - /// |箭头高。 + /// ||箭头高。 /// </summary> public float height { @@ -34,7 +34,7 @@ namespace XCharts.Runtime } /// <summary> /// The offset of arrow. - /// |箭头偏移。 + /// ||箭头偏移。 /// </summary> public float offset { @@ -43,7 +43,7 @@ namespace XCharts.Runtime } /// <summary> /// The dent of arrow. - /// |箭头的凹度。 + /// ||箭头的凹度。 /// </summary> public float dent { @@ -53,7 +53,7 @@ namespace XCharts.Runtime /// <summary> /// the color of arrow. - /// |箭头颜色。 + /// ||箭头颜色。 /// </summary> public Color32 color { diff --git a/Runtime/Component/Child/BaseLine.cs b/Runtime/Component/Child/BaseLine.cs index 5472b77a..5f022ed1 100644 --- a/Runtime/Component/Child/BaseLine.cs +++ b/Runtime/Component/Child/BaseLine.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to base line. - /// |线条基础配置。 + /// ||线条基础配置。 /// </summary> [System.Serializable] public class BaseLine : ChildComponent @@ -14,7 +14,7 @@ namespace XCharts.Runtime /// <summary> /// Set this to false to prevent the axis line from showing. - /// |是否显示坐标轴轴线。 + /// ||是否显示坐标轴轴线。 /// </summary> public bool show { diff --git a/Runtime/Component/Child/IconStyle.cs b/Runtime/Component/Child/IconStyle.cs index 17d847c0..ede0afe5 100644 --- a/Runtime/Component/Child/IconStyle.cs +++ b/Runtime/Component/Child/IconStyle.cs @@ -44,7 +44,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the data icon is show. - /// |是否显示图标。 + /// ||是否显示图标。 /// </summary> public bool show { get { return m_Show; } set { m_Show = value; } } /// <summary> @@ -53,12 +53,12 @@ namespace XCharts.Runtime public Layer layer { get { return m_Layer; } set { m_Layer = value; } } /// <summary> /// The image of icon. - /// |图标的图片。 + /// ||图标的图片。 /// </summary> public Sprite sprite { get { return m_Sprite; } set { m_Sprite = value; } } /// <summary> /// How to display the icon. - /// |图片的显示类型。 + /// ||图片的显示类型。 /// </summary> public Image.Type type { get { return m_Type; } set { m_Type = value; } } /// <summary> diff --git a/Runtime/Component/Child/ImageStyle.cs b/Runtime/Component/Child/ImageStyle.cs index d48582fb..645c2c2b 100644 --- a/Runtime/Component/Child/ImageStyle.cs +++ b/Runtime/Component/Child/ImageStyle.cs @@ -27,17 +27,17 @@ namespace XCharts.Runtime /// <summary> /// Whether the data icon is show. - /// |是否显示图标。 + /// ||是否显示图标。 /// </summary> public bool show { get { return m_Show; } set { m_Show = value; } } /// <summary> /// The image of icon. - /// |图标的图片。 + /// ||图标的图片。 /// </summary> public Sprite sprite { get { return m_Sprite; } set { m_Sprite = value; } } /// <summary> /// How to display the image. - /// |图片的显示类型。 + /// ||图片的显示类型。 /// </summary> public Image.Type type { get { return m_Type; } set { m_Type = value; } } /// <summary> diff --git a/Runtime/Component/Child/ItemStyle.cs b/Runtime/Component/Child/ItemStyle.cs index 56437837..b9712fb7 100644 --- a/Runtime/Component/Child/ItemStyle.cs +++ b/Runtime/Component/Child/ItemStyle.cs @@ -87,7 +87,7 @@ namespace XCharts.Runtime } /// <summary> /// Gradient color1. - /// |渐变色的颜色1。 + /// ||渐变色的颜色1。 /// </summary> public Color32 toColor { @@ -96,7 +96,7 @@ namespace XCharts.Runtime } /// <summary> /// Gradient color2.Only valid in line diagrams. - /// |渐变色的颜色2。只在折线图中有效。 + /// ||渐变色的颜色2。只在折线图中有效。 /// </summary> public Color32 toColor2 { @@ -105,7 +105,7 @@ namespace XCharts.Runtime } /// <summary> /// Serie's mark color. It is only used to display Legend and Tooltip, and does not affect the drawing color. The default value is clear. - /// |Serie的标识颜色。仅用于Legend和Tooltip的展示,不影响绘制颜色,默认为clear。 + /// ||Serie的标识颜色。仅用于Legend和Tooltip的展示,不影响绘制颜色,默认为clear。 /// </summary> public Color32 markColor { @@ -210,11 +210,10 @@ namespace XCharts.Runtime } /// <summary> /// Standard numeric format strings. - /// |标准数字格式字符串。用于将数值格式化显示为字符串。 + /// ||标准数字格式字符串。用于将数值格式化显示为字符串。 /// 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 /// 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings /// </summary> - /// <value></value> public string numericFormatter { get { return m_NumericFormatter; } @@ -222,7 +221,7 @@ namespace XCharts.Runtime } /// <summary> /// The radius of rounded corner. Its unit is px. Use array to respectively specify the 4 corner radiuses((clockwise upper left, upper right, bottom right and bottom left)). - /// |圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 + /// ||圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 /// </summary> public float[] cornerRadius { diff --git a/Runtime/Component/Child/LineArrow.cs b/Runtime/Component/Child/LineArrow.cs index ed45a0e2..2c9a229b 100644 --- a/Runtime/Component/Child/LineArrow.cs +++ b/Runtime/Component/Child/LineArrow.cs @@ -33,7 +33,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show the arrow. - /// |是否显示箭头。 + /// ||是否显示箭头。 /// </summary> public bool show { @@ -42,7 +42,7 @@ namespace XCharts.Runtime } /// <summary> /// The position of arrow. - /// |箭头位置。 + /// ||箭头位置。 /// </summary> public Position position { @@ -52,7 +52,7 @@ namespace XCharts.Runtime /// <summary> /// the arrow of line. - /// |箭头。 + /// ||箭头。 /// </summary> public ArrowStyle arrow { diff --git a/Runtime/Component/Child/LineStyle.cs b/Runtime/Component/Child/LineStyle.cs index 23f868d4..de61bc67 100644 --- a/Runtime/Component/Child/LineStyle.cs +++ b/Runtime/Component/Child/LineStyle.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// The style of line. - /// |线条样式。 + /// ||线条样式。 /// 注: 修改 lineStyle 中的颜色不会影响图例颜色,如果需要图例颜色和折线图颜色一致,需修改 itemStyle.color,线条颜色默认也会取该颜色。 /// toColor,toColor2可设置水平方向的渐变,如需要设置垂直方向的渐变,可使用VisualMap。 /// </summary> @@ -53,7 +53,7 @@ namespace XCharts.Runtime /// <summary> /// Whether show line. - /// |是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。 + /// ||是否显示线条。当作为子组件,它的父组件有参数控制是否显示时,改参数无效。 /// </summary> public bool show { @@ -62,7 +62,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of line. - /// |线的类型。 + /// ||线的类型。 /// </summary> public Type type { @@ -71,7 +71,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of line, default use serie color. - /// |线的颜色。 + /// ||线的颜色。 /// </summary> public Color32 color { @@ -80,7 +80,7 @@ namespace XCharts.Runtime } /// <summary> /// the middle color of line, default use serie color. - /// |线的渐变颜色(需要水平方向渐变时)。 + /// ||线的渐变颜色(需要水平方向渐变时)。 /// </summary> public Color32 toColor { @@ -89,7 +89,7 @@ namespace XCharts.Runtime } /// <summary> /// the end color of line, default use serie color. - /// |线的渐变颜色2(需要水平方向三个渐变色的渐变时)。 + /// ||线的渐变颜色2(需要水平方向三个渐变色的渐变时)。 /// </summary> public Color32 toColor2 { @@ -98,7 +98,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of line. - /// |线宽。 + /// ||线宽。 /// </summary> public float width { @@ -107,7 +107,7 @@ namespace XCharts.Runtime } /// <summary> /// the length of line. - /// |线长。 + /// ||线长。 /// </summary> public float length { @@ -116,7 +116,7 @@ namespace XCharts.Runtime } /// <summary> /// Opacity of the line. Supports value from 0 to 1, and the line will not be drawn when set to 0. - /// |线的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 + /// ||线的透明度。支持从 0 到 1 的数字,为 0 时不绘制该图形。 /// </summary> public float opacity { @@ -127,7 +127,7 @@ namespace XCharts.Runtime /// <summary> /// the length of dash line. default value is 0, which means the length of dash line is 12 times of line width. /// Represents a multiple of the number of segments in a line chart. - /// |虚线的长度。默认0时为线条宽度的12倍。在折线图中代表分割段数的倍数。 + /// ||虚线的长度。默认0时为线条宽度的12倍。在折线图中代表分割段数的倍数。 /// </summary> public float dashLength { @@ -138,7 +138,7 @@ namespace XCharts.Runtime /// <summary> /// the length of dot line. default value is 0, which means the length of dot line is 2 times of line width. /// Represents a multiple of the number of segments in a line chart. - /// |点线的长度。默认0时为线条宽度的3倍。在折线图中代表分割段数的倍数。 + /// ||点线的长度。默认0时为线条宽度的3倍。在折线图中代表分割段数的倍数。 /// </summary> public float dotLength { @@ -149,7 +149,7 @@ namespace XCharts.Runtime /// <summary> /// the length of gap line. default value is 0, which means the length of gap line is 3 times of line width. /// Represents a multiple of the number of segments in a line chart. - /// |点线的长度。默认0时为线条宽度的3倍。在折线图中代表分割段数的倍数。 + /// ||点线的长度。默认0时为线条宽度的3倍。在折线图中代表分割段数的倍数。 /// </summary> public float gapLength { diff --git a/Runtime/Component/Child/Location.cs b/Runtime/Component/Child/Location.cs index cc576bd2..0d49d6c7 100644 --- a/Runtime/Component/Child/Location.cs +++ b/Runtime/Component/Child/Location.cs @@ -8,7 +8,7 @@ namespace XCharts.Runtime { /// <summary> /// Location type. Quick to set the general location. - /// |位置类型。通过Align快速设置大体位置,再通过left,right,top,bottom微调具体位置。 + /// ||位置类型。通过Align快速设置大体位置,再通过left,right,top,bottom微调具体位置。 /// </summary> [Serializable] public class Location : ChildComponent, IPropertyChanged @@ -53,7 +53,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the left side of the container. - /// |离容器左侧的距离。 + /// ||离容器左侧的距离。 /// </summary> public float left { @@ -62,7 +62,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the left side of the container. - /// |离容器右侧的距离。 + /// ||离容器右侧的距离。 /// </summary> public float right { @@ -71,7 +71,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the left side of the container. - /// |离容器上侧的距离。 + /// ||离容器上侧的距离。 /// </summary> public float top { @@ -80,7 +80,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the left side of the container. - /// |离容器下侧的距离。 + /// ||离容器下侧的距离。 /// </summary> public float bottom { @@ -90,9 +90,8 @@ namespace XCharts.Runtime /// <summary> /// the anchor of text. - /// |Location对应的Anchor锚点 + /// ||Location对应的Anchor锚点 /// </summary> - /// <value></value> public TextAnchor runtimeTextAlignment { get { return m_TextAlignment; } } #if dUI_TextMeshPro @@ -100,17 +99,17 @@ namespace XCharts.Runtime #endif /// <summary> /// the minimum achor. - /// |Location对应的anchorMin。 + /// ||Location对应的anchorMin。 /// </summary> public Vector2 runtimeAnchorMin { get { return m_AnchorMin; } } /// <summary> /// the maximun achor. - /// |Location对应的anchorMax. - /// |</summary> + /// ||Location对应的anchorMax. + /// ||</summary> public Vector2 runtimeAnchorMax { get { return m_AnchorMax; } } /// <summary> /// the povot. - /// |Loation对应的中心点。 + /// ||Loation对应的中心点。 /// </summary> public Vector2 runtimePivot { get { return m_Pivot; } } public float runtimeLeft { get; private set; } diff --git a/Runtime/Component/Child/MLValue.cs b/Runtime/Component/Child/MLValue.cs index 589127ba..42451c43 100644 --- a/Runtime/Component/Child/MLValue.cs +++ b/Runtime/Component/Child/MLValue.cs @@ -12,23 +12,23 @@ namespace XCharts.Runtime { /// <summary> /// the type of value. - /// |数值类型。 + /// ||数值类型。 /// </summary> public enum Type { /// <summary> /// Percent value form. - /// |百分比形式。 + /// ||百分比形式。 /// </summary> Percent, /// <summary> /// Absolute value form. - /// |绝对值形式。 + /// ||绝对值形式。 /// </summary> Absolute, /// <summary> /// Extra value form. - /// |额外形式。 + /// ||额外形式。 /// </summary> Extra } @@ -52,7 +52,7 @@ namespace XCharts.Runtime /// <summary> /// Get the value by type. - /// |根据类型获取值。 + /// ||根据类型获取值。 /// </summary> /// <param name="total">默认值</param> /// <returns></returns> diff --git a/Runtime/Component/Child/MarqueeStyle.cs b/Runtime/Component/Child/MarqueeStyle.cs index e28ee74d..30e12a84 100644 --- a/Runtime/Component/Child/MarqueeStyle.cs +++ b/Runtime/Component/Child/MarqueeStyle.cs @@ -23,39 +23,39 @@ namespace XCharts.Runtime /// <summary> /// The area style of marquee. - /// |选取框区域填充样式。 + /// ||选取框区域填充样式。 /// </summary> public AreaStyle areaStyle { get { return m_AreaStyle; } set { m_AreaStyle = value; } } /// <summary> /// The line style of marquee border. - /// |选取框区域边框样式。 + /// ||选取框区域边框样式。 /// </summary> public LineStyle lineStyle { get { return m_LineStyle; } set { m_LineStyle = value; } } /// <summary> /// Check whether the scope is applied to the DataZoom. /// If this parameter is set to true, the range after the selection is complete is the DataZoom selection range. - /// |选取框范围是否应用到DataZoom上。当为true时,框选结束后的范围即为DataZoom的选择范围。 + /// ||选取框范围是否应用到DataZoom上。当为true时,框选结束后的范围即为DataZoom的选择范围。 /// </summary> public bool apply { get { return m_Apply; } set { m_Apply = value; } } /// <summary> /// Whether to select the actual box selection area. When true, /// the actual range between the mouse's actual point and the end point is used as the box selection area. - /// |是否选取实际框选区域。当为true时,以鼠标的其实点和结束点间的实际范围作为框选区域。 + /// ||是否选取实际框选区域。当为true时,以鼠标的其实点和结束点间的实际范围作为框选区域。 /// </summary> public bool realRect { get { return m_RealRect; } set { m_RealRect = value; } } /// <summary> /// Customize the callback to the start of the selection of the checkbox. - /// |自定义选取框开始选取时的回调。 + /// ||自定义选取框开始选取时的回调。 /// </summary> public Action<DataZoom> onStart { set { m_OnStart = value; } get { return m_OnStart; } } /// <summary> /// Custom checkboxes select ongoing callbacks. - /// |自定义选取框选取进行时的回调。 + /// ||自定义选取框选取进行时的回调。 /// </summary> public Action<DataZoom> onGoing { set { m_OnStart = value; } get { return m_OnStart; } } /// <summary> /// Customize the callback at the end of the selection. - /// |自定义选取框结束选取时的回调。 + /// ||自定义选取框结束选取时的回调。 /// </summary> public Action<DataZoom> onEnd { set { m_OnEnd = value; } get { return m_OnEnd; } } } diff --git a/Runtime/Component/Child/Padding.cs b/Runtime/Component/Child/Padding.cs index d22d3f7a..3752e688 100644 --- a/Runtime/Component/Child/Padding.cs +++ b/Runtime/Component/Child/Padding.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// padding setting of item or text. - /// |边距设置。 + /// ||边距设置。 /// </summary> [Serializable] public class Padding : ChildComponent @@ -41,7 +41,7 @@ namespace XCharts.Runtime } /// <summary> /// padding of top. - /// |顶部间距。 + /// ||顶部间距。 /// </summary> public float top { @@ -50,7 +50,7 @@ namespace XCharts.Runtime } /// <summary> /// padding of right. - /// |右部间距。 + /// ||右部间距。 /// </summary> public float right { @@ -59,7 +59,7 @@ namespace XCharts.Runtime } /// <summary> /// padding of bottom. - /// |底部间距。 + /// ||底部间距。 /// </summary> public float bottom { @@ -68,7 +68,7 @@ namespace XCharts.Runtime } /// <summary> /// padding of left. - /// |左边间距。 + /// ||左边间距。 /// </summary> public float left { diff --git a/Runtime/Component/Child/SerieSymbl.cs b/Runtime/Component/Child/SerieSymbl.cs index c31c5bd5..20e76d20 100644 --- a/Runtime/Component/Child/SerieSymbl.cs +++ b/Runtime/Component/Child/SerieSymbl.cs @@ -6,23 +6,23 @@ namespace XCharts.Runtime { /// <summary> /// The way to get serie symbol size. - /// |获取标记图形大小的方式。 + /// ||获取标记图形大小的方式。 /// </summary> public enum SymbolSizeType { /// <summary> /// Specify constant for symbol size. - /// |自定义大小。 + /// ||自定义大小。 /// </summary> Custom, /// <summary> /// Specify the dataIndex and dataScale to calculate symbol size. - /// |通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。 + /// ||通过 dataIndex 从数据中获取,再乘以一个比例系数 dataScale 。 /// </summary> FromData, /// <summary> /// Specify function for symbol size. - /// |通过委托函数获取。 + /// ||通过委托函数获取。 /// </summary> Function, } @@ -61,7 +61,7 @@ namespace XCharts.Runtime /// <summary> /// the type of symbol size. - /// |标记图形的大小获取方式。 + /// ||标记图形的大小获取方式。 /// </summary> public SymbolSizeType sizeType { @@ -70,7 +70,7 @@ namespace XCharts.Runtime } /// <summary> /// whitch data index is when the sizeType assined as FromData. - /// |当sizeType指定为FromData时,指定的数据源索引。 + /// ||当sizeType指定为FromData时,指定的数据源索引。 /// </summary> public int dataIndex { @@ -79,7 +79,7 @@ namespace XCharts.Runtime } /// <summary> /// the scale of data when sizeType assined as FromData. - /// |当sizeType指定为FromData时,指定的倍数系数。 + /// ||当sizeType指定为FromData时,指定的倍数系数。 /// </summary> public float dataScale { @@ -88,7 +88,7 @@ namespace XCharts.Runtime } /// <summary> /// the function of size when sizeType assined as Function. - /// |当sizeType指定为Function时,指定的委托函数。 + /// ||当sizeType指定为Function时,指定的委托函数。 /// </summary> public SymbolSizeFunction sizeFunction { @@ -97,7 +97,7 @@ namespace XCharts.Runtime } /// <summary> /// the index start to show symbol. - /// |开始显示图形标记的索引。 + /// ||开始显示图形标记的索引。 /// </summary> public int startIndex { @@ -106,7 +106,7 @@ namespace XCharts.Runtime } /// <summary> /// the interval of show symbol. - /// |显示图形标记的间隔。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 + /// ||显示图形标记的间隔。0表示显示所有标签,1表示隔一个隔显示一个标签,以此类推。 /// </summary> public int interval { @@ -115,7 +115,7 @@ namespace XCharts.Runtime } /// <summary> /// whether to show the last symbol. - /// |是否强制显示最后一个图形标记。 + /// ||是否强制显示最后一个图形标记。 /// </summary> public bool forceShowLast { @@ -132,7 +132,7 @@ namespace XCharts.Runtime } /// <summary> /// Minimum symbol size. - /// |图形最小尺寸。只在sizeType为SymbolSizeType.FromData时有效。 + /// ||图形最小尺寸。只在sizeType为SymbolSizeType.FromData时有效。 /// </summary> public float minSize { @@ -141,7 +141,7 @@ namespace XCharts.Runtime } /// <summary> /// Maximum symbol size. - /// |图形最大尺寸。只在sizeType为SymbolSizeType.FromData时有效。 + /// ||图形最大尺寸。只在sizeType为SymbolSizeType.FromData时有效。 /// </summary> public float maxSize { diff --git a/Runtime/Component/Child/SymbolStyle.cs b/Runtime/Component/Child/SymbolStyle.cs index 3e394a78..98d62178 100644 --- a/Runtime/Component/Child/SymbolStyle.cs +++ b/Runtime/Component/Child/SymbolStyle.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// the type of symbol. - /// |标记图形的类型。 + /// ||标记图形的类型。 /// </summary> public enum SymbolType { @@ -100,7 +100,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the symbol is showed. - /// |是否显示标记。 + /// ||是否显示标记。 /// </summary> public bool show { @@ -109,7 +109,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of symbol. - /// |标记类型。 + /// ||标记类型。 /// </summary> public SymbolType type { @@ -118,7 +118,7 @@ namespace XCharts.Runtime } /// <summary> /// the size of symbol. - /// |标记的大小。 + /// ||标记的大小。 /// </summary> public float size { @@ -127,7 +127,7 @@ namespace XCharts.Runtime } /// <summary> /// the gap of symbol and line segment. - /// |图形标记和线条的间隙距离。 + /// ||图形标记和线条的间隙距离。 /// </summary> public float gap { @@ -160,7 +160,7 @@ namespace XCharts.Runtime } /// <summary> /// the fill type of image. - /// |图形填充类型。 + /// ||图形填充类型。 /// </summary> public Image.Type imageType { @@ -187,7 +187,7 @@ namespace XCharts.Runtime private List<float> m_AnimationSize = new List<float>() { 0, 5, 10 }; /// <summary> /// the setting for effect scatter. - /// |带有涟漪特效动画的散点图的动画参数。 + /// ||带有涟漪特效动画的散点图的动画参数。 /// </summary> public List<float> animationSize { get { return m_AnimationSize; } } diff --git a/Runtime/Component/Child/TextLimit.cs b/Runtime/Component/Child/TextLimit.cs index 0d276237..d01e492d 100644 --- a/Runtime/Component/Child/TextLimit.cs +++ b/Runtime/Component/Child/TextLimit.cs @@ -7,7 +7,7 @@ namespace XCharts.Runtime /// <summary> /// Text character limitation and adaptation component. When the length of the text exceeds the set length, /// it is cropped and suffixes are appended to the end.Only valid in the category axis. - /// |文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 + /// ||文本字符限制和自适应。当文本长度超过设定的长度时进行裁剪,并将后缀附加在最后。 /// 只在类目轴中有效。 /// </summary> [Serializable] @@ -20,7 +20,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to enable text limit. - /// |是否启用文本自适应。 + /// ||是否启用文本自适应。 /// [default:true] /// </summary> public bool enable @@ -30,8 +30,8 @@ namespace XCharts.Runtime } /// <summary> /// Set the maximum width. A default of 0 indicates automatic fetch; otherwise, custom. - /// |Clipping occurs when the width of the text is greater than this value. - /// |设定最大宽度。默认为0表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。 + /// ||Clipping occurs when the width of the text is greater than this value. + /// ||设定最大宽度。默认为0表示自动获取,否则表示自定义。当文本的宽度大于该值进行裁剪。 /// </summary> public float maxWidth { @@ -40,7 +40,7 @@ namespace XCharts.Runtime } /// <summary> /// White pixel distance at both ends. - /// |两边留白像素距离。 + /// ||两边留白像素距离。 /// [default:10f] /// </summary> public float gap @@ -50,7 +50,7 @@ namespace XCharts.Runtime } /// <summary> /// Suffixes when the length exceeds. - /// |长度超出时的后缀。 + /// ||长度超出时的后缀。 /// [default: "..."] /// </summary> public string suffix diff --git a/Runtime/Component/Child/TextPadding.cs b/Runtime/Component/Child/TextPadding.cs index bcbeab7f..25a2b583 100644 --- a/Runtime/Component/Child/TextPadding.cs +++ b/Runtime/Component/Child/TextPadding.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to text. - /// |文本的内边距设置。 + /// ||文本的内边距设置。 /// </summary> [Serializable] public class TextPadding : Padding diff --git a/Runtime/Component/Child/TextStyle.cs b/Runtime/Component/Child/TextStyle.cs index d652994f..36c0489e 100644 --- a/Runtime/Component/Child/TextStyle.cs +++ b/Runtime/Component/Child/TextStyle.cs @@ -8,7 +8,7 @@ namespace XCharts.Runtime { /// <summary> /// Settings related to text. - /// |文本的相关设置。 + /// ||文本的相关设置。 /// </summary> [Serializable] public class TextStyle : ChildComponent @@ -37,7 +37,7 @@ namespace XCharts.Runtime } /// <summary> /// Rotation of text. - /// |文本的旋转。 + /// ||文本的旋转。 /// [default: `0f`] /// </summary> public float rotate @@ -55,7 +55,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of text. - /// |文本的颜色。 + /// ||文本的颜色。 /// [default: `Color.clear`] /// </summary> public Color color @@ -65,7 +65,7 @@ namespace XCharts.Runtime } /// <summary> /// the font of text. When `null`, the theme's font is used by default. - /// |文本字体。 + /// ||文本字体。 /// [default: null] /// </summary> public Font font @@ -75,7 +75,7 @@ namespace XCharts.Runtime } /// <summary> /// font size. - /// |文本字体大小。 + /// ||文本字体大小。 /// [default: 18] /// </summary> public int fontSize @@ -85,7 +85,7 @@ namespace XCharts.Runtime } /// <summary> /// font style. - /// |文本字体的风格。 + /// ||文本字体的风格。 /// [default: FontStyle.Normal] /// </summary> public FontStyle fontStyle @@ -95,7 +95,7 @@ namespace XCharts.Runtime } /// <summary> /// text line spacing. - /// |行间距。 + /// ||行间距。 /// [default: 1f] /// </summary> public float lineSpacing @@ -130,7 +130,7 @@ namespace XCharts.Runtime #if dUI_TextMeshPro /// <summary> /// the font of textmeshpro. - /// |TextMeshPro字体。 + /// ||TextMeshPro字体。 /// </summary> public TMP_FontAsset tmpFont { @@ -139,7 +139,7 @@ namespace XCharts.Runtime } /// <summary> /// the font style of TextMeshPro. - /// |TextMeshPro字体类型。 + /// ||TextMeshPro字体类型。 /// </summary> public FontStyles tmpFontStyle { @@ -148,7 +148,7 @@ namespace XCharts.Runtime } /// <summary> /// the text alignment of TextMeshPro. - /// |TextMeshPro字体对齐方式。 + /// ||TextMeshPro字体对齐方式。 /// </summary> public TextAlignmentOptions tmpAlignment { @@ -157,7 +157,7 @@ namespace XCharts.Runtime } /// <summary> /// the sprite asset of TextMeshPro. - /// |TextMeshPro的Sprite Asset。 + /// ||TextMeshPro的Sprite Asset。 /// </summary> public TMP_SpriteAsset tmpSpriteAsset { diff --git a/Runtime/Component/Comment/Comment.cs b/Runtime/Component/Comment/Comment.cs index f5a8dbef..dffabb57 100644 --- a/Runtime/Component/Comment/Comment.cs +++ b/Runtime/Component/Comment/Comment.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// comment of chart. - /// |图表注解组件。 + /// ||图表注解组件。 /// </summary> [Serializable] [ComponentHandler(typeof(CommentHander), true)] @@ -19,17 +19,17 @@ namespace XCharts.Runtime /// <summary> /// Set this to false to prevent the comment from showing. - /// |是否显示注解组件。 + /// ||是否显示注解组件。 /// </summary> public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } } /// <summary> /// The items of comment. - /// |注解项。每个注解组件可以设置多个注解项。 + /// ||注解项。每个注解组件可以设置多个注解项。 /// </summary> public List<CommentItem> items { get { return m_Items; } set { m_Items = value; SetComponentDirty(); } } /// <summary> /// The text style of all comments. - /// |所有组件的文本样式。 + /// ||所有组件的文本样式。 /// </summary> public LabelStyle labelStyle { @@ -38,7 +38,7 @@ namespace XCharts.Runtime } /// <summary> /// The text style of all comments. - /// |所有组件的文本样式。 + /// ||所有组件的文本样式。 /// </summary> public CommentMarkStyle markStyle { @@ -68,7 +68,7 @@ namespace XCharts.Runtime /// <summary> /// Callback handling when parameters change. - /// |参数变更时的回调处理。 + /// ||参数变更时的回调处理。 /// </summary> public void OnChanged() { diff --git a/Runtime/Component/Comment/CommentHander.cs b/Runtime/Component/Comment/CommentHander.cs index eef0f5d2..4e515f2e 100644 --- a/Runtime/Component/Comment/CommentHander.cs +++ b/Runtime/Component/Comment/CommentHander.cs @@ -47,7 +47,7 @@ namespace XCharts.Runtime if (item.content.IndexOf("{") >= 0) { var content = item.content; - FormatterHelper.ReplaceContent(ref content, 0, item.labelStyle.numericFormatter, null, chart); + FormatterHelper.ReplaceContent(ref content, -1, item.labelStyle.numericFormatter, null, chart); return content; } else diff --git a/Runtime/Component/Comment/CommentItem.cs b/Runtime/Component/Comment/CommentItem.cs index 2b7ab9dd..d568db57 100644 --- a/Runtime/Component/Comment/CommentItem.cs +++ b/Runtime/Component/Comment/CommentItem.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// comment of chart. - /// |注解项。 + /// ||注解项。 /// </summary> [Serializable] public class CommentItem : ChildComponent @@ -20,27 +20,27 @@ namespace XCharts.Runtime /// <summary> /// Set this to false to prevent this comment item from showing. - /// |是否显示当前注解项。 + /// ||是否显示当前注解项。 /// </summary> public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } } /// <summary> /// content of comment. - /// |注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。 + /// ||注解的文本内容。支持模板参数,可以参考Tooltip的itemFormatter。 /// </summary> public string content { get { return m_Content; } set { if (PropertyUtil.SetClass(ref m_Content, value)) SetComponentDirty(); } } /// <summary> /// the mark rect of comment. - /// |注解区域。 + /// ||注解区域。 /// </summary> public Rect markRect { get { return m_MarkRect; } set { if (PropertyUtil.SetStruct(ref m_MarkRect, value)) SetVerticesDirty(); } } /// <summary> /// the mark rect style. - /// |注解标记区域样式。 + /// ||注解标记区域样式。 /// </summary> public CommentMarkStyle markStyle { get { return m_MarkStyle; } set { if (PropertyUtil.SetClass(ref m_MarkStyle, value)) SetVerticesDirty(); } } /// <summary> /// The text style of all comments. - /// |注解项的文本样式。 + /// ||注解项的文本样式。 /// </summary> public LabelStyle labelStyle { @@ -49,7 +49,7 @@ namespace XCharts.Runtime } /// <summary> /// The location of comment. - /// |Comment显示的位置。 + /// ||Comment显示的位置。 /// </summary> public Location location { diff --git a/Runtime/Component/Comment/CommentMarkStyle.cs b/Runtime/Component/Comment/CommentMarkStyle.cs index 174c58aa..b2bc76ba 100644 --- a/Runtime/Component/Comment/CommentMarkStyle.cs +++ b/Runtime/Component/Comment/CommentMarkStyle.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// the comment mark style. - /// |注解项区域样式。 + /// ||注解项区域样式。 /// </summary> [Serializable] public class CommentMarkStyle : ChildComponent @@ -15,12 +15,12 @@ namespace XCharts.Runtime /// <summary> /// Set this to false to prevent this comment item from showing. - /// |是否显示当前注解项。 + /// ||是否显示当前注解项。 /// </summary> public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetVerticesDirty(); } } /// <summary> /// line style of comment mark area. - /// |线条样式。 + /// ||线条样式。 /// </summary> public LineStyle lineStyle { get { return m_LineStyle; } set { if (PropertyUtil.SetClass(ref m_LineStyle, value)) SetVerticesDirty(); } } } diff --git a/Runtime/Component/DataZoom/DataZoom.cs b/Runtime/Component/DataZoom/DataZoom.cs index 4f8a72ce..fd2f60fe 100644 --- a/Runtime/Component/DataZoom/DataZoom.cs +++ b/Runtime/Component/DataZoom/DataZoom.cs @@ -7,7 +7,7 @@ namespace XCharts.Runtime /// DataZoom component is used for zooming a specific area, /// which enables user to investigate data in detail, /// or get an overview of the data, or get rid of outlier points. - /// |DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 + /// ||DataZoom 组件 用于区域缩放,从而能自由关注细节的数据信息,或者概览数据整体,或者去除离群点的影响。 /// </summary> [System.Serializable] [ComponentHandler(typeof(DataZoomHandler), true)] @@ -17,30 +17,30 @@ namespace XCharts.Runtime /// Generally dataZoom component zoom or roam coordinate system through data filtering /// and set the windows of axes internally. /// Its behaviours vary according to filtering mode settings. - /// |dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。 + /// ||dataZoom 的运行原理是通过 数据过滤 来达到 数据窗口缩放 的效果。数据过滤模式的设置不同,效果也不同。 /// </summary> public enum FilterMode { /// <summary> /// data that outside the window will be filtered, which may lead to some changes of windows of other axes. /// For each data item, it will be filtered if one of the relevant dimensions is out of the window. - /// |当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。 + /// ||当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只要有一个维度在数据窗口外,整个数据项就会被过滤掉。 /// </summary> Filter, /// <summary> /// data that outside the window will be filtered, which may lead to some changes of windows of other axes. /// For each data item, it will be filtered only if all of the relevant dimensions are out of the same side of the window. - /// |当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。 + /// ||当前数据窗口外的数据,被 过滤掉。即 会 影响其他轴的数据范围。每个数据项,只有当全部维度都在数据窗口同侧外部,整个数据项才会被过滤掉。 /// </summary> WeakFilter, /// <summary> /// data that outside the window will be set to NaN, which will not lead to changes of windows of other axes. - /// |当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。 + /// ||当前数据窗口外的数据,被 设置为空。即 不会 影响其他轴的数据范围。 /// </summary> Empty, /// <summary> /// Do not filter data. - /// |不过滤数据,只改变数轴范围。 + /// ||不过滤数据,只改变数轴范围。 /// </summary> None } @@ -52,7 +52,7 @@ namespace XCharts.Runtime //Value, /// <summary> /// percent value. - /// |百分比。 + /// ||百分比。 /// </summary> Percent } @@ -97,7 +97,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show dataZoom. - /// |是否显示缩放区域。 + /// ||是否显示缩放区域。 /// </summary> public bool enable { @@ -106,7 +106,7 @@ namespace XCharts.Runtime } /// <summary> /// The mode of data filter. - /// |数据过滤类型。 + /// ||数据过滤类型。 /// </summary> public FilterMode filterMode { @@ -115,7 +115,7 @@ namespace XCharts.Runtime } /// <summary> /// Specify which xAxis is controlled by the dataZoom. - /// |控制的 x 轴索引列表。 + /// ||控制的 x 轴索引列表。 /// </summary> public List<int> xAxisIndexs { @@ -124,7 +124,7 @@ namespace XCharts.Runtime } /// <summary> /// Specify which yAxis is controlled by the dataZoom. - /// |控制的 y 轴索引列表。 + /// ||控制的 y 轴索引列表。 /// </summary> public List<int> yAxisIndexs { @@ -135,7 +135,7 @@ namespace XCharts.Runtime /// Whether built-in support is supported. /// Built into the coordinate system to allow the user to zoom in and out of the coordinate system by mouse dragging, /// mouse wheel, finger swiping (on the touch screen). - /// |是否支持内置。内置于坐标系中,使用户可以在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。 + /// ||是否支持内置。内置于坐标系中,使用户可以在坐标系上通过鼠标拖拽、鼠标滚轮、手指滑动(触屏上)来缩放或漫游坐标系。 /// </summary> public bool supportInside { @@ -144,7 +144,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether inside scrolling is supported. - /// |是否支持坐标系内滚动 + /// ||是否支持坐标系内滚动 /// </summary> public bool supportInsideScroll { @@ -153,7 +153,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether insde drag is supported. - /// |是否支持坐标系内拖拽 + /// ||是否支持坐标系内拖拽 /// </summary> public bool supportInsideDrag { @@ -162,7 +162,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether a slider is supported. There are separate sliders on which the user zooms or roams. - /// |是否支持滑动条。有单独的滑动条,用户在滑动条上进行缩放或漫游。 + /// ||是否支持滑动条。有单独的滑动条,用户在滑动条上进行缩放或漫游。 /// </summary> public bool supportSlider { @@ -171,7 +171,7 @@ namespace XCharts.Runtime } /// <summary> /// Supported Box Selected. Provides a marquee for scaling the data area. - /// |是否支持框选。提供一个选框进行数据区域缩放。 + /// ||是否支持框选。提供一个选框进行数据区域缩放。 /// </summary> public bool supportMarquee { @@ -180,7 +180,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show data shadow, to indicate the data tendency in brief. - /// |是否显示数据阴影。数据阴影可以简单地反应数据走势。 + /// ||是否显示数据阴影。数据阴影可以简单地反应数据走势。 /// </summary> public bool showDataShadow { @@ -189,7 +189,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show detail, that is, show the detailed data information when dragging. - /// |是否显示detail,即拖拽时候显示详细数值信息。 + /// ||是否显示detail,即拖拽时候显示详细数值信息。 /// </summary> public bool showDetail { @@ -198,7 +198,7 @@ namespace XCharts.Runtime } /// <summary> /// Specify whether to lock the size of window (selected area). - /// |是否锁定选择区域(或叫做数据窗口)的大小。 + /// ||是否锁定选择区域(或叫做数据窗口)的大小。 /// 如果设置为 true 则锁定选择区域的大小,也就是说,只能平移,不能缩放。 /// </summary> public bool zoomLock @@ -208,12 +208,12 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show data shadow in dataZoom-silder component, to indicate the data tendency in brief. - /// |拖动时,是否实时更新系列的视图。如果设置为 false,则只在拖拽结束的时候更新。默认为true,暂不支持修改。 + /// ||拖动时,是否实时更新系列的视图。如果设置为 false,则只在拖拽结束的时候更新。默认为true,暂不支持修改。 /// </summary> public bool realtime { get { return true; } } /// <summary> /// The background color of the component. - /// |组件的背景颜色。 + /// ||组件的背景颜色。 /// </summary> public Color backgroundColor { @@ -222,7 +222,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of dataZoom data area. - /// |数据区域颜色。 + /// ||数据区域颜色。 /// </summary> public Color32 fillerColor { @@ -232,7 +232,7 @@ namespace XCharts.Runtime /// <summary> /// the color of dataZoom border. - /// |边框颜色。 + /// ||边框颜色。 /// </summary> public Color32 borderColor { @@ -250,7 +250,7 @@ namespace XCharts.Runtime /// <summary> /// Distance between dataZoom component and the bottom side of the container. /// bottom value is a instant pixel value like 10 or float value [0-1]. - /// |组件离容器下侧的距离。 + /// ||组件离容器下侧的距离。 /// </summary> public float bottom { @@ -260,7 +260,7 @@ namespace XCharts.Runtime /// <summary> /// Distance between dataZoom component and the top side of the container. /// top value is a instant pixel value like 10 or float value [0-1]. - /// |组件离容器上侧的距离。 + /// ||组件离容器上侧的距离。 /// </summary> public float top { @@ -270,7 +270,7 @@ namespace XCharts.Runtime /// <summary> /// Distance between dataZoom component and the left side of the container. /// left value is a instant pixel value like 10 or float value [0-1]. - /// |组件离容器左侧的距离。 + /// ||组件离容器左侧的距离。 /// </summary> public float left { @@ -280,7 +280,7 @@ namespace XCharts.Runtime /// <summary> /// Distance between dataZoom component and the right side of the container. /// right value is a instant pixel value like 10 or float value [0-1]. - /// |组件离容器右侧的距离。 + /// ||组件离容器右侧的距离。 /// </summary> public float right { @@ -289,7 +289,7 @@ namespace XCharts.Runtime } /// <summary> /// Use absolute value or percent value in DataZoom.start and DataZoom.end. - /// |取绝对值还是百分比。 + /// ||取绝对值还是百分比。 /// </summary> public RangeMode rangeMode { @@ -298,7 +298,7 @@ namespace XCharts.Runtime } /// <summary> /// The start percentage of the window out of the data extent, in the range of 0 ~ 100. - /// |数据窗口范围的起始百分比。范围是:0 ~ 100。 + /// ||数据窗口范围的起始百分比。范围是:0 ~ 100。 /// </summary> public float start { @@ -307,7 +307,7 @@ namespace XCharts.Runtime } /// <summary> /// Lock start value. - /// |固定起始值,不让改变。 + /// ||固定起始值,不让改变。 /// </summary> public bool startLock { @@ -316,7 +316,7 @@ namespace XCharts.Runtime } /// <summary> /// Lock end value. - /// |固定结束值,不让改变。 + /// ||固定结束值,不让改变。 /// </summary> public bool endLock { @@ -325,7 +325,7 @@ namespace XCharts.Runtime } /// <summary> /// The end percentage of the window out of the data extent, in the range of 0 ~ 100. - /// |数据窗口范围的结束百分比。范围是:0 ~ 100。 + /// ||数据窗口范围的结束百分比。范围是:0 ~ 100。 /// </summary> public float end { @@ -334,7 +334,7 @@ namespace XCharts.Runtime } /// <summary> /// Minimum number of display data. Minimum number of data displayed when DataZoom is enlarged to maximum. - /// |最小显示数据个数。当DataZoom放大到最大时,最小显示的数据个数。 + /// ||最小显示数据个数。当DataZoom放大到最大时,最小显示的数据个数。 /// </summary> public int minShowNum { @@ -344,7 +344,7 @@ namespace XCharts.Runtime /// <summary> /// The sensitivity of dataZoom scroll. /// The larger the number, the more sensitive it is. - /// |缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 + /// ||缩放区域组件的敏感度。值越高每次缩放所代表的数据越多。 /// </summary> public float scrollSensitivity { @@ -354,7 +354,7 @@ namespace XCharts.Runtime /// <summary> /// Specify whether the layout of dataZoom component is horizontal or vertical. What's more, /// it indicates whether the horizontal axis or vertical axis is controlled by default in catesian coordinate system. - /// |布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。 + /// ||布局方式是横还是竖。不仅是布局方式,对于直角坐标系而言,也决定了,缺省情况控制横向数轴还是纵向数轴。 /// </summary> public Orient orient { @@ -363,7 +363,7 @@ namespace XCharts.Runtime } /// <summary> /// label style. - /// |文本标签格式。 + /// ||文本标签格式。 /// </summary> public LabelStyle labelStyle { @@ -411,12 +411,12 @@ namespace XCharts.Runtime /// <summary> /// The start label. - /// |组件的开始信息文本。 + /// ||组件的开始信息文本。 /// </summary> private ChartLabel m_StartLabel { get; set; } /// <summary> /// The end label. - /// |组件的结束信息文本。 + /// ||组件的结束信息文本。 /// </summary> private ChartLabel m_EndLabel { get; set; } diff --git a/Runtime/Component/DataZoom/DataZoomHandler.cs b/Runtime/Component/DataZoom/DataZoomHandler.cs index 0778d7c8..3c686cab 100644 --- a/Runtime/Component/DataZoom/DataZoomHandler.cs +++ b/Runtime/Component/DataZoom/DataZoomHandler.cs @@ -529,7 +529,7 @@ namespace XCharts.Runtime Vector3 np = Vector3.zero; double minValue = 0; double maxValue = 0; - SeriesHelper.GetYMinMaxValue(chart, 0, chart.IsAllAxisValue(), axis.inverse, out minValue, out maxValue, false, false); + SeriesHelper.GetYMinMaxValue(chart, 0, axis.inverse, out minValue, out maxValue, false, false); AxisHelper.AdjustMinMaxValue(axis, ref minValue, ref maxValue, true); int rate = 1; @@ -621,7 +621,7 @@ namespace XCharts.Runtime Vector3 np = Vector3.zero; double minValue = 0; double maxValue = 0; - SeriesHelper.GetYMinMaxValue(chart, 0, chart.IsAllAxisValue(), axis.inverse, out minValue, out maxValue); + SeriesHelper.GetYMinMaxValue(chart, 0, axis.inverse, out minValue, out maxValue); AxisHelper.AdjustMinMaxValue(axis, ref minValue, ref maxValue, true); int rate = 1; diff --git a/Runtime/Component/Debug/DebugInfo.cs b/Runtime/Component/Debug/DebugInfo.cs index b0af3b0c..966d7a98 100644 --- a/Runtime/Component/Debug/DebugInfo.cs +++ b/Runtime/Component/Debug/DebugInfo.cs @@ -42,32 +42,32 @@ namespace XCharts.Runtime /// <summary> /// Whether show debug component. - /// |是否显示Debug组件。 + /// ||是否显示Debug组件。 /// </summary> public bool show { get { return m_Show; } set { m_Show = value; } } /// <summary> /// Whether show children components of chart in hierarchy view. - /// |是否在Hierarchy试图显示所有chart下的节点。 + /// ||是否在Hierarchy试图显示所有chart下的节点。 /// </summary> public bool showAllChartObject { get { return m_ShowAllChartObject; } set { m_ShowAllChartObject = value; } } /// <summary> /// Whether to fold series in inspector view. - /// |是否在Inspector上折叠Serie。 + /// ||是否在Inspector上折叠Serie。 /// </summary> public bool foldSeries { get { return m_FoldSeries; } set { m_FoldSeries = value; } } /// <summary> /// frame rate. - /// |当前帧率。 + /// ||当前帧率。 /// </summary> public float fps { get; private set; } /// <summary> /// The average frame rate. - /// |平均帧率。 + /// ||平均帧率。 /// </summary> public float avgFps { get; private set; } /// <summary> /// The fefresh count of chart per second. - /// |图表每秒刷新次数。 + /// ||图表每秒刷新次数。 /// </summary> public int refreshCount { get; internal set; } internal int clickChartCount { get; set; } diff --git a/Runtime/Component/Label/LabelLine.cs b/Runtime/Component/Label/LabelLine.cs index dd41e8db..4f668e50 100644 --- a/Runtime/Component/Label/LabelLine.cs +++ b/Runtime/Component/Label/LabelLine.cs @@ -55,7 +55,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the label line is showed. - /// |是否显示视觉引导线。 + /// ||是否显示视觉引导线。 /// </summary> public bool show { @@ -64,7 +64,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of visual guide line. - /// |视觉引导线类型。 + /// ||视觉引导线类型。 /// </summary> public LineType lineType { @@ -73,7 +73,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of visual guild line. - /// |视觉引导线颜色。默认和serie一致取自调色板。 + /// ||视觉引导线颜色。默认和serie一致取自调色板。 /// </summary> public Color32 lineColor { @@ -82,7 +82,7 @@ namespace XCharts.Runtime } /// <summary> /// the angle of visual guild line. Valid for broken line and curve line. Invalid in Pie. - /// |视觉引导线的固定角度。对折线和曲线有效。在Pie中无效。 + /// ||视觉引导线的固定角度。对折线和曲线有效。在Pie中无效。 /// </summary> public float lineAngle { @@ -91,7 +91,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of visual guild line. - /// |视觉引导线的宽度。 + /// ||视觉引导线的宽度。 /// </summary> public float lineWidth { @@ -100,7 +100,7 @@ namespace XCharts.Runtime } /// <summary> /// the gap of container and guild line. - /// |视觉引导线和容器的间距。 + /// ||视觉引导线和容器的间距。 /// </summary> public float lineGap { @@ -109,7 +109,7 @@ namespace XCharts.Runtime } /// <summary> /// The length of the first segment of visual guide line. - /// |视觉引导线第一段的长度。 + /// ||视觉引导线第一段的长度。 /// </summary> public float lineLength1 { @@ -118,7 +118,7 @@ namespace XCharts.Runtime } /// <summary> /// The length of the second segment of visual guide line. - /// |视觉引导线第二段的长度。 + /// ||视觉引导线第二段的长度。 /// </summary> public float lineLength2 { @@ -127,7 +127,7 @@ namespace XCharts.Runtime } /// <summary> /// The fixed x position of the end point of visual guide line. - /// |视觉引导线结束点的固定x位置。当不为0时,会代替lineLength2设定引导线的x位置。 + /// ||视觉引导线结束点的固定x位置。当不为0时,会代替lineLength2设定引导线的x位置。 /// </summary> public float lineEndX { @@ -136,7 +136,7 @@ namespace XCharts.Runtime } /// <summary> /// The symbol of the start point of labelline. - /// |起始点的图形标记。 + /// ||起始点的图形标记。 /// </summary> public SymbolStyle startSymbol { @@ -145,7 +145,7 @@ namespace XCharts.Runtime } /// <summary> /// The symbol of the end point of labelline. - /// |结束点的图形标记。 + /// ||结束点的图形标记。 /// </summary> public SymbolStyle endSymbol { diff --git a/Runtime/Component/Label/LabelStyle.cs b/Runtime/Component/Label/LabelStyle.cs index 00920dda..5ae385c4 100644 --- a/Runtime/Component/Label/LabelStyle.cs +++ b/Runtime/Component/Label/LabelStyle.cs @@ -5,66 +5,66 @@ namespace XCharts.Runtime { /// <summary> /// Text label of chart, to explain some data information about graphic item like value, name and so on. - /// |图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 + /// ||图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 /// </summary> [System.Serializable] public class LabelStyle : ChildComponent, ISerieComponent, ISerieDataComponent { /// <summary> /// The position of label. - /// |标签的位置。 + /// ||标签的位置。 /// </summary> public enum Position { Default, /// <summary> /// Outside of sectors of pie chart, which relates to corresponding sector through visual guide line. - /// |饼图扇区外侧,通过视觉引导线连到相应的扇区。 + /// ||饼图扇区外侧,通过视觉引导线连到相应的扇区。 /// </summary> Outside, /// <summary> /// Inside the sectors of pie chart. - /// |饼图扇区内部。 + /// ||饼图扇区内部。 /// </summary> Inside, /// <summary> /// In the center of pie chart. - /// |在饼图中心位置。 + /// ||在饼图中心位置。 /// </summary> Center, /// <summary> /// top of symbol. - /// |图形标志的顶部。 + /// ||图形标志的顶部。 /// </summary> Top, /// <summary> /// the bottom of symbol. - /// |图形标志的底部。 + /// ||图形标志的底部。 /// </summary> Bottom, /// <summary> /// the left of symbol. - /// |图形标志的左边。 + /// ||图形标志的左边。 /// </summary> Left, /// <summary> /// the right of symbol. - /// |图形标志的右边。 + /// ||图形标志的右边。 /// </summary> Right, /// <summary> /// the start of line. - /// |线的起始点。 + /// ||线的起始点。 /// </summary> Start, /// <summary> /// the middle of line. - /// |线的中点。 + /// ||线的中点。 /// </summary> Middle, /// <summary> /// the end of line. - /// |线的结束点。 + /// ||线的结束点。 /// </summary> End } @@ -102,7 +102,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the label is showed. - /// |是否显示文本标签。 + /// ||是否显示文本标签。 /// </summary> public bool show { @@ -111,7 +111,7 @@ namespace XCharts.Runtime } /// <summary> /// The position of label. - /// |标签的位置。 + /// ||标签的位置。 /// </summary> public Position position { @@ -119,17 +119,61 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetStruct(ref m_Position, value)) SetAllDirty(); } } /// <summary> - /// formatter of label. - /// |标签内容字符串模版格式器。支持用 \n 换行。 - /// 模板变量有: - /// {.}:圆点标记。 - /// {a}:系列名。 - /// {a}:系列名。 - /// {b}:类目值或数据名。 - /// {c}:数据值。 - /// {d}:百分比。 - /// {e}:数据名。 - /// {f}:数据和。 + /// label content string template formatter. \n line wrapping is supported. Formatters for some components will not take effect. <br /> + /// Template placeholder have the following, some of which apply only to fixed components: <br /> + /// `{.}` : indicates the dot mark. <br /> + /// `{a}` : indicates the series name. <br /> + /// `{b}` : category value or data name. <br /> + /// `{c}` : data value. <br /> + /// `{d}` : percentage. <br /> + /// `{e}` : indicates the data name. <br /> + /// `{f}` : data sum. <br /> + /// `{g}` : indicates the total number of data. <br /> + /// `{h}` : hexadecimal color value. <br /> + /// `{value}` : The value of the axis or legend. <br /> + /// The following placeholder apply to `UITable` components: <br /> + /// `{name}` : indicates the row name of the table. <br /> + /// `{index}` : indicates the row number of the table. <br /> + /// The following placeholder apply to `UIStatistc` components: <br /> + /// `{title}` : title text. <br /> + /// `{dd}` : day. <br /> + /// `{hh}` : hours. <br /> + /// `{mm}` : minutes. <br /> + /// `{ss}` : second. <br /> + /// `{fff}` : milliseconds. <br /> + /// `{d}` : day. <br /> + /// `{h}` : hours. <br /> + /// `{m}` : minutes. <br /> + /// `{s}` : second. <br /> + /// `{f}` : milliseconds. <br /> + /// Example :{b}:{c}<br /> + /// ||标签内容字符串模版格式器。支持用 \n 换行。部分组件的格式器会不生效。<br/> + /// 模板通配符有以下这些,部分只适用于固定的组件:<br/> + /// `{.}`:圆点标记。<br/> + /// `{a}`:系列名。<br/> + /// `{b}`:类目值或数据名。<br/> + /// `{c}`:数据值。<br/> + /// `{d}`:百分比。<br/> + /// `{e}`:数据名。<br/> + /// `{f}`:数据和。<br/> + /// `{g}`:数据总个数。<br/> + /// `{h}`:十六进制颜色值。<br/> + /// `{value}`:坐标轴或图例的值。<br/> + /// 以下通配符适用UITable组件:<br/> + /// `{name}`: 表格的行名。<br/> + /// `{index}`:表格的行号。<br/> + /// 以下通配符适用UIStatistc组件:<br/> + /// `{title}`:标题文本。<br/> + /// `{dd}`:天。<br/> + /// `{hh}`:小时。<br/> + /// `{mm}`:分钟。<br/> + /// `{ss}`:秒。<br/> + /// `{fff}`:毫秒。<br/> + /// `{d}`:天。<br/> + /// `{h}`:小时。<br/> + /// `{m}`:分钟。<br/> + /// `{s}`:秒。<br/> + /// `{f}`:毫秒。<br/> /// 示例:“{b}:{c}” /// </summary> public string formatter @@ -138,8 +182,25 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetClass(ref m_Formatter, value)) SetComponentDirty(); } } /// <summary> + /// Standard number and date format string. Used to format a Double value or a DateTime date as a string. numericFormatter is used as an argument to either `Double.ToString ()` or `DateTime.ToString()`. <br /> + /// The number format uses the Axx format: A is a single-character format specifier that supports C currency, D decimal, E exponent, F fixed-point number, G regular, N digit, P percentage, R round trip, and X hexadecimal. xx is precision specification, from 0-99. E.g. F1, E2<br /> + /// Date format Common date formats are: yyyy year, MM month, dd day, HH hour, mm minute, ss second, fff millisecond. For example: yyyy-MM-dd HH:mm:ss<br /> + /// number format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings<br/> + /// date format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings<br/> + /// ||标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。<br/> + /// 数字格式使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。如:F1, E2<br/> + /// 日期格式常见的格式:yyyy年,MM月,dd日,HH时,mm分,ss秒,fff毫秒。如:yyyy-MM-dd HH:mm:ss<br/> + /// 数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings <br/> + /// 日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings + /// </summary> + public string numericFormatter + { + get { return m_NumericFormatter; } + set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); } + } + /// <summary> /// offset to the host graphic element. - /// |距离图形元素的偏移 + /// ||距离图形元素的偏移 /// </summary> public Vector3 offset { @@ -148,7 +209,7 @@ namespace XCharts.Runtime } /// <summary> /// Rotation of label. - /// |文本的旋转。 + /// ||文本的旋转。 /// </summary> public float rotate { @@ -157,7 +218,7 @@ namespace XCharts.Runtime } /// <summary> /// auto rotate of label. - /// |是否自动旋转。 + /// ||是否自动旋转。 /// </summary> public bool autoRotate { @@ -165,7 +226,8 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetStruct(ref m_AutoRotate, value)) SetComponentDirty(); } } /// <summary> - /// 距离轴线的距离。 + /// the distance of label to axis line. + /// ||距离轴线的距离。 /// </summary> public float distance { @@ -174,9 +236,8 @@ namespace XCharts.Runtime } /// <summary> /// the width of label. If set as default value 0, it means than the label width auto set as the text width. - /// |标签的宽度。一般不用指定,不指定时则自动是文字的宽度。 + /// ||标签的宽度。一般不用指定,不指定时则自动是文字的宽度。 /// </summary> - /// <value></value> public float width { get { return m_Width; } @@ -184,9 +245,8 @@ namespace XCharts.Runtime } /// <summary> /// the height of label. If set as default value 0, it means than the label height auto set as the text height. - /// |标签的高度。一般不用指定,不指定时则自动是文字的高度。 + /// ||标签的高度。一般不用指定,不指定时则自动是文字的高度。 /// </summary> - /// <value></value> public float height { get { return m_Height; } @@ -194,7 +254,7 @@ namespace XCharts.Runtime } /// <summary> /// the text padding of label. - /// |文本的边距。 + /// ||文本的边距。 /// </summary> public TextPadding textPadding { @@ -202,19 +262,8 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetClass(ref m_TextPadding, value)) SetComponentDirty(); } } /// <summary> - /// Standard numeric format strings. - /// |标准数字格式字符串。用于将数值格式化显示为字符串。 - /// 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 - /// 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings - /// </summary> - /// <value></value> - public string numericFormatter - { - get { return m_NumericFormatter; } - set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); } - } - /// <summary> - /// 是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 + /// Whether to automatically offset. When turned on, the Y offset will automatically determine the opening of the curve to determine whether to offset up or down. + /// ||是否开启自动偏移。当开启时,Y的偏移会自动判断曲线的开口来决定向上还是向下偏移。 /// </summary> public bool autoOffset { @@ -223,7 +272,7 @@ namespace XCharts.Runtime } /// <summary> /// the sytle of background. - /// |背景图样式。 + /// ||背景图样式。 /// </summary> public ImageStyle background { @@ -232,7 +281,7 @@ namespace XCharts.Runtime } /// <summary> /// the sytle of icon. - /// |图标样式。 + /// ||图标样式。 /// </summary> public IconStyle icon { @@ -241,19 +290,26 @@ namespace XCharts.Runtime } /// <summary> /// the sytle of text. - /// |文本样式。 + /// ||文本样式。 /// </summary> public TextStyle textStyle { get { return m_TextStyle; } set { if (PropertyUtil.SetClass(ref m_TextStyle, value)) SetAllDirty(); } } + /// <summary> + /// the formatter function of label, which supports string template and callback function. + /// ||标签的文本格式化函数,支持字符串模版和回调函数。 + /// </summary> public LabelFormatterFunction formatterFunction { get { return m_FormatterFunction; } set { m_FormatterFunction = value; } } - + /// <summary> + /// whether the label is inside. + /// ||是否在内部。 + /// </summary> public bool IsInside() { return m_Position == Position.Inside || m_Position == Position.Center; @@ -397,7 +453,14 @@ namespace XCharts.Runtime } else { - dateString = dateTime.ToString(numericFormatter); + try + { + dateString = dateTime.ToString(numericFormatter); + } + catch + { + XLog.Warning("not support datetime formatter:" + numericFormatter); + } } if (!string.IsNullOrEmpty(m_Formatter)) { diff --git a/Runtime/Component/Legend/Legend.cs b/Runtime/Component/Legend/Legend.cs index 283110fa..7549885a 100644 --- a/Runtime/Component/Legend/Legend.cs +++ b/Runtime/Component/Legend/Legend.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; using UnityEngine; @@ -6,7 +7,7 @@ namespace XCharts.Runtime /// <summary> /// Legend component.The legend component shows different sets of tags, colors, and names. /// You can control which series are not displayed by clicking on the legend. - /// |图例组件。 + /// ||图例组件。 /// 图例组件展现了不同系列的标记,颜色和名字。可以通过点击图例控制哪些系列不显示。 /// </summary> [System.Serializable] @@ -50,7 +51,7 @@ namespace XCharts.Runtime } /// <summary> /// Selected mode of legend, which controls whether series can be toggled displaying by clicking legends. - /// |图例选择的模式,控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。 + /// ||图例选择的模式,控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。 /// </summary> public enum SelectedMode { @@ -79,7 +80,6 @@ namespace XCharts.Runtime [SerializeField] private bool m_ItemAutoColor = true; [SerializeField] private float m_ItemOpacity = 1; [SerializeField] private string m_Formatter; - [SerializeField] protected string m_NumericFormatter = ""; [SerializeField] private LabelStyle m_LabelStyle = new LabelStyle(); [SerializeField] private List<string> m_Data = new List<string>(); [SerializeField] private List<Sprite> m_Icons = new List<Sprite>(); @@ -92,7 +92,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show legend component. - /// |是否显示图例组件。 + /// ||是否显示图例组件。 /// </summary> public bool show { @@ -101,7 +101,7 @@ namespace XCharts.Runtime } /// <summary> /// Type of legend. - /// |图例类型。 + /// ||图例类型。 /// </summary> public Type iconType { @@ -110,7 +110,7 @@ namespace XCharts.Runtime } /// <summary> /// Selected mode of legend, which controls whether series can be toggled displaying by clicking legends. - /// |选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。 + /// ||选择模式。控制是否可以通过点击图例改变系列的显示状态。默认开启图例选择,可以设成 None 关闭。 /// </summary> public SelectedMode selectedMode { @@ -119,7 +119,7 @@ namespace XCharts.Runtime } /// <summary> /// Specify whether the layout of legend component is horizontal or vertical. - /// |布局方式是横还是竖。 + /// ||布局方式是横还是竖。 /// </summary> public Orient orient { @@ -128,7 +128,7 @@ namespace XCharts.Runtime } /// <summary> /// The location of legend. - /// |图例显示的位置。 + /// ||图例显示的位置。 /// </summary> public Location location { @@ -137,7 +137,7 @@ namespace XCharts.Runtime } /// <summary> /// Image width of legend symbol. - /// |图例标记的图形宽度。 + /// ||图例标记的图形宽度。 /// </summary> public float itemWidth { @@ -146,7 +146,7 @@ namespace XCharts.Runtime } /// <summary> /// Image height of legend symbol. - /// |图例标记的图形高度。 + /// ||图例标记的图形高度。 /// </summary> public float itemHeight { @@ -155,7 +155,7 @@ namespace XCharts.Runtime } /// <summary> /// The distance between each legend, horizontal distance in horizontal layout, and vertical distance in vertical layout. - /// |图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 + /// ||图例每项之间的间隔。横向布局时为水平间隔,纵向布局时为纵向间隔。 /// </summary> public float itemGap { @@ -164,7 +164,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the legend symbol matches the color automatically. - /// |图例标记的图形是否自动匹配颜色。 + /// ||图例标记的图形是否自动匹配颜色。 /// </summary> public bool itemAutoColor { @@ -173,7 +173,7 @@ namespace XCharts.Runtime } /// <summary> /// the opacity of item color. - /// |图例标记的图形的颜色透明度。 + /// ||图例标记的图形的颜色透明度。 /// </summary> public float itemOpacity { @@ -181,21 +181,10 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetStruct(ref m_ItemOpacity, value)) SetComponentDirty(); } } /// <summary> - /// Standard numeric format strings. - /// |标准数字格式字符串。用于将数值格式化显示为字符串。 - /// 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 - /// 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings - /// </summary> - public string numericFormatter - { - get { return m_NumericFormatter; } - set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); } - } - /// <summary> - /// Legend content string template formatter. Support for wrapping lines with \n. Template:{value}. - /// |图例内容字符串模版格式器。支持用 \n 换行。 - /// 模板变量为图例名称 {value}。其他模板变量参考Toolip的itemFormatter。 + /// No longer used, the use of LabelStyle.formatter instead. + /// ||不再使用,使用LabelStyle.formatter代替。 /// </summary> + [Obsolete("Use LabelStyle.formatter instead.", false)] public string formatter { get { return m_Formatter; } @@ -203,7 +192,7 @@ namespace XCharts.Runtime } /// <summary> /// the style of text. - /// |文本样式。 + /// ||文本样式。 /// </summary> public LabelStyle labelStyle { @@ -212,7 +201,7 @@ namespace XCharts.Runtime } /// <summary> /// the sytle of background. - /// |背景图样式。 + /// ||背景图样式。 /// </summary> public ImageStyle background { @@ -221,7 +210,7 @@ namespace XCharts.Runtime } /// <summary> /// the paddinng of item and background. - /// |图例标记和背景的间距。 + /// ||图例标记和背景的间距。 /// </summary> public Padding padding { @@ -232,7 +221,7 @@ namespace XCharts.Runtime /// Data array of legend. An array item is usually a name representing string. (If it is a pie chart, /// it could also be the name of a single data in the pie chart) of a series. /// If data is not specified, it will be auto collected from series. - /// |图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 name(如果是饼图,也可以是饼图单个数据的 name)。 + /// ||图例的数据数组。数组项通常为一个字符串,每一项代表一个系列的 name(如果是饼图,也可以是饼图单个数据的 name)。 /// 如果 data 没有被指定,会自动从当前系列中获取。指定data时里面的数据项和serie匹配时才会生效。 /// </summary> public List<string> data @@ -250,7 +239,7 @@ namespace XCharts.Runtime } /// <summary> /// the colors of legend item. - /// |图例标记的颜色列表。 + /// ||图例标记的颜色列表。 /// </summary> public List<Color> colors { @@ -259,7 +248,7 @@ namespace XCharts.Runtime } /// <summary> /// the custom positions of legend item. - /// |图例标记的自定义位置列表。 + /// ||图例标记的自定义位置列表。 /// </summary> public List<Vector3> positions { @@ -287,7 +276,7 @@ namespace XCharts.Runtime /// <summary> /// Clear legend data. - /// |清空。 + /// ||清空。 /// </summary> public override void ClearData() { @@ -297,7 +286,7 @@ namespace XCharts.Runtime /// <summary> /// Whether include in legend data by the specified name. - /// |是否包括由指定名字的图例 + /// ||是否包括由指定名字的图例 /// </summary> /// <param name="name"></param> /// <returns></returns> @@ -308,7 +297,7 @@ namespace XCharts.Runtime /// <summary> /// Removes the legend with the specified name. - /// |移除指定名字的图例。 + /// ||移除指定名字的图例。 /// </summary> /// <param name="name"></param> public void RemoveData(string name) @@ -322,7 +311,7 @@ namespace XCharts.Runtime /// <summary> /// Add legend data. - /// |添加图例。 + /// ||添加图例。 /// </summary> /// <param name="name"></param> public void AddData(string name) @@ -336,7 +325,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the legend for the specified index. - /// |获得指定索引的图例。 + /// ||获得指定索引的图例。 /// </summary> /// <param name="index"></param> /// <returns></returns> @@ -351,7 +340,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the index of the specified legend. - /// |获得指定图例的索引。 + /// ||获得指定图例的索引。 /// </summary> /// <param name="legendName"></param> /// <returns></returns> @@ -362,7 +351,7 @@ namespace XCharts.Runtime /// <summary> /// Remove all legend buttons. - /// |移除所有图例按钮。 + /// ||移除所有图例按钮。 /// </summary> public void RemoveButton() { @@ -371,7 +360,7 @@ namespace XCharts.Runtime /// <summary> /// Bind buttons to legends. - /// |给图例绑定按钮。 + /// ||给图例绑定按钮。 /// </summary> /// <param name="name"></param> /// <param name="btn"></param> @@ -386,7 +375,7 @@ namespace XCharts.Runtime /// <summary> /// Update the legend button color. - /// |更新图例按钮颜色。 + /// ||更新图例按钮颜色。 /// </summary> /// <param name="name"></param> /// <param name="color"></param> @@ -400,7 +389,7 @@ namespace XCharts.Runtime /// <summary> /// Update the text color of legend. - /// |更新图例文字颜色。 + /// ||更新图例文字颜色。 /// </summary> /// <param name="name"></param> /// <param name="color"></param> @@ -414,7 +403,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the legend button for the specified index. - /// |获得指定索引的图例按钮。 + /// ||获得指定索引的图例按钮。 /// </summary> /// <param name="index"></param> /// <returns></returns> @@ -448,7 +437,7 @@ namespace XCharts.Runtime /// <summary> /// Callback handling when parameters change. - /// |参数变更时的回调处理。 + /// ||参数变更时的回调处理。 /// </summary> public void OnChanged() { diff --git a/Runtime/Component/Legend/LegendContext.cs b/Runtime/Component/Legend/LegendContext.cs index 12cc5688..69c89c5a 100644 --- a/Runtime/Component/Legend/LegendContext.cs +++ b/Runtime/Component/Legend/LegendContext.cs @@ -18,7 +18,7 @@ namespace XCharts.Runtime public Vector2 center { get; internal set; } /// <summary> /// the button list of legend. - /// |图例按钮列表。 + /// ||图例按钮列表。 /// </summary> internal Dictionary<string, LegendItem> buttonList = new Dictionary<string, LegendItem>(); /// <summary> diff --git a/Runtime/Component/Legend/LegendHandler.cs b/Runtime/Component/Legend/LegendHandler.cs index e2a0bd48..478689a5 100644 --- a/Runtime/Component/Legend/LegendHandler.cs +++ b/Runtime/Component/Legend/LegendHandler.cs @@ -42,8 +42,10 @@ namespace XCharts.Runtime public override void OnSerieDataUpdate(int serieIndex) { - if (FormatterHelper.NeedFormat(component.formatter)) +#pragma warning disable 0618 + if (FormatterHelper.NeedFormat(component.formatter) || FormatterHelper.NeedFormat(component.labelStyle.formatter)) component.refreshComponent(); +#pragma warning restore 0618 } private void InitLegend(Legend legend) @@ -150,16 +152,19 @@ namespace XCharts.Runtime private string GetFormatterContent(Legend legend, int dataIndex, string category) { - if (string.IsNullOrEmpty(legend.formatter)) +#pragma warning disable 0618 + if (string.IsNullOrEmpty(legend.formatter) || string.IsNullOrEmpty(legend.labelStyle.formatter)) return category; else { - var content = legend.formatter.Replace("{name}", category); + var formatter = string.IsNullOrEmpty(legend.labelStyle.formatter) ? legend.formatter : legend.labelStyle.formatter; + var content = formatter.Replace("{name}", category); content = content.Replace("{value}", category); var serie = chart.GetSerie(0); - FormatterHelper.ReplaceContent(ref content, dataIndex, legend.numericFormatter, serie, chart, category); + FormatterHelper.ReplaceContent(ref content, dataIndex, legend.labelStyle.numericFormatter, serie, chart, category); return content; } +#pragma warning restore 0618 } private void OnLegendButtonClick(Legend legend, int index, string legendName, bool show) diff --git a/Runtime/Component/Mark/MarkArea.cs b/Runtime/Component/Mark/MarkArea.cs index 560d6af8..577295ba 100644 --- a/Runtime/Component/Mark/MarkArea.cs +++ b/Runtime/Component/Mark/MarkArea.cs @@ -28,7 +28,7 @@ namespace XCharts.Runtime /// <summary> /// Used to mark an area in chart. For example, mark a time interval. - /// |图表标域,常用于标记图表中某个范围的数据。 + /// ||图表标域,常用于标记图表中某个范围的数据。 /// </summary> [System.Serializable] [ComponentHandler(typeof(MarkAreaHandler), true)] @@ -127,7 +127,7 @@ namespace XCharts.Runtime public double runtimeValue { get; internal set; } /// <summary> /// Name of the marker, which will display as a label. - /// |标注名称。会作为文字显示。 + /// ||标注名称。会作为文字显示。 /// </summary> public string name { @@ -136,7 +136,7 @@ namespace XCharts.Runtime } /// <summary> /// Special markArea types, are used to label maximum value, minimum value and so on. - /// |特殊的标域类型,用于标注最大值最小值等。 + /// ||特殊的标域类型,用于标注最大值最小值等。 /// </summary> public MarkAreaType type { @@ -145,7 +145,7 @@ namespace XCharts.Runtime } /// <summary> /// From which dimension of data to calculate the maximum and minimum value and so on. - /// |从哪个维度的数据计算最大最小值等。 + /// ||从哪个维度的数据计算最大最小值等。 /// </summary> public int dimension { @@ -154,7 +154,7 @@ namespace XCharts.Runtime } /// <summary> /// The x coordinate relative to the origin, in pixels. - /// |相对原点的 x 坐标,单位像素。当type为None时有效。 + /// ||相对原点的 x 坐标,单位像素。当type为None时有效。 /// </summary> public float xPosition { @@ -163,7 +163,7 @@ namespace XCharts.Runtime } /// <summary> /// The y coordinate relative to the origin, in pixels. - /// |相对原点的 y 坐标,单位像素。当type为None时有效。 + /// ||相对原点的 y 坐标,单位像素。当type为None时有效。 /// </summary> public float yPosition { @@ -172,7 +172,7 @@ namespace XCharts.Runtime } /// <summary> /// The value specified on the X-axis. A value specified when the X-axis is the category axis represents the index of the category axis data, otherwise a specific value. - /// |X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 + /// ||X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 /// </summary> public double xValue { @@ -181,7 +181,7 @@ namespace XCharts.Runtime } /// <summary> /// That's the value on the Y-axis. The value specified when the Y axis is the category axis represents the index of the category axis data, otherwise the specific value. - /// |Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 + /// ||Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 /// </summary> public double yValue { diff --git a/Runtime/Component/Mark/MarkLine.cs b/Runtime/Component/Mark/MarkLine.cs index 3a7b135f..47f1e2ba 100644 --- a/Runtime/Component/Mark/MarkLine.cs +++ b/Runtime/Component/Mark/MarkLine.cs @@ -29,7 +29,7 @@ namespace XCharts.Runtime /// <summary> /// Use a line in the chart to illustrate. - /// |图表标线。 + /// ||图表标线。 /// </summary> [System.Serializable] [ComponentHandler(typeof(MarkLineHandler), true)] @@ -37,12 +37,13 @@ namespace XCharts.Runtime { [SerializeField] private bool m_Show = true; [SerializeField] private int m_SerieIndex = 0; + [SerializeField][Since("v3.9.0")] private bool m_OnTop = true; [SerializeField] private AnimationStyle m_Animation = new AnimationStyle(); [SerializeField] private List<MarkLineData> m_Data = new List<MarkLineData>(); /// <summary> /// Whether to display the marking line. - /// |是否显示标线。 + /// ||是否显示标线。 /// </summary> public bool show { @@ -51,7 +52,7 @@ namespace XCharts.Runtime } /// <summary> /// The serie index of markLine. - /// |标线影响的Serie索引。 + /// ||标线影响的Serie索引。 /// </summary> public int serieIndex { @@ -59,8 +60,17 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetStruct(ref m_SerieIndex, value)) SetVerticesDirty(); } } /// <summary> + /// whether the markline is on top. + /// ||是否在最上层。 + /// </summary> + public bool onTop + { + get { return m_OnTop; } + set { if (PropertyUtil.SetStruct(ref m_OnTop, value)) SetVerticesDirty(); } + } + /// <summary> /// The animation of markline. - /// |标线的动画样式。 + /// ||标线的动画样式。 /// </summary> public AnimationStyle animation { @@ -72,7 +82,7 @@ namespace XCharts.Runtime /// When the group is not 0, two data items of the same group represent the starting point and /// the ending point of the line respectively to form a line. In this case, the relevant style /// parameters of the line are the parameters of the starting point. - /// |标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 + /// ||标线的数据列表。当数据项的group为0时,每个数据项表示一条标线;当group不为0时,相同group的两个数据项分别表 /// 示标线的起始点和终止点来组成一条标线,此时标线的相关样式参数取起始点的参数。 /// </summary> public List<MarkLineData> data @@ -103,7 +113,7 @@ namespace XCharts.Runtime } /// <summary> /// Data of marking line. - /// |图表标线的数据。 + /// ||图表标线的数据。 /// </summary> [System.Serializable] public class MarkLineData : ChildComponent @@ -133,7 +143,7 @@ namespace XCharts.Runtime /// <summary> /// Name of the marker, which will display as a label. - /// |标线名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 + /// ||标线名称,将会作为文字显示。label的formatter可通过{b}显示名称,通过{c}显示数值。 /// </summary> public string name { @@ -142,7 +152,7 @@ namespace XCharts.Runtime } /// <summary> /// Special label types, are used to label maximum value, minimum value and so on. - /// |特殊的标线类型,用于标注最大值最小值等。 + /// ||特殊的标线类型,用于标注最大值最小值等。 /// </summary> public MarkLineType type { @@ -151,7 +161,7 @@ namespace XCharts.Runtime } /// <summary> /// From which dimension of data to calculate the maximum and minimum value and so on. - /// |从哪个维度的数据计算最大最小值等。 + /// ||从哪个维度的数据计算最大最小值等。 /// </summary> public int dimension { @@ -160,7 +170,7 @@ namespace XCharts.Runtime } /// <summary> /// The x coordinate relative to the origin, in pixels. - /// |相对原点的 x 坐标,单位像素。当type为None时有效。 + /// ||相对原点的 x 坐标,单位像素。当type为None时有效。 /// </summary> public float xPosition { @@ -169,7 +179,7 @@ namespace XCharts.Runtime } /// <summary> /// The y coordinate relative to the origin, in pixels. - /// |相对原点的 y 坐标,单位像素。当type为None时有效。 + /// ||相对原点的 y 坐标,单位像素。当type为None时有效。 /// </summary> public float yPosition { @@ -178,7 +188,7 @@ namespace XCharts.Runtime } /// <summary> /// The value specified on the X-axis. A value specified when the X-axis is the category axis represents the index of the category axis data, otherwise a specific value. - /// |X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 + /// ||X轴上的指定值。当X轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 /// </summary> public double xValue { @@ -187,7 +197,7 @@ namespace XCharts.Runtime } /// <summary> /// That's the value on the Y-axis. The value specified when the Y axis is the category axis represents the index of the category axis data, otherwise the specific value. - /// |Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 + /// ||Y轴上的指定值。当Y轴为类目轴时指定值表示类目轴数据的索引,否则为具体的值。当type为None时有效。 /// </summary> public double yValue { @@ -196,7 +206,7 @@ namespace XCharts.Runtime } /// <summary> /// Grouping. When the group is not 0, it means that this data is the starting point or end point of the marking line. Data consistent with the group form a marking line. - /// |分组。当group不为0时,表示这个data是标线的起点或终点,group一致的data组成一条标线。 + /// ||分组。当group不为0时,表示这个data是标线的起点或终点,group一致的data组成一条标线。 /// </summary> public int group { @@ -205,7 +215,7 @@ namespace XCharts.Runtime } /// <summary> /// Is the origin of the coordinate system. - /// |是否为坐标系原点。 + /// ||是否为坐标系原点。 /// </summary> public bool zeroPosition { @@ -214,7 +224,7 @@ namespace XCharts.Runtime } /// <summary> /// The symbol of the start point of markline. - /// |起始点的图形标记。 + /// ||起始点的图形标记。 /// </summary> public SymbolStyle startSymbol { @@ -223,7 +233,7 @@ namespace XCharts.Runtime } /// <summary> /// The symbol of the end point of markline. - /// |结束点的图形标记。 + /// ||结束点的图形标记。 /// </summary> public SymbolStyle endSymbol { @@ -232,7 +242,7 @@ namespace XCharts.Runtime } /// <summary> /// The line style of markline. - /// |标线样式。 + /// ||标线样式。 /// </summary> public LineStyle lineStyle { @@ -241,7 +251,7 @@ namespace XCharts.Runtime } /// <summary> /// Text styles of label. You can set position to Start, Middle, and End to display text in different locations. - /// |文本样式。可设置position为Start、Middle和End在不同的位置显示文本。 + /// ||文本样式。可设置position为Start、Middle和End在不同的位置显示文本。 /// </summary> public LabelStyle label { diff --git a/Runtime/Component/Mark/MarkLineHandler.cs b/Runtime/Component/Mark/MarkLineHandler.cs index 858097f1..13bf6953 100644 --- a/Runtime/Component/Mark/MarkLineHandler.cs +++ b/Runtime/Component/Mark/MarkLineHandler.cs @@ -19,9 +19,16 @@ namespace XCharts.Runtime InitMarkLine(component); } + public override void DrawBase(VertexHelper vh) + { + if (!component.onTop) + DrawMarkLine(vh, component); + } + public override void DrawUpper(VertexHelper vh) { - DrawMarkLine(vh, component); + if (component.onTop) + DrawMarkLine(vh, component); } public override void Update() @@ -125,19 +132,19 @@ namespace XCharts.Runtime { case MarkLineType.Min: data.runtimeValue = SerieHelper.GetMinData(serie, data.dimension, dataZoom); - GetStartEndPos(xAxis, yAxis, grid, data.runtimeValue, ref sp, ref ep); + GetStartEndPos(yAxis, grid, data.runtimeValue, ref sp, ref ep); break; case MarkLineType.Max: data.runtimeValue = SerieHelper.GetMaxData(serie, data.dimension, dataZoom); - GetStartEndPos(xAxis, yAxis, grid, data.runtimeValue, ref sp, ref ep); + GetStartEndPos(yAxis, grid, data.runtimeValue, ref sp, ref ep); break; case MarkLineType.Average: data.runtimeValue = SerieHelper.GetAverageData(serie, data.dimension, dataZoom); - GetStartEndPos(xAxis, yAxis, grid, data.runtimeValue, ref sp, ref ep); + GetStartEndPos(yAxis, grid, data.runtimeValue, ref sp, ref ep); break; case MarkLineType.Median: data.runtimeValue = SerieHelper.GetMedianData(serie, data.dimension, dataZoom); - GetStartEndPos(xAxis, yAxis, grid, data.runtimeValue, ref sp, ref ep); + GetStartEndPos(yAxis, grid, data.runtimeValue, ref sp, ref ep); break; case MarkLineType.None: if (data.xPosition != 0) @@ -165,7 +172,7 @@ namespace XCharts.Runtime } else { - GetStartEndPos(xAxis, yAxis, grid, data.yValue, ref sp, ref ep); + GetStartEndPos(yAxis, grid, data.yValue, ref sp, ref ep); } } else @@ -179,7 +186,7 @@ namespace XCharts.Runtime } else { - GetStartEndPos(xAxis, yAxis, grid, data.xValue, ref sp, ref ep); + GetStartEndPos(xAxis, grid, data.xValue, ref sp, ref ep); } } break; @@ -258,11 +265,11 @@ namespace XCharts.Runtime ColorUtil.clearColor32, borderColor, symbol.gap, serie.clip, cornerRadius, grid, startPos); } - private void GetStartEndPos(Axis xAxis, Axis yAxis, GridCoord grid, double value, ref Vector3 sp, ref Vector3 ep) + private void GetStartEndPos(Axis xAxis, GridCoord grid, double value, ref Vector3 sp, ref Vector3 ep) { - if (xAxis.IsCategory()) + if (xAxis is YAxis) { - var pY = AxisHelper.GetAxisPosition(grid, yAxis, value); + var pY = AxisHelper.GetAxisPosition(grid, xAxis, value); sp = new Vector3(grid.context.x, pY); ep = new Vector3(grid.context.x + grid.context.width, pY); } diff --git a/Runtime/Component/Radar/RadarCoord.cs b/Runtime/Component/Radar/RadarCoord.cs index 72ff346f..6967ec6e 100644 --- a/Runtime/Component/Radar/RadarCoord.cs +++ b/Runtime/Component/Radar/RadarCoord.cs @@ -15,7 +15,7 @@ namespace XCharts.Runtime { /// <summary> /// Radar render type, in which 'Polygon' and 'Circle' are supported. - /// |雷达图绘制类型,支持 'Polygon' 和 'Circle'。 + /// ||雷达图绘制类型,支持 'Polygon' 和 'Circle'。 /// </summary> public enum Shape { @@ -24,24 +24,24 @@ namespace XCharts.Runtime } /// <summary> /// The position type of radar. - /// |显示位置。 + /// ||显示位置。 /// </summary> public enum PositionType { /// <summary> /// Display at the vertex. - /// |显示在顶点处。 + /// ||显示在顶点处。 /// </summary> Vertice, /// <summary> /// Display at the middle of line. - /// |显示在两者之间。 + /// ||显示在两者之间。 /// </summary> Between, } /// <summary> /// Indicator of radar chart, which is used to assign multiple variables(dimensions) in radar chart. - /// |雷达图的指示器,用来指定雷达图中的多个变量(维度)。 + /// ||雷达图的指示器,用来指定雷达图中的多个变量(维度)。 /// </summary> [System.Serializable] public class Indicator @@ -53,27 +53,27 @@ namespace XCharts.Runtime /// <summary> /// The name of indicator. - /// |指示器名称。 + /// ||指示器名称。 /// </summary> public string name { get { return m_Name; } set { m_Name = value; } } /// <summary> /// The maximum value of indicator, with default value of 0, but we recommend to set it manually. - /// |指示器的最大值,默认为 0 无限制。 + /// ||指示器的最大值,默认为 0 无限制。 /// </summary> public double max { get { return m_Max; } set { m_Max = value; } } /// <summary> /// The minimum value of indicator, with default value of 0. - /// |指示器的最小值,默认为 0 无限制。 + /// ||指示器的最小值,默认为 0 无限制。 /// </summary> public double min { get { return m_Min; } set { m_Min = value; } } /// <summary> /// the text conponent of indicator. - /// |指示器的文本组件。 + /// ||指示器的文本组件。 /// </summary> public Text text { get; set; } /// <summary> /// Normal range. When the value is outside this range, the display color is automatically changed. - /// |正常值范围。当数值不在这个范围时,会自动变更显示颜色。 + /// ||正常值范围。当数值不在这个范围时,会自动变更显示颜色。 /// </summary> public double[] range { @@ -117,12 +117,12 @@ namespace XCharts.Runtime /// <summary> /// [default:true] /// Set this to false to prevent the radar from showing. - /// |是否显示雷达坐标系组件。 + /// ||是否显示雷达坐标系组件。 /// </summary> public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } } /// <summary> /// Index of layout component that serie uses. Default is -1 means not use layout, otherwise use the first layout component. - /// |所使用的 layout 组件的 index。 默认为-1不指定index, 当为大于或等于0时, 为第一个layout组件的第index个格子。 + /// ||所使用的 layout 组件的 index。 默认为-1不指定index, 当为大于或等于0时, 为第一个layout组件的第index个格子。 /// </summary> public int gridIndex { @@ -131,9 +131,8 @@ namespace XCharts.Runtime } /// <summary> /// Radar render type, in which 'Polygon' and 'Circle' are supported. - /// |雷达图绘制类型,支持 'Polygon' 和 'Circle'。 + /// ||雷达图绘制类型,支持 'Polygon' 和 'Circle'。 /// </summary> - /// <value></value> public Shape shape { get { return m_Shape; } @@ -141,7 +140,7 @@ namespace XCharts.Runtime } /// <summary> /// the radius of radar. - /// |雷达图的半径。 + /// ||雷达图的半径。 /// </summary> public float radius { @@ -150,7 +149,7 @@ namespace XCharts.Runtime } /// <summary> /// Segments of indicator axis. - /// |指示器轴的分割段数。 + /// ||指示器轴的分割段数。 /// </summary> public int splitNumber { @@ -159,7 +158,7 @@ namespace XCharts.Runtime } /// <summary> /// the center of radar chart. - /// |雷达图的中心点。数组的第一项是横坐标,第二项是纵坐标。 + /// ||雷达图的中心点。数组的第一项是横坐标,第二项是纵坐标。 /// 当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 /// </summary> public float[] center @@ -169,7 +168,7 @@ namespace XCharts.Runtime } /// <summary> /// axis line. - /// |轴线。 + /// ||轴线。 /// </summary> public AxisLine axisLine { @@ -178,7 +177,7 @@ namespace XCharts.Runtime } /// <summary> /// Name options for radar indicators. - /// |雷达图每个指示器名称的配置项。 + /// ||雷达图每个指示器名称的配置项。 /// </summary> public AxisName axisName { @@ -187,7 +186,7 @@ namespace XCharts.Runtime } /// <summary> /// split line. - /// |分割线。 + /// ||分割线。 /// </summary> public AxisSplitLine splitLine { @@ -196,7 +195,7 @@ namespace XCharts.Runtime } /// <summary> /// Split area of axis in grid area. - /// |分割区域。 + /// ||分割区域。 /// </summary> public AxisSplitArea splitArea { @@ -205,7 +204,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show indicator. - /// |是否显示指示器。 + /// ||是否显示指示器。 /// </summary> public bool indicator { @@ -214,7 +213,7 @@ namespace XCharts.Runtime } /// <summary> /// The gap of indicator and radar. - /// |指示器和雷达的间距。 + /// ||指示器和雷达的间距。 /// </summary> public float indicatorGap { @@ -223,7 +222,7 @@ namespace XCharts.Runtime } /// <summary> /// The ratio of maximum and minimum values rounded upward. The default is 0, which is automatically calculated. - /// |最大最小值向上取整的倍率。默认为0时自动计算。 + /// ||最大最小值向上取整的倍率。默认为0时自动计算。 /// </summary> public double ceilRate { @@ -240,7 +239,7 @@ namespace XCharts.Runtime } /// <summary> /// The position type of indicator. - /// |显示位置类型。 + /// ||显示位置类型。 /// </summary> public PositionType positionType { @@ -249,7 +248,7 @@ namespace XCharts.Runtime } /// <summary> /// The color displayed when data out of range. - /// |数值超出范围时显示的颜色。 + /// ||数值超出范围时显示的颜色。 /// </summary> public Color32 outRangeColor { @@ -258,7 +257,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether serie data connect to radar center with line. - /// |数值是否连线到中心点。 + /// ||数值是否连线到中心点。 /// </summary> public bool connectCenter { @@ -267,7 +266,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether need gradient for data line. - /// |数值线段是否需要渐变。 + /// ||数值线段是否需要渐变。 /// </summary> public bool lineGradient { @@ -284,7 +283,7 @@ namespace XCharts.Runtime } /// <summary> /// the indicator list. - /// |指示器列表。 + /// ||指示器列表。 /// </summary> public List<Indicator> indicatorList { get { return m_IndicatorList; } } diff --git a/Runtime/Component/Radar/RadarCoordContext.cs b/Runtime/Component/Radar/RadarCoordContext.cs index dc45f606..e30da0cf 100644 --- a/Runtime/Component/Radar/RadarCoordContext.cs +++ b/Runtime/Component/Radar/RadarCoordContext.cs @@ -8,12 +8,12 @@ namespace XCharts.Runtime { /// <summary> /// the center position of radar in container. - /// |雷达图在容器中的具体中心点。 + /// ||雷达图在容器中的具体中心点。 /// </summary> public Vector3 center { get; internal set; } /// <summary> /// the true radius of radar. - /// |雷达图的运行时实际半径。 + /// ||雷达图的运行时实际半径。 /// </summary> public float radius { get; internal set; } public float dataRadius { get; internal set; } diff --git a/Runtime/Component/Settings/Settings.cs b/Runtime/Component/Settings/Settings.cs index c450f7a9..6a073339 100644 --- a/Runtime/Component/Settings/Settings.cs +++ b/Runtime/Component/Settings/Settings.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Global parameter setting component. The default value can be used in general, and can be adjusted when necessary. - /// |全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 + /// ||全局参数设置组件。一般情况下可使用默认值,当有需要时可进行调整。 /// </summary> [Serializable] public class Settings : MainComponent @@ -28,7 +28,7 @@ namespace XCharts.Runtime public bool show { get { return m_Show; } } /// <summary> /// max painter. - /// |设定的painter数量。 + /// ||设定的painter数量。 /// </summary> public int maxPainter { @@ -78,7 +78,7 @@ namespace XCharts.Runtime /// <summary> /// Curve smoothing factor. By adjusting the smoothing coefficient, the curvature of the curve can be changed, /// and different curves with slightly different appearance can be obtained. - /// |曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。 + /// ||曲线平滑系数。通过调整平滑系数可以改变曲线的曲率,得到外观稍微有变化的不同曲线。 /// </summary> public float lineSmoothStyle { @@ -87,10 +87,9 @@ namespace XCharts.Runtime } /// <summary> /// Smoothness of curve. The smaller the value, the smoother the curve, but the number of vertices will increase. - /// |When the area with gradient is filled, the larger the value, the worse the transition effect. - /// |曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 + /// ||When the area with gradient is filled, the larger the value, the worse the transition effect. + /// ||曲线平滑度。值越小曲线越平滑,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 /// </summary> - /// <value></value> public float lineSmoothness { get { return m_LineSmoothness; } @@ -100,9 +99,8 @@ namespace XCharts.Runtime /// The partition distance of a line segment. A line in a normal line chart is made up of many segments, /// the number of which is determined by the change in value. The smaller the number of segments, /// the higher the number of vertices. When the area with gradient is filled, the larger the value, the worse the transition effect. - /// |线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 + /// ||线段的分割距离。普通折线图的线是由很多线段组成,段数由该数值决定。值越小段数越多,但顶点数也会随之增加。当开启有渐变的区域填充时,数值越大渐变过渡效果越差。 /// </summary> - /// <value></value> public float lineSegmentDistance { get { return m_LineSegmentDistance; } @@ -110,7 +108,7 @@ namespace XCharts.Runtime } /// <summary> /// the smoothess of cricle. - /// |圆形的平滑度。数越小圆越平滑,但顶点数也会随之增加。 + /// ||圆形的平滑度。数越小圆越平滑,但顶点数也会随之增加。 /// </summary> public float cicleSmoothness { @@ -120,7 +118,7 @@ namespace XCharts.Runtime /// <summary> /// the width of line serie legend. - /// |Line类型图例图标的线条宽度。 + /// ||Line类型图例图标的线条宽度。 /// </summary> public float legendIconLineWidth { @@ -130,7 +128,7 @@ namespace XCharts.Runtime /// <summary> /// The radius of rounded corner. Its unit is px. Use array to respectively specify the 4 corner radiuses((clockwise upper left, upper right, bottom right and bottom left)). - /// |图例圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 + /// ||图例圆角半径。用数组分别指定4个圆角半径(顺时针左上,右上,右下,左下)。 /// </summary> public float[] legendIconCornerRadius { @@ -140,7 +138,7 @@ namespace XCharts.Runtime /// <summary> /// the max splitnumber of axis. - /// |坐标轴最大分隔段数。段数过大时可能会生成较多的label节点。 + /// ||坐标轴最大分隔段数。段数过大时可能会生成较多的label节点。 /// </summary> public float axisMaxSplitNumber { diff --git a/Runtime/Component/State/BlurStyle.cs b/Runtime/Component/State/BlurStyle.cs index 8f67f5e9..fea2cd07 100644 --- a/Runtime/Component/State/BlurStyle.cs +++ b/Runtime/Component/State/BlurStyle.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Configurations of blur state. - /// |淡出状态样式。 + /// ||淡出状态样式。 /// </summary> [System.Serializable] [Since("v3.2.0")] diff --git a/Runtime/Component/State/EmphasisStyle.cs b/Runtime/Component/State/EmphasisStyle.cs index 9719ae47..19c6e62f 100644 --- a/Runtime/Component/State/EmphasisStyle.cs +++ b/Runtime/Component/State/EmphasisStyle.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Configurations of emphasis state. - /// |高亮状态样式。 + /// ||高亮状态样式。 /// </summary> [System.Serializable] [Since("v3.2.0")] @@ -12,45 +12,45 @@ namespace XCharts.Runtime { /// <summary> /// focus type. - /// |聚焦类型。 + /// ||聚焦类型。 /// </summary> public enum FocusType { /// <summary> /// Do not fade out other data, it's by default. - /// |不淡出其它图形,默认使用该配置。 + /// ||不淡出其它图形,默认使用该配置。 /// </summary> None, /// <summary> /// Only focus (not fade out) the element of the currently highlighted data. - /// |只聚焦(不淡出)当前高亮的数据的图形。 + /// ||只聚焦(不淡出)当前高亮的数据的图形。 /// </summary> Self, /// <summary> /// Focus on all elements of the series which the currently highlighted data belongs to. - /// |聚焦当前高亮的数据所在的系列的所有图形。 + /// ||聚焦当前高亮的数据所在的系列的所有图形。 /// </summary> Series } /// <summary> /// blur scope. - /// |淡出范围。 + /// ||淡出范围。 /// </summary> public enum BlurScope { /// <summary> /// coordinate system. - /// |淡出范围为坐标系,默认使用该配置。 + /// ||淡出范围为坐标系,默认使用该配置。 /// </summary> GridCoord, /// <summary> /// series. - /// |淡出范围为系列。 + /// ||淡出范围为系列。 /// </summary> Series, /// <summary> /// global. - /// |淡出范围为全局。 + /// ||淡出范围为全局。 /// </summary> Global } @@ -61,7 +61,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to scale to highlight the data in emphasis state. - /// |高亮时的缩放倍数。 + /// ||高亮时的缩放倍数。 /// </summary> public float scale { @@ -70,7 +70,7 @@ namespace XCharts.Runtime } /// <summary> /// When the data is highlighted, whether to fade out of other data to focus the highlighted. - /// |在高亮图形时,是否淡出其它数据的图形已达到聚焦的效果。 + /// ||在高亮图形时,是否淡出其它数据的图形已达到聚焦的效果。 /// </summary> public FocusType focus { @@ -79,7 +79,7 @@ namespace XCharts.Runtime } /// <summary> /// The range of fade out when focus is enabled. - /// |在开启focus的时候,可以通过blurScope配置淡出的范围。 + /// ||在开启focus的时候,可以通过blurScope配置淡出的范围。 /// </summary> public BlurScope blurScope { diff --git a/Runtime/Component/State/SelectStyle.cs b/Runtime/Component/State/SelectStyle.cs index 7357a216..c72eb72d 100644 --- a/Runtime/Component/State/SelectStyle.cs +++ b/Runtime/Component/State/SelectStyle.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Configurations of select state. - /// |选中状态样式。 + /// ||选中状态样式。 /// </summary> [System.Serializable] [Since("v3.2.0")] diff --git a/Runtime/Component/State/StateStyle.cs b/Runtime/Component/State/StateStyle.cs index 847108ce..66f04415 100644 --- a/Runtime/Component/State/StateStyle.cs +++ b/Runtime/Component/State/StateStyle.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// the state style of serie. - /// |Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种状态。 + /// ||Serie的状态样式。Serie的状态有正常,高亮,淡出,选中四种状态。 /// </summary> [System.Serializable] [Since("v3.2.0")] diff --git a/Runtime/Component/Title/Title.cs b/Runtime/Component/Title/Title.cs index ac4ca74d..2ed68335 100644 --- a/Runtime/Component/Title/Title.cs +++ b/Runtime/Component/Title/Title.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Title component, including main title and subtitle. - /// |标题组件,包含主标题和副标题。 + /// ||标题组件,包含主标题和副标题。 /// </summary> [Serializable] [ComponentHandler(typeof(TitleHander), true)] @@ -22,17 +22,17 @@ namespace XCharts.Runtime /// <summary> /// [default:true] /// Set this to false to prevent the title from showing. - /// |是否显示标题组件。 + /// ||是否显示标题组件。 /// </summary> public bool show { get { return m_Show; } set { if (PropertyUtil.SetStruct(ref m_Show, value)) SetComponentDirty(); } } /// <summary> /// The main title text, supporting \n for newlines. - /// |主标题文本,支持使用 \n 换行。 + /// ||主标题文本,支持使用 \n 换行。 /// </summary> public string text { get { return m_Text; } set { if (PropertyUtil.SetClass(ref m_Text, value)) SetComponentDirty(); } } /// <summary> /// The text style of main title. - /// |主标题文本样式。 + /// ||主标题文本样式。 /// </summary> public LabelStyle labelStyle { @@ -41,7 +41,7 @@ namespace XCharts.Runtime } /// <summary> /// Subtitle text, supporting for \n for newlines. - /// |副标题文本,支持使用 \n 换行。 + /// ||副标题文本,支持使用 \n 换行。 /// </summary> public string subText { @@ -50,7 +50,7 @@ namespace XCharts.Runtime } /// <summary> /// The text style of sub title. - /// |副标题文本样式。 + /// ||副标题文本样式。 /// </summary> public LabelStyle subLabelStyle { @@ -60,7 +60,7 @@ namespace XCharts.Runtime /// <summary> /// [default:8] /// The gap between the main title and subtitle. - /// |主副标题之间的间距。 + /// ||主副标题之间的间距。 /// </summary> public float itemGap { @@ -69,7 +69,7 @@ namespace XCharts.Runtime } /// <summary> /// The location of title component. - /// |标题显示位置。 + /// ||标题显示位置。 /// </summary> public Location location { diff --git a/Runtime/Component/Title/TitleHandler.cs b/Runtime/Component/Title/TitleHandler.cs index a0437acb..e059352c 100644 --- a/Runtime/Component/Title/TitleHandler.cs +++ b/Runtime/Component/Title/TitleHandler.cs @@ -62,7 +62,7 @@ namespace XCharts.Runtime if (FormatterHelper.NeedFormat(title.text)) { var content = title.text; - FormatterHelper.ReplaceContent(ref content, 0, title.labelStyle.numericFormatter, null, chart); + FormatterHelper.ReplaceContent(ref content, -1, title.labelStyle.numericFormatter, null, chart); return content; } else @@ -76,7 +76,7 @@ namespace XCharts.Runtime if (FormatterHelper.NeedFormat(title.subText)) { var content = title.subText; - FormatterHelper.ReplaceContent(ref content, 0, title.subLabelStyle.numericFormatter, null, chart); + FormatterHelper.ReplaceContent(ref content, -1, title.subLabelStyle.numericFormatter, null, chart); return content; } else diff --git a/Runtime/Component/Title/TitleStyle.cs b/Runtime/Component/Title/TitleStyle.cs index 647eb517..9b405ab8 100644 --- a/Runtime/Component/Title/TitleStyle.cs +++ b/Runtime/Component/Title/TitleStyle.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// the title of serie. - /// |标题相关设置。 + /// ||标题相关设置。 /// </summary> [Serializable] public class TitleStyle : LabelStyle, ISerieDataComponent, ISerieComponent diff --git a/Runtime/Component/Tooltip/Tooltip.cs b/Runtime/Component/Tooltip/Tooltip.cs index eea09674..d737f210 100644 --- a/Runtime/Component/Tooltip/Tooltip.cs +++ b/Runtime/Component/Tooltip/Tooltip.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// Tooltip component. - /// |提示框组件。 + /// ||提示框组件。 /// </summary> [System.Serializable] [ComponentHandler(typeof(TooltipHandler), true)] @@ -14,88 +14,88 @@ namespace XCharts.Runtime { /// <summary> /// Indicator type. - /// |指示器类型。 + /// ||指示器类型。 /// </summary> public enum Type { /// <summary> /// line indicator. - /// |直线指示器 + /// ||直线指示器 /// </summary> Line, /// <summary> /// shadow crosshair indicator. - /// |阴影指示器 + /// ||阴影指示器 /// </summary> Shadow, /// <summary> /// no indicator displayed. - /// |无指示器 + /// ||无指示器 /// </summary> None, /// <summary> /// crosshair indicator, which is actually the shortcut of enable two axisPointers of two orthometric axes. - /// |十字准星指示器。坐标轴显示Label和交叉线。 + /// ||十字准星指示器。坐标轴显示Label和交叉线。 /// </summary> Corss, /// <summary> /// Auto select indicator according to serie type. - /// |根据serie的类型自动选择显示指示器。 + /// ||根据serie的类型自动选择显示指示器。 /// </summary> Auto } /// <summary> /// Trigger strategy. - /// |触发类型。 + /// ||触发类型。 /// </summary> public enum Trigger { /// <summary> /// Triggered by data item, which is mainly used for charts that don't have a category axis like scatter charts or pie charts. - /// |数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。 + /// ||数据项图形触发,主要在散点图,饼图等无类目轴的图表中使用。 /// </summary> Item, /// <summary> /// Triggered by axes, which is mainly used for charts that have category axes, like bar charts or line charts. - /// |坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。 + /// ||坐标轴触发,主要在柱状图,折线图等会使用类目轴的图表中使用。 /// </summary> Axis, /// <summary> /// Trigger nothing. - /// |什么都不触发。 + /// ||什么都不触发。 /// </summary> None, /// <summary> /// Auto select trigger according to serie type. - /// |根据serie的类型自动选择触发类型。 + /// ||根据serie的类型自动选择触发类型。 /// </summary> Auto } /// <summary> /// Position type. - /// |坐标类型。 + /// ||坐标类型。 /// </summary> public enum Position { /// <summary> /// Auto. The mobile platform is displayed at the top, and the non-mobile platform follows the mouse position. - /// |自适应。移动平台靠顶部显示,非移动平台跟随鼠标位置。 + /// ||自适应。移动平台靠顶部显示,非移动平台跟随鼠标位置。 /// </summary> Auto, /// <summary> /// Custom. Fully customize display position (x,y). - /// |自定义。完全自定义显示位置(x,y)。 + /// ||自定义。完全自定义显示位置(x,y)。 /// </summary> Custom, /// <summary> /// Just fix the coordinate X. Y follows the mouse position. - /// |只固定坐标X。Y跟随鼠标位置。 + /// ||只固定坐标X。Y跟随鼠标位置。 /// </summary> FixedX, /// <summary> /// Just fix the coordinate Y. X follows the mouse position. - /// |只固定坐标Y。X跟随鼠标位置。 + /// ||只固定坐标Y。X跟随鼠标位置。 FixedY } @@ -146,7 +146,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show the tooltip component. - /// |是否显示提示框组件。 + /// ||是否显示提示框组件。 /// </summary> public bool show { @@ -155,7 +155,7 @@ namespace XCharts.Runtime } /// <summary> /// Indicator type. - /// |提示框指示器类型。 + /// ||提示框指示器类型。 /// </summary> public Type type { @@ -164,7 +164,7 @@ namespace XCharts.Runtime } /// <summary> /// Type of triggering. - /// |触发类型。 + /// ||触发类型。 /// </summary> public Trigger trigger { @@ -173,7 +173,7 @@ namespace XCharts.Runtime } /// <summary> /// Type of position. - /// |显示位置类型。 + /// ||显示位置类型。 /// </summary> public Position position { @@ -181,10 +181,25 @@ namespace XCharts.Runtime set { if (PropertyUtil.SetStruct(ref m_Position, value)) SetAllDirty(); } } /// <summary> - /// The string template formatter for the tooltip title content. Support for wrapping lines with \n. - /// The placeholder {I} can be set separately to indicate that the title is ignored and not displayed. - /// Template see itemFormatter. - /// |提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。 + /// String template formatter for tooltip title content. \n line wrapping is supported. The placeholder {i} can be set separately to indicate that title is ignored and not displayed. + /// Template variables are {.}, {a}, {b}, {c}, {d}, {e}, {f}, and {g}. <br /> + /// {.} is the dot of the corresponding color of serie currently indicated or index 0. <br /> + /// {a} is the series name name of serie currently indicated or index 0. <br /> + /// {b} is the name of the serie data item serieData currently indicated or index 0, or the category value (such as the X-axis of a line chart). <br /> + /// {c} is the value of the serie y-dimension (dimesion is 1) currently indicated or index is 0. <br /> + /// {d} is the serie y-dimensional (dimesion 1) percentage value of the currently indicated or index 0, note without the % sign. <br /> + /// {e} is the name of the serie data item serieData currently indicated or whose index is 0. <br /> + /// {h} is the hexadecimal color value of serieData for the serie data item currently indicated or index 0. <br /> + /// {f} is the sum of data. <br /> + /// {g} indicates the total number of data. <br /> + /// {.1} represents a dot of the corresponding color with serie specified as index 1. <br /> + /// The 1 in {a1}, {b1}, {c1} represents serie where index is specified as 1. <br /> + /// {c1:2} represents the third data of the current indicator data item in serie with index 1 (one data item has multiple data, index 2 represents the third data). <br /> + /// {c1:2-2} represents the third data of serie third data item with index 1 (that is, the number of data items must be specified when specifying the number of data items). <br /> + /// {d1:2:f2} indicates that a format string with a single value is f2 (numericFormatter is used if no value is specified). <br /> + /// {d:0.##} indicates that the format string with a value specified alone is 0.## # (for percentages, preserving a 2-digit significant number while avoiding the "100.00%" situation with f2). <br /> + /// example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1}, {c1:1-1: f1}" + /// ||提示框标题内容的字符串模版格式器。支持用 \n 换行。可以单独设置占位符{i}表示忽略不显示title。 /// 模板变量有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}。<br/> /// {.}为当前所指示或index为0的serie的对应颜色的圆点。<br/> /// {a}为当前所指示或index为0的serie的系列名name。<br/> @@ -203,7 +218,6 @@ namespace XCharts.Runtime /// {d:0.##} 表示单独指定了数值的格式化字符串为 0.## (用于百分比,保留2位有效数同时又能避免使用 f2 而出现的类似于"100.00%"的情况 )。<br/> /// 示例:"{a}:{c}"、"{a1}:{c1:f1}"、"{a1}:{c1:0:f1}"、"{a1}:{c1:1-1:f1}" /// </summary> - /// </summary> public string titleFormatter { get { return m_TitleFormatter; } set { m_TitleFormatter = value; } } /// <summary> /// a string template formatter for a single Serie or data item content. Support for wrapping lines with \n. @@ -222,7 +236,7 @@ namespace XCharts.Runtime /// {d1:2: F2} indicates that a formatted string with a value specified separately is F2 (numericFormatter is used when numericFormatter is not specified).<br/> /// {d:0.##} indicates that a formatted string with a value specified separately is 0.## (used for percentage, reserved 2 valid digits while avoiding the situation similar to "100.00%" when using f2 ).<br/> /// Example: "{a}, {c}", "{a1}, {c1: f1}", "{a1}, {c1:0: f1}", "{a1} : {c1:1-1: f1}"<br/> - /// |提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。用|来表示多个列的分隔。 + /// ||提示框单个serie或数据项内容的字符串模版格式器。支持用 \n 换行。用|来表示多个列的分隔。 /// 模板变量有{.}、{a}、{b}、{c}、{d}、{e}、{f}、{g}。<br/> /// {i}或-表示忽略当前项。 /// {.}为当前所指示的serie或数据项的对应颜色的圆点。<br/> @@ -237,104 +251,106 @@ namespace XCharts.Runtime /// {c0}表示当前数据项维度为0的数据。<br/> /// {c1}表示当前数据项维度为1的数据。<br/> /// {d3}表示维度3的数据的百分比。它的分母是默认维度(一般是1维度)数据。<br/> - /// |表示多个列的分隔。<br> + /// |表示多个列的分隔。<br/> /// 示例:"{i}", "{.}|{a}|{c}", "{.}|{b}|{c2:f2}" /// </summary> public string itemFormatter { get { return m_ItemFormatter; } set { m_ItemFormatter = value; } } /// <summary> - /// the marker of serie. - /// |serie的符号标志。 + /// Standard number and date format string. Used to format a Double value or a DateTime date as a string. numericFormatter is used as an argument to either `Double.ToString ()` or `DateTime.ToString()`. <br /> + /// The number format uses the Axx format: A is a single-character format specifier that supports C currency, D decimal, E exponent, F fixed-point number, G regular, N digit, P percentage, R round trip, and X hexadecimal. xx is precision specification, from 0-99. E.g. F1, E2<br /> + /// Date format Common date formats are: yyyy year, MM month, dd day, HH hour, mm minute, ss second, fff millisecond. For example: yyyy-MM-dd HH:mm:ss<br /> + /// number format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings<br/> + /// date format reference: https://docs.microsoft.com/en-us/dotnet/standard/base-types/standard-numeric-format-strings<br/> + /// ||标准数字和日期格式字符串。用于将Double数值或DateTime日期格式化显示为字符串。numericFormatter用来作为Double.ToString()或DateTime.ToString()的参数。<br/> + /// 数字格式使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。如:F1, E2<br/> + /// 日期格式常见的格式:yyyy年,MM月,dd日,HH时,mm分,ss秒,fff毫秒。如:yyyy-MM-dd HH:mm:ss<br/> + /// 数值格式化参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings <br/> + /// 日期格式化参考:https://learn.microsoft.com/zh-cn/dotnet/standard/base-types/standard-date-and-time-format-strings /// </summary> - public string marker { get { return m_Marker; } set { m_Marker = value; } } - /// <summary> - /// Fixed width. Higher priority than minWidth. - /// |固定宽度。比 minWidth 优先。 - /// </summary> - public float fixedWidth { get { return m_FixedWidth; } set { m_FixedWidth = value; } } - /// <summary> - /// Fixed height. Higher priority than minHeight. - /// |固定高度。比 minHeight 优先。 - /// </summary> - public float fixedHeight { get { return m_FixedHeight; } set { m_FixedHeight = value; } } - /// <summary> - /// Minimum width. If fixedWidth has a value, get fixedWidth first. - /// |最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。 - /// </summary> - public float minWidth { get { return m_MinWidth; } set { m_MinWidth = value; } } - /// <summary> - /// Minimum height. If fixedHeight has a value, take priority over fixedHeight. - /// |最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。 - /// </summary> - public float minHeight { get { return m_MinHeight; } set { m_MinHeight = value; } } - /// <summary> - /// Standard numeric format string. Used to format numeric values to display as strings. - /// Using 'Axx' form: 'A' is the single character of the format specifier, supporting 'C' currency, - /// 'D' decimal, 'E' exponent, 'F' number of vertices, 'G' regular, 'N' digits, 'P' percentage, - /// 'R' round tripping, 'X' hex etc. 'XX' is the precision specification, from '0' - '99'. - /// |标准数字格式字符串。用于将数值格式化显示为字符串。 - /// 使用Axx的形式:A是格式说明符的单字符,支持C货币、D十进制、E指数、F定点数、G常规、N数字、P百分比、R往返、X十六进制的。xx是精度说明,从0-99。 - /// 参考:https://docs.microsoft.com/zh-cn/dotnet/standard/base-types/standard-numeric-format-strings - /// </summary> - /// <value></value> public string numericFormatter { get { return m_NumericFormatter; } set { if (PropertyUtil.SetClass(ref m_NumericFormatter, value)) SetComponentDirty(); } } /// <summary> + /// the marker of serie. + /// ||serie的符号标志。 + /// </summary> + public string marker { get { return m_Marker; } set { m_Marker = value; } } + /// <summary> + /// Fixed width. Higher priority than minWidth. + /// ||固定宽度。比 minWidth 优先。 + /// </summary> + public float fixedWidth { get { return m_FixedWidth; } set { m_FixedWidth = value; } } + /// <summary> + /// Fixed height. Higher priority than minHeight. + /// ||固定高度。比 minHeight 优先。 + /// </summary> + public float fixedHeight { get { return m_FixedHeight; } set { m_FixedHeight = value; } } + /// <summary> + /// Minimum width. If fixedWidth has a value, get fixedWidth first. + /// ||最小宽度。如若 fixedWidth 设有值,优先取 fixedWidth。 + /// </summary> + public float minWidth { get { return m_MinWidth; } set { m_MinWidth = value; } } + /// <summary> + /// Minimum height. If fixedHeight has a value, take priority over fixedHeight. + /// ||最小高度。如若 fixedHeight 设有值,优先取 fixedHeight。 + /// </summary> + public float minHeight { get { return m_MinHeight; } set { m_MinHeight = value; } } + /// <summary> /// the text padding of left and right. defaut:5. - /// |左右边距。 + /// ||左右边距。 /// </summary> public int paddingLeftRight { get { return m_PaddingLeftRight; } set { m_PaddingLeftRight = value; } } /// <summary> /// the text padding of top and bottom. defaut:5. - /// |上下边距。 + /// ||上下边距。 /// </summary> public int paddingTopBottom { get { return m_PaddingTopBottom; } set { m_PaddingTopBottom = value; } } /// <summary> /// Whether to show ignored data on tooltip. - /// |是否显示忽略数据在tooltip上。 + /// ||是否显示忽略数据在tooltip上。 /// </summary> public bool ignoreDataShow { get { return m_IgnoreDataShow; } set { m_IgnoreDataShow = value; } } /// <summary> /// The default display character information for ignored data. - /// |被忽略数据的默认显示字符信息。如果设置为空,则表示完全不显示忽略数据。 + /// ||被忽略数据的默认显示字符信息。如果设置为空,则表示完全不显示忽略数据。 /// </summary> public string ignoreDataDefaultContent { get { return m_IgnoreDataDefaultContent; } set { m_IgnoreDataDefaultContent = value; } } /// <summary> /// The background image of tooltip. - /// |提示框的背景图片。 + /// ||提示框的背景图片。 /// </summary> public Sprite backgroundImage { get { return m_BackgroundImage; } set { m_BackgroundImage = value; SetComponentDirty(); } } /// <summary> /// The background type of tooltip. - /// |提示框的背景图片显示类型。 + /// ||提示框的背景图片显示类型。 /// </summary> public Image.Type backgroundType { get { return m_BackgroundType; } set { m_BackgroundType = value; SetComponentDirty(); } } /// <summary> /// The background color of tooltip. - /// |提示框的背景颜色。 + /// ||提示框的背景颜色。 /// </summary> public Color backgroundColor { get { return m_BackgroundColor; } set { m_BackgroundColor = value; SetComponentDirty(); } } /// <summary> /// Whether to trigger after always display. - /// |是否触发后一直显示提示框浮层。 + /// ||是否触发后一直显示提示框浮层。 /// </summary> public bool alwayShowContent { get { return m_AlwayShowContent; } set { m_AlwayShowContent = value; } } /// <summary> /// Whether to show the tooltip floating layer, whose default value is true. /// It should be configurated to be false, if you only need tooltip to trigger the event or show the axisPointer without content. - /// |是否显示提示框浮层,默认显示。只需tooltip触发事件或显示axisPointer而不需要显示内容时可配置该项为false。 + /// ||是否显示提示框浮层,默认显示。只需tooltip触发事件或显示axisPointer而不需要显示内容时可配置该项为false。 /// </summary> public bool showContent { get { return m_ShowContent; } set { m_ShowContent = value; } } /// <summary> /// The position offset of tooltip relative to the mouse position. - /// |提示框相对于鼠标位置的偏移。 + /// ||提示框相对于鼠标位置的偏移。 /// </summary> public Vector2 offset { get { return m_Offset; } set { m_Offset = value; } } /// <summary> /// the width of tooltip border. - /// |边框线宽。 + /// ||边框线宽。 /// </summary> public float borderWidth { @@ -343,7 +359,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of tooltip border. - /// |边框颜色。 + /// ||边框颜色。 /// </summary> public Color32 borderColor { @@ -352,7 +368,7 @@ namespace XCharts.Runtime } /// <summary> /// the x positionn of fixedX. - /// |固定X位置的坐标。 + /// ||固定X位置的坐标。 /// </summary> public float fixedX { @@ -361,7 +377,7 @@ namespace XCharts.Runtime } /// <summary> /// the y position of fixedY. - /// |固定Y位置的坐标。 + /// ||固定Y位置的坐标。 /// </summary> public float fixedY { @@ -370,7 +386,7 @@ namespace XCharts.Runtime } /// <summary> /// height of title text. - /// |标题文本的高。 + /// ||标题文本的高。 /// </summary> public float titleHeight { @@ -379,7 +395,7 @@ namespace XCharts.Runtime } /// <summary> /// height of content text. - /// |数据项文本的高。 + /// ||数据项文本的高。 /// </summary> public float itemHeight { @@ -388,7 +404,7 @@ namespace XCharts.Runtime } /// <summary> /// the textstyle of title. - /// |标题的文本样式。 + /// ||标题的文本样式。 /// </summary> public LabelStyle titleLabelStyle { @@ -397,7 +413,7 @@ namespace XCharts.Runtime } /// <summary> /// the textstyle list of content. - /// |内容部分的文本样式列表。和列一一对应。 + /// ||内容部分的文本样式列表。和列一一对应。 /// </summary> public List<LabelStyle> contentLabelStyles { @@ -407,7 +423,7 @@ namespace XCharts.Runtime /// <summary> /// the line style of indicator line. - /// |指示线样式。 + /// ||指示线样式。 /// </summary> public LineStyle lineStyle { @@ -434,14 +450,14 @@ namespace XCharts.Runtime public Dictionary<int, List<int>> runtimeSerieIndex = new Dictionary<int, List<int>>(); /// <summary> /// The data index currently indicated by Tooltip. - /// |当前提示框所指示的数据项索引。 + /// ||当前提示框所指示的数据项索引。 /// </summary> public List<int> runtimeDataIndex { get { return m_RuntimeDateIndex; } internal set { m_RuntimeDateIndex = value; } } private List<int> m_RuntimeDateIndex = new List<int>() { -1, -1 }; /// <summary> /// Keep Tooltiop displayed at the top. - /// |保持Tooltiop显示在最顶上 + /// ||保持Tooltiop显示在最顶上 /// </summary> public void KeepTop() { diff --git a/Runtime/Component/Tooltip/TooltipHandler.cs b/Runtime/Component/Tooltip/TooltipHandler.cs index 2aaa016e..4fc3007c 100644 --- a/Runtime/Component/Tooltip/TooltipHandler.cs +++ b/Runtime/Component/Tooltip/TooltipHandler.cs @@ -18,6 +18,11 @@ namespace XCharts.Runtime InitTooltip(component); } + public override void BeforceSerieUpdate() + { + UpdateTooltipData(component); + } + public override void Update() { UpdateTooltip(component); @@ -86,8 +91,9 @@ namespace XCharts.Runtime } } - private void UpdateTooltip(Tooltip tooltip) + private void UpdateTooltipData(Tooltip tooltip) { + showTooltip = false; if (tooltip.trigger == Tooltip.Trigger.None) return; if (!chart.isPointerInChart || !tooltip.show) { @@ -98,7 +104,28 @@ namespace XCharts.Runtime } return; } - var showTooltip = false; + for (int i = chart.series.Count - 1; i >= 0; i--) + { + var serie = chart.series[i]; + if (!(serie is INeedSerieContainer)) + { + showTooltip = true; + return; + } + } + containerSeries = ListPool<Serie>.Get(); + UpdatePointerContainerAndSeriesAndTooltip(tooltip, ref containerSeries); + if (containerSeries.Count > 0) + { + showTooltip = true; + } + } + + private bool showTooltip; + private List<Serie> containerSeries; + private void UpdateTooltip(Tooltip tooltip) + { + if (!showTooltip) return; for (int i = chart.series.Count - 1; i >= 0; i--) { var serie = chart.series[i]; @@ -106,20 +133,19 @@ namespace XCharts.Runtime { if (SetSerieTooltip(tooltip, serie)) { - showTooltip = true; chart.RefreshTopPainter(); return; } } } - var containerSeries = ListPool<Serie>.Get(); - UpdatePointerContainerAndSeriesAndTooltip(tooltip, ref containerSeries); - if (containerSeries.Count > 0) + if (containerSeries != null) { - if (SetSerieTooltip(tooltip, containerSeries)) - showTooltip = true; + if (!SetSerieTooltip(tooltip, containerSeries)) + { + showTooltip = false; + } + ListPool<Serie>.Release(containerSeries); } - ListPool<Serie>.Release(containerSeries); if (!showTooltip) { if (tooltip.context.type == Tooltip.Type.Corss && m_PointerContainer != null && m_PointerContainer.IsPointerEnter()) @@ -138,10 +164,6 @@ namespace XCharts.Runtime } } - private void UpdateTooltipTypeAndTrigger(Tooltip tootip) - { - } - private void UpdateTooltipIndicatorLabelText(Tooltip tooltip) { if (!tooltip.show) return; @@ -284,8 +306,10 @@ namespace XCharts.Runtime { if (isTriggerAxis) { + var index = serie.context.dataZoomStartIndex + (int)yAxis.context.pointerValue; serie.context.pointerEnter = true; - serie.context.pointerAxisDataIndexs.Add((int)yAxis.context.pointerValue); + serie.context.pointerAxisDataIndexs.Add(index); + serie.context.pointerItemDataIndex = index; yAxis.context.axisTooltipValue = yAxis.context.pointerValue; } } diff --git a/Runtime/Component/Tooltip/TooltipHelper.cs b/Runtime/Component/Tooltip/TooltipHelper.cs index eeae3318..50b5dbda 100644 --- a/Runtime/Component/Tooltip/TooltipHelper.cs +++ b/Runtime/Component/Tooltip/TooltipHelper.cs @@ -16,7 +16,7 @@ namespace XCharts.Runtime else { tooltip.context.data.title = tooltip.titleFormatter; - FormatterHelper.ReplaceContent(ref tooltip.context.data.title, 0, + FormatterHelper.ReplaceContent(ref tooltip.context.data.title, -1, tooltip.numericFormatter, null, chart); } } diff --git a/Runtime/Component/VisualMap/VisualMap.cs b/Runtime/Component/VisualMap/VisualMap.cs index 69a0a786..deee8550 100644 --- a/Runtime/Component/VisualMap/VisualMap.cs +++ b/Runtime/Component/VisualMap/VisualMap.cs @@ -39,7 +39,7 @@ namespace XCharts.Runtime /// <summary> /// VisualMap component. Mapping data to visual elements such as colors. - /// |视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 + /// ||视觉映射组件。用于进行『视觉编码』,也就是将数据映射到视觉元素(视觉通道)。 /// </summary> [System.Serializable] [ComponentHandler(typeof(VisualMapHandler), true)] @@ -108,7 +108,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to enable components. - /// |组件是否生效。 + /// ||组件是否生效。 /// </summary> public bool show { @@ -117,7 +117,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to display components. If set to false, it will not show up, but the data mapping function still exists. - /// |是否显示组件。如果设置为 false,不会显示,但是数据映射的功能还存在。 + /// ||是否显示组件。如果设置为 false,不会显示,但是数据映射的功能还存在。 /// </summary> public bool showUI { @@ -126,7 +126,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of visualmap component. - /// |组件类型。 + /// ||组件类型。 /// </summary> public Type type { @@ -135,7 +135,7 @@ namespace XCharts.Runtime } /// <summary> /// the selected mode for Piecewise visualMap. - /// |选择模式。 + /// ||选择模式。 /// </summary> public SelectedMode selectedMode { @@ -144,7 +144,7 @@ namespace XCharts.Runtime } /// <summary> /// the serie index of visualMap. - /// |影响的serie索引。 + /// ||影响的serie索引。 /// </summary> public int serieIndex { @@ -153,7 +153,7 @@ namespace XCharts.Runtime } /// <summary> /// The minimum allowed. 'min' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap. - /// | + /// || /// 允许的最小值。`autoMinMax`为`false`时必须指定。[visualMap.min, visualMap.max] 形成了视觉映射的『定义域』。 /// </summary> public double min @@ -163,7 +163,7 @@ namespace XCharts.Runtime } /// <summary> /// The maximum allowed. 'max' must be user specified. [visualmap.min, visualmap.max] forms the "domain" of the visualMap. - /// | + /// || /// 允许的最大值。`autoMinMax`为`false`时必须指定。[visualMap.min, visualMax.max] 形成了视觉映射的『定义域』。 /// </summary> public double max @@ -173,27 +173,26 @@ namespace XCharts.Runtime } /// <summary> /// Specifies the position of the numeric value corresponding to the handle. Range should be within the range of [min,max]. - /// | + /// || /// 指定手柄对应数值的位置。range 应在[min,max]范围内。 /// </summary> public double[] range { get { return m_Range; } } /// <summary> /// Text on both ends. - /// |两端的文本,如 ['High', 'Low']。 + /// ||两端的文本,如 ['High', 'Low']。 /// </summary> public string[] text { get { return m_Text; } } /// <summary> /// The distance between the two text bodies. - /// |两端文字主体之间的距离,单位为px。 + /// ||两端文字主体之间的距离,单位为px。 /// </summary> public float[] textGap { get { return m_TextGap; } } /// <summary> /// For continuous data, it is automatically evenly divided into several segments /// and automatically matches the size of inRange color list when the default is 0. - /// | + /// || /// 对于连续型数据,自动平均切分成几段,默认为0时自动匹配inRange颜色列表大小。 /// </summary> - /// <value></value> public int splitNumber { get { return m_SplitNumber; } @@ -201,7 +200,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the handle used for dragging is displayed (the handle can be dragged to adjust the selected range). - /// | + /// || /// 是否显示拖拽用的手柄(手柄能拖拽调整选中范围)。 /// </summary> public bool calculable @@ -211,7 +210,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to update in real time while dragging. - /// | + /// || /// 拖拽时,是否实时更新。 /// </summary> public bool realtime @@ -221,7 +220,7 @@ namespace XCharts.Runtime } /// <summary> /// The width of the figure, that is, the width of the color bar. - /// | + /// || /// 图形的宽度,即颜色条的宽度。 /// </summary> public float itemWidth @@ -231,7 +230,7 @@ namespace XCharts.Runtime } /// <summary> /// The height of the figure, that is, the height of the color bar. - /// | + /// || /// 图形的高度,即颜色条的高度。 /// </summary> public float itemHeight @@ -249,7 +248,7 @@ namespace XCharts.Runtime } /// <summary> /// Border line width. - /// | + /// || /// 边框线宽,单位px。 /// </summary> public float borderWidth @@ -259,8 +258,8 @@ namespace XCharts.Runtime } /// <summary> /// Specifies "which dimension" of the data to map to the visual element. "Data" is series.data. - /// |Starting at 1, the default is 0 to take the last dimension in data. - /// | + /// ||Starting at 1, the default is 0 to take the last dimension in data. + /// || /// 指定用数据的『哪个维度』,映射到视觉元素上。『数据』即 series.data。从1开始,默认为0取 data 中最后一个维度。 /// </summary> public int dimension @@ -271,13 +270,12 @@ namespace XCharts.Runtime /// <summary> /// When the hoverLink function is turned on, when the mouse hovers over the visualMap component, /// the corresponding value of the mouse position is highlighted in the corresponding graphic element in the diagram. - /// |Conversely, when the mouse hovers over a graphic element in a diagram, + /// ||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. - /// | + /// || /// 打开 hoverLink 功能时,鼠标悬浮到 visualMap 组件上时,鼠标位置对应的数值 在 图表中对应的图形元素,会高亮。 /// 反之,鼠标悬浮到图表中的图形元素上时,在 visualMap 组件的相应位置会有三角提示其所对应的数值。 /// </summary> - /// <value></value> public bool hoverLink { get { return m_HoverLink; } @@ -294,7 +292,7 @@ namespace XCharts.Runtime } /// <summary> /// Specify whether the layout of component is horizontal or vertical. - /// | + /// || /// 布局方式是横还是竖。 /// </summary> public Orient orient @@ -304,7 +302,7 @@ namespace XCharts.Runtime } /// <summary> /// The location of component. - /// |组件显示的位置。 + /// ||组件显示的位置。 /// </summary> public Location location { @@ -313,7 +311,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the visualmap is work on linestyle of linechart. - /// |组件是否对LineChart的LineStyle有效。 + /// ||组件是否对LineChart的LineStyle有效。 /// </summary> public bool workOnLine { @@ -322,7 +320,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the visualmap is work on areaStyle of linechart. - /// |组件是否对LineChart的AreaStyle有效。 + /// ||组件是否对LineChart的AreaStyle有效。 /// </summary> public bool workOnArea { @@ -331,7 +329,7 @@ namespace XCharts.Runtime } /// <summary> /// Defines a visual color outside of the selected range. - /// |定义 在选中范围外 的视觉颜色。 + /// ||定义 在选中范围外 的视觉颜色。 /// </summary> public List<VisualMapRange> outOfRange { diff --git a/Runtime/Coord/Grid/GridCoord.cs b/Runtime/Coord/Grid/GridCoord.cs index 2e2760e1..8f4ccdc4 100644 --- a/Runtime/Coord/Grid/GridCoord.cs +++ b/Runtime/Coord/Grid/GridCoord.cs @@ -7,8 +7,8 @@ namespace XCharts.Runtime { /// <summary> /// Grid component. - /// |Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. - /// |网格组件。 + /// ||Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. + /// ||网格组件。 /// 直角坐标系内绘图网格。可以在网格上绘制折线图,柱状图,散点图。 /// </summary> [Serializable] @@ -30,7 +30,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show the grid in rectangular coordinate. - /// |是否显示直角坐标系网格。 + /// ||是否显示直角坐标系网格。 /// </summary> public bool show { @@ -41,9 +41,8 @@ namespace XCharts.Runtime /// The index of the grid layout component to which the grid belongs. /// The default is -1, which means that it does not belong to any grid layout component. /// When this value is set, the left, right, top, and bottom properties will be invalid. - /// |网格所属的网格布局组件的索引。默认为-1,表示不属于任何网格布局组件。当设置了该值时,left、right、top、bottom属性将失效。 + /// ||网格所属的网格布局组件的索引。默认为-1,表示不属于任何网格布局组件。当设置了该值时,left、right、top、bottom属性将失效。 /// </summary> - /// <value></value> public int layoutIndex { get { return m_LayoutIndex; } @@ -51,7 +50,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the left side of the container. - /// |grid 组件离容器左侧的距离。 + /// ||grid 组件离容器左侧的距离。 /// </summary> public float left { @@ -60,7 +59,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the right side of the container. - /// |grid 组件离容器右侧的距离。 + /// ||grid 组件离容器右侧的距离。 /// </summary> public float right { @@ -69,7 +68,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the top side of the container. - /// |grid 组件离容器上侧的距离。 + /// ||grid 组件离容器上侧的距离。 /// </summary> public float top { @@ -78,7 +77,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the bottom side of the container. - /// |grid 组件离容器下侧的距离。 + /// ||grid 组件离容器下侧的距离。 /// </summary> public float bottom { @@ -87,7 +86,7 @@ namespace XCharts.Runtime } /// <summary> /// Background color of grid, which is transparent by default. - /// |网格背景色,默认透明。 + /// ||网格背景色,默认透明。 /// </summary> public Color32 backgroundColor { @@ -96,7 +95,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show the grid border. - /// |是否显示网格边框。 + /// ||是否显示网格边框。 /// </summary> public bool showBorder { @@ -105,7 +104,7 @@ namespace XCharts.Runtime } /// <summary> /// Border width of grid. - /// |网格边框宽。 + /// ||网格边框宽。 /// </summary> public float borderWidth { @@ -114,7 +113,7 @@ namespace XCharts.Runtime } /// <summary> /// The color of grid border. - /// |网格边框颜色。 + /// ||网格边框颜色。 /// </summary> public Color32 borderColor { @@ -151,7 +150,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the pointer is in the grid. - /// |指针是否在网格内。 + /// ||指针是否在网格内。 /// </summary> /// <returns></returns> public bool IsPointerEnter() @@ -161,7 +160,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the given position is in the grid. - /// |给定的位置是否在网格内。 + /// ||给定的位置是否在网格内。 /// </summary> /// <param name="pos"></param> /// <returns></returns> @@ -172,7 +171,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the given position is in the grid. - /// |给定的位置是否在网格内。 + /// ||给定的位置是否在网格内。 /// </summary> /// <param name="pos"></param> /// <param name="isYAxis"></param> @@ -185,7 +184,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the given position is in the grid. - /// |给定的位置是否在网格内。 + /// ||给定的位置是否在网格内。 /// </summary> /// <param name="x"></param> /// <param name="y"></param> @@ -197,7 +196,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the given x is in the grid. - /// |给定的x是否在网格内。 + /// ||给定的x是否在网格内。 /// </summary> /// <param name="x"></param> /// <returns></returns> @@ -209,7 +208,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the given y is in the grid. - /// |给定的y是否在网格内。 + /// ||给定的y是否在网格内。 /// </summary> /// <param name="y"></param> /// <returns></returns> @@ -221,7 +220,7 @@ namespace XCharts.Runtime /// <summary> /// Clamp the position of pos to the grid. - /// |将位置限制在网格内。 + /// ||将位置限制在网格内。 /// </summary> /// <param name="pos"></param> [Since("v3.7.0")] @@ -233,7 +232,7 @@ namespace XCharts.Runtime /// <summary> /// Clamp the x position of pos to the grid. - /// |将位置的X限制在网格内。 + /// ||将位置的X限制在网格内。 /// </summary> /// <param name="pos"></param> [Since("v3.7.0")] @@ -245,7 +244,7 @@ namespace XCharts.Runtime /// <summary> /// Clamp the y position of pos to the grid. - /// |将位置的Y限制在网格内。 + /// ||将位置的Y限制在网格内。 /// </summary> /// <param name="pos"></param> [Since("v3.7.0")] diff --git a/Runtime/Coord/Grid/XGridLayout.cs b/Runtime/Coord/Grid/XGridLayout.cs index 3a28fba3..a3f20b06 100644 --- a/Runtime/Coord/Grid/XGridLayout.cs +++ b/Runtime/Coord/Grid/XGridLayout.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Grid layout component. Used to manage the layout of multiple `GridCoord`, and the number of rows and columns of the grid can be controlled by `row` and `column`. - /// |网格布局组件。用于管理多个`GridCoord`的布局,可以通过`row`和`column`来控制网格的行列数。 + /// ||网格布局组件。用于管理多个`GridCoord`的布局,可以通过`row`和`column`来控制网格的行列数。 /// </summary> [Since("v3.8.0")] [Serializable] @@ -26,7 +26,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show the grid in rectangular coordinate. - /// |是否显示直角坐标系网格。 + /// ||是否显示直角坐标系网格。 /// </summary> public bool show { @@ -35,7 +35,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the left side of the container. - /// |grid 组件离容器左侧的距离。 + /// ||grid 组件离容器左侧的距离。 /// </summary> public float left { @@ -44,7 +44,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the right side of the container. - /// |grid 组件离容器右侧的距离。 + /// ||grid 组件离容器右侧的距离。 /// </summary> public float right { @@ -53,7 +53,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the top side of the container. - /// |grid 组件离容器上侧的距离。 + /// ||grid 组件离容器上侧的距离。 /// </summary> public float top { @@ -62,7 +62,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the bottom side of the container. - /// |grid 组件离容器下侧的距离。 + /// ||grid 组件离容器下侧的距离。 /// </summary> public float bottom { @@ -71,7 +71,7 @@ namespace XCharts.Runtime } /// <summary> /// the row count of grid layout. - /// |网格布局的行数。 + /// ||网格布局的行数。 /// </summary> public int row { @@ -80,7 +80,7 @@ namespace XCharts.Runtime } /// <summary> /// the column count of grid layout. - /// |网格布局的列数。 + /// ||网格布局的列数。 /// </summary> public int column { @@ -89,7 +89,7 @@ namespace XCharts.Runtime } /// <summary> /// the spacing of grid layout. - /// |网格布局的间距。 + /// ||网格布局的间距。 /// </summary> public Vector2 spacing { @@ -98,7 +98,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to inverse the grid layout. - /// |是否反转网格布局。 + /// ||是否反转网格布局。 /// </summary> public bool inverse { diff --git a/Runtime/Coord/Parallel/ParallelCoord.cs b/Runtime/Coord/Parallel/ParallelCoord.cs index ebcc2186..2628a599 100644 --- a/Runtime/Coord/Parallel/ParallelCoord.cs +++ b/Runtime/Coord/Parallel/ParallelCoord.cs @@ -5,8 +5,8 @@ namespace XCharts.Runtime { /// <summary> /// Grid component. - /// |Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. - /// |网格组件。 + /// ||Drawing grid in rectangular coordinate. Line chart, bar chart, and scatter chart can be drawn in grid. + /// ||网格组件。 /// 直角坐标系内绘图网格。可以在网格上绘制折线图,柱状图,散点图。 /// </summary> [Serializable] @@ -25,7 +25,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show the grid in rectangular coordinate. - /// |是否显示直角坐标系网格。 + /// ||是否显示直角坐标系网格。 /// </summary> public bool show { @@ -34,7 +34,7 @@ namespace XCharts.Runtime } /// <summary> /// Orientation of the axis. By default, it's 'Vertical'. You can set it to be 'Horizonal' to make a vertical axis. - /// |坐标轴朝向。默认为垂直朝向。 + /// ||坐标轴朝向。默认为垂直朝向。 /// </summary> public Orient orient { @@ -43,7 +43,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the left side of the container. - /// |grid 组件离容器左侧的距离。 + /// ||grid 组件离容器左侧的距离。 /// </summary> public float left { @@ -52,7 +52,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the right side of the container. - /// |grid 组件离容器右侧的距离。 + /// ||grid 组件离容器右侧的距离。 /// </summary> public float right { @@ -61,7 +61,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the top side of the container. - /// |grid 组件离容器上侧的距离。 + /// ||grid 组件离容器上侧的距离。 /// </summary> public float top { @@ -70,7 +70,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between grid component and the bottom side of the container. - /// |grid 组件离容器下侧的距离。 + /// ||grid 组件离容器下侧的距离。 /// </summary> public float bottom { @@ -79,7 +79,7 @@ namespace XCharts.Runtime } /// <summary> /// Background color of grid, which is transparent by default. - /// |网格背景色,默认透明。 + /// ||网格背景色,默认透明。 /// </summary> public Color backgroundColor { diff --git a/Runtime/Coord/Polar/PolarCoord.cs b/Runtime/Coord/Polar/PolarCoord.cs index 7d185f96..e0613d2b 100644 --- a/Runtime/Coord/Polar/PolarCoord.cs +++ b/Runtime/Coord/Polar/PolarCoord.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// Polar coordinate can be used in scatter and line chart. Every polar coordinate has an angleAxis and a radiusAxis. - /// |极坐标系组件。 + /// ||极坐标系组件。 /// 极坐标系,可以用于散点图和折线图。每个极坐标系拥有一个角度轴和一个半径轴。 /// </summary> [Serializable] @@ -22,7 +22,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show the polor component. - /// |是否显示极坐标。 + /// ||是否显示极坐标。 /// </summary> public bool show { @@ -32,7 +32,7 @@ namespace XCharts.Runtime /// <summary> /// The center of ploar. The center[0] is the x-coordinate, and the center[1] is the y-coordinate. /// When value between 0 and 1 represents a percentage relative to the chart. - /// |极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。 + /// ||极坐标的中心点。数组的第一项是横坐标,第二项是纵坐标。 /// 当值为0-1之间时表示百分比,设置成百分比时第一项是相对于容器宽度,第二项是相对于容器高度。 /// </summary> public float[] center @@ -42,7 +42,7 @@ namespace XCharts.Runtime } /// <summary> /// the radius of polar. - /// |半径。radius[0]表示内径,radius[1]表示外径。 + /// ||半径。radius[0]表示内径,radius[1]表示外径。 /// </summary> public float[] radius { @@ -51,7 +51,7 @@ namespace XCharts.Runtime } /// <summary> /// Background color of polar, which is transparent by default. - /// |极坐标的背景色,默认透明。 + /// ||极坐标的背景色,默认透明。 /// </summary> public Color backgroundColor { @@ -61,7 +61,7 @@ namespace XCharts.Runtime /// <summary> /// The offset of indicator label. - /// |指示器标签的偏移量。 + /// ||指示器标签的偏移量。 /// </summary> public float indicatorLabelOffset { diff --git a/Runtime/Coord/Polar/PolarCoordContext.cs b/Runtime/Coord/Polar/PolarCoordContext.cs index f2909b6f..028ce6c3 100644 --- a/Runtime/Coord/Polar/PolarCoordContext.cs +++ b/Runtime/Coord/Polar/PolarCoordContext.cs @@ -7,18 +7,18 @@ namespace XCharts.Runtime { /// <summary> /// the center position of polar in container. - /// |极坐标在容器中的具体中心点。 + /// ||极坐标在容器中的具体中心点。 /// </summary> public Vector3 center; public float radius; /// <summary> /// the true radius of polar. - /// |极坐标的运行时实际内半径。 + /// ||极坐标的运行时实际内半径。 /// </summary> public float insideRadius; /// <summary> /// the true radius of polar. - /// |极坐标的运行时实际外半径。 + /// ||极坐标的运行时实际外半径。 /// </summary> public float outsideRadius; public bool isPointerEnter; diff --git a/Runtime/Helper/FormatterHelper.cs b/Runtime/Helper/FormatterHelper.cs index 5874c618..02fcc327 100644 --- a/Runtime/Helper/FormatterHelper.cs +++ b/Runtime/Helper/FormatterHelper.cs @@ -21,7 +21,7 @@ namespace XCharts.Runtime public static bool NeedFormat(string content) { - return content.IndexOf('{') >= 0; + return !string.IsNullOrEmpty(content) && content.IndexOf('{') >= 0; } /// <summary> @@ -40,6 +40,10 @@ namespace XCharts.Runtime { var foundDot = false; var mc = s_Regex.Matches(content); + if (dataIndex < 0) + { + dataIndex = serie != null ? serie.context.pointerItemDataIndex : 0; + } foreach (var m in mc) { var old = m.ToString(); @@ -99,10 +103,10 @@ namespace XCharts.Runtime var args1Str = args[1].ToString(); if (s_RegexN.IsMatch(args1Str)) bIndex = int.Parse(args1Str); } - var needCategory = (p != 'e' && p != 'E') && serie.defaultColorBy != SerieColorBy.Data; + var needCategory = p != 'e' && p != 'E' && serie.defaultColorBy != SerieColorBy.Data; if (needCategory) { - var category = chart.GetTooltipCategory(dataIndex, serie); + var category = chart.GetTooltipCategory(serie); content = content.Replace(old, category); } else @@ -154,6 +158,7 @@ namespace XCharts.Runtime numericFormatter = SerieHelper.GetNumericFormatter(serie, serie.GetSerieData(bIndex), ""); } var value = serie.GetData(bIndex, dimensionIndex); + var ignore = serie.IsIgnoreIndex(bIndex); if (isPercent) { var total = serie.GetDataTotal(dimensionIndex, serie.GetSerieData(bIndex)); @@ -167,7 +172,10 @@ namespace XCharts.Runtime } else { - content = content.Replace(old, ChartCached.FloatToStr(value, numericFormatter)); + if (ignore) + content = content.Replace(old, "-"); + else + content = content.Replace(old, ChartCached.FloatToStr(value, numericFormatter)); } } } @@ -214,14 +222,21 @@ namespace XCharts.Runtime } else if (p == 'd' || p == 'D') { - var rate = pIndex >= 0 && serieData != null ? - (value == 0 ? 0 : serieData.GetData(pIndex) / value * 100) : - (total == 0 ? 0 : value / total * 100); - content = content.Replace(old, ChartCached.NumberToStr(rate, numericFormatter)); + if (serieData != null && serieData.ignore) + content = content.Replace(old, "-"); + else + { + var rate = pIndex >= 0 && serieData != null ? + (value == 0 ? 0 : serieData.GetData(pIndex) / value * 100) : + (total == 0 ? 0 : value / total * 100); + content = content.Replace(old, ChartCached.NumberToStr(rate, numericFormatter)); + } } else if (p == 'c' || p == 'C') { - if (pIndex >= 0 && serieData != null) + if (serieData != null && serieData.ignore) + content = content.Replace(old, "-"); + else if (serieData != null && pIndex >= 0) content = content.Replace(old, ChartCached.NumberToStr(serieData.GetData(pIndex), numericFormatter)); else content = content.Replace(old, ChartCached.NumberToStr(value, numericFormatter)); diff --git a/Runtime/I18n/Lang.cs b/Runtime/I18n/Lang.cs index eb62484b..e89b88dd 100644 --- a/Runtime/I18n/Lang.cs +++ b/Runtime/I18n/Lang.cs @@ -6,7 +6,7 @@ namespace XCharts.Runtime { /// <summary> /// Language. - /// |国际化语言表。 + /// ||国际化语言表。 /// </summary> [Serializable] [CreateAssetMenu(menuName = "XCharts/Export Lang")] diff --git a/Runtime/Internal/Attributes/SerieComponentAttribute.cs b/Runtime/Internal/Attributes/SerieComponentAttribute.cs index 13de0284..7a8890fa 100644 --- a/Runtime/Internal/Attributes/SerieComponentAttribute.cs +++ b/Runtime/Internal/Attributes/SerieComponentAttribute.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// The attribute for serie component. - /// |可添加到Serie的组件。 + /// ||可添加到Serie的组件。 /// </summary> [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class SerieComponentAttribute : Attribute diff --git a/Runtime/Internal/Attributes/SerieConvertAttribute.cs b/Runtime/Internal/Attributes/SerieConvertAttribute.cs index 6e888f96..2661d344 100644 --- a/Runtime/Internal/Attributes/SerieConvertAttribute.cs +++ b/Runtime/Internal/Attributes/SerieConvertAttribute.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// The attribute for which serie types can be converted to. - /// |可转化为哪些Serie类型。 + /// ||可转化为哪些Serie类型。 /// </summary> [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class SerieConvertAttribute : Attribute diff --git a/Runtime/Internal/Attributes/SerieDataComponentAttribute.cs b/Runtime/Internal/Attributes/SerieDataComponentAttribute.cs index a5b82cbb..bd6428eb 100644 --- a/Runtime/Internal/Attributes/SerieDataComponentAttribute.cs +++ b/Runtime/Internal/Attributes/SerieDataComponentAttribute.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// The attribute for serie data component. - /// |可添加到SerieData的组件。 + /// ||可添加到SerieData的组件。 /// </summary> [AttributeUsage(AttributeTargets.Class, AllowMultiple = true)] public sealed class SerieDataComponentAttribute : Attribute diff --git a/Runtime/Internal/BaseChart.API.cs b/Runtime/Internal/BaseChart.API.cs index 6c502c28..259c32da 100644 --- a/Runtime/Internal/BaseChart.API.cs +++ b/Runtime/Internal/BaseChart.API.cs @@ -8,13 +8,13 @@ namespace XCharts.Runtime { /// <summary> /// The base class of all charts. - /// |所有Chart的基类。 + /// ||所有Chart的基类。 /// </summary> public partial class BaseChart { /// <summary> /// The name of chart. - /// |</summary> + /// ||</summary> public string chartName { get { return m_ChartName; } @@ -32,31 +32,31 @@ namespace XCharts.Runtime } /// <summary> /// The theme. - /// |</summary> + /// ||</summary> public ThemeStyle theme { get { return m_Theme; } set { m_Theme = value; } } /// <summary> /// Global parameter setting component. - /// |全局设置组件。 + /// ||全局设置组件。 /// </summary> public Settings settings { get { return m_Settings; } } /// <summary> /// The x of chart. - /// |图表的X + /// ||图表的X /// </summary> public float chartX { get { return m_ChartX; } } /// <summary> /// The y of chart. - /// |图表的Y + /// ||图表的Y /// </summary> public float chartY { get { return m_ChartY; } } /// <summary> /// The width of chart. - /// |图表的宽 + /// ||图表的宽 /// </summary> public float chartWidth { get { return m_ChartWidth; } } /// <summary> /// The height of chart. - /// |图表的高 + /// ||图表的高 /// </summary> public float chartHeight { get { return m_ChartHeight; } } public Vector2 chartMinAnchor { get { return m_ChartMinAnchor; } } @@ -65,18 +65,18 @@ namespace XCharts.Runtime public Vector2 chartSizeDelta { get { return m_ChartSizeDelta; } } /// <summary> /// The position of chart. - /// |图表的左下角起始坐标。 + /// ||图表的左下角起始坐标。 /// </summary> public Vector3 chartPosition { get { return m_ChartPosition; } } public Rect chartRect { get { return m_ChartRect; } } /// <summary> /// The callback function of chart init. - /// |图表的初始化完成回调。 + /// ||图表的初始化完成回调。 /// </summary> public Action onInit { set { m_OnInit = value; } } /// <summary> /// The callback function of chart update. - /// |图表的Update回调。 + /// ||图表的Update回调。 /// </summary> public Action onUpdate { set { m_OnUpdate = value; } } /// <summary> @@ -105,44 +105,44 @@ namespace XCharts.Runtime public CustomDrawGaugePointerFunction customDrawGaugePointerFunction { set { m_CustomDrawGaugePointerFunction = value; } get { return m_CustomDrawGaugePointerFunction; } } /// <summary> /// the callback function of pointer click serie. - /// |鼠标点击Serie回调。 + /// ||鼠标点击Serie回调。 /// </summary> [Since("v3.6.0")] public Action<SerieEventData> onSerieClick { set { m_OnSerieClick = value; m_ForceOpenRaycastTarget = true; } get { return m_OnSerieClick; } } /// <summary> /// the callback function of pointer down serie. - /// |鼠标按下Serie回调。 + /// ||鼠标按下Serie回调。 /// </summary> [Since("v3.6.0")] public Action<SerieEventData> onSerieDown { set { m_OnSerieDown = value; m_ForceOpenRaycastTarget = true; } get { return m_OnSerieDown; } } /// <summary> /// the callback function of pointer enter serie. - /// |鼠标进入Serie回调。 + /// ||鼠标进入Serie回调。 /// </summary> [Since("v3.6.0")] public Action<SerieEventData> onSerieEnter { set { m_OnSerieEnter = value; m_ForceOpenRaycastTarget = true; } get { return m_OnSerieEnter; } } /// <summary> /// the callback function of pointer exit serie. - /// |鼠标离开Serie回调。 + /// ||鼠标离开Serie回调。 /// </summary> [Since("v3.6.0")] public Action<SerieEventData> onSerieExit { set { m_OnSerieExit = value; m_ForceOpenRaycastTarget = true; } get { return m_OnSerieExit; } } /// <summary> /// the callback function of pointer click pie area. - /// |点击饼图区域回调。参数:PointerEventData,SerieIndex,SerieDataIndex + /// ||点击饼图区域回调。参数:PointerEventData,SerieIndex,SerieDataIndex /// </summary> [Obsolete("Use \"onSerieClick\" instead", true)] public Action<PointerEventData, int, int> onPointerClickPie { get; set; } /// <summary> /// the callback function of pointer enter pie area. - /// |鼠标进入和离开饼图区域回调,SerieDataIndex为-1时表示离开。参数:PointerEventData,SerieIndex,SerieDataIndex + /// ||鼠标进入和离开饼图区域回调,SerieDataIndex为-1时表示离开。参数:PointerEventData,SerieIndex,SerieDataIndex /// </summary> [Since("v3.3.0")] [Obsolete("Use \"onSerieEnter\" instead", true)] public Action<int, int> onPointerEnterPie { set { m_OnPointerEnterPie = value; m_ForceOpenRaycastTarget = true; } get { return m_OnPointerEnterPie; } } /// <summary> /// the callback function of click bar. - /// |点击柱形图柱条回调。参数:eventData, dataIndex + /// ||点击柱形图柱条回调。参数:eventData, dataIndex /// </summary> [Obsolete("Use \"onSerieClick\" instead", true)] public Action<PointerEventData, int> onPointerClickBar { get; set; } @@ -152,17 +152,17 @@ namespace XCharts.Runtime public Action<Axis, double> onAxisPointerValueChanged { set { m_OnAxisPointerValueChanged = value; } get { return m_OnAxisPointerValueChanged; } } /// <summary> /// the callback function of click legend. - /// |点击图例按钮回调。参数:legendIndex, legendName, show + /// ||点击图例按钮回调。参数:legendIndex, legendName, show /// </summary> public Action<Legend, int, string, bool> onLegendClick { set { m_OnLegendClick = value; } internal get { return m_OnLegendClick; } } /// <summary> /// the callback function of enter legend. - /// |鼠标进入图例回调。参数:legendIndex, legendName + /// ||鼠标进入图例回调。参数:legendIndex, legendName /// </summary> public Action<Legend, int, string> onLegendEnter { set { m_OnLegendEnter = value; } internal get { return m_OnLegendEnter; } } /// <summary> /// the callback function of exit legend. - /// |鼠标退出图例回调。参数:legendIndex, legendName + /// ||鼠标退出图例回调。参数:legendIndex, legendName /// </summary> public Action<Legend, int, string> onLegendExit { set { m_OnLegendExit = value; } internal get { return m_OnLegendExit; } } public void Init(bool defaultChart = true) @@ -179,7 +179,7 @@ namespace XCharts.Runtime } /// <summary> /// Redraw chart in next frame. - /// |在下一帧刷新整个图表。 + /// ||在下一帧刷新整个图表。 /// </summary> public void RefreshChart() { @@ -197,7 +197,7 @@ namespace XCharts.Runtime /// <summary> /// Redraw chart serie in next frame. - /// |在下一帧刷新图表的指定serie。 + /// ||在下一帧刷新图表的指定serie。 /// </summary> public void RefreshChart(int serieIndex) { @@ -206,7 +206,7 @@ namespace XCharts.Runtime /// <summary> /// Redraw chart serie in next frame. - /// |在下一帧刷新图表的指定serie。 + /// ||在下一帧刷新图表的指定serie。 /// </summary> public void RefreshChart(Serie serie) { @@ -217,7 +217,7 @@ namespace XCharts.Runtime /// <summary> /// Clear all components and series data. Note: serie only empties the data and does not remove serie. - /// |清空所有组件和Serie的数据。注意:Serie只是清空数据,不会移除Serie。 + /// ||清空所有组件和Serie的数据。注意:Serie只是清空数据,不会移除Serie。 /// </summary> public virtual void ClearData() { @@ -228,7 +228,7 @@ namespace XCharts.Runtime [Since("v3.4.0")] /// <summary> /// Clear the data of all series. - /// |清空所有serie的数据。 + /// ||清空所有serie的数据。 /// </summary> public virtual void ClearSerieData() { @@ -241,7 +241,7 @@ namespace XCharts.Runtime [Since("v3.4.0")] /// <summary> /// Clear the data of all components. - /// |清空所有组件的数据。 + /// ||清空所有组件的数据。 /// </summary> public virtual void ClearComponentData() { @@ -254,7 +254,7 @@ namespace XCharts.Runtime /// <summary> /// Empty all component data and remove all series. Use the chart again and again to tell the truth. /// Note: The component only clears the data part, and the parameters are retained and not reset. - /// |清空所有组件数据,并移除所有Serie。一般在图表重新初始化时使用。 + /// ||清空所有组件数据,并移除所有Serie。一般在图表重新初始化时使用。 /// 注意:组件只清空数据部分,参数会保留不会被重置。 /// </summary> public virtual void RemoveData() @@ -269,7 +269,7 @@ namespace XCharts.Runtime /// <summary> /// Remove all of them Serie. This interface is used when Serie needs to be removed only, and RemoveData() is generally used in other cases. - /// |移除所有的Serie。当确认只需要移除Serie时使用该接口,其他情况下一般用RemoveData()。 + /// ||移除所有的Serie。当确认只需要移除Serie时使用该接口,其他情况下一般用RemoveData()。 /// </summary> [Since("v3.2.0")] public virtual void RemoveAllSerie() @@ -282,7 +282,7 @@ namespace XCharts.Runtime /// <summary> /// Remove legend and serie by name. - /// |清除指定系列名称的数据。 + /// ||清除指定系列名称的数据。 /// </summary> /// <param name="serieName">the name of serie</param> public virtual void RemoveData(string serieName) @@ -320,7 +320,7 @@ namespace XCharts.Runtime /// <summary> /// Whether serie is activated. - /// |获得指定图例名字的系列是否显示。 + /// ||获得指定图例名字的系列是否显示。 /// </summary> /// <param name="legendName"></param> /// <returns></returns> @@ -349,7 +349,7 @@ namespace XCharts.Runtime /// <summary> /// Update chart theme. - /// |切换内置主题。 + /// ||切换内置主题。 /// </summary> /// <param name="theme">theme</param> public bool UpdateTheme(ThemeType theme) @@ -367,7 +367,7 @@ namespace XCharts.Runtime /// <summary> /// Update chart theme info. - /// |切换图表主题。 + /// ||切换图表主题。 /// </summary> /// <param name="theme">theme</param> public void UpdateTheme(Theme theme) @@ -381,7 +381,7 @@ namespace XCharts.Runtime /// <summary> /// Whether enable serie animations. - /// |是否启用Serie动画。 + /// ||是否启用Serie动画。 /// </summary> /// <param name="flag"></param> public void AnimationEnable(bool flag) @@ -391,7 +391,7 @@ namespace XCharts.Runtime /// <summary> /// Start all serie fadein animations. - /// |开始所有Serie的渐入动画。 + /// ||开始所有Serie的渐入动画。 /// </summary> /// <param name="reset">reset animation</param> public void AnimationFadeIn(bool reset = true) @@ -402,7 +402,7 @@ namespace XCharts.Runtime /// <summary> /// Start all serie fadeout animations. - /// |开始所有Serie的渐出动画。 + /// ||开始所有Serie的渐出动画。 /// </summary> public void AnimationFadeOut() { @@ -411,7 +411,7 @@ namespace XCharts.Runtime /// <summary> /// Pause all animations. - /// |暂停所有Serie的动画。 + /// ||暂停所有Serie的动画。 /// </summary> public void AnimationPause() { @@ -420,7 +420,7 @@ namespace XCharts.Runtime /// <summary> /// Resume all animations. - /// |继续所有Serie的动画。 + /// ||继续所有Serie的动画。 /// </summary> public void AnimationResume() { @@ -429,7 +429,7 @@ namespace XCharts.Runtime /// <summary> /// Reset all animations. - /// |重置所有Serie的动画。 + /// ||重置所有Serie的动画。 /// </summary> public void AnimationReset() { @@ -668,7 +668,7 @@ namespace XCharts.Runtime /// <summary> /// trigger tooltip by data index. - /// |尝试触发指定数据项的Tooltip. + /// ||尝试触发指定数据项的Tooltip. /// </summary> /// <param name="dataIndex">数据项索引</param> /// <param name="serieIndex">Serie索引,默认为第0个Serie</param> @@ -698,7 +698,7 @@ namespace XCharts.Runtime /// <summary> /// trigger tooltip by chart local position. - /// |在指定的位置尝试触发Tooltip. + /// ||在指定的位置尝试触发Tooltip. /// </summary> /// <param name="localPosition"></param> /// <returns></returns> @@ -714,7 +714,7 @@ namespace XCharts.Runtime /// <summary> /// cancel tooltip. - /// |取消Tooltip. + /// ||取消Tooltip. /// </summary> [Since("v3.7.0")] public void CancelTooltip() diff --git a/Runtime/Internal/BaseChart.Component.cs b/Runtime/Internal/BaseChart.Component.cs index 4a895b8f..ac19ddc6 100644 --- a/Runtime/Internal/BaseChart.Component.cs +++ b/Runtime/Internal/BaseChart.Component.cs @@ -268,7 +268,7 @@ namespace XCharts.Runtime /// <summary> /// Ensure the chart has the component, if not, add it. /// Note: it may fail to add. - /// |确保图表有该组件,如果没有则添加。注意:有可能添加不成功。 + /// ||确保图表有该组件,如果没有则添加。注意:有可能添加不成功。 /// </summary> /// <typeparam name="T"></typeparam> /// <returns>component, or null if add failed.</returns> @@ -395,7 +395,7 @@ namespace XCharts.Runtime /// <summary> /// reutrn true when all the show axis is `Value` type. - /// |纯数值坐标轴(数值轴或对数轴)。 + /// ||纯数值坐标轴(数值轴或对数轴)。 /// </summary> public bool IsAllAxisValue() { @@ -439,31 +439,17 @@ namespace XCharts.Runtime return false; } - internal string GetTooltipCategory(int dataIndex, DataZoom dataZoom = null) - { - var xAxis = GetChartComponent<XAxis>(); - var yAxis = GetChartComponent<YAxis>(); - if (yAxis.IsCategory()) - { - return yAxis.GetData((int)yAxis.context.pointerValue, dataZoom); - } - else if (xAxis.IsCategory()) - { - return xAxis.GetData((int)xAxis.context.pointerValue, dataZoom); - } - return null; - } - internal string GetTooltipCategory(int dataIndex, Serie serie, DataZoom dataZoom = null) + internal string GetTooltipCategory(Serie serie) { var xAxis = GetChartComponent<XAxis>(serie.xAxisIndex); var yAxis = GetChartComponent<YAxis>(serie.yAxisIndex); if (yAxis.IsCategory()) { - return yAxis.GetData((int)yAxis.context.pointerValue, dataZoom); + return yAxis.GetData(serie.context.pointerItemDataIndex); } else if (xAxis.IsCategory()) { - return xAxis.GetData((int)xAxis.context.pointerValue, dataZoom); + return xAxis.GetData(serie.context.pointerItemDataIndex); } return null; } diff --git a/Runtime/Internal/BaseChart.Custom.cs b/Runtime/Internal/BaseChart.Custom.cs index bd79a405..7c761e68 100644 --- a/Runtime/Internal/BaseChart.Custom.cs +++ b/Runtime/Internal/BaseChart.Custom.cs @@ -10,20 +10,21 @@ namespace XCharts.Runtime public virtual void GetSeriesMinMaxValue(Axis axis, int axisIndex, out double tempMinValue, out double tempMaxValue) { + var needAnimationData = !axis.context.needAnimation; if (IsAllAxisValue()) { if (axis is XAxis) { - SeriesHelper.GetXMinMaxValue(this, axisIndex, true, axis.inverse, out tempMinValue, out tempMaxValue, false, false); + SeriesHelper.GetXMinMaxValue(this, axisIndex, axis.inverse, out tempMinValue, out tempMaxValue, false, false, needAnimationData); } else { - SeriesHelper.GetYMinMaxValue(this, axisIndex, true, axis.inverse, out tempMinValue, out tempMaxValue); + SeriesHelper.GetYMinMaxValue(this, axisIndex, axis.inverse, out tempMinValue, out tempMaxValue, false, false, needAnimationData); } } else { - SeriesHelper.GetYMinMaxValue(this, axisIndex, false, axis.inverse, out tempMinValue, out tempMaxValue); + SeriesHelper.GetYMinMaxValue(this, axisIndex, axis.inverse, out tempMinValue, out tempMaxValue, false, false, needAnimationData); } AxisHelper.AdjustMinMaxValue(axis, ref tempMinValue, ref tempMaxValue, true); } diff --git a/Runtime/Internal/BaseChart.Serie.cs b/Runtime/Internal/BaseChart.Serie.cs index 2f6bf388..26aaa113 100644 --- a/Runtime/Internal/BaseChart.Serie.cs +++ b/Runtime/Internal/BaseChart.Serie.cs @@ -221,8 +221,8 @@ namespace XCharts.Runtime /// <summary> /// Add a data to serie. - /// |If serieName doesn't exist in legend,will be add to legend. - /// |添加一个数据到指定的系列中。 + /// ||If serieName doesn't exist in legend,will be add to legend. + /// ||添加一个数据到指定的系列中。 /// </summary> /// <param name="serieName">the name of serie</param> /// <param name="data">the data to add</param> @@ -243,7 +243,7 @@ namespace XCharts.Runtime /// <summary> /// Add a data to serie. - /// |添加一个数据到指定的系列中。 + /// ||添加一个数据到指定的系列中。 /// </summary> /// <param name="serieIndex">the index of serie</param> /// <param name="data">the data to add</param> @@ -264,7 +264,7 @@ namespace XCharts.Runtime /// <summary> /// Add an arbitray dimension data to serie,such as (x,y,z,...). - /// |添加多维数据(x,y,z...)到指定的系列中。 + /// ||添加多维数据(x,y,z...)到指定的系列中。 /// </summary> /// <param name="serieName">the name of serie</param> /// <param name="multidimensionalData">the (x,y,z,...) data</param> @@ -285,7 +285,7 @@ namespace XCharts.Runtime /// <summary> /// Add an arbitray dimension data to serie,such as (x,y,z,...). - /// |添加多维数据(x,y,z...)到指定的系列中。 + /// ||添加多维数据(x,y,z...)到指定的系列中。 /// </summary> /// <param name="serieIndex">the index of serie,index starts at 0</param> /// <param name="multidimensionalData">the (x,y,z,...) data</param> @@ -307,7 +307,7 @@ namespace XCharts.Runtime [Since("v3.4.0")] /// <summary> /// Add an arbitray dimension data to serie,such as (x,y,z,...). - /// |添加多维数据(x,y,z...)到指定的系列中。 + /// ||添加多维数据(x,y,z...)到指定的系列中。 /// </summary> /// <param name="serieIndex">the index of serie</param> /// <param name="multidimensionalData">the (x,y,z,...) data</param> @@ -327,7 +327,7 @@ namespace XCharts.Runtime [Since("v3.4.0")] /// <summary> /// Add an arbitray dimension data to serie,such as (x,y,z,...). - /// |添加多维数据(x,y,z...)到指定的系列中。 + /// ||添加多维数据(x,y,z...)到指定的系列中。 /// </summary> /// <param name="serieName">the name of serie</param> /// <param name="multidimensionalData">the (x,y,z,...) data</param> @@ -346,7 +346,7 @@ namespace XCharts.Runtime /// <summary> /// Add a (x,y) data to serie. - /// |添加(x,y)数据到指定系列中。 + /// ||添加(x,y)数据到指定系列中。 /// </summary> /// <param name="serieName">the name of serie</param> /// <param name="xValue">x data</param> @@ -368,7 +368,7 @@ namespace XCharts.Runtime /// <summary> /// Add a (x,y) data to serie. - /// |添加(x,y)数据到指定系列中。 + /// ||添加(x,y)数据到指定系列中。 /// </summary> /// <param name="serieIndex">the index of serie</param> /// <param name="xValue">x data</param> @@ -389,7 +389,7 @@ namespace XCharts.Runtime } /// <summary> /// Add a (time,y) data to serie. - /// |添加(time,y)数据到指定的系列中。 + /// ||添加(time,y)数据到指定的系列中。 /// </summary> /// <param name="serieName"></param> /// <param name="time"></param> @@ -405,7 +405,7 @@ namespace XCharts.Runtime /// <summary> /// Add a (time,y) data to serie. - /// |添加(time,y)数据到指定的系列中。 + /// ||添加(time,y)数据到指定的系列中。 /// </summary> /// <param name="serieIndex"></param> /// <param name="time"></param> @@ -444,7 +444,7 @@ namespace XCharts.Runtime /// <summary> /// Update serie data by serie name. - /// |更新指定系列中的指定索引数据。 + /// ||更新指定系列中的指定索引数据。 /// </summary> /// <param name="serieName">the name of serie</param> /// <param name="dataIndex">the index of data</param> @@ -454,16 +454,22 @@ namespace XCharts.Runtime var serie = GetSerie(serieName); if (serie != null) { - serie.UpdateYData(dataIndex, value); - RefreshPainter(serie); - return true; + if (serie.UpdateYData(dataIndex, value)) + { + RefreshPainter(serie); + return true; + } + else + { + return false; + } } return false; } /// <summary> /// Update serie data by serie index. - /// |更新指定系列中的指定索引数据。 + /// ||更新指定系列中的指定索引数据。 /// </summary> /// <param name="serieIndex">the index of serie</param> /// <param name="dataIndex">the index of data</param> @@ -473,9 +479,15 @@ namespace XCharts.Runtime var serie = GetSerie(serieIndex); if (serie != null) { - serie.UpdateYData(dataIndex, value); - RefreshPainter(serie); - return true; + if (serie.UpdateYData(dataIndex, value)) + { + RefreshPainter(serie); + return true; + } + else + { + return false; + } } return false; } @@ -491,9 +503,15 @@ namespace XCharts.Runtime var serie = GetSerie(serieName); if (serie != null) { - serie.UpdateData(dataIndex, multidimensionalData); - RefreshPainter(serie); - return true; + if (serie.UpdateData(dataIndex, multidimensionalData)) + { + RefreshPainter(serie); + return true; + } + else + { + return false; + } } return false; } @@ -509,9 +527,15 @@ namespace XCharts.Runtime var serie = GetSerie(serieIndex); if (serie != null) { - serie.UpdateData(dataIndex, multidimensionalData); - RefreshPainter(serie); - return true; + if (serie.UpdateData(dataIndex, multidimensionalData)) + { + RefreshPainter(serie); + return true; + } + else + { + return false; + } } return false; } @@ -528,9 +552,15 @@ namespace XCharts.Runtime var serie = GetSerie(serieName); if (serie != null) { - serie.UpdateData(dataIndex, dimension, value); - RefreshPainter(serie); - return true; + if (serie.UpdateData(dataIndex, dimension, value)) + { + RefreshPainter(serie); + return true; + } + else + { + return false; + } } return false; } @@ -547,16 +577,22 @@ namespace XCharts.Runtime var serie = GetSerie(serieIndex); if (serie != null) { - serie.UpdateData(dataIndex, dimension, value); - RefreshPainter(serie); - return true; + if (serie.UpdateData(dataIndex, dimension, value)) + { + RefreshPainter(serie); + return true; + } + else + { + return false; + } } return false; } /// <summary> /// Update serie data name. - /// |更新指定系列中的指定索引数据名称。 + /// ||更新指定系列中的指定索引数据名称。 /// </summary> /// <param name="serieName"></param> /// <param name="dataIndex"></param> @@ -566,15 +602,14 @@ namespace XCharts.Runtime var serie = GetSerie(serieName); if (serie != null) { - serie.UpdateDataName(dataIndex, dataName); - return true; + return serie.UpdateDataName(dataIndex, dataName); } return false; } /// <summary> /// Update serie data name. - /// |更新指定系列中的指定索引数据名称。 + /// ||更新指定系列中的指定索引数据名称。 /// </summary> /// <param name="serieIndex"></param> /// <param name="dataName"></param> @@ -584,8 +619,7 @@ namespace XCharts.Runtime var serie = GetSerie(serieIndex); if (serie != null) { - serie.UpdateDataName(dataIndex, dataName); - return true; + return serie.UpdateDataName(dataIndex, dataName); } return false; } @@ -620,7 +654,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show serie. - /// |设置指定系列是否显示。 + /// ||设置指定系列是否显示。 /// </summary> /// <param name="serieName">the name of serie</param> /// <param name="active">Active or not</param> @@ -633,7 +667,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to show serie. - /// |设置指定系列是否显示。 + /// ||设置指定系列是否显示。 /// </summary> /// <param name="serieIndex">the index of serie</param> /// <param name="active">Active or not</param> @@ -655,7 +689,7 @@ namespace XCharts.Runtime /// <summary> /// Add a category data to xAxis. - /// |添加一个类目数据到指定的x轴。 + /// ||添加一个类目数据到指定的x轴。 /// </summary> /// <param name="category">the category data</param> /// <param name="xAxisIndex">which xAxis should category add to</param> @@ -670,7 +704,7 @@ namespace XCharts.Runtime /// <summary> /// Update category data. - /// |更新X轴类目数据。 + /// ||更新X轴类目数据。 /// </summary> /// <param name="index">the index of category data</param> /// <param name="category"></param> @@ -686,7 +720,7 @@ namespace XCharts.Runtime /// <summary> /// Add an icon to xAxis. - /// |添加一个图标到指定的x轴。 + /// ||添加一个图标到指定的x轴。 /// </summary> /// <param name="icon"></param> /// <param name="xAxisIndex"></param> @@ -701,7 +735,7 @@ namespace XCharts.Runtime /// <summary> /// Update xAxis icon. - /// |更新X轴图标。 + /// ||更新X轴图标。 /// </summary> /// <param name="index"></param> /// <param name="icon"></param> @@ -717,7 +751,7 @@ namespace XCharts.Runtime /// <summary> /// Add a category data to yAxis. - /// |添加一个类目数据到指定的y轴。 + /// ||添加一个类目数据到指定的y轴。 /// </summary> /// <param name="category">the category data</param> /// <param name="yAxisIndex">which yAxis should category add to</param> @@ -732,7 +766,7 @@ namespace XCharts.Runtime /// <summary> /// Update category data. - /// |更新Y轴类目数据。 + /// ||更新Y轴类目数据。 /// </summary> /// <param name="index">the index of category data</param> /// <param name="category"></param> @@ -748,7 +782,7 @@ namespace XCharts.Runtime /// <summary> /// Add an icon to yAxis. - /// |添加一个图标到指定的y轴。 + /// ||添加一个图标到指定的y轴。 /// </summary> /// <param name="icon"></param> /// <param name="yAxisIndex"></param> diff --git a/Runtime/Internal/BaseChart.cs b/Runtime/Internal/BaseChart.cs index e991ceb9..e5afa1c3 100644 --- a/Runtime/Internal/BaseChart.cs +++ b/Runtime/Internal/BaseChart.cs @@ -194,9 +194,11 @@ namespace XCharts.Runtime CheckRefreshChart(); Internal_CheckAnimation(); foreach (var handler in m_SerieHandlers) handler.BeforeUpdate(); + foreach (var handler in m_ComponentHandlers) handler.BeforceSerieUpdate(); foreach (var handler in m_SerieHandlers) handler.Update(); - foreach (var handler in m_SerieHandlers) handler.AfterUpdate(); foreach (var handler in m_ComponentHandlers) handler.Update(); + foreach (var handler in m_SerieHandlers) handler.AfterUpdate(); + m_DebugInfo.Update(); if (m_OnUpdate != null) m_OnUpdate(); diff --git a/Runtime/Internal/BaseGraph.API.cs b/Runtime/Internal/BaseGraph.API.cs index 553249f9..f659a233 100644 --- a/Runtime/Internal/BaseGraph.API.cs +++ b/Runtime/Internal/BaseGraph.API.cs @@ -7,33 +7,33 @@ namespace XCharts.Runtime { /// <summary> /// The base class of all graphs or components. - /// |所有图形的基类。 + /// ||所有图形的基类。 /// </summary> public partial class BaseGraph { /// <summary> /// The x of graph. - /// |图形的X + /// ||图形的X /// </summary> public float graphX { get { return m_GraphX; } } /// <summary> /// The y of graph. - /// |图形的Y + /// ||图形的Y /// </summary> public float graphY { get { return m_GraphY; } } /// <summary> /// The width of graph. - /// |图形的宽 + /// ||图形的宽 /// </summary> public float graphWidth { get { return m_GraphWidth; } } /// <summary> /// The height of graph. - /// |图形的高 + /// ||图形的高 /// </summary> public float graphHeight { get { return m_GraphHeight; } } /// <summary> /// The position of graph. - /// |图形的左下角起始坐标。 + /// ||图形的左下角起始坐标。 /// </summary> public Vector3 graphPosition { get { return m_GraphPosition; } } public Rect graphRect { get { return m_GraphRect; } } @@ -44,12 +44,12 @@ namespace XCharts.Runtime public Vector2 graphAnchoredPosition { get { return m_GraphAnchoredPosition; } } /// <summary> /// The postion of pointer. - /// |鼠标位置。 + /// ||鼠标位置。 /// </summary> public Vector2 pointerPos { get; protected set; } /// <summary> /// Whether the mouse pointer is in the chart. - /// |鼠标是否在图表内。 + /// ||鼠标是否在图表内。 /// </summary> public bool isPointerInChart { get { return m_PointerEventData != null; } } @@ -125,7 +125,7 @@ namespace XCharts.Runtime /// <summary> /// Redraw graph in next frame. - /// |在下一帧刷新图形。 + /// ||在下一帧刷新图形。 /// </summary> public virtual void RefreshGraph() { @@ -175,7 +175,7 @@ namespace XCharts.Runtime /// <summary> /// chart local point to screen point. - /// |图表内坐标转屏幕坐标。 + /// ||图表内坐标转屏幕坐标。 /// </summary> /// <param name="localPoint">图表内的坐标</param> /// <returns>屏幕坐标</returns> @@ -189,7 +189,7 @@ namespace XCharts.Runtime /// <summary> /// chart local point to world point. - /// |图表内坐标转世界坐标。 + /// ||图表内坐标转世界坐标。 /// </summary> /// <param name="localPoint">图表内的坐标</param> /// <returns>世界坐标</returns> diff --git a/Runtime/Internal/Basic/CoordSystem.cs b/Runtime/Internal/Basic/CoordSystem.cs index 6b66f707..6f01f47b 100644 --- a/Runtime/Internal/Basic/CoordSystem.cs +++ b/Runtime/Internal/Basic/CoordSystem.cs @@ -4,7 +4,7 @@ namespace XCharts.Runtime { /// <summary> /// Coordinate system component. - /// | + /// || /// 坐标系系统。 /// </summary> [Serializable] diff --git a/Runtime/Internal/Basic/MainComponent.cs b/Runtime/Internal/Basic/MainComponent.cs index 202831e1..d36f9a87 100644 --- a/Runtime/Internal/Basic/MainComponent.cs +++ b/Runtime/Internal/Basic/MainComponent.cs @@ -94,6 +94,7 @@ namespace XCharts.Runtime public virtual void InitComponent() { } public virtual void RemoveComponent() { } public virtual void CheckComponent(StringBuilder sb) { } + public virtual void BeforceSerieUpdate() { } public virtual void Update() { } public virtual void DrawBase(VertexHelper vh) { } public virtual void DrawUpper(VertexHelper vh) { } diff --git a/Runtime/Internal/Misc/DelegateFunction.cs b/Runtime/Internal/Misc/DelegateFunction.cs index 15b1e9db..e60bc2da 100644 --- a/Runtime/Internal/Misc/DelegateFunction.cs +++ b/Runtime/Internal/Misc/DelegateFunction.cs @@ -5,7 +5,7 @@ namespace XCharts.Runtime { /// <summary> /// The delegate function for LabelStyle‘s formatter. - /// |SerieLabel的formatter自定义委托。 + /// ||SerieLabel的formatter自定义委托。 /// </summary> /// <param name="dataIndex">数据索引</param> /// <param name="value">数值</param> diff --git a/Runtime/Internal/Misc/Enums.cs b/Runtime/Internal/Misc/Enums.cs index f19d2d62..c6761c2b 100644 --- a/Runtime/Internal/Misc/Enums.cs +++ b/Runtime/Internal/Misc/Enums.cs @@ -2,7 +2,7 @@ namespace XCharts.Runtime { /// <summary> /// the layout is horizontal or vertical. - /// |垂直还是水平布局方式。 + /// ||垂直还是水平布局方式。 /// </summary> public enum Orient { diff --git a/Runtime/Internal/Misc/ISerieComponent.cs b/Runtime/Internal/Misc/ISerieComponent.cs index 9a863d4d..03d7fd0c 100644 --- a/Runtime/Internal/Misc/ISerieComponent.cs +++ b/Runtime/Internal/Misc/ISerieComponent.cs @@ -2,7 +2,7 @@ namespace XCharts.Runtime { /// <summary> /// The interface for serie component. - /// |可用于Serie的组件。 + /// ||可用于Serie的组件。 /// </summary> public interface ISerieComponent { diff --git a/Runtime/Internal/Misc/ISerieDataComponent.cs b/Runtime/Internal/Misc/ISerieDataComponent.cs index 278c5903..35c1187d 100644 --- a/Runtime/Internal/Misc/ISerieDataComponent.cs +++ b/Runtime/Internal/Misc/ISerieDataComponent.cs @@ -2,7 +2,7 @@ namespace XCharts.Runtime { /// <summary> /// The interface for serie data component. - /// |可用于SerieData的组件。 + /// ||可用于SerieData的组件。 /// </summary> public interface ISerieDataComponent { diff --git a/Runtime/Internal/Misc/SerieEventData.cs b/Runtime/Internal/Misc/SerieEventData.cs index 4d3ff773..ea4ef1d4 100644 --- a/Runtime/Internal/Misc/SerieEventData.cs +++ b/Runtime/Internal/Misc/SerieEventData.cs @@ -4,33 +4,33 @@ namespace XCharts.Runtime { /// <summary> /// the data of serie event. - /// |serie事件的数据。 + /// ||serie事件的数据。 /// </summary> public class SerieEventData { /// <summary> /// the position of pointer in chart. - /// |鼠标在chart中的位置。 + /// ||鼠标在chart中的位置。 /// </summary> public Vector3 pointerPos { get; set; } /// <summary> /// the index of serie in chart.series. - /// |在chart.series中的索引。 + /// ||在chart.series中的索引。 /// </summary> public int serieIndex { get; set; } /// <summary> /// the index of data in serie.data. - /// |在serie.data中的索引。 + /// ||在serie.data中的索引。 /// </summary> public int dataIndex { get; set; } /// <summary> /// the dimension of data. - /// |数据的维度。 + /// ||数据的维度。 /// </summary> public int dimension { get; set; } /// <summary> /// the value of data. - /// |数据的值。 + /// ||数据的值。 /// </summary> public double value { get; set; } diff --git a/Runtime/Internal/Pools/SerieEventDataPool.cs b/Runtime/Internal/Pools/SerieEventDataPool.cs index 899d51f0..d0367ae3 100644 --- a/Runtime/Internal/Pools/SerieEventDataPool.cs +++ b/Runtime/Internal/Pools/SerieEventDataPool.cs @@ -22,6 +22,7 @@ namespace XCharts.Runtime data.dataIndex = dataIndex; data.pointerPos = pos; data.dimension = dimension; + data.value = value; return data; } diff --git a/Runtime/Internal/UIComponent.cs b/Runtime/Internal/UIComponent.cs index 8a1266e6..c0fb9f87 100644 --- a/Runtime/Internal/UIComponent.cs +++ b/Runtime/Internal/UIComponent.cs @@ -15,7 +15,10 @@ namespace XCharts.Runtime [SerializeField] private bool m_DebugModel = false; [SerializeField] protected UIComponentTheme m_Theme = new UIComponentTheme(); [SerializeField] private ImageStyle m_Background = new ImageStyle() { show = false }; + protected bool m_DataDirty; + private ThemeType m_CheckTheme = 0; + public override HideFlags chartHideFlags { get { return m_DebugModel ? HideFlags.None : HideFlags.HideInHierarchy; } } public UIComponentTheme theme { get { return m_Theme; } set { m_Theme = value; } } /// <summary> @@ -24,7 +27,7 @@ namespace XCharts.Runtime public ImageStyle background { get { return m_Background; } set { m_Background = value; color = Color.white; } } /// <summary> /// Update chart theme. - /// |切换内置主题。 + /// ||切换内置主题。 /// </summary> /// <param name="theme">theme</param> public bool UpdateTheme(ThemeType theme) @@ -41,6 +44,25 @@ namespace XCharts.Runtime return true; } + [Since("v3.9.0")] + public void SetDataDirty() + { + m_DataDirty = true; + m_RefreshChart = true; + } + + public override void SetAllDirty() + { + base.SetAllDirty(); + SetDataDirty(); + } + + public override void SetVerticesDirty() + { + base.SetVerticesDirty(); + m_RefreshChart = true; + } + protected override void InitComponent() { base.InitComponent(); @@ -75,6 +97,12 @@ namespace XCharts.Runtime UIHelper.DrawBackground(vh, this); } + protected override void Awake() + { + CheckTheme(true); + base.Awake(); + } + protected override void Update() { base.Update(); @@ -85,8 +113,46 @@ namespace XCharts.Runtime } } +#if UNITY_EDITOR + protected override void Reset() + { + base.Reset(); + Awake(); + } + + protected override void OnValidate() + { + base.OnValidate(); + } +#endif + protected virtual void DataDirty() { } + + protected virtual void CheckTheme(bool firstInit = false) + { + if (m_Theme.sharedTheme == null) + { + m_Theme.sharedTheme = XCThemeMgr.GetTheme(ThemeType.Default); + } + if (firstInit) + { + m_CheckTheme = m_Theme.themeType; + } + if (m_Theme.sharedTheme != null && m_CheckTheme != m_Theme.themeType) + { + m_CheckTheme = m_Theme.themeType; + m_Theme.sharedTheme.CopyTheme(m_CheckTheme); +#if UNITY_EDITOR + UnityEditor.EditorUtility.SetDirty(this); +#endif + SetAllDirty(); + SetAllComponentDirty(); + OnThemeChanged(); + } + } + + protected virtual void OnThemeChanged() { } } } \ No newline at end of file diff --git a/Runtime/Internal/UIComponentTheme.cs b/Runtime/Internal/UIComponentTheme.cs index ad51eed3..df0f94b3 100644 --- a/Runtime/Internal/UIComponentTheme.cs +++ b/Runtime/Internal/UIComponentTheme.cs @@ -14,7 +14,7 @@ namespace XCharts.Runtime public bool show { get { return m_Show; } } /// <summary> /// the theme of chart. - /// |主题类型。 + /// ||主题类型。 /// </summary> public ThemeType themeType { @@ -22,7 +22,7 @@ namespace XCharts.Runtime } /// <summary> /// theme name. - /// |主题名字。 + /// ||主题名字。 /// </summary> public string themeName { @@ -30,7 +30,7 @@ namespace XCharts.Runtime } /// <summary> /// the asset of theme. - /// |主题配置。 + /// ||主题配置。 /// </summary> public Theme sharedTheme { @@ -39,14 +39,15 @@ namespace XCharts.Runtime } /// <summary> /// the background color of chart. - /// |背景颜色。 + /// ||背景颜色。 /// </summary> public Color32 backgroundColor { get { if (m_TransparentBackground) return ColorUtil.clearColor32; - else return sharedTheme.backgroundColor; + else if (sharedTheme != null) return sharedTheme.backgroundColor; + else return ColorUtil.clearColor32; } } } diff --git a/Runtime/Internal/Utilities/ChartCached.cs b/Runtime/Internal/Utilities/ChartCached.cs index d376421a..cda8bbb8 100644 --- a/Runtime/Internal/Utilities/ChartCached.cs +++ b/Runtime/Internal/Utilities/ChartCached.cs @@ -22,6 +22,7 @@ namespace XCharts.Runtime private static Dictionary<double, Dictionary<string, string>> s_NumberToStr = new Dictionary<double, Dictionary<string, string>>(); private static Dictionary<int, Dictionary<string, string>> s_PrecisionToStr = new Dictionary<int, Dictionary<string, string>>(); + private static Dictionary<string, Dictionary<int, string>> s_StringIntDict = new Dictionary<string, Dictionary<int, string>>(); public static string FloatToStr(double value, string numericFormatter = "F", int precision = 0) { @@ -113,6 +114,19 @@ namespace XCharts.Runtime } } + public static string GetString(string prefix, int suffix) + { + if (!s_StringIntDict.ContainsKey(prefix)) + { + s_StringIntDict[prefix] = new Dictionary<int, string>(); + } + if (!s_StringIntDict[prefix].ContainsKey(suffix)) + { + s_StringIntDict[prefix][suffix] = prefix + suffix; + } + return s_StringIntDict[prefix][suffix]; + } + internal static string GetComponentObjectName(MainComponent component) { Dictionary<int, string> dict; diff --git a/Runtime/Internal/Utilities/ChartHelper.cs b/Runtime/Internal/Utilities/ChartHelper.cs index c32f6a88..2b21fd59 100644 --- a/Runtime/Internal/Utilities/ChartHelper.cs +++ b/Runtime/Internal/Utilities/ChartHelper.cs @@ -184,7 +184,7 @@ namespace XCharts.Runtime /// <summary> /// Ensure that the transform has the specified component, add it if not. - /// |确保对象有指定的组件,如果没有则添加。 + /// ||确保对象有指定的组件,如果没有则添加。 /// </summary> /// <param name="transform"></param> /// <typeparam name="T"></typeparam> @@ -196,7 +196,7 @@ namespace XCharts.Runtime /// <summary> /// Ensure that the game object has the specified component, add it if not. - /// | 确保对象有指定的组件,如果没有则添加。 + /// || 确保对象有指定的组件,如果没有则添加。 /// </summary> /// <param name="gameObject"></param> /// <typeparam name="T"></typeparam> @@ -438,7 +438,8 @@ namespace XCharts.Runtime label.color = (!labelStyle.background.autoColor || autoColor == Color.clear) ? labelStyle.background.color : autoColor; label.sprite = labelStyle.background.sprite; - label.type = labelStyle.background.type; + if(label.type != labelStyle.background.type) + label.type = labelStyle.background.type; } else { @@ -682,7 +683,7 @@ namespace XCharts.Runtime public static double GetMaxDivisibleValue(double max, double ceilRate) { if (max == 0) return 0; - double pow = 1; + double pow = 1; if (max > -1 && max < 1) { pow = Mathf.Pow(10, MathUtil.GetPrecision(max)); @@ -739,7 +740,7 @@ namespace XCharts.Runtime public static double GetMinDivisibleValue(double min, double ceilRate) { if (min == 0) return 0; - double pow = 1; + double pow = 1; if (min > -1 && min < 1) { pow = Mathf.Pow(10, MathUtil.GetPrecision(min)); @@ -770,20 +771,13 @@ namespace XCharts.Runtime public static double GetMaxLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber) { - splitNumber = 0; + splitNumber = 1; if (value <= 0) return 0; - double max = 0; + double max = isLogBaseE ? Math.Exp(splitNumber) : Math.Pow(logBase, splitNumber); while (max < value) { - if (isLogBaseE) - { - max = Math.Exp(splitNumber); - } - else - { - max = Math.Pow(logBase, splitNumber); - } splitNumber++; + max = isLogBaseE ? Math.Exp(splitNumber) : Math.Pow(logBase, splitNumber); } return max; } @@ -791,19 +785,13 @@ namespace XCharts.Runtime public static double GetMinLogValue(double value, float logBase, bool isLogBaseE, out int splitNumber) { splitNumber = 0; + if (value <= 0) return 0; if (value > 1) return 1; - double min = 1; + double min = isLogBaseE ? Math.Exp(-splitNumber) : Math.Pow(logBase, -splitNumber); while (min > value) { - if (isLogBaseE) - { - min = Math.Exp(-splitNumber); - } - else - { - min = Math.Pow(logBase, -splitNumber); - } splitNumber++; + min = isLogBaseE ? Math.Exp(-splitNumber) : Math.Pow(logBase, -splitNumber); } return min; } diff --git a/Runtime/Internal/Utilities/DataHelper.cs b/Runtime/Internal/Utilities/DataHelper.cs index a0d181ac..c7c8db54 100644 --- a/Runtime/Internal/Utilities/DataHelper.cs +++ b/Runtime/Internal/Utilities/DataHelper.cs @@ -26,8 +26,8 @@ namespace XCharts.Runtime ref bool dataChanging, Axis axis, bool unscaledTime) { var inverse = axis.inverse; - var minValue = axis.context.minValue; - var maxValue = axis.context.maxValue; + var minValue = 0; + var maxValue = 0; if (rate <= 1 || index == minCount) { if (showData[index].IsDataChanged()) diff --git a/Runtime/Internal/XCResourcesImporter.cs b/Runtime/Internal/XCResourcesImporter.cs index f8f252d0..63d6a911 100644 --- a/Runtime/Internal/XCResourcesImporter.cs +++ b/Runtime/Internal/XCResourcesImporter.cs @@ -153,7 +153,7 @@ namespace XCharts.Runtime /// <summary> /// Limits the minimum size of the editor window. - /// |</summary> + /// ||</summary> void SetEditorWindowSize() { EditorWindow editorWindow = this; diff --git a/Runtime/Internal/XChartsMgr.cs b/Runtime/Internal/XChartsMgr.cs index a791524c..fecf4c81 100644 --- a/Runtime/Internal/XChartsMgr.cs +++ b/Runtime/Internal/XChartsMgr.cs @@ -21,8 +21,8 @@ namespace XCharts.Runtime [ExecuteInEditMode] public static class XChartsMgr { - public static readonly string version = "3.8.1"; - public static readonly int versionDate = 20231001; + public static readonly string version = "3.9.0"; + public static readonly int versionDate = 20231201; public static string fullVersion { get { return version + "-" + versionDate; } } internal static List<BaseChart> chartList = new List<BaseChart>(); diff --git a/Runtime/Serie/Bar/BarHandler.cs b/Runtime/Serie/Bar/BarHandler.cs index 3de86ccc..7cdfe601 100644 --- a/Runtime/Serie/Bar/BarHandler.cs +++ b/Runtime/Serie/Bar/BarHandler.cs @@ -67,8 +67,8 @@ namespace XCharts.Runtime { case LabelStyle.Position.Bottom: var center = serieData.context.rect.center; - if(serie.context.isHorizontal) - return new Vector3(center.x - serieData.context.rect.width/2, center.y); + if (serie.context.isHorizontal) + return new Vector3(center.x - serieData.context.rect.width / 2, center.y); else return new Vector3(center.x, center.y - serieData.context.rect.height / 2); case LabelStyle.Position.Center: @@ -94,10 +94,13 @@ namespace XCharts.Runtime m_LastCheckContextFlag = needCheck; serie.context.pointerItemDataIndex = -1; serie.context.pointerEnter = false; + Color32 color1, toColor1; foreach (var serieData in serie.data) { serieData.context.highlight = false; - serieData.interact.Reset(); + var state = SerieHelper.GetSerieState(serie, serieData, true); + SerieHelper.GetItemColor(out color1, out toColor1, serie, serieData, chart.theme, state); + serieData.interact.SetColor(ref needInteract, color1, toColor1); } chart.RefreshPainter(serie); } @@ -189,8 +192,6 @@ namespace XCharts.Runtime var dataChangeDuration = serie.animation.GetChangeDuration(); var dataAddDuration = serie.animation.GetAdditionDuration(); var interactDuration = serie.animation.GetInteractionDuration(); - var yMinValue = relativedAxis.context.minValue; - var yMaxValue = relativedAxis.context.maxValue; var areaColor = ColorUtil.clearColor32; var areaToColor = ColorUtil.clearColor32; @@ -216,7 +217,7 @@ namespace XCharts.Runtime var state = SerieHelper.GetSerieState(serie, serieData); var itemStyle = SerieHelper.GetItemStyle(serie, serieData, state); var value = axis.IsCategory() ? i : serieData.GetData(0, axis.inverse); - var relativedValue = serieData.GetCurrData(1, dataAddDuration, dataChangeDuration, relativedAxis.inverse, yMinValue, yMaxValue, serie.animation.unscaledTime); + var relativedValue = serieData.GetCurrData(1, dataAddDuration, dataChangeDuration, relativedAxis.inverse, 0, 0, serie.animation.unscaledTime); var borderWidth = relativedValue == 0 ? 0 : itemStyle.runtimeBorderWidth; var borderGap = relativedValue == 0 ? 0 : itemStyle.borderGap; var borderGapAndWidth = borderWidth + borderGap; diff --git a/Runtime/Serie/Bar/SimplifiedBarHandler.cs b/Runtime/Serie/Bar/SimplifiedBarHandler.cs index 49833431..f98576d3 100644 --- a/Runtime/Serie/Bar/SimplifiedBarHandler.cs +++ b/Runtime/Serie/Bar/SimplifiedBarHandler.cs @@ -137,8 +137,6 @@ namespace XCharts.Runtime var dataChangeDuration = serie.animation.GetChangeDuration(); var dataAddDuration = serie.animation.GetAdditionDuration(); var interactDuration = serie.animation.GetInteractionDuration(); - double yMinValue = relativedAxis.context.minValue; - double yMaxValue = relativedAxis.context.maxValue; var areaColor = ColorUtil.clearColor32; var areaToColor = ColorUtil.clearColor32; @@ -163,7 +161,7 @@ namespace XCharts.Runtime var highlight = serieData.context.highlight || serie.highlight; var itemStyle = SerieHelper.GetItemStyle(serie, serieData); var value = axis.IsCategory() ? i : serieData.GetData(0, axis.inverse); - var relativedValue = serieData.GetCurrData(1, dataAddDuration, dataChangeDuration, relativedAxis.inverse, yMinValue, yMaxValue, serie.animation.unscaledTime); + var relativedValue = serieData.GetCurrData(1, dataAddDuration, dataChangeDuration, relativedAxis.inverse, 0, 0, serie.animation.unscaledTime); var borderWidth = relativedValue == 0 ? 0 : itemStyle.runtimeBorderWidth; if (!serieData.interact.TryGetColor(ref areaColor, ref areaToColor, ref interacting, interactDuration)) diff --git a/Runtime/Serie/Heatmap/Heatmap.cs b/Runtime/Serie/Heatmap/Heatmap.cs index 0f62e11f..cfd2d0ad 100644 --- a/Runtime/Serie/Heatmap/Heatmap.cs +++ b/Runtime/Serie/Heatmap/Heatmap.cs @@ -4,18 +4,18 @@ namespace XCharts.Runtime { /// <summary> /// The mapping type of heatmap. - /// |热力图类型。通过颜色映射划分。 + /// ||热力图类型。通过颜色映射划分。 /// </summary> public enum HeatmapType { /// <summary> /// Data mapping type.By default, the second dimension data is used as the color map. - /// |数据映射型。默认用第2维数据作为颜色映射。要求数据至少有3个维度数据。 + /// ||数据映射型。默认用第2维数据作为颜色映射。要求数据至少有3个维度数据。 /// </summary> Data, /// <summary> /// Number mapping type.The number of occurrences of a statistic in a divided grid, as a color map. - /// |个数映射型。统计数据在划分的格子中出现的次数,作为颜色映射。要求数据至少有2个维度数据。 + /// ||个数映射型。统计数据在划分的格子中出现的次数,作为颜色映射。要求数据至少有2个维度数据。 /// </summary> Count } @@ -35,7 +35,7 @@ namespace XCharts.Runtime /// <summary> /// The mapping type of heatmap. - /// |热力图类型。通过颜色映射划分。 + /// ||热力图类型。通过颜色映射划分。 /// </summary> public HeatmapType heatmapType { diff --git a/Runtime/Serie/Heatmap/HeatmapHandler.cs b/Runtime/Serie/Heatmap/HeatmapHandler.cs index 2ff83ec0..a5b3ced0 100644 --- a/Runtime/Serie/Heatmap/HeatmapHandler.cs +++ b/Runtime/Serie/Heatmap/HeatmapHandler.cs @@ -249,7 +249,7 @@ namespace XCharts.Runtime var isRectSymbol = symbol.type == SymbolType.Rect; SerieHelper.GetSymbolInfo(out borderColor, out symbolBorder, out cornerRadius, serie, serieData, chart.theme, state); var value = serieData.GetCurrData(dimension, dataAddDuration, dataChangeDuration, yAxis.inverse, - yAxis.context.minValue, yAxis.context.maxValue, unscaledTime); + 0, 0, unscaledTime); if (serieData.IsDataChanged()) dataChanging = true; var pos = new Vector3(zeroX + (i + 0.5f) * xWidth, zeroY + (j + 0.5f) * yWidth); diff --git a/Runtime/Serie/Pie/Pie.cs b/Runtime/Serie/Pie/Pie.cs index 864b0023..c6548ce4 100644 --- a/Runtime/Serie/Pie/Pie.cs +++ b/Runtime/Serie/Pie/Pie.cs @@ -18,7 +18,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to use gradient color in pie chart. - /// | 是否开启半径方向的渐变效果。 + /// || 是否开启半径方向的渐变效果。 /// </summary> public bool radiusGradient { diff --git a/Runtime/Serie/Pie/PieHandler.cs b/Runtime/Serie/Pie/PieHandler.cs index 00fa2b43..d39c9199 100644 --- a/Runtime/Serie/Pie/PieHandler.cs +++ b/Runtime/Serie/Pie/PieHandler.cs @@ -46,9 +46,9 @@ namespace XCharts.Runtime if (labelLine != null && labelLine.show && serieData.labelObject != null) { var currAngle = serieData.context.halfAngle - serie.context.startAngle; - var isRight = currAngle % 360 < 180; + var isLeft = currAngle > 180 || (currAngle == 0 && serieData.context.startAngle > 0); var textOffset = serieData.labelObject.text.GetPreferredWidth() / 2; - return serieData.context.labelPosition + (isRight ? Vector3.right : Vector3.left) * textOffset; + return serieData.context.labelPosition + (isLeft ? Vector3.left : Vector3.right) * textOffset; } else { @@ -62,9 +62,11 @@ namespace XCharts.Runtime if (label.autoOffset) { var currAngle = serieData.context.halfAngle - serie.context.startAngle; - var isRight = currAngle % 360 < 180; - if (isRight) return offset; - else return new Vector3(-offset.x, offset.y, offset.z); + var isLeft = currAngle > 180 || (currAngle == 0 && serieData.context.startAngle > 0); + if (isLeft) + return new Vector3(-offset.x, offset.y, offset.z); + else + return offset; } else { @@ -464,10 +466,11 @@ namespace XCharts.Runtime var rad = Mathf.Deg2Rad * serieData.context.halfAngle; var lineLength1 = ChartHelper.GetActualValue(labelLine.lineLength1, serie.context.outsideRadius); var lineLength2 = ChartHelper.GetActualValue(labelLine.lineLength2, serie.context.outsideRadius); + var radius = lineLength1 + serie.context.outsideRadius - serieData.context.outsideRadius; var pos1 = startPosition; - var pos2 = pos1 + new Vector3(Mathf.Sin(rad) * lineLength1, Mathf.Cos(rad) * lineLength1); + var pos2 = pos1 + new Vector3(Mathf.Sin(rad) * radius, Mathf.Cos(rad) * radius); var pos5 = labelLine.lineType == LabelLine.LineType.HorizontalLine - ? pos1 + dire * (lineLength1 + lineLength2) + labelLine.GetEndSymbolOffset() + ? pos1 + dire * (radius + lineLength2) + labelLine.GetEndSymbolOffset() : pos2 + dire * lineLength2 + labelLine.GetEndSymbolOffset(); if (labelLine.lineEndX != 0) { diff --git a/Runtime/Serie/Radar/Radar.cs b/Runtime/Serie/Radar/Radar.cs index d7d2e3dc..4ca21d0f 100644 --- a/Runtime/Serie/Radar/Radar.cs +++ b/Runtime/Serie/Radar/Radar.cs @@ -15,7 +15,7 @@ namespace XCharts.Runtime /// <summary> /// Whether use smooth curve. - /// |是否平滑曲线。平滑曲线时不支持区域填充颜色。 + /// ||是否平滑曲线。平滑曲线时不支持区域填充颜色。 /// </summary> public bool smooth { diff --git a/Runtime/Serie/Serie.ExtraComponent.cs b/Runtime/Serie/Serie.ExtraComponent.cs index ac7d546a..52a8a09a 100644 --- a/Runtime/Serie/Serie.ExtraComponent.cs +++ b/Runtime/Serie/Serie.ExtraComponent.cs @@ -32,49 +32,49 @@ namespace XCharts.Runtime /// <summary> /// The style of area. - /// |区域填充样式。 + /// ||区域填充样式。 /// </summary> public AreaStyle areaStyle { get { return m_AreaStyles.Count > 0 ? m_AreaStyles[0] : null; } } /// <summary> /// Text label of graphic element,to explain some data information about graphic item like value, name and so on. - /// |图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 + /// ||图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。 /// </summary> public LabelStyle label { get { return m_Labels.Count > 0 ? m_Labels[0] : null; } } public LabelStyle endLabel { get { return m_EndLabels.Count > 0 ? m_EndLabels[0] : null; } } /// <summary> /// The line of label. - /// |标签上的视觉引导线。 + /// ||标签上的视觉引导线。 /// </summary> public LabelLine labelLine { get { return m_LabelLines.Count > 0 ? m_LabelLines[0] : null; } } /// <summary> /// The arrow of line. - /// |折线图的箭头。 + /// ||折线图的箭头。 /// </summary> public LineArrow lineArrow { get { return m_LineArrows.Count > 0 ? m_LineArrows[0] : null; } } /// <summary> /// the icon of data. - /// |数据项标题样式。 + /// ||数据项标题样式。 /// </summary> public TitleStyle titleStyle { get { return m_TitleStyles.Count > 0 ? m_TitleStyles[0] : null; } } /// <summary> /// style of emphasis state. - /// |高亮状态的样式。 + /// ||高亮状态的样式。 /// </summary> public EmphasisStyle emphasisStyle { get { return m_EmphasisStyles.Count > 0 ? m_EmphasisStyles[0] : null; } } /// <summary> /// style of blur state. - /// |淡出状态的样式。 + /// ||淡出状态的样式。 /// </summary> public BlurStyle blurStyle { get { return m_BlurStyles.Count > 0 ? m_BlurStyles[0] : null; } } /// <summary> /// style of select state. - /// |选中状态的样式。 + /// ||选中状态的样式。 /// </summary> public SelectStyle selectStyle { get { return m_SelectStyles.Count > 0 ? m_SelectStyles[0] : null; } } /// <summary> /// Remove all extra components. - /// |移除所有额外组件。 + /// ||移除所有额外组件。 /// </summary> public void RemoveAllComponents() { @@ -99,7 +99,7 @@ namespace XCharts.Runtime /// <summary> /// Ensure the serie has the component. If not, add it. - /// |确保系列有该组件。如果没有,则添加。 + /// ||确保系列有该组件。如果没有,则添加。 /// </summary> /// <typeparam name="T"></typeparam> /// <returns>component or null</returns> diff --git a/Runtime/Serie/Serie.cs b/Runtime/Serie/Serie.cs index a2d5f6e4..c724c80a 100644 --- a/Runtime/Serie/Serie.cs +++ b/Runtime/Serie/Serie.cs @@ -6,161 +6,161 @@ namespace XCharts.Runtime { /// <summary> /// Whether to show as Nightingale chart, which distinguishs data through radius. - /// |是否展示成南丁格尔图,通过半径区分数据大小。 + /// ||是否展示成南丁格尔图,通过半径区分数据大小。 /// </summary> public enum RoseType { /// <summary> /// Don't show as Nightingale chart. - /// |不展示成南丁格尔玫瑰图。 + /// ||不展示成南丁格尔玫瑰图。 /// </summary> None, /// <summary> /// Use central angle to show the percentage of data, radius to show data size. - /// |扇区圆心角展现数据的百分比,半径展现数据的大小。 + /// ||扇区圆心角展现数据的百分比,半径展现数据的大小。 /// </summary> Radius, /// <summary> /// All the sectors will share the same central angle, the data size is shown only through radiuses. - /// |所有扇区圆心角相同,仅通过半径展现数据大小。 + /// ||所有扇区圆心角相同,仅通过半径展现数据大小。 /// </summary> Area } /// <summary> /// the type of line chart. - /// |折线图样式类型 + /// ||折线图样式类型 /// </summary> public enum LineType { /// <summary> /// the normal line chart, - /// |普通折线图。 + /// ||普通折线图。 /// </summary> Normal, /// <summary> /// the smooth line chart, - /// |平滑曲线。 + /// ||平滑曲线。 /// </summary> Smooth, /// <summary> /// step line. - /// |阶梯线图:当前点。 + /// ||阶梯线图:当前点。 /// </summary> StepStart, /// <summary> /// step line. - /// |阶梯线图:当前点和下一个点的中间。 + /// ||阶梯线图:当前点和下一个点的中间。 /// </summary> StepMiddle, /// <summary> /// step line. - /// |阶梯线图:下一个拐点。 + /// ||阶梯线图:下一个拐点。 /// </summary> StepEnd } /// <summary> /// the type of bar. - /// |柱状图类型。 + /// ||柱状图类型。 /// </summary> public enum BarType { /// <summary> /// normal bar. - /// |普通柱形图。 + /// ||普通柱形图。 /// </summary> Normal, /// <summary> /// zebra bar. - /// |斑马柱形图。 + /// ||斑马柱形图。 /// </summary> Zebra, /// <summary> /// capsule bar. - /// |胶囊柱形图。 + /// ||胶囊柱形图。 /// </summary> Capsule } /// <summary> /// the type of radar. - /// |雷达图类型。 + /// ||雷达图类型。 /// </summary> public enum RadarType { /// <summary> /// multiple radar. - /// |多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。 + /// ||多圈雷达图。此时可一个雷达里绘制多个圈,一个serieData就可组成一个圈(多维数据)。 /// </summary> Multiple, /// <summary> /// single radar. - /// |单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自`data[1]`。 + /// ||单圈雷达图。此时一个雷达只能绘制一个圈,多个serieData组成一个圈,数据取自`data[1]`。 /// </summary> Single } /// <summary> /// sample type of line chart. - /// |采样类型,一般用于折线图。 + /// ||采样类型,一般用于折线图。 /// </summary> public enum SampleType { /// <summary> /// Take a peak. When the average value of the filter point is greater than or equal to 'sampleAverage', /// take the maximum value; If you do it the other way around, you get the minimum. - /// |取峰值。 + /// ||取峰值。 /// </summary> Peak, /// <summary> /// Take the average of the filter points. - /// |取过滤点的平均值。 + /// ||取过滤点的平均值。 /// </summary> Average, /// <summary> /// Take the maximum value of the filter point. - /// |取过滤点的最大值。 + /// ||取过滤点的最大值。 /// </summary> Max, /// <summary> /// Take the minimum value of the filter point. - /// |取过滤点的最小值。 + /// ||取过滤点的最小值。 /// </summary> Min, /// <summary> /// Take the sum of the filter points. - /// |取过滤点的和。 + /// ||取过滤点的和。 /// </summary> Sum } /// <summary> /// the sort type of serie data. - /// |数据排序方式。 + /// ||数据排序方式。 /// </summary> public enum SerieDataSortType { /// <summary> /// In the order of data. - /// |按数据的顺序。 + /// ||按数据的顺序。 /// </summary> None, /// <summary> /// Sort data in ascending order. - /// |升序。 + /// ||升序。 /// </summary> Ascending, /// <summary> /// Sort data in descending order. - /// |降序。 + /// ||降序。 /// </summary> Descending, } /// <summary> /// Alignment mode. - /// |对齐方式。文本,图标,图形等的对齐方式。 + /// ||对齐方式。文本,图标,图形等的对齐方式。 /// </summary> public enum Align { @@ -171,56 +171,56 @@ namespace XCharts.Runtime /// <summary> /// Serie state. Supports normal, emphasis, blur, and select states. - /// |Serie状态。支持正常、高亮、淡出、选中四种状态。 + /// ||Serie状态。支持正常、高亮、淡出、选中四种状态。 /// </summary> public enum SerieState { /// <summary> /// Normal state. - /// |正常状态。 + /// ||正常状态。 /// </summary> Normal, /// <summary> /// Emphasis state. - /// |高亮状态。 + /// ||高亮状态。 /// </summary> Emphasis, /// <summary> /// Blur state. - /// |淡出状态。 + /// ||淡出状态。 /// </summary> Blur, /// <summary> /// Select state. - /// |选中状态。 + /// ||选中状态。 /// </summary> Select, /// <summary> /// Auto state. - /// |自动保持和父节点一致。一般用在SerieData。 + /// ||自动保持和父节点一致。一般用在SerieData。 /// </summary> Auto } /// <summary> /// The policy to take color from theme. - /// |从主题中取色策略。 + /// ||从主题中取色策略。 /// </summary> public enum SerieColorBy { /// <summary> /// Select state. - /// |默认策略。每种Serie都有自己的默认的取颜色策略。比如Line默认是Series策略,Pie默认是Data策略。 + /// ||默认策略。每种Serie都有自己的默认的取颜色策略。比如Line默认是Series策略,Pie默认是Data策略。 /// </summary> Default, /// <summary> /// assigns the colors in the palette by serie, so that all data in the same series are in the same color. - /// |按照系列分配调色盘中的颜色,同一系列中的所有数据都是用相同的颜色。 + /// ||按照系列分配调色盘中的颜色,同一系列中的所有数据都是用相同的颜色。 /// </summary> Serie, /// <summary> /// assigns colors in the palette according to data items, with each data item using a different color. - /// |按照数据项分配调色盘中的颜色,每个数据项都使用不同的颜色。 + /// ||按照数据项分配调色盘中的颜色,每个数据项都使用不同的颜色。 /// </summary> Data } @@ -321,33 +321,33 @@ namespace XCharts.Runtime /// <summary> /// event callback when click serie. - /// |点击系列时的回调。 + /// ||点击系列时的回调。 /// </summary> public Action<SerieEventData> onClick { get; set; } /// <summary> /// event callback when mouse down on serie. - /// |鼠标按下时的回调。 + /// ||鼠标按下时的回调。 /// </summary> public Action<SerieEventData> onDown { get; set; } /// <summary> /// event callback when mouse enter serie. - /// |鼠标进入时的回调。 + /// ||鼠标进入时的回调。 /// </summary> public Action<SerieEventData> onEnter { get; set; } /// <summary> /// event callback when mouse leave serie. - /// |鼠标离开时的回调。 + /// ||鼠标离开时的回调。 /// </summary> public Action<SerieEventData> onExit { get; set; } /// <summary> /// The index of serie. - /// |系列索引。 + /// ||系列索引。 /// </summary> public int index { get { return m_Index; } internal set { m_Index = value; } } /// <summary> /// Whether to show serie in chart. - /// |系列是否显示在图表上。 + /// ||系列是否显示在图表上。 /// </summary> public bool show { @@ -356,7 +356,7 @@ namespace XCharts.Runtime } /// <summary> /// the chart coord system of serie. - /// |使用的坐标系。 + /// ||使用的坐标系。 /// </summary> public string coordSystem { @@ -365,7 +365,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of serie. - /// |系列类型。 + /// ||系列类型。 /// </summary> public string serieType { @@ -374,7 +374,7 @@ namespace XCharts.Runtime } /// <summary> /// Series name used for displaying in tooltip and filtering with legend. - /// |系列名称,用于 tooltip 的显示,legend 的图例筛选。 + /// ||系列名称,用于 tooltip 的显示,legend 的图例筛选。 /// </summary> public string serieName { @@ -383,12 +383,12 @@ namespace XCharts.Runtime } /// <summary> /// Legend name. When the serie name is not empty, the legend name is the series name; Otherwise, it is index. - /// |图例名称。当系列名称不为空时,图例名称即为系列名称;反之则为索引index。 + /// ||图例名称。当系列名称不为空时,图例名称即为系列名称;反之则为索引index。 /// </summary> public string legendName { get { return string.IsNullOrEmpty(serieName) ? ChartCached.IntToStr(index) : serieName; } } /// <summary> /// The default state of a serie. - /// |系列的默认状态。 + /// ||系列的默认状态。 /// </summary> public SerieState state { @@ -397,7 +397,7 @@ namespace XCharts.Runtime } /// <summary> /// The policy to take color from theme. - /// |从主题中取色的策略。 + /// ||从主题中取色的策略。 /// </summary> public SerieColorBy colorBy { @@ -407,7 +407,7 @@ namespace XCharts.Runtime } /// <summary> /// If stack the value. On the same category axis, the series with the same stack name would be put on top of each other. - /// |数据堆叠,同个类目轴上系列配置相同的stack值后,后一个系列的值会在前一个系列的值上相加。 + /// ||数据堆叠,同个类目轴上系列配置相同的stack值后,后一个系列的值会在前一个系列的值上相加。 /// </summary> public string stack { @@ -416,7 +416,7 @@ namespace XCharts.Runtime } /// <summary> /// the index of XAxis. - /// |使用X轴的index。 + /// ||使用X轴的index。 /// </summary> public int xAxisIndex { @@ -425,7 +425,7 @@ namespace XCharts.Runtime } /// <summary> /// the index of YAxis. - /// |使用Y轴的index。 + /// ||使用Y轴的index。 /// </summary> public int yAxisIndex { @@ -434,7 +434,7 @@ namespace XCharts.Runtime } /// <summary> /// Index of radar component that radar chart uses. - /// |雷达图所使用的 radar 组件的 index。 + /// ||雷达图所使用的 radar 组件的 index。 /// </summary> public int radarIndex { @@ -443,7 +443,7 @@ namespace XCharts.Runtime } /// <summary> /// Index of vesel component that liquid chart uses. - /// |水位图所使用的 vessel 组件的 index。 + /// ||水位图所使用的 vessel 组件的 index。 /// </summary> public int vesselIndex { @@ -452,7 +452,7 @@ namespace XCharts.Runtime } /// <summary> /// Index of polar component that serie uses. - /// |所使用的 polar 组件的 index。 + /// ||所使用的 polar 组件的 index。 /// </summary> public int polarIndex { @@ -461,7 +461,7 @@ namespace XCharts.Runtime } /// <summary>s /// Index of single axis component that serie uses. - /// |所使用的 singleAxis 组件的 index。 + /// ||所使用的 singleAxis 组件的 index。 /// </summary> public int singleAxisIndex { @@ -470,7 +470,7 @@ namespace XCharts.Runtime } /// <summary>s /// Index of parallel coord component that serie uses. - /// |所使用的 parallel coord 组件的 index。 + /// ||所使用的 parallel coord 组件的 index。 /// </summary> public int parallelIndex { @@ -479,7 +479,7 @@ namespace XCharts.Runtime } /// <summary> /// Index of layout component that serie uses. Default is -1 means not use layout, otherwise use the first layout component. - /// |所使用的 layout 组件的 index。 默认为-1不指定index, 当为大于或等于0时, 为第一个layout组件的第index个格子。 + /// ||所使用的 layout 组件的 index。 默认为-1不指定index, 当为大于或等于0时, 为第一个layout组件的第index个格子。 /// </summary> public int gridIndex { @@ -488,7 +488,7 @@ namespace XCharts.Runtime } /// <summary> /// The min number of data to show in chart. - /// |系列所显示数据的最小索引 + /// ||系列所显示数据的最小索引 /// </summary> public int minShow { @@ -497,7 +497,7 @@ namespace XCharts.Runtime } /// <summary> /// The max number of data to show in chart. - /// |系列所显示数据的最大索引 + /// ||系列所显示数据的最大索引 /// </summary> public int maxShow { @@ -507,7 +507,7 @@ namespace XCharts.Runtime /// <summary> /// The max number of serie data cache. /// The first data will be remove when the size of serie data is larger then maxCache. - /// |系列中可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。 + /// ||系列中可缓存的最大数据量。默认为0没有限制,大于0时超过指定值会移除旧数据再插入新数据。 /// </summary> public int maxCache { @@ -517,7 +517,7 @@ namespace XCharts.Runtime /// <summary> /// the symbol of serie data item. - /// |标记的图形。 + /// ||标记的图形。 /// </summary> public SerieSymbol symbol { @@ -526,7 +526,7 @@ namespace XCharts.Runtime } /// <summary> /// The type of line chart. - /// |折线图样式类型。 + /// ||折线图样式类型。 /// </summary> public LineType lineType { @@ -536,7 +536,7 @@ namespace XCharts.Runtime /// <summary> /// Whether to restrict the curve. When true, the curve between two continuous data of the same value /// is restricted to not exceed the data point, and is flat to the data point. - /// |是否限制曲线。当为true时,两个连续相同数值的数据间的曲线会限制为不超出数据点,和数据点是平直的。 + /// ||是否限制曲线。当为true时,两个连续相同数值的数据间的曲线会限制为不超出数据点,和数据点是平直的。 /// </summary> public bool smoothLimit { @@ -545,7 +545,7 @@ namespace XCharts.Runtime } /// <summary> /// the min pixel dist of sample. - /// |采样的最小像素距离,默认为0时不采样。当两个数据点间的水平距离小于改值时,开启采样,保证两点间的水平距离不小于改值。 + /// ||采样的最小像素距离,默认为0时不采样。当两个数据点间的水平距离小于改值时,开启采样,保证两点间的水平距离不小于改值。 /// </summary> public float sampleDist { @@ -554,7 +554,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of sample. - /// |采样类型。当sampleDist大于0时有效。 + /// ||采样类型。当sampleDist大于0时有效。 /// </summary> public SampleType sampleType { @@ -571,7 +571,7 @@ namespace XCharts.Runtime } /// <summary> /// The style of line. - /// |线条样式。 + /// ||线条样式。 /// </summary> public LineStyle lineStyle { @@ -596,7 +596,7 @@ namespace XCharts.Runtime } /// <summary> /// The width of the bar. Adaptive when default 0. - /// |柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 + /// ||柱条的宽度,不设时自适应。支持设置成相对于类目宽度的百分比。 /// </summary> public float barWidth { @@ -605,7 +605,7 @@ namespace XCharts.Runtime } /// <summary> /// The max width of the bar. Adaptive when default 0. - /// |柱条的最大宽度,默认为0为不限制最大宽度。支持设置成相对于类目宽度的百分比。 + /// ||柱条的最大宽度,默认为0为不限制最大宽度。支持设置成相对于类目宽度的百分比。 /// </summary> public float barMaxWidth { @@ -618,7 +618,7 @@ namespace XCharts.Runtime /// In a single coodinate system, this attribute is shared by multiple 'bar' series. /// This attribute should be set on the last 'bar' series in the coodinate system, /// then it will be adopted by all 'bar' series in the coordinate system. - /// |不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30%) + /// ||不同系列的柱间距离。为百分比(如 '0.3f',表示柱子宽度的 30%) /// 如果想要两个系列的柱子重叠,可以设置 barGap 为 '-1f'。这在用柱子做背景的时候有用。 /// 在同一坐标系上,此属性会被多个 'bar' 系列共享。此属性应设置于此坐标系中最后一个 'bar' 系列上才会生效,并且是对此坐标系中所有 'bar' 系列生效。 /// </summary> @@ -646,7 +646,7 @@ namespace XCharts.Runtime /// <summary> /// Whether offset when mouse click pie chart item. - /// |鼠标点击时是否开启偏移,一般用在PieChart图表中。 + /// ||鼠标点击时是否开启偏移,一般用在PieChart图表中。 /// </summary> public bool pieClickOffset { @@ -655,7 +655,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to show as Nightingale chart. - /// |是否展示成南丁格尔图,通过半径区分数据大小。 + /// ||是否展示成南丁格尔图,通过半径区分数据大小。 /// </summary> public RoseType pieRoseType { @@ -664,7 +664,7 @@ namespace XCharts.Runtime } /// <summary> /// gap of item. - /// |间距。 + /// ||间距。 /// </summary> public float gap { @@ -673,7 +673,7 @@ namespace XCharts.Runtime } /// <summary> /// the center of chart. - /// |中心点。 + /// ||中心点。 /// </summary> public float[] center { @@ -682,7 +682,7 @@ namespace XCharts.Runtime } /// <summary> /// the radius of chart. - /// |半径。radius[0]表示内径,radius[1]表示外径。 + /// ||半径。radius[0]表示内径,radius[1]表示外径。 /// </summary> public float[] radius { @@ -691,7 +691,7 @@ namespace XCharts.Runtime } /// <summary> /// the min radius of chart. It can be used to limit the minimum radius of the rose chart. - /// |最小半径。可用于限制玫瑰图的最小半径。 + /// ||最小半径。可用于限制玫瑰图的最小半径。 /// </summary> public float minRadius { @@ -748,7 +748,7 @@ namespace XCharts.Runtime } /// <summary> /// The minimum angle of sector(0-360). It prevents some sector from being too small when value is small. - /// |最小的扇区角度(0-360)。用于防止某个值过小导致扇区太小影响交互。 + /// ||最小的扇区角度(0-360)。用于防止某个值过小导致扇区太小影响交互。 /// </summary> public float minAngle { @@ -798,7 +798,6 @@ namespace XCharts.Runtime /// <summary> /// 忽略数据时折线是断开还是连接。默认false为连接。 /// </summary> - /// <value></value> public bool ignoreLineBreak { get { return m_IgnoreLineBreak; } @@ -814,7 +813,7 @@ namespace XCharts.Runtime } /// <summary> /// The start animation. - /// |起始动画。 + /// ||起始动画。 /// </summary> public AnimationStyle animation { @@ -823,7 +822,7 @@ namespace XCharts.Runtime } /// <summary> /// The style of data item. - /// |图形样式。 + /// ||图形样式。 /// </summary> public ItemStyle itemStyle { @@ -833,14 +832,14 @@ namespace XCharts.Runtime /// <summary> /// 数据项里的数据维数。 /// </summary> - public int showDataDimension { get { return m_ShowDataDimension; } set { m_ShowDataDimension = Mathf.Clamp(2, 10, value); } } + public int showDataDimension { get { return m_ShowDataDimension; } set { m_ShowDataDimension = Mathf.Clamp(value, 2, 10); } } /// <summary> /// 在Editor的inpsector上是否显示name参数 /// </summary> public bool showDataName { get { return m_ShowDataName; } set { m_ShowDataName = value; } } /// <summary> /// If clip the overflow on the coordinate system. - /// |是否裁剪超出坐标系部分的图形。 + /// ||是否裁剪超出坐标系部分的图形。 /// </summary> public bool clip { @@ -849,7 +848,7 @@ namespace XCharts.Runtime } /// <summary> /// Show negative number as positive number. - /// |将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 + /// ||将负数数值显示为正数。一般和`AxisLabel`的`showAsPositiveNumber`配合使用。仅在折线图和柱状图中有效。 /// </summary> public bool showAsPositiveNumber { @@ -868,7 +867,7 @@ namespace XCharts.Runtime } /// <summary> /// Turn on the threshold for mass optimization. Enter performance mode only when large is enabled and the amount of data is greater than the threshold. - /// |开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 + /// ||开启大数量优化的阈值。只有当开启了large并且数据量大于该阀值时才进入性能模式。 /// </summary> public int largeThreshold { @@ -877,7 +876,7 @@ namespace XCharts.Runtime } /// <summary> /// If the pie chart and labels are displayed externally, whether to enable the label overlap prevention policy is disabled by default. If labels are crowded and overlapped, the positions of labels are moved to prevent label overlap. - /// |在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 + /// ||在饼图且标签外部显示的情况下,是否启用防止标签重叠策略,默认关闭,在标签拥挤重叠的情况下会挪动各个标签的位置,防止标签间的重叠。 /// </summary> public bool avoidLabelOverlap { @@ -887,7 +886,7 @@ namespace XCharts.Runtime /// <summary> /// Distance between component and the left side of the container. - /// |组件离容器左侧的距离。 + /// ||组件离容器左侧的距离。 /// </summary> public float left { @@ -896,7 +895,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the right side of the container. - /// |组件离容器右侧的距离。 + /// ||组件离容器右侧的距离。 /// </summary> public float right { @@ -905,7 +904,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the top side of the container. - /// |组件离容器上侧的距离。 + /// ||组件离容器上侧的距离。 /// </summary> public float top { @@ -914,7 +913,7 @@ namespace XCharts.Runtime } /// <summary> /// Distance between component and the bottom side of the container. - /// |组件离容器下侧的距离。 + /// ||组件离容器下侧的距离。 /// </summary> public float bottom { @@ -923,7 +922,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether to add new data at the head or at the end of the list. - /// |添加新数据时是在列表的头部还是尾部加入。 + /// ||添加新数据时是在列表的头部还是尾部加入。 /// </summary> public bool insertDataToHead { @@ -1080,12 +1079,12 @@ namespace XCharts.Runtime } /// <summary> /// Whether the serie is highlighted. - /// |该系列是否高亮,一般由图例悬停触发。 + /// ||该系列是否高亮,一般由图例悬停触发。 /// </summary> public bool highlight { get; internal set; } /// <summary> /// the count of data list. - /// |数据项个数。 + /// ||数据项个数。 /// </summary> public int dataCount { get { return m_Data.Count; } } public bool nameDirty { get { return m_NameDirty; } } @@ -1700,8 +1699,7 @@ namespace XCharts.Runtime /// <param name="value"></param> public bool UpdateYData(int index, double value) { - UpdateData(index, 1, value); - return true; + return UpdateData(index, 1, value); } /// <summary> diff --git a/Runtime/Serie/SerieData.cs b/Runtime/Serie/SerieData.cs index d1ae84d0..c0e79546 100644 --- a/Runtime/Serie/SerieData.cs +++ b/Runtime/Serie/SerieData.cs @@ -7,7 +7,7 @@ namespace XCharts.Runtime { /// <summary> /// A data item of serie. - /// |系列中的一个数据项。可存储数据名和1-n维个数据。 + /// ||系列中的一个数据项。可存储数据名和1-n维个数据。 /// </summary> [System.Serializable] public class SerieData : ChildComponent @@ -63,22 +63,22 @@ namespace XCharts.Runtime private bool m_Show = true; /// <summary> /// the index of SerieData. - /// |数据项索引。 + /// ||数据项索引。 /// </summary> public override int index { get { return m_Index; } set { m_Index = value; } } /// <summary> /// the name of data item. - /// |数据项名称。 + /// ||数据项名称。 /// </summary> public string name { get { return m_Name; } set { m_Name = value; } } /// <summary> /// the id of data. - /// |数据项的唯一id。唯一id不是必须设置的。 + /// ||数据项的唯一id。唯一id不是必须设置的。 /// </summary> public string id { get { return m_Id; } set { m_Id = value; } } /// <summary> /// the id of parent SerieData. - /// |父节点id。父节点id不是必须设置的。 + /// ||父节点id。父节点id不是必须设置的。 /// </summary> public string parentId { get { return m_ParentId; } set { m_ParentId = value; } } /// <summary> @@ -95,18 +95,17 @@ namespace XCharts.Runtime public float radius { get { return m_Radius; } set { m_Radius = value; } } /// <summary> /// Whether the data item is selected. - /// |该数据项是否被选中。 + /// ||该数据项是否被选中。 /// </summary> public bool selected { get { return m_Selected; } set { m_Selected = value; } } /// <summary> /// the state of serie data. - /// |数据项的默认状态。 + /// ||数据项的默认状态。 /// </summary> public SerieState state { get { return m_State; } set { m_State = value; } } /// <summary> /// 数据项图例名称。当数据项名称不为空时,图例名称即为系列名称;反之则为索引index。 /// </summary> - /// <value></value> public string legendName { get { return string.IsNullOrEmpty(name) ? ChartCached.IntToStr(index) : name; } } /// <summary> @@ -140,12 +139,12 @@ namespace XCharts.Runtime /// <summary> /// An arbitrary dimension data list of data item. - /// |可指定任意维数的数值列表。 + /// ||可指定任意维数的数值列表。 /// </summary> public List<double> data { get { return m_Data; } set { m_Data = value; } } /// <summary> /// [default:true] Whether the data item is showed. - /// |该数据项是否要显示。 + /// ||该数据项是否要显示。 /// </summary> public bool show { get { return m_Show; } set { m_Show = value; } } @@ -270,7 +269,7 @@ namespace XCharts.Runtime /// <summary> /// Get the component of the serie data. return null if not exist. - /// |获取数据项的指定类型的组件,如果不存在则返回null。 + /// ||获取数据项的指定类型的组件,如果不存在则返回null。 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> @@ -281,7 +280,7 @@ namespace XCharts.Runtime /// <summary> /// Ensure the serie data has the component, if not, add it. - /// |确保数据项有指定类型的组件,如果没有则添加。 + /// ||确保数据项有指定类型的组件,如果没有则添加。 /// </summary> /// <typeparam name="T"></typeparam> /// <returns></returns> @@ -293,7 +292,7 @@ namespace XCharts.Runtime /// <summary> /// Ensure the serie data has the component, if not, add it. - /// |确保数据项有指定类型的组件,如果没有则添加。 + /// ||确保数据项有指定类型的组件,如果没有则添加。 /// </summary> /// <param name="type"></param> /// <returns></returns> @@ -643,7 +642,7 @@ namespace XCharts.Runtime /// <summary> /// the maxinum value. - /// |最大值。 + /// ||最大值。 /// </summary> public double GetMaxData(bool inverse = false) { @@ -659,7 +658,7 @@ namespace XCharts.Runtime /// <summary> /// the mininum value. - /// |最小值。 + /// ||最小值。 /// </summary> public double GetMinData(bool inverse = false) { diff --git a/Runtime/Serie/SerieDataContext.cs b/Runtime/Serie/SerieDataContext.cs index 685f541f..2666950d 100644 --- a/Runtime/Serie/SerieDataContext.cs +++ b/Runtime/Serie/SerieDataContext.cs @@ -57,7 +57,7 @@ namespace XCharts.Runtime public Image symbol; /// <summary> /// Whether the data item is highlighted. - /// |该数据项是否被高亮,一般由鼠标悬停或图例悬停触发高亮。 + /// ||该数据项是否被高亮,一般由鼠标悬停或图例悬停触发高亮。 /// </summary> public bool highlight { diff --git a/Runtime/Serie/SerieHandler.cs b/Runtime/Serie/SerieHandler.cs index f2774cfb..fb1e94f7 100644 --- a/Runtime/Serie/SerieHandler.cs +++ b/Runtime/Serie/SerieHandler.cs @@ -108,6 +108,7 @@ namespace XCharts.Runtime if (serie.dataDirty) { SeriesHelper.UpdateSerieNameList(chart, ref chart.m_LegendRealShowName); + chart.OnSerieDataUpdate(serie.index); serie.OnDataUpdate(); serie.dataDirty = false; } @@ -149,38 +150,11 @@ namespace XCharts.Runtime serie.interactDirty = false; m_ForceUpdateSerieContext = true; } + UpdateSerieContextInternal(); } public override void AfterUpdate() { - UpdateSerieContextInternal(); - } - - public override void ForceUpdateSerieContext() - { - m_ForceUpdateSerieContext = true; - } - - private void CheckConfigurationChanged() - { - if (m_LastRadius[0] != serie.radius[0] || m_LastRadius[1] != serie.radius[1]) - { - m_LastRadius[0] = serie.radius[0]; - m_LastRadius[1] = serie.radius[1]; - serie.SetVerticesDirty(); - } - if (m_LastCenter[0] != serie.center[0] || m_LastCenter[1] != serie.center[1]) - { - m_LastCenter[0] = serie.center[0]; - m_LastCenter[1] = serie.center[1]; - serie.SetVerticesDirty(); - } - } - - private void UpdateSerieContextInternal() - { - UpdateSerieContext(); - m_ForceUpdateSerieContext = false; if (m_LastPointerEnter != serie.context.pointerEnter || m_LastPointerDataIndex != serie.context.pointerItemDataIndex) { if (chart.onSerieEnter != null || chart.onSerieExit != null || serie.onEnter != null || serie.onExit != null) @@ -215,6 +189,33 @@ namespace XCharts.Runtime } } + public override void ForceUpdateSerieContext() + { + m_ForceUpdateSerieContext = true; + } + + private void CheckConfigurationChanged() + { + if (m_LastRadius[0] != serie.radius[0] || m_LastRadius[1] != serie.radius[1]) + { + m_LastRadius[0] = serie.radius[0]; + m_LastRadius[1] = serie.radius[1]; + serie.SetVerticesDirty(); + } + if (m_LastCenter[0] != serie.center[0] || m_LastCenter[1] != serie.center[1]) + { + m_LastCenter[0] = serie.center[0]; + m_LastCenter[1] = serie.center[1]; + serie.SetVerticesDirty(); + } + } + + private void UpdateSerieContextInternal() + { + UpdateSerieContext(); + m_ForceUpdateSerieContext = false; + } + public override void RefreshLabelNextFrame() { m_RefreshLabel = true; @@ -418,7 +419,7 @@ namespace XCharts.Runtime else { content = titleStyle.formatter; - FormatterHelper.ReplaceContent(ref content, 0, titleStyle.numericFormatter, serie, chart); + FormatterHelper.ReplaceContent(ref content, -1, titleStyle.numericFormatter, serie, chart); } var label = ChartHelper.AddChartLabel("title_" + 0, serieTitleRoot.transform, titleStyle, chart.theme.common, content, color, TextAnchor.MiddleCenter); @@ -445,9 +446,8 @@ namespace XCharts.Runtime else { content = titleStyle.formatter; - FormatterHelper.ReplaceContent(ref content, 0, titleStyle.numericFormatter, serie, chart); + FormatterHelper.ReplaceContent(ref content, i, titleStyle.numericFormatter, serie, chart); } - FormatterHelper.ReplaceContent(ref content, i, titleStyle.numericFormatter, serie, chart); var label = ChartHelper.AddChartLabel("title_" + i, serieTitleRoot.transform, titleStyle, chart.theme.common, content, color, TextAnchor.MiddleCenter); serieData.titleObject = label; diff --git a/Runtime/Serie/SerieHelper.cs b/Runtime/Serie/SerieHelper.cs index 01419756..573e2c26 100644 --- a/Runtime/Serie/SerieHelper.cs +++ b/Runtime/Serie/SerieHelper.cs @@ -118,7 +118,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the maximum and minimum values of the specified dimension of a serie. - /// |获得系列指定维数的最大最小值。 + /// ||获得系列指定维数的最大最小值。 /// </summary> /// <param name="serie">指定系列</param> /// <param name="dimension">指定维数</param> @@ -153,7 +153,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the maximum and minimum values of all data in the serie. - /// |获得系列所有数据的最大最小值。 + /// ||获得系列所有数据的最大最小值。 /// </summary> /// <param name="serie"></param> /// <param name="min"></param> @@ -194,7 +194,7 @@ namespace XCharts.Runtime /// <summary> /// Whether the data for the specified dimension of serie are all 0. - /// |系列指定维数的数据是否全部为0。 + /// ||系列指定维数的数据是否全部为0。 /// </summary> /// <param name="serie">系列</param> /// <param name="dimension">指定维数</param> @@ -469,7 +469,9 @@ namespace XCharts.Runtime else { var stateStyle = GetStateStyle(serie, serieData, state); - return stateStyle == null || !stateStyle.show ? serie.label : stateStyle.label; + if (stateStyle != null && stateStyle.show) return stateStyle.label; + else if (serieData.labelStyle != null) return serieData.labelStyle; + else return serie.label; } } @@ -483,7 +485,9 @@ namespace XCharts.Runtime else { var stateStyle = GetStateStyle(serie, serieData, state); - return stateStyle == null || !stateStyle.show ? serie.labelLine : stateStyle.labelLine; + if (stateStyle != null && stateStyle.show) return stateStyle.labelLine; + else if (serieData.labelLine != null) return serieData.labelLine; + else return serie.labelLine; } } @@ -497,7 +501,9 @@ namespace XCharts.Runtime else { var stateStyle = GetStateStyle(serie, serieData, state); - return stateStyle == null || !stateStyle.show ? serie.symbol : stateStyle.symbol; + if (stateStyle != null && stateStyle.show) return stateStyle.symbol; + else if (serieData.symbol != null) return serieData.symbol; + else return serie.symbol; } } diff --git a/Runtime/Serie/SeriesHelper.cs b/Runtime/Serie/SeriesHelper.cs index 074f2c50..a8575bc2 100644 --- a/Runtime/Serie/SeriesHelper.cs +++ b/Runtime/Serie/SeriesHelper.cs @@ -308,10 +308,10 @@ namespace XCharts.Runtime /// <param name="axisIndex"></param> /// <param name="minValue"></param> /// <param name="maxValue"></param> - public static void GetXMinMaxValue(BaseChart chart, int axisIndex, bool isValueAxis, - bool inverse, out double minValue, out double maxValue, bool isPolar = false, bool filterByDataZoom = true) + public static void GetXMinMaxValue(BaseChart chart, int axisIndex, bool inverse, out double minValue, + out double maxValue, bool isPolar = false, bool filterByDataZoom = true, bool needAnimation = false) { - GetMinMaxValue(chart, axisIndex, isValueAxis, inverse, false, out minValue, out maxValue, isPolar, filterByDataZoom); + GetMinMaxValue(chart, axisIndex, inverse, false, out minValue, out maxValue, isPolar, filterByDataZoom, needAnimation); } /// <summary> @@ -321,18 +321,17 @@ namespace XCharts.Runtime /// <param name="axisIndex"></param> /// <param name="minValue"></param> /// <param name="maxValue"></param> - public static void GetYMinMaxValue(BaseChart chart, int axisIndex, bool isValueAxis, - bool inverse, out double minValue, out double maxValue, bool isPolar = false, bool filterByDataZoom = true) + public static void GetYMinMaxValue(BaseChart chart, int axisIndex, bool inverse, out double minValue, + out double maxValue, bool isPolar = false, bool filterByDataZoom = true, bool needAnimation = false) { - GetMinMaxValue(chart, axisIndex, isValueAxis, inverse, true, out minValue, out maxValue, isPolar, filterByDataZoom); + GetMinMaxValue(chart, axisIndex, inverse, true, out minValue, out maxValue, isPolar, filterByDataZoom, needAnimation); } private static Dictionary<int, List<Serie>> _stackSeriesForMinMax = new Dictionary<int, List<Serie>>(); private static Dictionary<int, double> _serieTotalValueForMinMax = new Dictionary<int, double>(); - private static DataZoom xDataZoom, yDataZoom; - public static void GetMinMaxValue(BaseChart chart, int axisIndex, bool isValueAxis, + public static void GetMinMaxValue(BaseChart chart, int axisIndex, bool inverse, bool yValue, out double minValue, out double maxValue, bool isPolar = false, - bool filterByDataZoom = true) + bool filterByDataZoom = true, bool needAnimation = false) { double min = double.MaxValue; double max = double.MinValue; @@ -346,8 +345,8 @@ namespace XCharts.Runtime if ((isPolar && serie.polarIndex != axisIndex) || (!isPolar && serie.yAxisIndex != axisIndex) || !serie.show) continue; - var updateDuration = serie.animation.GetChangeDuration(); - var dataAddDuration = serie.animation.GetAdditionDuration(); + var updateDuration = needAnimation ? serie.animation.GetChangeDuration() : 0; + var dataAddDuration = needAnimation ? serie.animation.GetAdditionDuration() : 0; var unscaledTime = serie.animation.unscaledTime; if (isPercentStack && SeriesHelper.IsPercentStack<Bar>(series, serie.serieName)) { @@ -406,8 +405,8 @@ namespace XCharts.Runtime } else { - var updateDuration = serie.animation.GetChangeDuration(); - var dataAddDuration = serie.animation.GetAdditionDuration(); + var updateDuration = needAnimation ? serie.animation.GetChangeDuration() : 0; + var dataAddDuration = needAnimation ? serie.animation.GetAdditionDuration() : 0; var unscaledTime = serie.animation.unscaledTime; for (int j = 0; j < showData.Count; j++) { @@ -420,10 +419,8 @@ namespace XCharts.Runtime } else { - //currData = yValue ? showData[j].GetData(1) : showData[j].GetData(0); currData = showData[j].GetCurrData(yValue ? 1 : 0, dataAddDuration, updateDuration, unscaledTime, inverse); } - //if (inverse) currData = -currData; if (!serie.IsIgnoreValue(showData[j], currData)) _serieTotalValueForMinMax[j] = _serieTotalValueForMinMax[j] + currData; } @@ -466,5 +463,18 @@ namespace XCharts.Runtime } return max; } + + public static float GetMinAnimationDuration(List<Serie> series) + { + float min = float.MaxValue; + foreach (var serie in series) + { + var changeAnimation = serie.animation.change.duration; + var additionAnimation = serie.animation.addition.duration; + if (changeAnimation != 0 && changeAnimation < min) min = changeAnimation; + if (additionAnimation != 0 && additionAnimation < min) min = additionAnimation; + } + return min; + } } } \ No newline at end of file diff --git a/Runtime/Theme/AxisTheme.cs b/Runtime/Theme/AxisTheme.cs index 1cc388fc..807c6da9 100644 --- a/Runtime/Theme/AxisTheme.cs +++ b/Runtime/Theme/AxisTheme.cs @@ -26,7 +26,7 @@ namespace XCharts.Runtime /// <summary> /// the type of line. - /// |坐标轴线类型。 + /// ||坐标轴线类型。 /// </summary> public LineStyle.Type lineType { @@ -35,7 +35,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of line. - /// |坐标轴线宽。 + /// ||坐标轴线宽。 /// </summary> public float lineWidth { @@ -44,7 +44,7 @@ namespace XCharts.Runtime } /// <summary> /// the length of line. - /// |坐标轴线长。 + /// ||坐标轴线长。 /// </summary> public float lineLength { @@ -53,7 +53,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of line. - /// |坐标轴线颜色。 + /// ||坐标轴线颜色。 /// </summary> public Color32 lineColor { @@ -62,7 +62,7 @@ namespace XCharts.Runtime } /// <summary> /// the type of split line. - /// |分割线线类型。 + /// ||分割线线类型。 /// </summary> public LineStyle.Type splitLineType { @@ -71,7 +71,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of split line. - /// |分割线线宽。 + /// ||分割线线宽。 /// </summary> public float splitLineWidth { @@ -80,7 +80,7 @@ namespace XCharts.Runtime } /// <summary> /// the length of split line. - /// |分割线线长。 + /// ||分割线线长。 /// </summary> public float splitLineLength { @@ -89,7 +89,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of split line. - /// |分割线线颜色。 + /// ||分割线线颜色。 /// </summary> public Color32 splitLineColor { @@ -98,7 +98,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of minor split line. - /// |次分割线线颜色。 + /// ||次分割线线颜色。 /// </summary> public Color32 minorSplitLineColor { @@ -107,7 +107,7 @@ namespace XCharts.Runtime } /// <summary> /// the length of tick. - /// |刻度线线长。 + /// ||刻度线线长。 /// </summary> public float tickLength { @@ -116,7 +116,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of tick. - /// |刻度线线宽。 + /// ||刻度线线宽。 /// </summary> public float tickWidth { @@ -125,7 +125,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of tick. - /// |坐标轴线颜色。 + /// ||坐标轴线颜色。 /// </summary> public Color32 tickColor { @@ -134,7 +134,7 @@ namespace XCharts.Runtime } /// <summary> /// the colors of split area. - /// |坐标轴分隔区域的颜色。 + /// ||坐标轴分隔区域的颜色。 /// </summary> public List<Color32> splitAreaColors { diff --git a/Runtime/Theme/ComponentTheme.cs b/Runtime/Theme/ComponentTheme.cs index 91141cff..5a034624 100644 --- a/Runtime/Theme/ComponentTheme.cs +++ b/Runtime/Theme/ComponentTheme.cs @@ -19,7 +19,7 @@ namespace XCharts.Runtime /// <summary> /// the font of text. - /// |字体。 + /// ||字体。 /// </summary> public Font font { @@ -28,7 +28,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of text. - /// |文本颜色。 + /// ||文本颜色。 /// </summary> public Color textColor { @@ -37,7 +37,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of text. - /// |文本颜色。 + /// ||文本颜色。 /// </summary> public Color textBackgroundColor { @@ -46,7 +46,7 @@ namespace XCharts.Runtime } /// <summary> /// the font size of text. - /// |文本字体大小。 + /// ||文本字体大小。 /// </summary> public int fontSize { @@ -57,7 +57,7 @@ namespace XCharts.Runtime #if dUI_TextMeshPro /// <summary> /// the font of chart text。 - /// |字体。 + /// ||字体。 /// </summary> public TMP_FontAsset tmpFont { diff --git a/Runtime/Theme/DataZoomTheme.cs b/Runtime/Theme/DataZoomTheme.cs index 0c4a8862..45127342 100644 --- a/Runtime/Theme/DataZoomTheme.cs +++ b/Runtime/Theme/DataZoomTheme.cs @@ -16,7 +16,7 @@ namespace XCharts.Runtime /// <summary> /// the width of border line. - /// |边框线宽。 + /// ||边框线宽。 /// </summary> public float borderWidth { @@ -25,7 +25,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of data line. - /// |数据阴影线宽。 + /// ||数据阴影线宽。 /// </summary> public float dataLineWidth { @@ -34,7 +34,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of dataZoom data area. - /// |数据区域颜色。 + /// ||数据区域颜色。 /// </summary> public Color32 fillerColor { @@ -44,7 +44,7 @@ namespace XCharts.Runtime /// <summary> /// the color of dataZoom border. - /// |边框颜色。 + /// ||边框颜色。 /// </summary> public Color32 borderColor { @@ -53,7 +53,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of data area line. - /// |数据阴影的线条颜色。 + /// ||数据阴影的线条颜色。 /// </summary> public Color32 dataLineColor { @@ -62,7 +62,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of data area line. - /// |数据阴影的填充颜色。 + /// ||数据阴影的填充颜色。 /// </summary> public Color32 dataAreaColor { @@ -71,7 +71,7 @@ namespace XCharts.Runtime } /// <summary> /// the background color of datazoom. - /// |背景颜色。 + /// ||背景颜色。 /// </summary> public Color32 backgroundColor { diff --git a/Runtime/Theme/LegendTheme.cs b/Runtime/Theme/LegendTheme.cs index 259abd4c..044c77d5 100644 --- a/Runtime/Theme/LegendTheme.cs +++ b/Runtime/Theme/LegendTheme.cs @@ -13,7 +13,7 @@ namespace XCharts.Runtime /// <summary> /// the color of text. - /// |文本颜色。 + /// ||文本颜色。 /// </summary> public Color unableColor { diff --git a/Runtime/Theme/SerieTheme.cs b/Runtime/Theme/SerieTheme.cs index e41f052a..558e33df 100644 --- a/Runtime/Theme/SerieTheme.cs +++ b/Runtime/Theme/SerieTheme.cs @@ -17,7 +17,7 @@ namespace XCharts.Runtime /// <summary> /// the color of text. - /// |文本颜色。 + /// ||文本颜色。 /// </summary> public float lineWidth { @@ -26,7 +26,7 @@ namespace XCharts.Runtime } /// <summary> /// the symbol size of line serie. - /// |折线图的Symbol大小。 + /// ||折线图的Symbol大小。 /// </summary> public float lineSymbolSize { @@ -35,7 +35,7 @@ namespace XCharts.Runtime } /// <summary> /// the symbol size of scatter serie. - /// |散点图的Symbol大小。 + /// ||散点图的Symbol大小。 /// </summary> public float scatterSymbolSize { diff --git a/Runtime/Theme/Theme.cs b/Runtime/Theme/Theme.cs index bd6e4bc6..d2eb5704 100644 --- a/Runtime/Theme/Theme.cs +++ b/Runtime/Theme/Theme.cs @@ -10,7 +10,7 @@ namespace XCharts.Runtime { /// <summary> /// Theme. - /// |主题相关配置。 + /// ||主题相关配置。 /// </summary> [Serializable] public class Theme : ScriptableObject @@ -42,7 +42,7 @@ namespace XCharts.Runtime /// <summary> /// the theme of chart. - /// |主题类型。 + /// ||主题类型。 /// </summary> public ThemeType themeType { @@ -51,7 +51,7 @@ namespace XCharts.Runtime } /// <summary> /// the name of theme. - /// |主题名称。 + /// ||主题名称。 /// </summary> public string themeName { @@ -61,7 +61,7 @@ namespace XCharts.Runtime /// <summary> /// the contrast color of chart. - /// |对比色。 + /// ||对比色。 /// </summary> public Color32 contrastColor { @@ -70,7 +70,7 @@ namespace XCharts.Runtime } /// <summary> /// the background color of chart. - /// |背景颜色。 + /// ||背景颜色。 /// </summary> public Color32 backgroundColor { @@ -80,7 +80,7 @@ namespace XCharts.Runtime /// <summary> /// The color list of palette. If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series. - /// |调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 + /// ||调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 /// </summary> public List<Color32> colorPalette { get { return m_ColorPalette; } set { m_ColorPalette = value; } } public ComponentTheme common { get { return m_Common; } set { m_Common = value; } } @@ -95,7 +95,7 @@ namespace XCharts.Runtime #if dUI_TextMeshPro /// <summary> /// the font of chart text。 - /// |主题字体。 + /// ||主题字体。 /// </summary> public TMP_FontAsset tmpFont { @@ -109,7 +109,7 @@ namespace XCharts.Runtime #endif /// <summary> /// the font of chart text。 - /// |主题字体。 + /// ||主题字体。 /// </summary> public Font font { @@ -142,7 +142,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the color of the specified index from the palette. - /// |获得调色盘对应系列索引的颜色值。 + /// ||获得调色盘对应系列索引的颜色值。 /// </summary> /// <param name="index">编号索引</param> /// <returns>the color,or Color.clear when failed.颜色值,失败时返回Color.clear</returns> @@ -182,7 +182,7 @@ namespace XCharts.Runtime Dictionary<int, string> _colorDic = new Dictionary<int, string>(); /// <summary> /// Gets the hexadecimal color string of the specified index from the palette. - /// |获得指定索引的十六进制颜色值字符串。 + /// ||获得指定索引的十六进制颜色值字符串。 /// </summary> /// <param name="index"></param> /// <returns></returns> @@ -217,7 +217,7 @@ namespace XCharts.Runtime /// <summary> /// copy all configurations from theme. - /// |复制主题的所有配置。 + /// ||复制主题的所有配置。 /// </summary> /// <param name="theme"></param> public void CopyTheme(Theme theme) @@ -243,7 +243,7 @@ namespace XCharts.Runtime /// <summary> /// Clear all custom configurations. - /// |重置,清除所有自定义配置。 + /// ||重置,清除所有自定义配置。 /// </summary> public bool ResetTheme() { @@ -275,9 +275,8 @@ namespace XCharts.Runtime /// <summary> /// default theme. - /// |默认主题。 + /// ||默认主题。 /// </summary> - /// <value></value> public static void ResetToDefaultTheme(Theme theme) { theme.themeType = ThemeType.Default; @@ -301,9 +300,8 @@ namespace XCharts.Runtime /// <summary> /// dark theme. - /// |暗主题。 + /// ||暗主题。 /// </summary> - /// <value></value> public static void ResetToDarkTheme(Theme theme) { theme.themeType = ThemeType.Dark; @@ -380,7 +378,7 @@ namespace XCharts.Runtime /// <summary> /// Convert the html string to color. - /// |将字符串颜色值转成Color。 + /// ||将字符串颜色值转成Color。 /// </summary> /// <param name="hexColorStr"></param> /// <returns></returns> diff --git a/Runtime/Theme/ThemeStyle.cs b/Runtime/Theme/ThemeStyle.cs index f174dbcd..7c459b4f 100644 --- a/Runtime/Theme/ThemeStyle.cs +++ b/Runtime/Theme/ThemeStyle.cs @@ -34,7 +34,7 @@ namespace XCharts.Runtime [Serializable] /// <summary> /// Theme. - /// |主题相关配置。 + /// ||主题相关配置。 /// </summary> public class ThemeStyle : ChildComponent { @@ -52,7 +52,7 @@ namespace XCharts.Runtime public bool show { get { return m_Show; } } /// <summary> /// the theme of chart. - /// |主题类型。 + /// ||主题类型。 /// </summary> public ThemeType themeType { @@ -60,7 +60,7 @@ namespace XCharts.Runtime } /// <summary> /// theme name. - /// |主题名字。 + /// ||主题名字。 /// </summary> public string themeName { @@ -68,7 +68,7 @@ namespace XCharts.Runtime } /// <summary> /// the asset of theme. - /// |主题配置。 + /// ||主题配置。 /// </summary> public Theme sharedTheme { @@ -77,7 +77,7 @@ namespace XCharts.Runtime } /// <summary> /// the contrast color of chart. - /// |对比色。 + /// ||对比色。 /// </summary> public Color32 contrastColor { @@ -85,7 +85,7 @@ namespace XCharts.Runtime } /// <summary> /// the background color of chart. - /// |背景颜色。 + /// ||背景颜色。 /// </summary> public Color32 backgroundColor { @@ -97,7 +97,7 @@ namespace XCharts.Runtime } /// <summary> /// Whether the background color is transparent. When true, the background color is not drawn. - /// |是否透明背景颜色。当设置为true时,不绘制背景颜色。 + /// ||是否透明背景颜色。当设置为true时,不绘制背景颜色。 /// </summary> public bool transparentBackground { @@ -107,9 +107,8 @@ namespace XCharts.Runtime /// <summary> /// Whether to customize theme colors. When set to true, /// you can use 'sync color to custom' to synchronize the theme color to the custom color. It can also be set manually. - /// |是否自定义主题颜色。当设置为true时,可以用‘sync color to custom’同步主题的颜色到自定义颜色。也可以手动设置。 + /// ||是否自定义主题颜色。当设置为true时,可以用‘sync color to custom’同步主题的颜色到自定义颜色。也可以手动设置。 /// </summary> - /// <value></value> public bool enableCustomTheme { get { return m_EnableCustomTheme; } @@ -117,7 +116,7 @@ namespace XCharts.Runtime } /// <summary> /// the custom background color of chart. - /// |自定义的背景颜色。 + /// ||自定义的背景颜色。 /// </summary> public Color32 customBackgroundColor { @@ -127,7 +126,7 @@ namespace XCharts.Runtime /// <summary> /// The color list of palette. If no color is set in series, the colors would be adopted sequentially and circularly from this list as the colors of series. - /// |调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 + /// ||调色盘颜色列表。如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色。 /// </summary> public List<Color32> colorPalette { @@ -146,7 +145,7 @@ namespace XCharts.Runtime /// <summary> /// Gets the color of the specified index from the palette. - /// |获得调色盘对应系列索引的颜色值。 + /// ||获得调色盘对应系列索引的颜色值。 /// </summary> /// <param name="index">编号索引</param> /// <returns>the color,or Color.clear when failed.颜色值,失败时返回Color.clear</returns> @@ -206,7 +205,7 @@ namespace XCharts.Runtime Dictionary<int, string> _colorDic = new Dictionary<int, string>(); /// <summary> /// Gets the hexadecimal color string of the specified index from the palette. - /// |获得指定索引的十六进制颜色值字符串。 + /// ||获得指定索引的十六进制颜色值字符串。 /// </summary> /// <param name="index"></param> /// <returns></returns> @@ -227,7 +226,7 @@ namespace XCharts.Runtime /// <summary> /// Convert the html string to color. - /// |将字符串颜色值转成Color。 + /// ||将字符串颜色值转成Color。 /// </summary> /// <param name="hexColorStr"></param> /// <returns></returns> diff --git a/Runtime/Theme/TooltipTheme.cs b/Runtime/Theme/TooltipTheme.cs index a0d0dab1..ed90d038 100644 --- a/Runtime/Theme/TooltipTheme.cs +++ b/Runtime/Theme/TooltipTheme.cs @@ -16,7 +16,7 @@ namespace XCharts.Runtime /// <summary> /// the type of line. - /// |坐标轴线类型。 + /// ||坐标轴线类型。 /// </summary> public LineStyle.Type lineType { @@ -25,7 +25,7 @@ namespace XCharts.Runtime } /// <summary> /// the width of line. - /// |指示线线宽。 + /// ||指示线线宽。 /// </summary> public float lineWidth { @@ -34,7 +34,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of line. - /// |指示线颜色。 + /// ||指示线颜色。 /// </summary> public Color32 lineColor { @@ -44,7 +44,7 @@ namespace XCharts.Runtime /// <summary> /// the color of line. - /// |区域指示的颜色。 + /// ||区域指示的颜色。 /// </summary> public Color32 areaColor { @@ -53,7 +53,7 @@ namespace XCharts.Runtime } /// <summary> /// the text color of tooltip cross indicator's axis label. - /// |十字指示器坐标轴标签的文本颜色。 + /// ||十字指示器坐标轴标签的文本颜色。 /// </summary> public Color32 labelTextColor { @@ -63,7 +63,7 @@ namespace XCharts.Runtime /// <summary> /// the background color of tooltip cross indicator's axis label. - /// |十字指示器坐标轴标签的背景颜色。 + /// ||十字指示器坐标轴标签的背景颜色。 /// </summary> public Color32 labelBackgroundColor { diff --git a/Runtime/Theme/VisualMapTheme.cs b/Runtime/Theme/VisualMapTheme.cs index 3810838d..f07b952a 100644 --- a/Runtime/Theme/VisualMapTheme.cs +++ b/Runtime/Theme/VisualMapTheme.cs @@ -13,7 +13,7 @@ namespace XCharts.Runtime /// <summary> /// the width of border. - /// |边框线宽。 + /// ||边框线宽。 /// </summary> public float borderWidth { @@ -22,7 +22,7 @@ namespace XCharts.Runtime } /// <summary> /// the color of dataZoom border. - /// |边框颜色。 + /// ||边框颜色。 /// </summary> public Color32 borderColor { @@ -32,7 +32,7 @@ namespace XCharts.Runtime /// <summary> /// the background color of visualmap. - /// |背景颜色。 + /// ||背景颜色。 /// </summary> public Color32 backgroundColor { @@ -42,7 +42,6 @@ namespace XCharts.Runtime /// <summary> /// 可视化组件的调节三角形边长。 /// </summary> - /// <value></value> public float triangeLen { get { return m_TriangeLen; } diff --git a/Runtime/Utilities/ColorUtil.cs b/Runtime/Utilities/ColorUtil.cs index b5809792..3e154b9c 100644 --- a/Runtime/Utilities/ColorUtil.cs +++ b/Runtime/Utilities/ColorUtil.cs @@ -11,7 +11,7 @@ namespace XCharts.Runtime /// <summary> /// Convert the html string to color. - /// |将字符串颜色值转成Color。 + /// ||将字符串颜色值转成Color。 /// </summary> /// <param name="hexColorStr"></param> /// <returns></returns> diff --git a/Runtime/Utilities/DateTimeUtil.cs b/Runtime/Utilities/DateTimeUtil.cs index 1ff3fa97..7c14cfe5 100644 --- a/Runtime/Utilities/DateTimeUtil.cs +++ b/Runtime/Utilities/DateTimeUtil.cs @@ -19,24 +19,24 @@ namespace XCharts.Runtime private static string s_YearDateFormatter = "yyyy"; //private static string s_MonthDateFormatter = "MM"; //private static string s_DayDateFormatter = "dd"; - private static string s_HourDateFormatter = "HH:mm"; - private static string s_MinuteDateFormatter = "HH:mm"; + //private static string s_HourDateFormatter = "HH:mm"; + //private static string s_MinuteDateFormatter = "mm:ss"; private static string s_SecondDateFormatter = "HH:mm:ss"; - //private static string s_DateFormatter = "yyyy-MM-dd HH:mm:ss"; + //private static string s_FullDateFormatter = "yyyy-MM-dd HH:mm:ss"; public static int GetTimestamp() { - return (int) (DateTime.Now - k_DateTime1970).TotalSeconds; + return (int)(DateTime.Now - k_DateTime1970).TotalSeconds; } public static int GetTimestamp(DateTime time) { - return (int) (time - k_DateTime1970).TotalSeconds; + return (int)(time - k_DateTime1970).TotalSeconds; } public static DateTime GetDateTime(int timestamp) { - long span = ((long) timestamp) * 10000000; + long span = ((long)timestamp) * 10000000; return k_DateTime1970.Add(new TimeSpan(span)); } @@ -61,11 +61,11 @@ namespace XCharts.Runtime } else if (range >= DateTimeUtil.ONE_HOUR * DateTimeUtil.MIN_TIME_SPLIT_NUMBER) { - dateString = dateTime.ToString(s_HourDateFormatter); + dateString = dateTime.ToString(s_SecondDateFormatter); } else if (range >= DateTimeUtil.ONE_MINUTE * DateTimeUtil.MIN_TIME_SPLIT_NUMBER) { - dateString = dateTime.ToString(s_MinuteDateFormatter); + dateString = dateTime.ToString(s_SecondDateFormatter); } else { diff --git a/Runtime/XLog/XLog.cs b/Runtime/XLog/XLog.cs index 3380aadc..f0d94d32 100644 --- a/Runtime/XLog/XLog.cs +++ b/Runtime/XLog/XLog.cs @@ -9,7 +9,7 @@ namespace XCharts.Runtime { /// <summary> /// Log system. Used to output logs with date and log type, support output to file, support custom output log type. - /// |日志系统。用于输出带日期和日志类型的日志,支持输出到文件,支持自定义输出的日志类型。 + /// ||日志系统。用于输出带日期和日志类型的日志,支持输出到文件,支持自定义输出的日志类型。 /// </summary> public class XLog : MonoBehaviour { diff --git a/Runtime/XUGL/UGL.cs b/Runtime/XUGL/UGL.cs index ee8bb548..6103c524 100644 --- a/Runtime/XUGL/UGL.cs +++ b/Runtime/XUGL/UGL.cs @@ -6,7 +6,7 @@ namespace XUGL { /// <summary> /// UGUI Graphics Library. - /// |UGUI 图形库 + /// ||UGUI 图形库 /// </summary> public static class UGL { @@ -2067,7 +2067,7 @@ namespace XUGL /// <summary> /// Draw plus sign. - /// |绘制加号 + /// ||绘制加号 /// </summary> /// <param name="vh"></param> /// <param name="center"></param> @@ -2086,7 +2086,7 @@ namespace XUGL /// <summary> /// Draw minus sign. - /// |绘制减号 + /// ||绘制减号 /// </summary> /// <param name="vh"></param> /// <param name="center"></param> diff --git a/package.json b/package.json index 00bfca79..244e67b4 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,13 @@ { "name": "com.monitor1394.xcharts", "displayName": "XCharts", - "version": "3.8.1", - "date": "20231001", - "checkdate": "20231001", - "desc": "如果 XCharts 对您有帮助,希望您能在 Github 上点 Star 支持,非常感谢!", + "author": "monitor1394", + "license": "MIT", + "version": "3.9.0", + "date": "20231201", + "checkdate": "20231201", "unity": "2018.3", - "description": "A charting and data visualization library for Unity.", + "description": "A charting and data visualization library for Unity. Support line chart, bar chart, pie chart, radar chart, scatter chart, heatmap chart, ring chart, candlestick chart, polar chart and parallel coordinates.", "keywords": [ "chart", "charts", @@ -19,8 +20,6 @@ "type": "git", "url": "git+https://github.com/XCharts-Team/XCharts.git" }, - "author": "monitor1394", - "license": "MIT", "bugs": { "url": "https://github.com/XCharts-Team/XCharts/issues" },