增加ScatterChart散点图

This commit is contained in:
monitor1394
2019-07-21 23:10:38 +08:00
parent ff8057690c
commit 8a25a09435
16 changed files with 131255 additions and 45738 deletions

View File

@@ -176,7 +176,9 @@ namespace XCharts
{
var xdata = serie.xData[n];
var ydata = serie.yData[n];
if (Mathf.Abs(xValue - xdata) / xRate < 5 && Mathf.Abs(yValue - ydata) / yRate < 5)
var symbolSize = serie.symbol.GetSize(serie.data[n].data);
if (Mathf.Abs(xValue - xdata) / xRate < symbolSize
&& Mathf.Abs(yValue - ydata) / yRate < symbolSize)
{
m_Tooltip.dataIndex[i] = n;
serie.selected = true;

View File

@@ -47,11 +47,7 @@ namespace XCharts
m_ItemWidth = 60.0f,
m_ItemHeight = 20.0f,
m_ItemGap = 5,
m_ItemFontSize = 16,
m_Data = new List<string>()
{
"serie1"
}
m_ItemFontSize = 16
};
legend.location.top = 30;
return legend;

View File

@@ -0,0 +1,26 @@
using UnityEngine;
namespace XCharts
{
[System.Serializable]
public class Scatter
{
[SerializeField] private string m_Name;
[SerializeField] private float m_InsideRadius;
[SerializeField] private float m_OutsideRadius;
[SerializeField] private float m_TooltipExtraRadius;
public string name { get { return m_Name; } set { m_Name = value; } }
public static Scatter defaultScatter
{
get
{
var scatter = new Scatter
{
};
return scatter;
}
}
}
}

View File

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