mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 18:00:26 +00:00
增加对自定义Chart的支持
This commit is contained in:
@@ -179,7 +179,7 @@ namespace XCharts
|
||||
else return null;
|
||||
}
|
||||
|
||||
internal static SerieLabel GetSerieLabel(Serie serie, SerieData serieData, bool highlight = false)
|
||||
public static SerieLabel GetSerieLabel(Serie serie, SerieData serieData, bool highlight = false)
|
||||
{
|
||||
if (highlight)
|
||||
{
|
||||
@@ -272,22 +272,6 @@ namespace XCharts
|
||||
else return null;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新运行时中心点和半径
|
||||
/// </summary>
|
||||
/// <param name="chartWidth"></param>
|
||||
/// <param name="chartHeight"></param>
|
||||
internal static void UpdateCenter(Serie serie, Vector3 chartPosition, float chartWidth, float chartHeight)
|
||||
{
|
||||
if (serie.center.Length < 2) return;
|
||||
var centerX = serie.center[0] <= 1 ? chartWidth * serie.center[0] : serie.center[0];
|
||||
var centerY = serie.center[1] <= 1 ? chartHeight * serie.center[1] : serie.center[1];
|
||||
serie.runtimeCenterPos = chartPosition + new Vector3(centerX, centerY);
|
||||
var minWidth = Mathf.Min(chartWidth, chartHeight);
|
||||
serie.runtimeInsideRadius = serie.radius[0] <= 1 ? minWidth * serie.radius[0] : serie.radius[0];
|
||||
serie.runtimeOutsideRadius = serie.radius[1] <= 1 ? minWidth * serie.radius[1] : serie.radius[1];
|
||||
}
|
||||
|
||||
internal static string GetNumericFormatter(Serie serie, SerieData serieData)
|
||||
{
|
||||
var itemStyle = SerieHelper.GetItemStyle(serie, serieData);
|
||||
|
||||
Reference in New Issue
Block a user