mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 01:10:08 +00:00
增加Heatmap的maxCache参数支持
This commit is contained in:
@@ -543,11 +543,14 @@ namespace XCharts.Runtime
|
||||
/// <param name="axis"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static int GetAxisValueSplitIndex(Axis axis, double value, int totalSplitNumber = -1)
|
||||
public static int GetAxisValueSplitIndex(Axis axis, double value, bool checkMaxCache, int totalSplitNumber = -1)
|
||||
{
|
||||
if (axis.IsCategory())
|
||||
{
|
||||
return (int)value;
|
||||
if (checkMaxCache)
|
||||
return axis.maxCache > 0 ? (int)value - (axis.GetAddedDataCount() - axis.data.Count) : (int)value;
|
||||
else
|
||||
return (int)value;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user