mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-27 19:50:10 +00:00
[doc] add since version
This commit is contained in:
@@ -54,6 +54,9 @@
|
|||||||
|
|
||||||
## master
|
## master
|
||||||
|
|
||||||
|
* (2022.06.25) 增加`Since`标识配置参数从哪个版本开始支持
|
||||||
|
* (2022.06.24) 优化`Painter`绘制层,`Top`层细分为`Upper`和`Top`层
|
||||||
|
* (2022.06.24) 增加`Legend`对`Background`和`Padding`的支持
|
||||||
* (2022.06.21) 增加`TextStyle`对`TextMeshPro`的`Sprite Asset`支持 (#201)
|
* (2022.06.21) 增加`TextStyle`对`TextMeshPro`的`Sprite Asset`支持 (#201)
|
||||||
* (2022.06.20) 优化`Tooltip`的边界限制 (#202)
|
* (2022.06.20) 优化`Tooltip`的边界限制 (#202)
|
||||||
* (2022.06.20) 修复`TextMeshPro`开启时编译错误
|
* (2022.06.20) 修复`TextMeshPro`开启时编译错误
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
- [SimplifiedBarChart](#SimplifiedBarChart)
|
- [SimplifiedBarChart](#SimplifiedBarChart)
|
||||||
- [SimplifiedCandlestickChart](#SimplifiedCandlestickChart)
|
- [SimplifiedCandlestickChart](#SimplifiedCandlestickChart)
|
||||||
- [SimplifiedLineChart](#SimplifiedLineChart)
|
- [SimplifiedLineChart](#SimplifiedLineChart)
|
||||||
|
- [Since](#Since)
|
||||||
- [SVG](#SVG)
|
- [SVG](#SVG)
|
||||||
- [SVGImage](#SVGImage)
|
- [SVGImage](#SVGImage)
|
||||||
- [SVGPath](#SVGPath)
|
- [SVGPath](#SVGPath)
|
||||||
@@ -237,6 +238,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
|
|||||||
| `RefreshPainter()` |public void RefreshPainter(int index)</br> |
|
| `RefreshPainter()` |public void RefreshPainter(int index)</br> |
|
||||||
| `RefreshPainter()` |public void RefreshPainter(Serie serie)</br> |
|
| `RefreshPainter()` |public void RefreshPainter(Serie serie)</br> |
|
||||||
| `RefreshTopPainter()` |public void RefreshTopPainter()</br> |
|
| `RefreshTopPainter()` |public void RefreshTopPainter()</br> |
|
||||||
|
| `RefreshUpperPainter()` |public void RefreshUpperPainter()</br> |
|
||||||
| `RemoveAllChartComponent()` |public void RemoveAllChartComponent()</br> |
|
| `RemoveAllChartComponent()` |public void RemoveAllChartComponent()</br> |
|
||||||
| `RemoveChartComponent()` |public bool RemoveChartComponent(MainComponent component)</br> |
|
| `RemoveChartComponent()` |public bool RemoveChartComponent(MainComponent component)</br> |
|
||||||
| `RemoveChartComponent()` |public bool RemoveChartComponent(Type type, int index = 0)</br> |
|
| `RemoveChartComponent()` |public bool RemoveChartComponent(Type type, int index = 0)</br> |
|
||||||
@@ -257,6 +259,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
|
|||||||
| `SetSerieActive()` |public void SetSerieActive(string serieName, bool active)</br>Whether to show serie. |
|
| `SetSerieActive()` |public void SetSerieActive(string serieName, bool active)</br>Whether to show serie. |
|
||||||
| `SetSeriePainterMaterial()` |public void SetSeriePainterMaterial(Material material)</br>设置Serie Painter的材质球 |
|
| `SetSeriePainterMaterial()` |public void SetSeriePainterMaterial(Material material)</br>设置Serie Painter的材质球 |
|
||||||
| `SetTopPainterMaterial()` |public void SetTopPainterMaterial(Material material)</br>设置Top Painter的材质球 |
|
| `SetTopPainterMaterial()` |public void SetTopPainterMaterial(Material material)</br>设置Top Painter的材质球 |
|
||||||
|
| `SetUpperPainterMaterial()` |public void SetUpperPainterMaterial(Material material)</br>设置Upper Painter的材质球 |
|
||||||
| `TryAddChartComponent()` |public bool TryAddChartComponent(Type type)</br> |
|
| `TryAddChartComponent()` |public bool TryAddChartComponent(Type type)</br> |
|
||||||
| `TryGetChartComponent<T>()` |public bool TryGetChartComponent<T>(out T component, int index = 0)</br> |
|
| `TryGetChartComponent<T>()` |public bool TryGetChartComponent<T>(out T component, int index = 0)</br> |
|
||||||
| `UdpateXAxisIcon()` |public void UdpateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)</br>Update xAxis icon. |
|
| `UdpateXAxisIcon()` |public void UdpateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)</br>Update xAxis icon. |
|
||||||
@@ -373,6 +376,7 @@ Inherits or Implemented: [BaseChart](#BaseChart)
|
|||||||
| `SetActive()` |public static void SetActive(Image image, bool active)</br> |
|
| `SetActive()` |public static void SetActive(Image image, bool active)</br> |
|
||||||
| `SetActive()` |public static void SetActive(Text text, bool active)</br> |
|
| `SetActive()` |public static void SetActive(Text text, bool active)</br> |
|
||||||
| `SetActive()` |public static void SetActive(Transform transform, bool active)</br>通过设置scale实现是否显示,优化性能,减少GC |
|
| `SetActive()` |public static void SetActive(Transform transform, bool active)</br>通过设置scale实现是否显示,优化性能,减少GC |
|
||||||
|
| `SetBackground()` |public static void SetBackground(Image background, ImageStyle imageStyle)</br> |
|
||||||
| `SetColorOpacity()` |public static void SetColorOpacity(ref Color32 color, float opacity)</br> |
|
| `SetColorOpacity()` |public static void SetColorOpacity(ref Color32 color, float opacity)</br> |
|
||||||
|
|
||||||
## `ChartLabel`
|
## `ChartLabel`
|
||||||
@@ -546,6 +550,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
|
|||||||
| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)</br> |
|
| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)</br> |
|
||||||
| `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)</br> |
|
| `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)</br> |
|
||||||
| `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)</br> |
|
| `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)</br> |
|
||||||
|
| `SetLegendBackground()` |public static void SetLegendBackground(Legend legend, ImageStyle style)</br> |
|
||||||
|
|
||||||
## `LegendItem`
|
## `LegendItem`
|
||||||
|
|
||||||
@@ -554,6 +559,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
|
|||||||
| `GetIconColor()` |public Color GetIconColor()</br> |
|
| `GetIconColor()` |public Color GetIconColor()</br> |
|
||||||
| `GetIconRect()` |public Rect GetIconRect()</br> |
|
| `GetIconRect()` |public Rect GetIconRect()</br> |
|
||||||
| `SetActive()` |public void SetActive(bool active)</br> |
|
| `SetActive()` |public void SetActive(bool active)</br> |
|
||||||
|
| `SetBackground()` |public void SetBackground(ImageStyle imageStyle)</br> |
|
||||||
| `SetButton()` |public void SetButton(Button button)</br> |
|
| `SetButton()` |public void SetButton(Button button)</br> |
|
||||||
| `SetContent()` |public bool SetContent(string content)</br> |
|
| `SetContent()` |public bool SetContent(string content)</br> |
|
||||||
| `SetContentBackgroundColor()` |public void SetContentBackgroundColor(Color color)</br> |
|
| `SetContentBackgroundColor()` |public void SetContentBackgroundColor(Color color)</br> |
|
||||||
@@ -905,6 +911,14 @@ Inherits or Implemented: [BaseChart](#BaseChart)
|
|||||||
|
|
||||||
Inherits or Implemented: [BaseChart](#BaseChart)
|
Inherits or Implemented: [BaseChart](#BaseChart)
|
||||||
|
|
||||||
|
## `Since`
|
||||||
|
|
||||||
|
Inherits or Implemented: [Attribute](#Attribute)
|
||||||
|
|
||||||
|
|public method|description|
|
||||||
|
|--|--|
|
||||||
|
| `Since()` |public Since(string version)</br> |
|
||||||
|
|
||||||
## `SVG`
|
## `SVG`
|
||||||
|
|
||||||
|public method|description|
|
|public method|description|
|
||||||
|
|||||||
@@ -80,6 +80,7 @@
|
|||||||
- [SimplifiedBarChart](#SimplifiedBarChart)
|
- [SimplifiedBarChart](#SimplifiedBarChart)
|
||||||
- [SimplifiedCandlestickChart](#SimplifiedCandlestickChart)
|
- [SimplifiedCandlestickChart](#SimplifiedCandlestickChart)
|
||||||
- [SimplifiedLineChart](#SimplifiedLineChart)
|
- [SimplifiedLineChart](#SimplifiedLineChart)
|
||||||
|
- [Since](#Since)
|
||||||
- [SVG](#SVG)
|
- [SVG](#SVG)
|
||||||
- [SVGImage](#SVGImage)
|
- [SVGImage](#SVGImage)
|
||||||
- [SVGPath](#SVGPath)
|
- [SVGPath](#SVGPath)
|
||||||
@@ -237,6 +238,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
|
|||||||
| `RefreshPainter()` |public void RefreshPainter(int index)</br> |
|
| `RefreshPainter()` |public void RefreshPainter(int index)</br> |
|
||||||
| `RefreshPainter()` |public void RefreshPainter(Serie serie)</br> |
|
| `RefreshPainter()` |public void RefreshPainter(Serie serie)</br> |
|
||||||
| `RefreshTopPainter()` |public void RefreshTopPainter()</br> |
|
| `RefreshTopPainter()` |public void RefreshTopPainter()</br> |
|
||||||
|
| `RefreshUpperPainter()` |public void RefreshUpperPainter()</br> |
|
||||||
| `RemoveAllChartComponent()` |public void RemoveAllChartComponent()</br> |
|
| `RemoveAllChartComponent()` |public void RemoveAllChartComponent()</br> |
|
||||||
| `RemoveChartComponent()` |public bool RemoveChartComponent(MainComponent component)</br> |
|
| `RemoveChartComponent()` |public bool RemoveChartComponent(MainComponent component)</br> |
|
||||||
| `RemoveChartComponent()` |public bool RemoveChartComponent(Type type, int index = 0)</br> |
|
| `RemoveChartComponent()` |public bool RemoveChartComponent(Type type, int index = 0)</br> |
|
||||||
@@ -257,6 +259,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
|
|||||||
| `SetSerieActive()` |public void SetSerieActive(string serieName, bool active)</br>设置指定系列是否显示。 |
|
| `SetSerieActive()` |public void SetSerieActive(string serieName, bool active)</br>设置指定系列是否显示。 |
|
||||||
| `SetSeriePainterMaterial()` |public void SetSeriePainterMaterial(Material material)</br>设置Serie Painter的材质球 |
|
| `SetSeriePainterMaterial()` |public void SetSeriePainterMaterial(Material material)</br>设置Serie Painter的材质球 |
|
||||||
| `SetTopPainterMaterial()` |public void SetTopPainterMaterial(Material material)</br>设置Top Painter的材质球 |
|
| `SetTopPainterMaterial()` |public void SetTopPainterMaterial(Material material)</br>设置Top Painter的材质球 |
|
||||||
|
| `SetUpperPainterMaterial()` |public void SetUpperPainterMaterial(Material material)</br>设置Upper Painter的材质球 |
|
||||||
| `TryAddChartComponent()` |public bool TryAddChartComponent(Type type)</br> |
|
| `TryAddChartComponent()` |public bool TryAddChartComponent(Type type)</br> |
|
||||||
| `TryGetChartComponent<T>()` |public bool TryGetChartComponent<T>(out T component, int index = 0)</br> |
|
| `TryGetChartComponent<T>()` |public bool TryGetChartComponent<T>(out T component, int index = 0)</br> |
|
||||||
| `UdpateXAxisIcon()` |public void UdpateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)</br>更新X轴图标。 |
|
| `UdpateXAxisIcon()` |public void UdpateXAxisIcon(int index, Sprite icon, int xAxisIndex = 0)</br>更新X轴图标。 |
|
||||||
@@ -373,6 +376,7 @@ Inherits or Implemented: [BaseChart](#BaseChart)
|
|||||||
| `SetActive()` |public static void SetActive(Image image, bool active)</br> |
|
| `SetActive()` |public static void SetActive(Image image, bool active)</br> |
|
||||||
| `SetActive()` |public static void SetActive(Text text, bool active)</br> |
|
| `SetActive()` |public static void SetActive(Text text, bool active)</br> |
|
||||||
| `SetActive()` |public static void SetActive(Transform transform, bool active)</br>通过设置scale实现是否显示,优化性能,减少GC |
|
| `SetActive()` |public static void SetActive(Transform transform, bool active)</br>通过设置scale实现是否显示,优化性能,减少GC |
|
||||||
|
| `SetBackground()` |public static void SetBackground(Image background, ImageStyle imageStyle)</br> |
|
||||||
| `SetColorOpacity()` |public static void SetColorOpacity(ref Color32 color, float opacity)</br> |
|
| `SetColorOpacity()` |public static void SetColorOpacity(ref Color32 color, float opacity)</br> |
|
||||||
|
|
||||||
## `ChartLabel`
|
## `ChartLabel`
|
||||||
@@ -546,6 +550,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
|
|||||||
| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)</br> |
|
| `GetContentColor()` |public static Color GetContentColor(BaseChart chart, int legendIndex, string legendName, Legend legend, ThemeStyle theme, bool active)</br> |
|
||||||
| `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)</br> |
|
| `GetIconColor()` |public static Color GetIconColor(BaseChart chart, Legend legend, int readIndex, string legendName, bool active)</br> |
|
||||||
| `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)</br> |
|
| `ResetItemPosition()` |public static void ResetItemPosition(Legend legend, Vector3 chartPos, float chartWidth, float chartHeight)</br> |
|
||||||
|
| `SetLegendBackground()` |public static void SetLegendBackground(Legend legend, ImageStyle style)</br> |
|
||||||
|
|
||||||
## `LegendItem`
|
## `LegendItem`
|
||||||
|
|
||||||
@@ -554,6 +559,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
|
|||||||
| `GetIconColor()` |public Color GetIconColor()</br> |
|
| `GetIconColor()` |public Color GetIconColor()</br> |
|
||||||
| `GetIconRect()` |public Rect GetIconRect()</br> |
|
| `GetIconRect()` |public Rect GetIconRect()</br> |
|
||||||
| `SetActive()` |public void SetActive(bool active)</br> |
|
| `SetActive()` |public void SetActive(bool active)</br> |
|
||||||
|
| `SetBackground()` |public void SetBackground(ImageStyle imageStyle)</br> |
|
||||||
| `SetButton()` |public void SetButton(Button button)</br> |
|
| `SetButton()` |public void SetButton(Button button)</br> |
|
||||||
| `SetContent()` |public bool SetContent(string content)</br> |
|
| `SetContent()` |public bool SetContent(string content)</br> |
|
||||||
| `SetContentBackgroundColor()` |public void SetContentBackgroundColor(Color color)</br> |
|
| `SetContentBackgroundColor()` |public void SetContentBackgroundColor(Color color)</br> |
|
||||||
@@ -905,6 +911,14 @@ Inherits or Implemented: [BaseChart](#BaseChart)
|
|||||||
|
|
||||||
Inherits or Implemented: [BaseChart](#BaseChart)
|
Inherits or Implemented: [BaseChart](#BaseChart)
|
||||||
|
|
||||||
|
## `Since`
|
||||||
|
|
||||||
|
Inherits or Implemented: [Attribute](#Attribute)
|
||||||
|
|
||||||
|
|public method|description|
|
||||||
|
|--|--|
|
||||||
|
| `Since()` |public Since(string version)</br> |
|
||||||
|
|
||||||
## `SVG`
|
## `SVG`
|
||||||
|
|
||||||
|public method|description|
|
|public method|description|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -28,7 +28,7 @@ namespace XCharts.Runtime
|
|||||||
[SerializeField] private TMP_FontAsset m_TMPFont;
|
[SerializeField] private TMP_FontAsset m_TMPFont;
|
||||||
[SerializeField] private FontStyles m_TMPFontStyle = FontStyles.Normal;
|
[SerializeField] private FontStyles m_TMPFontStyle = FontStyles.Normal;
|
||||||
[SerializeField] private TextAlignmentOptions m_TMPAlignment = TextAlignmentOptions.Left;
|
[SerializeField] private TextAlignmentOptions m_TMPAlignment = TextAlignmentOptions.Left;
|
||||||
[SerializeField] private TMP_SpriteAsset m_TMPSpriteAsset;
|
[SerializeField][Since("v3.1.0")] private TMP_SpriteAsset m_TMPSpriteAsset;
|
||||||
#endif
|
#endif
|
||||||
public bool show
|
public bool show
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,8 +80,8 @@ namespace XCharts.Runtime
|
|||||||
[SerializeField] private List<string> m_Data = new List<string>();
|
[SerializeField] private List<string> m_Data = new List<string>();
|
||||||
[SerializeField] private List<Sprite> m_Icons = new List<Sprite>();
|
[SerializeField] private List<Sprite> m_Icons = new List<Sprite>();
|
||||||
[SerializeField] private List<Color> m_Colors = new List<Color>();
|
[SerializeField] private List<Color> m_Colors = new List<Color>();
|
||||||
[SerializeField] protected ImageStyle m_Background = new ImageStyle() { show = false };
|
[SerializeField][Since("v3.1.0")] protected ImageStyle m_Background = new ImageStyle() { show = false };
|
||||||
[SerializeField] protected Padding m_Padding = new Padding();
|
[SerializeField][Since("v3.1.0")] protected Padding m_Padding = new Padding();
|
||||||
|
|
||||||
public LegendContext context = new LegendContext();
|
public LegendContext context = new LegendContext();
|
||||||
|
|
||||||
|
|||||||
15
Runtime/Internal/Attributes/SinceAttribute.cs
Normal file
15
Runtime/Internal/Attributes/SinceAttribute.cs
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
namespace XCharts.Runtime
|
||||||
|
{
|
||||||
|
[AttributeUsage(AttributeTargets.Field, AllowMultiple = false)]
|
||||||
|
public class Since : Attribute
|
||||||
|
{
|
||||||
|
public readonly string version;
|
||||||
|
|
||||||
|
public Since(string version)
|
||||||
|
{
|
||||||
|
this.version = version;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
11
Runtime/Internal/Attributes/SinceAttribute.cs.meta
Normal file
11
Runtime/Internal/Attributes/SinceAttribute.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 04c4c3fba4de2404d9c715eeff4a707c
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
||||||
Reference in New Issue
Block a user