mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-28 03:58:49 +00:00
update doc
This commit is contained in:
@@ -27,9 +27,9 @@ slug: /api
|
|||||||
|[PieChart](#piechart)|[PolarChart](#polarchart)|[PolarCoordContext](#polarcoordcontext)|
|
|[PieChart](#piechart)|[PolarChart](#polarchart)|[PolarCoordContext](#polarcoordcontext)|
|
||||||
|[PropertyUtil](#propertyutil)|[RadarChart](#radarchart)|[RadarCoordContext](#radarcoordcontext)|
|
|[PropertyUtil](#propertyutil)|[RadarChart](#radarchart)|[RadarCoordContext](#radarcoordcontext)|
|
||||||
|[ReflectionUtil](#reflectionutil)|[RequireChartComponentAttribute](#requirechartcomponentattribute)|[RingChart](#ringchart)|
|
|[ReflectionUtil](#reflectionutil)|[RequireChartComponentAttribute](#requirechartcomponentattribute)|[RingChart](#ringchart)|
|
||||||
|[RuntimeUtil](#runtimeutil)|[ScatterChart](#scatterchart)|[SerieContext](#seriecontext)|
|
|[RuntimeUtil](#runtimeutil)|[ScatterChart](#scatterchart)|[SerieComponentAttribute](#seriecomponentattribute)|
|
||||||
|[SerieConvertAttribute](#serieconvertattribute)|[SerieDataContext](#seriedatacontext)|[SerieDataExtraComponentAttribute](#seriedataextracomponentattribute)|
|
|[SerieContext](#seriecontext)|[SerieConvertAttribute](#serieconvertattribute)|[SerieDataComponentAttribute](#seriedatacomponentattribute)|
|
||||||
|[SerieDataExtraFieldAttribute](#seriedataextrafieldattribute)|[SerieExtraComponentAttribute](#serieextracomponentattribute)|[SerieHandler](#seriehandler)|
|
|[SerieDataContext](#seriedatacontext)|[SerieDataExtraFieldAttribute](#seriedataextrafieldattribute)|[SerieHandler](#seriehandler)|
|
||||||
|[SerieHandler<T>](#seriehandlert)|[SerieHandlerAttribute](#seriehandlerattribute)|[SerieHelper](#seriehelper)|
|
|[SerieHandler<T>](#seriehandlert)|[SerieHandlerAttribute](#seriehandlerattribute)|[SerieHelper](#seriehelper)|
|
||||||
|[SerieLabelHelper](#serielabelhelper)|[SerieLabelPool](#serielabelpool)|[SerieParams](#serieparams)|
|
|[SerieLabelHelper](#serielabelhelper)|[SerieLabelPool](#serielabelpool)|[SerieParams](#serieparams)|
|
||||||
|[SeriesHelper](#serieshelper)|[SimplifiedBarChart](#simplifiedbarchart)|[SimplifiedCandlestickChart](#simplifiedcandlestickchart)|
|
|[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() |public bool ConvertSerie(Serie serie, Type type)|
|
||||||
| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
|
| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
|
||||||
| ConvertXYAxis() |public void ConvertXYAxis(int index)<br/>转换X轴和Y轴的配置 |
|
| 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()|
|
| GenerateDefaultSerieName() |public string GenerateDefaultSerieName()|
|
||||||
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
|
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
|
||||||
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
|
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
|
||||||
@@ -321,7 +321,6 @@ Inherits or Implemented: [BaseChart](#basechart)
|
|||||||
| GetBlurColor() |public static Color32 GetBlurColor(Color32 color, float a = 0.3f)|
|
| GetBlurColor() |public static Color32 GetBlurColor(Color32 color, float a = 0.3f)|
|
||||||
| GetColor() |public static Color32 GetColor(string hexColorStr)|
|
| GetColor() |public static Color32 GetColor(string hexColorStr)|
|
||||||
| GetDire() |public static Vector3 GetDire(float angle, bool isDegree = false)|
|
| GetDire() |public static Vector3 GetDire(float angle, bool isDegree = false)|
|
||||||
| GetFloatAccuracy() |public static int GetFloatAccuracy(double value)|
|
|
||||||
| GetFullName() |public static string GetFullName(Transform transform)|
|
| GetFullName() |public static string GetFullName(Transform transform)|
|
||||||
| GetHighlightColor() |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)|
|
| GetHighlightColor() |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)|
|
||||||
| GetLastValue() |public static Vector3 GetLastValue(List<Vector3> list)|
|
| 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)|
|
| Approximately() |public static bool Approximately(double a, double b)|
|
||||||
| Clamp() |public static double Clamp(double d, double min, double max)|
|
| Clamp() |public static double Clamp(double d, double min, double max)|
|
||||||
| Clamp01() |public static double Clamp01(double value)|
|
| 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)|
|
| Lerp() |public static double Lerp(double a, double b, double t)|
|
||||||
|
|
||||||
## ObjectPool<T> where T
|
## ObjectPool<T> where T
|
||||||
@@ -737,6 +738,23 @@ Inherits or Implemented: [BaseChart](#basechart)
|
|||||||
|
|
||||||
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
|
## SerieContext
|
||||||
|
|
||||||
## SerieConvertAttribute
|
## 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)|
|
||||||
| SerieConvertAttribute() |public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)|
|
| SerieConvertAttribute() |public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)|
|
||||||
|
|
||||||
## SerieDataContext
|
## SerieDataComponentAttribute
|
||||||
|
|
||||||
|public method|description|
|
|
||||||
|--|--|
|
|
||||||
| Reset() |public void Reset()|
|
|
||||||
|
|
||||||
## SerieDataExtraComponentAttribute
|
|
||||||
|
|
||||||
Inherits or Implemented: [Attribute](#attribute)
|
Inherits or Implemented: [Attribute](#attribute)
|
||||||
|
|
||||||
|public method|description|
|
|public method|description|
|
||||||
|--|--|
|
|--|--|
|
||||||
| Contains() |public bool Contains(Type type)|
|
| Contains() |public bool Contains(Type type)|
|
||||||
| Contains<T>() |public bool Contains<T>() where T : ISerieExtraComponent|
|
| Contains<T>() |public bool Contains<T>() where T : ISerieComponent|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute()|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute()|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(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)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(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)|
|
| 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
|
## 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)|
|
||||||
| SerieDataExtraFieldAttribute() |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6, string field7)|
|
| 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
|
## SerieHandler
|
||||||
|
|
||||||
|public method|description|
|
|public method|description|
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ slug: /configuration
|
|||||||
|[TitleStyle](#titlestyle)|[TitleTheme](#titletheme)|[TooltipTheme](#tooltiptheme)|[VisualMapRange](#visualmaprange)|
|
|[TitleStyle](#titlestyle)|[TitleTheme](#titletheme)|[TooltipTheme](#tooltiptheme)|[VisualMapRange](#visualmaprange)|
|
||||||
|[VisualMapTheme](#visualmaptheme)|
|
|[VisualMapTheme](#visualmaptheme)|
|
||||||
|
|
||||||
## ISerieExtraComponent
|
## ISerieComponent
|
||||||
|
|
||||||
|||||
|
|||||
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -116,7 +116,7 @@ the animation of serie.
|
|||||||
|
|
||||||
## AreaStyle
|
## AreaStyle
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
The style of area.
|
The style of area.
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ Inherits or Implemented: [Serie](#serie),[INeedSerieContainer](#ineedseriecontai
|
|||||||
|
|
||||||
## BlurStyle
|
## BlurStyle
|
||||||
|
|
||||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
> Since `v3.2.0`
|
> Since `v3.2.0`
|
||||||
|
|
||||||
@@ -508,7 +508,7 @@ Inherits or Implemented: [BaseScatter](#basescatter)
|
|||||||
|
|
||||||
## EmphasisStyle
|
## EmphasisStyle
|
||||||
|
|
||||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
> Since `v3.2.0`
|
> Since `v3.2.0`
|
||||||
|
|
||||||
@@ -570,7 +570,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent)
|
|||||||
|
|
||||||
## ImageStyle
|
## ImageStyle
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
|field|default|since|comment|
|
|field|default|since|comment|
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -643,7 +643,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieDataComponent]
|
|||||||
|
|
||||||
## LabelLine
|
## 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
|
## 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.
|
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
|
## LineArrow
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent)
|
||||||
|
|
||||||
|field|default|since|comment|
|
|field|default|since|comment|
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -990,7 +990,7 @@ Inherits or Implemented: [BaseScatter](#basescatter)
|
|||||||
|
|
||||||
## SelectStyle
|
## SelectStyle
|
||||||
|
|
||||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
> Since `v3.2.0`
|
> Since `v3.2.0`
|
||||||
|
|
||||||
@@ -1344,7 +1344,7 @@ Title component, including main title and subtitle.
|
|||||||
|
|
||||||
## TitleStyle
|
## TitleStyle
|
||||||
|
|
||||||
Inherits or Implemented: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieExtraComponent](#iserieextracomponent)
|
Inherits or Implemented: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieComponent](#iseriecomponent)
|
||||||
|
|
||||||
the title of serie.
|
the title of serie.
|
||||||
|
|
||||||
|
|||||||
@@ -100,29 +100,29 @@ chart.SetSize(580, 300);//代码动态设置尺寸,或直接操作chart.rectTr
|
|||||||
设置标题:
|
设置标题:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var title = chart.GetOrAddChartComponent<Title>();
|
var title = chart.EnsureChartComponent<Title>();
|
||||||
title.text = "Simple Line";
|
title.text = "Simple Line";
|
||||||
```
|
```
|
||||||
|
|
||||||
设置提示框和图例是否显示:
|
设置提示框和图例是否显示:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var tooltip = chart.GetOrAddChartComponent<Tooltip>();
|
var tooltip = chart.EnsureChartComponent<Tooltip>();
|
||||||
tooltip.show = true;
|
tooltip.show = true;
|
||||||
|
|
||||||
var legend = chart.GetOrAddChartComponent<Legend>();
|
var legend = chart.EnsureChartComponent<Legend>();
|
||||||
legend.show = false;
|
legend.show = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
设置坐标轴:
|
设置坐标轴:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var xAxis = chart.GetOrAddChartComponent<XAxis>();
|
var xAxis = chart.EnsureChartComponent<XAxis>();
|
||||||
xAxis.splitNumber = 10;
|
xAxis.splitNumber = 10;
|
||||||
xAxis.boundaryGap = true;
|
xAxis.boundaryGap = true;
|
||||||
xAxis.type = Axis.AxisType.Category;
|
xAxis.type = Axis.AxisType.Category;
|
||||||
|
|
||||||
var yAxis = chart.GetOrAddChartComponent<YAxis>();
|
var yAxis = chart.EnsureChartComponent<YAxis>();
|
||||||
yAxis.type = Axis.AxisType.Value;
|
yAxis.type = Axis.AxisType.Value;
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -195,11 +195,11 @@ XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换
|
|||||||
需要先获取组件,再修改里面的参数:
|
需要先获取组件,再修改里面的参数:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var title = chart.GetOrAddChartComponent<Title>();
|
var title = chart.EnsureChartComponent<Title>();
|
||||||
title.text = "Simple LineChart";
|
title.text = "Simple LineChart";
|
||||||
title.subText = "normal line";
|
title.subText = "normal line";
|
||||||
|
|
||||||
var xAxis = chart.GetOrAddChartComponent<XAxis>();
|
var xAxis = chart.EnsureChartComponent<XAxis>();
|
||||||
xAxis.splitNumber = 10;
|
xAxis.splitNumber = 10;
|
||||||
xAxis.boundaryGap = true;
|
xAxis.boundaryGap = true;
|
||||||
xAxis.type = Axis.AxisType.Category;
|
xAxis.type = Axis.AxisType.Category;
|
||||||
@@ -234,9 +234,9 @@ serie.roundCap = true;
|
|||||||
给Serie添加额外组件:
|
给Serie添加额外组件:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
serie.AddExtraComponent<AreaStyle>();
|
serie.EnsureComponent<AreaStyle>();
|
||||||
|
|
||||||
var label = serie1.AddExtraComponent<LabelStyle>();
|
var label = serie1.EnsureComponent<LabelStyle>();
|
||||||
label.offset = new Vector3(0,20,0);
|
label.offset = new Vector3(0,20,0);
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ var serieData = chart.AddData(0, 20);
|
|||||||
//var serieData = serie.GetSerieData(0); //从已有数据中获取
|
//var serieData = serie.GetSerieData(0); //从已有数据中获取
|
||||||
serieData.radius = 10;
|
serieData.radius = 10;
|
||||||
|
|
||||||
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //给数据项添加ItemStyle组件
|
var itemStyle = serieData.EnsureComponent<ItemStyle>(); //给数据项添加ItemStyle组件
|
||||||
itemStyle.color = Color.blue;
|
itemStyle.color = Color.blue;
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 3
|
sidebar_position: 41
|
||||||
slug: /api
|
slug: /api
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -27,9 +27,9 @@ slug: /api
|
|||||||
|[PieChart](#piechart)|[PolarChart](#polarchart)|[PolarCoordContext](#polarcoordcontext)|
|
|[PieChart](#piechart)|[PolarChart](#polarchart)|[PolarCoordContext](#polarcoordcontext)|
|
||||||
|[PropertyUtil](#propertyutil)|[RadarChart](#radarchart)|[RadarCoordContext](#radarcoordcontext)|
|
|[PropertyUtil](#propertyutil)|[RadarChart](#radarchart)|[RadarCoordContext](#radarcoordcontext)|
|
||||||
|[ReflectionUtil](#reflectionutil)|[RequireChartComponentAttribute](#requirechartcomponentattribute)|[RingChart](#ringchart)|
|
|[ReflectionUtil](#reflectionutil)|[RequireChartComponentAttribute](#requirechartcomponentattribute)|[RingChart](#ringchart)|
|
||||||
|[RuntimeUtil](#runtimeutil)|[ScatterChart](#scatterchart)|[SerieContext](#seriecontext)|
|
|[RuntimeUtil](#runtimeutil)|[ScatterChart](#scatterchart)|[SerieComponentAttribute](#seriecomponentattribute)|
|
||||||
|[SerieConvertAttribute](#serieconvertattribute)|[SerieDataContext](#seriedatacontext)|[SerieDataExtraComponentAttribute](#seriedataextracomponentattribute)|
|
|[SerieContext](#seriecontext)|[SerieConvertAttribute](#serieconvertattribute)|[SerieDataComponentAttribute](#seriedatacomponentattribute)|
|
||||||
|[SerieDataExtraFieldAttribute](#seriedataextrafieldattribute)|[SerieExtraComponentAttribute](#serieextracomponentattribute)|[SerieHandler](#seriehandler)|
|
|[SerieDataContext](#seriedatacontext)|[SerieDataExtraFieldAttribute](#seriedataextrafieldattribute)|[SerieHandler](#seriehandler)|
|
||||||
|[SerieHandler<T>](#seriehandlert)|[SerieHandlerAttribute](#seriehandlerattribute)|[SerieHelper](#seriehelper)|
|
|[SerieHandler<T>](#seriehandlert)|[SerieHandlerAttribute](#seriehandlerattribute)|[SerieHelper](#seriehelper)|
|
||||||
|[SerieLabelHelper](#serielabelhelper)|[SerieLabelPool](#serielabelpool)|[SerieParams](#serieparams)|
|
|[SerieLabelHelper](#serielabelhelper)|[SerieLabelPool](#serielabelpool)|[SerieParams](#serieparams)|
|
||||||
|[SeriesHelper](#serieshelper)|[SimplifiedBarChart](#simplifiedbarchart)|[SimplifiedCandlestickChart](#simplifiedcandlestickchart)|
|
|[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() |public bool ConvertSerie(Serie serie, Type type)|
|
||||||
| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
|
| ConvertSerie<T>() |public bool ConvertSerie<T>(Serie serie) where T : Serie|
|
||||||
| ConvertXYAxis() |public void ConvertXYAxis(int index)<br/>转换X轴和Y轴的配置 |
|
| 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/>确保图表有该组件,如果没有则添加。注意:有可能添加不成功。 |
|
||||||
| GenerateDefaultSerieName() |public string GenerateDefaultSerieName()|
|
| GenerateDefaultSerieName() |public string GenerateDefaultSerieName()|
|
||||||
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
|
| GetAllSerieDataCount() |public int GetAllSerieDataCount()|
|
||||||
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
|
| GetChartBackgroundColor() |public Color32 GetChartBackgroundColor()|
|
||||||
@@ -321,7 +321,6 @@ Inherits or Implemented: [BaseChart](#basechart)
|
|||||||
| GetBlurColor() |public static Color32 GetBlurColor(Color32 color, float a = 0.3f)|
|
| GetBlurColor() |public static Color32 GetBlurColor(Color32 color, float a = 0.3f)|
|
||||||
| GetColor() |public static Color32 GetColor(string hexColorStr)|
|
| GetColor() |public static Color32 GetColor(string hexColorStr)|
|
||||||
| GetDire() |public static Vector3 GetDire(float angle, bool isDegree = false)|
|
| GetDire() |public static Vector3 GetDire(float angle, bool isDegree = false)|
|
||||||
| GetFloatAccuracy() |public static int GetFloatAccuracy(double value)|
|
|
||||||
| GetFullName() |public static string GetFullName(Transform transform)|
|
| GetFullName() |public static string GetFullName(Transform transform)|
|
||||||
| GetHighlightColor() |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)|
|
| GetHighlightColor() |public static Color32 GetHighlightColor(Color32 color, float rate = 0.8f)|
|
||||||
| GetLastValue() |public static Vector3 GetLastValue(List<Vector3> list)|
|
| 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)|
|
| Approximately() |public static bool Approximately(double a, double b)|
|
||||||
| Clamp() |public static double Clamp(double d, double min, double max)|
|
| Clamp() |public static double Clamp(double d, double min, double max)|
|
||||||
| Clamp01() |public static double Clamp01(double value)|
|
| 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)|
|
| Lerp() |public static double Lerp(double a, double b, double t)|
|
||||||
|
|
||||||
## ObjectPool<T> where T
|
## ObjectPool<T> where T
|
||||||
@@ -737,6 +738,23 @@ Inherits or Implemented: [BaseChart](#basechart)
|
|||||||
|
|
||||||
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
|
## SerieContext
|
||||||
|
|
||||||
## SerieConvertAttribute
|
## 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)|
|
||||||
| SerieConvertAttribute() |public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)|
|
| SerieConvertAttribute() |public SerieConvertAttribute(Type serie, Type serie2, Type serie3, Type serie4)|
|
||||||
|
|
||||||
## SerieDataContext
|
## SerieDataComponentAttribute
|
||||||
|
|
||||||
|public method|description|
|
|
||||||
|--|--|
|
|
||||||
| Reset() |public void Reset()|
|
|
||||||
|
|
||||||
## SerieDataExtraComponentAttribute
|
|
||||||
|
|
||||||
Inherits or Implemented: [Attribute](#attribute)
|
Inherits or Implemented: [Attribute](#attribute)
|
||||||
|
|
||||||
|public method|description|
|
|public method|description|
|
||||||
|--|--|
|
|--|--|
|
||||||
| Contains() |public bool Contains(Type type)|
|
| Contains() |public bool Contains(Type type)|
|
||||||
| Contains<T>() |public bool Contains<T>() where T : ISerieExtraComponent|
|
| Contains<T>() |public bool Contains<T>() where T : ISerieComponent|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute()|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute()|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(Type type1, Type type2, Type type3, Type type4)|
|
||||||
| SerieDataExtraComponentAttribute() |public SerieDataExtraComponentAttribute(Type type1, Type type2, Type type3, Type type4, Type type5)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(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)|
|
| SerieDataComponentAttribute() |public SerieDataComponentAttribute(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)|
|
| 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
|
## 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)|
|
||||||
| SerieDataExtraFieldAttribute() |public SerieDataExtraFieldAttribute(string field1, string field2, string field3, string field4, string field5, string field6, string field7)|
|
| 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
|
## SerieHandler
|
||||||
|
|
||||||
|public method|description|
|
|public method|description|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 5
|
sidebar_position: 61
|
||||||
slug: /changelog
|
slug: /changelog
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -65,6 +65,7 @@ slug: /changelog
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2023.02.12) 重构`Component`相关代码,调整API接口
|
||||||
* (2023.02.10) 修复`Axis`在`Log`轴时某些情况下最小值不正确的问题
|
* (2023.02.10) 修复`Axis`在`Log`轴时某些情况下最小值不正确的问题
|
||||||
* (2023.02.10) 优化`Axis`的数值`Label`的默认显示格式
|
* (2023.02.10) 优化`Axis`的数值`Label`的默认显示格式
|
||||||
* (2023.02.08) 增加`DataZoom`的`startLock`和`endLock`参数支持锁定
|
* (2023.02.08) 增加`DataZoom`的`startLock`和`endLock`参数支持锁定
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 2
|
sidebar_position: 31
|
||||||
slug: /configuration
|
slug: /configuration
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@ slug: /configuration
|
|||||||
|[TitleStyle](#titlestyle)|[TitleTheme](#titletheme)|[TooltipTheme](#tooltiptheme)|[VisualMapRange](#visualmaprange)|
|
|[TitleStyle](#titlestyle)|[TitleTheme](#titletheme)|[TooltipTheme](#tooltiptheme)|[VisualMapRange](#visualmaprange)|
|
||||||
|[VisualMapTheme](#visualmaptheme)|
|
|[VisualMapTheme](#visualmaptheme)|
|
||||||
|
|
||||||
## ISerieExtraComponent 系列的额外组件
|
## ISerieComponent 可添加到Serie的组件
|
||||||
|
|
||||||
|||||
|
|||||
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -62,7 +62,7 @@ slug: /configuration
|
|||||||
|[LabelLine](#labelline)|[LabelStyle](#labelstyle)|[LineArrow](#linearrow)|[SelectStyle](#selectstyle)|
|
|[LabelLine](#labelline)|[LabelStyle](#labelstyle)|[LineArrow](#linearrow)|[SelectStyle](#selectstyle)|
|
||||||
|[TitleStyle](#titlestyle)|
|
|[TitleStyle](#titlestyle)|
|
||||||
|
|
||||||
## ISerieDataComponent 数据项的额外组件
|
## ISerieDataComponent 可添加到SerieData的组件
|
||||||
|
|
||||||
|||||
|
|||||
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -116,7 +116,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent)
|
|||||||
|
|
||||||
## AreaStyle
|
## AreaStyle
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
区域填充样式。
|
区域填充样式。
|
||||||
|
|
||||||
@@ -355,7 +355,7 @@ Inherits or Implemented: [Serie](#serie),[INeedSerieContainer](#ineedseriecontai
|
|||||||
|
|
||||||
## BlurStyle
|
## BlurStyle
|
||||||
|
|
||||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
> 从 `v3.2.0` 开始支持
|
> 从 `v3.2.0` 开始支持
|
||||||
|
|
||||||
@@ -508,7 +508,7 @@ Inherits or Implemented: [BaseScatter](#basescatter)
|
|||||||
|
|
||||||
## EmphasisStyle
|
## EmphasisStyle
|
||||||
|
|
||||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
> 从 `v3.2.0` 开始支持
|
> 从 `v3.2.0` 开始支持
|
||||||
|
|
||||||
@@ -570,7 +570,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent)
|
|||||||
|
|
||||||
## ImageStyle
|
## ImageStyle
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
|field|default|since|comment|
|
|field|default|since|comment|
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -643,7 +643,7 @@ Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieDataComponent]
|
|||||||
|
|
||||||
## LabelLine
|
## 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
|
## LabelStyle
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。
|
图形上的文本标签,可用于说明图形的一些数据信息,比如值,名称等。
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ Inherits or Implemented: [Serie](#serie),[INeedSerieContainer](#ineedseriecontai
|
|||||||
|
|
||||||
## LineArrow
|
## LineArrow
|
||||||
|
|
||||||
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieExtraComponent](#iserieextracomponent)
|
Inherits or Implemented: [ChildComponent](#childcomponent),[ISerieComponent](#iseriecomponent)
|
||||||
|
|
||||||
|field|default|since|comment|
|
|field|default|since|comment|
|
||||||
|--|--|--|--|
|
|--|--|--|--|
|
||||||
@@ -990,7 +990,7 @@ Inherits or Implemented: [BaseScatter](#basescatter)
|
|||||||
|
|
||||||
## SelectStyle
|
## SelectStyle
|
||||||
|
|
||||||
Inherits or Implemented: [StateStyle](#statestyle),[ISerieExtraComponent](#iserieextracomponent),[ISerieDataComponent](#iseriedatacomponent)
|
Inherits or Implemented: [StateStyle](#statestyle),[ISerieComponent](#iseriecomponent),[ISerieDataComponent](#iseriedatacomponent)
|
||||||
|
|
||||||
> 从 `v3.2.0` 开始支持
|
> 从 `v3.2.0` 开始支持
|
||||||
|
|
||||||
@@ -1344,7 +1344,7 @@ Inherits or Implemented: [MainComponent](#maincomponent),[IPropertyChanged](#ipr
|
|||||||
|
|
||||||
## TitleStyle
|
## TitleStyle
|
||||||
|
|
||||||
Inherits or Implemented: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieExtraComponent](#iserieextracomponent)
|
Inherits or Implemented: [LabelStyle](#labelstyle),[ISerieDataComponent](#iseriedatacomponent),[ISerieComponent](#iseriecomponent)
|
||||||
|
|
||||||
标题相关设置。
|
标题相关设置。
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 4
|
sidebar_position: 51
|
||||||
slug: /faq
|
slug: /faq
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
---
|
---
|
||||||
sidebar_position: 6
|
title: 技术支持和订阅服务
|
||||||
|
sidebar_position: 21
|
||||||
slug: /support
|
slug: /support
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
title: 入门教程:5分钟上手 XCharts 3.0
|
title: 入门教程:5分钟上手 XCharts 3.0
|
||||||
sidebar_position: 1
|
sidebar_position: 11
|
||||||
slug: /tutorial01
|
slug: /tutorial01
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -105,29 +105,29 @@ chart.SetSize(580, 300);//代码动态设置尺寸,或直接操作chart.rectTr
|
|||||||
设置标题:
|
设置标题:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var title = chart.GetOrAddChartComponent<Title>();
|
var title = chart.EnsureChartComponent<Title>();
|
||||||
title.text = "Simple Line";
|
title.text = "Simple Line";
|
||||||
```
|
```
|
||||||
|
|
||||||
设置提示框和图例是否显示:
|
设置提示框和图例是否显示:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var tooltip = chart.GetOrAddChartComponent<Tooltip>();
|
var tooltip = chart.EnsureChartComponent<Tooltip>();
|
||||||
tooltip.show = true;
|
tooltip.show = true;
|
||||||
|
|
||||||
var legend = chart.GetOrAddChartComponent<Legend>();
|
var legend = chart.EnsureChartComponent<Legend>();
|
||||||
legend.show = false;
|
legend.show = false;
|
||||||
```
|
```
|
||||||
|
|
||||||
设置坐标轴:
|
设置坐标轴:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var xAxis = chart.GetOrAddChartComponent<XAxis>();
|
var xAxis = chart.EnsureChartComponent<XAxis>();
|
||||||
xAxis.splitNumber = 10;
|
xAxis.splitNumber = 10;
|
||||||
xAxis.boundaryGap = true;
|
xAxis.boundaryGap = true;
|
||||||
xAxis.type = Axis.AxisType.Category;
|
xAxis.type = Axis.AxisType.Category;
|
||||||
|
|
||||||
var yAxis = chart.GetOrAddChartComponent<YAxis>();
|
var yAxis = chart.EnsureChartComponent<YAxis>();
|
||||||
yAxis.type = Axis.AxisType.Value;
|
yAxis.type = Axis.AxisType.Value;
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -201,11 +201,11 @@ XCharts支持TextMeshPro,但默认是不开启的,需要自己手动切换
|
|||||||
需要先获取组件,再修改里面的参数:
|
需要先获取组件,再修改里面的参数:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
var title = chart.GetOrAddChartComponent<Title>();
|
var title = chart.EnsureChartComponent<Title>();
|
||||||
title.text = "Simple LineChart";
|
title.text = "Simple LineChart";
|
||||||
title.subText = "normal line";
|
title.subText = "normal line";
|
||||||
|
|
||||||
var xAxis = chart.GetOrAddChartComponent<XAxis>();
|
var xAxis = chart.EnsureChartComponent<XAxis>();
|
||||||
xAxis.splitNumber = 10;
|
xAxis.splitNumber = 10;
|
||||||
xAxis.boundaryGap = true;
|
xAxis.boundaryGap = true;
|
||||||
xAxis.type = Axis.AxisType.Category;
|
xAxis.type = Axis.AxisType.Category;
|
||||||
@@ -240,9 +240,9 @@ serie.roundCap = true;
|
|||||||
给Serie添加额外组件:
|
给Serie添加额外组件:
|
||||||
|
|
||||||
```C#
|
```C#
|
||||||
serie.AddExtraComponent<AreaStyle>();
|
serie.EnsureComponent<AreaStyle>();
|
||||||
|
|
||||||
var label = serie1.AddExtraComponent<LabelStyle>();
|
var label = serie1.EnsureComponent<LabelStyle>();
|
||||||
label.offset = new Vector3(0,20,0);
|
label.offset = new Vector3(0,20,0);
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -253,7 +253,7 @@ var serieData = chart.AddData(0, 20);
|
|||||||
//var serieData = serie.GetSerieData(0); //从已有数据中获取
|
//var serieData = serie.GetSerieData(0); //从已有数据中获取
|
||||||
serieData.radius = 10;
|
serieData.radius = 10;
|
||||||
|
|
||||||
var itemStyle = serieData.GetOrAddComponent<ItemStyle>(); //给数据项添加ItemStyle组件
|
var itemStyle = serieData.EnsureComponent<ItemStyle>(); //给数据项添加ItemStyle组件
|
||||||
itemStyle.color = Color.blue;
|
itemStyle.color = Color.blue;
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
- 支持万级大数据量绘制,支持采样绘制。
|
- 支持万级大数据量绘制,支持采样绘制。
|
||||||
- 支持`TexMeshPro`。
|
- 支持`TexMeshPro`。
|
||||||
- 支持所有`5.6`以上的`Unity`版本。
|
- 支持所有`5.6`以上的`Unity`版本。
|
||||||
- 支持 Input System ([如何从 Input Manager 转 Input System](Documentation~/zh/inputsystem.md))。
|
- 支持 Input System ([如何从 Input Manager 转 Input System](https://xcharts-team.github.io/docs/master/tutorial03/inputsystem))。
|
||||||
|
|
||||||
## 截图
|
## 截图
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user