mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 23:40:10 +00:00
增加Chart的更多快捷创建图表菜单
This commit is contained in:
@@ -2,6 +2,10 @@ using UnityEngine;
|
||||
|
||||
namespace XCharts.Runtime
|
||||
{
|
||||
/// <summary>
|
||||
/// Scatter chart is mainly used to show the relationship between two data dimensions.
|
||||
/// || 散点图主要用于展现两个数据维度之间的关系。
|
||||
/// </summary>
|
||||
[AddComponentMenu("XCharts/ScatterChart", 17)]
|
||||
[ExecuteInEditMode]
|
||||
[RequireComponent(typeof(RectTransform))]
|
||||
@@ -24,5 +28,21 @@ namespace XCharts.Runtime
|
||||
RemoveData();
|
||||
Scatter.AddDefaultSerie(this, GenerateDefaultSerieName());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// default bubble chart.
|
||||
/// || 默认气泡图。
|
||||
/// </summary>
|
||||
public void DefaultBubbleChart()
|
||||
{
|
||||
CheckChartInit();
|
||||
var serie = GetSerie(0);
|
||||
serie.itemStyle.borderWidth = 2f;
|
||||
serie.itemStyle.borderColor = theme.GetColor(0);
|
||||
serie.itemStyle.opacity = 0.35f;
|
||||
serie.symbol.sizeType = SymbolSizeType.FromData;
|
||||
serie.symbol.dataScale = 0.3f;
|
||||
serie.symbol.maxSize = 30f;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user