增加折线图对数轴Log的支持

This commit is contained in:
monitor1394
2020-01-15 19:41:21 +08:00
parent 4e709ab253
commit f5037dafb1
9 changed files with 198 additions and 34 deletions

View File

@@ -452,7 +452,8 @@ namespace XCharts
return false;
}
public bool UpdateData(string serieName,int dataIndex,List<float> values){
public bool UpdateData(string serieName, int dataIndex, List<float> values)
{
var serie = GetSerie(serieName);
if (serie != null)
{
@@ -460,7 +461,8 @@ namespace XCharts
}
return false;
}
public bool UpdateData(int serieIndex,int dataIndex,List<float> values){
public bool UpdateData(int serieIndex, int dataIndex, List<float> values)
{
var serie = GetSerie(serieIndex);
if (serie != null)
{
@@ -746,16 +748,8 @@ namespace XCharts
}
else
{
if (max > 1)
{
minVaule = Mathf.FloorToInt(min);
maxValue = Mathf.CeilToInt(max);
}
else
{
minVaule = min;
maxValue = max;
}
minVaule = min > 1 ? Mathf.FloorToInt(min) : min;
maxValue = max > 1 ? Mathf.CeilToInt(max) : max;
}
}