mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-29 20:58:47 +00:00
update doc
This commit is contained in:
@@ -27,9 +27,9 @@ slug: /api
|
||||
|[PieChart](#piechart)|[PolarChart](#polarchart)|[PolarCoordContext](#polarcoordcontext)|
|
||||
|[PropertyUtil](#propertyutil)|[RadarChart](#radarchart)|[RadarCoordContext](#radarcoordcontext)|
|
||||
|[ReflectionUtil](#reflectionutil)|[RequireChartComponentAttribute](#requirechartcomponentattribute)|[RingChart](#ringchart)|
|
||||
|[RuntimeUtil](#runtimeutil)|[ScatterChart](#scatterchart)|[SerieContext](#seriecontext)|
|
||||
|[SerieConvertAttribute](#serieconvertattribute)|[SerieDataContext](#seriedatacontext)|[SerieDataExtraComponentAttribute](#seriedataextracomponentattribute)|
|
||||
|[SerieDataExtraFieldAttribute](#seriedataextrafieldattribute)|[SerieExtraComponentAttribute](#serieextracomponentattribute)|[SerieHandler](#seriehandler)|
|
||||
|[RuntimeUtil](#runtimeutil)|[ScatterChart](#scatterchart)|[SerieComponentAttribute](#seriecomponentattribute)|
|
||||
|[SerieContext](#seriecontext)|[SerieConvertAttribute](#serieconvertattribute)|[SerieDataComponentAttribute](#seriedatacomponentattribute)|
|
||||
|[SerieDataContext](#seriedatacontext)|[SerieDataExtraFieldAttribute](#seriedataextrafieldattribute)|[SerieHandler](#seriehandler)|
|
||||
|[SerieHandler<T>](#seriehandlert)|[SerieHandlerAttribute](#seriehandlerattribute)|[SerieHelper](#seriehelper)|
|
||||
|[SerieLabelHelper](#serielabelhelper)|[SerieLabelPool](#serielabelpool)|[SerieParams](#serieparams)|
|
||||
|[SeriesHelper](#serieshelper)|[SimplifiedBarChart](#simplifiedbarchart)|[SimplifiedCandlestickChart](#simplifiedcandlestickchart)|
|
||||
@@ -133,7 +133,7 @@ Inherits or Implemented: [BaseGraph](#basegraph),[ISerializationCallbackReceiver
|
||||
| ConvertSerie() |public bool ConvertSerie(Serie serie, Type type)|
|
||||
| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
|
||||
| ConvertXYAxis() |public void ConvertXYAxis(int index)<br/>转换X轴和Y轴的配置 |
|
||||
| EnsureChartComponent<T>() |public T EnsureChartComponent<T>() where T : MainComponent|
|
||||
| EnsureChartComponent<T>() |public T EnsureChartComponent<T>() where T : MainComponent<br/>Ensure the chart has the component, if not, add it. Note: it may fail to add. |
|
||||
| GenerateDefaultSerieName() |public string GenerateDefaultSerieName()|
|
||||
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
|
||||
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
|
||||
@@ -321,7 +321,6 @@ Inherits or Implemented: [BaseChart](#basechart)
|
||||
| GetBlurColor() |public static Color32 GetBlurColor(Color32 color, float a = 0.3f)|
|
||||
| GetColor() |public static Color32 GetColor(string hexColorStr)|
|
||||
| GetDire() |public static Vector3 GetDire(float angle, bool isDegree = false)|
|
||||
| GetFloatAccuracy() |public static int GetFloatAccuracy(double value)|
|
||||
| GetFullName() |public static string GetFullName(Transform transform)|
|
||||
| GetHighlightColor() |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)|
|
||||
| GetLastValue() |public static Vector3 GetLastValue(List<Vector3> list)|
|
||||
@@ -635,6 +634,8 @@ Inherits or Implemented: [MainComponentHandler](#maincomponenthandler)
|
||||
| Approximately() |public static bool Approximately(double a, double b)|
|
||||
| Clamp() |public static double Clamp(double d, double min, double max)|
|
||||
| Clamp01() |public static double Clamp01(double value)|
|
||||
| GetPrecision() |public static int GetPrecision(double value)|
|
||||
| IsInteger() |public static bool IsInteger(double value)|
|
||||
| Lerp() |public static double Lerp(double a, double b, double t)|
|
||||
|
||||
## ObjectPool<T> where T
|
||||
@@ -737,6 +738,23 @@ Inherits or Implemented: [BaseChart](#basechart)
|
||||
|
||||
Inherits or Implemented: [BaseChart](#basechart)
|
||||
|
||||
## SerieComponentAttribute
|
||||
|
||||
Inherits or Implemented: [Attribute](#attribute)
|
||||
|
||||
|public method|description|
|
||||
|--|--|
|
||||
| Contains() |public bool Contains(Type type)|
|
||||
| Contains<T>() |public bool Contains<T>() where T : ISerieComponent|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute()|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1)|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1, Type type2)|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1, Type type2, Type type3)|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)|
|
||||
| SerieComponentAttribute() |public SerieComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)|
|
||||
|
||||
## SerieContext
|
||||
|
||||
## SerieConvertAttribute
|
||||
@@ -752,28 +770,28 @@ Inherits or Implemented: [Attribute](#attribute)
|
||||
| SerieConvertAttribute() |public SerieConvertAttribute(Type serie, Type serie2, Type serie3)|
|
||||
| SerieConvertAttribute() |public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)|
|
||||
|
||||
## SerieDataContext
|
||||
|
||||
|public method|description|
|
||||
|--|--|
|
||||
| Reset() |public void Reset()|
|
||||
|
||||
## SerieDataExtraComponentAttribute
|
||||
## SerieDataComponentAttribute
|
||||
|
||||
Inherits or Implemented: [Attribute](#attribute)
|
||||
|
||||
|public method|description|
|
||||
|--|--|
|
||||
| Contains() |public bool Contains(Type type)|
|
||||
| Contains<T>() |public bool Contains<T>() where T : ISerieExtraComponent|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute()|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1)|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2)|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3)|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)|
|
||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)|
|
||||
| Contains<T>() |public bool Contains<T>() where T : ISerieComponent|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute()|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1)|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2)|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3)|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)|
|
||||
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)|
|
||||
|
||||
## SerieDataContext
|
||||
|
||||
|public method|description|
|
||||
|--|--|
|
||||
| Reset() |public void Reset()|
|
||||
|
||||
## SerieDataExtraFieldAttribute
|
||||
|
||||
@@ -791,23 +809,6 @@ Inherits or Implemented: [Attribute](#attribute)
|
||||
| SerieDataExtraFieldAttribute() |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6)|
|
||||
| SerieDataExtraFieldAttribute() |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6, string field7)|
|
||||
|
||||
## SerieExtraComponentAttribute
|
||||
|
||||
Inherits or Implemented: [Attribute](#attribute)
|
||||
|
||||
|public method|description|
|
||||
|--|--|
|
||||
| Contains() |public bool Contains(Type type)|
|
||||
| Contains<T>() |public bool Contains<T>() where T : ISerieExtraComponent|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute()|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1)|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1, Type type2)|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1, Type type2, Type type3)|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6)|
|
||||
| SerieExtraComponentAttribute() |public SerieExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5, Type type6, Type type7)|
|
||||
|
||||
## SerieHandler
|
||||
|
||||
|public method|description|
|
||||
|
||||
@@ -54,7 +54,7 @@ slug: /configuration
|
||||
|[TitleStyle](#titlestyle)|[TitleTheme](#titletheme)|[TooltipTheme](#tooltiptheme)|[VisualMapRange](#visualmaprange)|
|
||||
|[VisualMapTheme](#visualmaptheme)|
|
||||
|
||||
## ISerieExtraComponent
|
||||
## ISerieComponent
|
||||
|
||||
|||||
|
||||
|--|--|--|--|
|
||||
@@ -116,7 +116,7 @@ the animation of serie.
|
||||
|
||||
## AreaStyle
|
||||
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
The style of area.
|
||||
|
||||
@@ -355,7 +355,7 @@ Inherits or Implemented: [Serie](#serie),[INeedSerieContainer](#ineedseriecontai
|
||||
|
||||
## BlurStyle
|
||||
|
||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
> Since `v3.2.0`
|
||||
|
||||
@@ -508,7 +508,7 @@ Inherits or Implemented: [BaseScatter](#basescatter)
|
||||
|
||||
## EmphasisStyle
|
||||
|
||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
> Since `v3.2.0`
|
||||
|
||||
@@ -570,7 +570,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent)
|
||||
|
||||
## ImageStyle
|
||||
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
|field|default|since|comment|
|
||||
|--|--|--|--|
|
||||
@@ -643,7 +643,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieDataComponent]
|
||||
|
||||
## LabelLine
|
||||
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
标签的引导线
|
||||
|
||||
@@ -662,7 +662,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent
|
||||
|
||||
## LabelStyle
|
||||
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
Text label of chart, to explain some data information about graphic item like value, name and so on.
|
||||
|
||||
@@ -757,7 +757,7 @@ Inherits or Implemented: [Serie](#serie),[INeedSerieContainer](#ineedseriecontai
|
||||
|
||||
## LineArrow
|
||||
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent)
|
||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent)
|
||||
|
||||
|field|default|since|comment|
|
||||
|--|--|--|--|
|
||||
@@ -990,7 +990,7 @@ Inherits or Implemented: [BaseScatter](#basescatter)
|
||||
|
||||
## SelectStyle
|
||||
|
||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||
|
||||
> Since `v3.2.0`
|
||||
|
||||
@@ -1344,7 +1344,7 @@ Title component, including main title and subtitle.
|
||||
|
||||
## TitleStyle
|
||||
|
||||
Inherits or Implemented: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieExtraComponent](#iserieextracomponent)
|
||||
Inherits or Implemented: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieComponent](#iseriecomponent)
|
||||
|
||||
the title of serie.
|
||||
|
||||
|
||||
@@ -100,29 +100,29 @@ chart.SetSize(580, 300);//代码动态设置尺寸,或直接操作chart.rectTr
|
||||
设置标题:
|
||||
|
||||
```C#
|
||||
var title = chart.GetOrAddChartComponent<Title>();
|
||||
var title = chart.EnsureChartComponent<Title>();
|
||||
title.text = "Simple Line";
|
||||
```
|
||||
|
||||
设置提示框和图例是否显示:
|
||||
|
||||
```C#
|
||||
var tooltip = chart.GetOrAddChartComponent<Tooltip>();
|
||||
var tooltip = chart.EnsureChartComponent<Tooltip>();
|
||||
tooltip.show = true;
|
||||
|
||||
var legend = chart.GetOrAddChartComponent<Legend>();
|
||||
var legend = chart.EnsureChartComponent<Legend>();
|
||||
legend.show = false;
|
||||
```
|
||||
|
||||
设置坐标轴:
|
||||
|
||||
```C#
|
||||
var xAxis = chart.GetOrAddChartComponent<XAxis>();
|
||||
var xAxis = chart.EnsureChartComponent<XAxis>();
|
||||
xAxis.splitNumber = 10;
|
||||
xAxis.boundaryGap = true;
|
||||
xAxis.type = Axis.AxisType.Category;
|
||||
|
||||
var yAxis = chart.GetOrAddChartComponent<YAxis>();
|
||||
var yAxis = chart.EnsureChartComponent<YAxis>();
|
||||
yAxis.type = Axis.AxisType.Value;
|
||||
```
|
||||
|
||||
@@ -195,11 +195,11 @@ XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换
|
||||
需要先获取组件,再修改里面的参数:
|
||||
|
||||
```C#
|
||||
var title = chart.GetOrAddChartComponent<Title>();
|
||||
var title = chart.EnsureChartComponent<Title>();
|
||||
title.text = "Simple LineChart";
|
||||
title.subText = "normal line";
|
||||
|
||||
var xAxis = chart.GetOrAddChartComponent<XAxis>();
|
||||
var xAxis = chart.EnsureChartComponent<XAxis>();
|
||||
xAxis.splitNumber = 10;
|
||||
xAxis.boundaryGap = true;
|
||||
xAxis.type = Axis.AxisType.Category;
|
||||
@@ -234,9 +234,9 @@ serie.roundCap = true;
|
||||
给Serie添加额外组件:
|
||||
|
||||
```C#
|
||||
serie.AddExtraComponent<AreaStyle>();
|
||||
serie.EnsureComponent<AreaStyle>();
|
||||
|
||||
var label = serie1.AddExtraComponent<LabelStyle>();
|
||||
var label = serie1.EnsureComponent<LabelStyle>();
|
||||
label.offset = new Vector3(0,20,0);
|
||||
```
|
||||
|
||||
@@ -247,7 +247,7 @@ var serieData = chart.AddData(0, 20);
|
||||
//var serieData = serie.GetSerieData(0); //从已有数据中获取
|
||||
serieData.radius = 10;
|
||||
|
||||
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //给数据项添加ItemStyle组件
|
||||
var itemStyle = serieData.EnsureComponent<ItemStyle>(); //给数据项添加ItemStyle组件
|
||||
itemStyle.color = Color.blue;
|
||||
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user