[doc] add since version

This commit is contained in:
monitor1394
2022-06-25 11:45:22 +08:00
parent 9a1c76c236
commit f19b61f1f2
9 changed files with 1572 additions and 1491 deletions

View File

@@ -54,6 +54,9 @@
## 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.20) 优化`Tooltip`的边界限制 (#202)
* (2022.06.20) 修复`TextMeshPro`开启时编译错误

View File

@@ -80,6 +80,7 @@
- [SimplifiedBarChart](#SimplifiedBarChart)
- [SimplifiedCandlestickChart](#SimplifiedCandlestickChart)
- [SimplifiedLineChart](#SimplifiedLineChart)
- [Since](#Since)
- [SVG](#SVG)
- [SVGImage](#SVGImage)
- [SVGPath](#SVGPath)
@@ -237,6 +238,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
| `RefreshPainter()` |public void RefreshPainter(int index)</br> |
| `RefreshPainter()` |public void RefreshPainter(Serie serie)</br> |
| `RefreshTopPainter()` |public void RefreshTopPainter()</br> |
| `RefreshUpperPainter()` |public void RefreshUpperPainter()</br> |
| `RemoveAllChartComponent()` |public void RemoveAllChartComponent()</br> |
| `RemoveChartComponent()` |public bool RemoveChartComponent(MainComponent component)</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. |
| `SetSeriePainterMaterial()` |public void SetSeriePainterMaterial(Material material)</br>设置Serie 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> |
| `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. |
@@ -373,6 +376,7 @@ Inherits or Implemented: [BaseChart](#BaseChart)
| `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(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> |
## `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> |
| `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> |
| `SetLegendBackground()` |public static void SetLegendBackground(Legend legend, ImageStyle style)</br> |
## `LegendItem`
@@ -554,6 +559,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
| `GetIconColor()` |public Color GetIconColor()</br> |
| `GetIconRect()` |public Rect GetIconRect()</br> |
| `SetActive()` |public void SetActive(bool active)</br> |
| `SetBackground()` |public void SetBackground(ImageStyle imageStyle)</br> |
| `SetButton()` |public void SetButton(Button button)</br> |
| `SetContent()` |public bool SetContent(string content)</br> |
| `SetContentBackgroundColor()` |public void SetContentBackgroundColor(Color color)</br> |
@@ -905,6 +911,14 @@ 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`
|public method|description|

View File

@@ -80,6 +80,7 @@
- [SimplifiedBarChart](#SimplifiedBarChart)
- [SimplifiedCandlestickChart](#SimplifiedCandlestickChart)
- [SimplifiedLineChart](#SimplifiedLineChart)
- [Since](#Since)
- [SVG](#SVG)
- [SVGImage](#SVGImage)
- [SVGPath](#SVGPath)
@@ -237,6 +238,7 @@ Inherits or Implemented: [BaseGraph](#BaseGraph),[ISerializationCallbackReceiver
| `RefreshPainter()` |public void RefreshPainter(int index)</br> |
| `RefreshPainter()` |public void RefreshPainter(Serie serie)</br> |
| `RefreshTopPainter()` |public void RefreshTopPainter()</br> |
| `RefreshUpperPainter()` |public void RefreshUpperPainter()</br> |
| `RemoveAllChartComponent()` |public void RemoveAllChartComponent()</br> |
| `RemoveChartComponent()` |public bool RemoveChartComponent(MainComponent component)</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>设置指定系列是否显示。 |
| `SetSeriePainterMaterial()` |public void SetSeriePainterMaterial(Material material)</br>设置Serie 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> |
| `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轴图标。 |
@@ -373,6 +376,7 @@ Inherits or Implemented: [BaseChart](#BaseChart)
| `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(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> |
## `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> |
| `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> |
| `SetLegendBackground()` |public static void SetLegendBackground(Legend legend, ImageStyle style)</br> |
## `LegendItem`
@@ -554,6 +559,7 @@ Inherits or Implemented: [MainComponentContext](#MainComponentContext)
| `GetIconColor()` |public Color GetIconColor()</br> |
| `GetIconRect()` |public Rect GetIconRect()</br> |
| `SetActive()` |public void SetActive(bool active)</br> |
| `SetBackground()` |public void SetBackground(ImageStyle imageStyle)</br> |
| `SetButton()` |public void SetButton(Button button)</br> |
| `SetContent()` |public bool SetContent(string content)</br> |
| `SetContentBackgroundColor()` |public void SetContentBackgroundColor(Color color)</br> |
@@ -905,6 +911,14 @@ 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`
|public method|description|

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -28,7 +28,7 @@ namespace XCharts.Runtime
[SerializeField] private TMP_FontAsset m_TMPFont;
[SerializeField] private FontStyles m_TMPFontStyle = FontStyles.Normal;
[SerializeField] private TextAlignmentOptions m_TMPAlignment = TextAlignmentOptions.Left;
[SerializeField] private TMP_SpriteAsset m_TMPSpriteAsset;
[SerializeField][Since("v3.1.0")] private TMP_SpriteAsset m_TMPSpriteAsset;
#endif
public bool show
{

View File

@@ -80,8 +80,8 @@ namespace XCharts.Runtime
[SerializeField] private List<string> m_Data = new List<string>();
[SerializeField] private List<Sprite> m_Icons = new List<Sprite>();
[SerializeField] private List<Color> m_Colors = new List<Color>();
[SerializeField] protected ImageStyle m_Background = new ImageStyle() { show = false };
[SerializeField] protected Padding m_Padding = new Padding();
[SerializeField][Since("v3.1.0")] protected ImageStyle m_Background = new ImageStyle() { show = false };
[SerializeField][Since("v3.1.0")] protected Padding m_Padding = new Padding();
public LegendContext context = new LegendContext();

View 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;
}
}
}

View File

@@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 04c4c3fba4de2404d9c715eeff4a707c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: