mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-20 15:30:09 +00:00
[bug][datazoom] fix chart display error when datazoom enable.
This commit is contained in:
@@ -293,7 +293,6 @@ namespace XCharts.Runtime
|
||||
for (int i = 0; i < dataCount; i++)
|
||||
{
|
||||
var serieData = serie.data[i];
|
||||
serieData.index = i;
|
||||
serie.context.sortedData.Add(serieData);
|
||||
}
|
||||
serie.context.sortedData.Sort(delegate(SerieData a, SerieData b)
|
||||
@@ -490,7 +489,6 @@ namespace XCharts.Runtime
|
||||
|
||||
private void DrawXAxisIndicator(VertexHelper vh, Tooltip tooltip, GridCoord grid)
|
||||
{
|
||||
|
||||
var xAxes = chart.GetChartComponents<XAxis>();
|
||||
var lineType = tooltip.lineStyle.GetType(chart.theme.tooltip.lineType);
|
||||
var lineWidth = tooltip.lineStyle.GetWidth(chart.theme.tooltip.lineWidth);
|
||||
@@ -512,6 +510,8 @@ namespace XCharts.Runtime
|
||||
pX += xAxis.IsCategory() ?
|
||||
(float) (xAxis.context.pointerValue * splitWidth + (xAxis.boundaryGap ? splitWidth / 2 : 0)) :
|
||||
xAxis.GetDistance(xAxis.context.axisTooltipValue, grid.context.width);
|
||||
if (pX < grid.context.x)
|
||||
break;
|
||||
Vector2 sp = new Vector2(pX, grid.context.y);
|
||||
Vector2 ep = new Vector2(pX, grid.context.y + grid.context.height);
|
||||
var lineColor = TooltipHelper.GetLineColor(tooltip, chart.theme);
|
||||
@@ -529,6 +529,8 @@ namespace XCharts.Runtime
|
||||
float tooltipSplitWid = splitWidth < 1 ? 1 : splitWidth;
|
||||
pX = (float) (grid.context.x + splitWidth * xAxis.context.pointerValue -
|
||||
(xAxis.boundaryGap ? 0 : splitWidth / 2));
|
||||
if (pX < grid.context.x)
|
||||
break;
|
||||
float pY = grid.context.y + grid.context.height;
|
||||
Vector3 p1 = new Vector3(pX, grid.context.y);
|
||||
Vector3 p2 = new Vector3(pX, pY);
|
||||
@@ -571,6 +573,8 @@ namespace XCharts.Runtime
|
||||
case Tooltip.Type.Line:
|
||||
float pY = (float) (grid.context.y + yAxis.context.pointerValue * splitWidth +
|
||||
(yAxis.boundaryGap ? splitWidth / 2 : 0));
|
||||
if (pY < grid.context.y)
|
||||
break;
|
||||
Vector2 sp = new Vector2(grid.context.x, pY);
|
||||
Vector2 ep = new Vector2(grid.context.x + grid.context.width, pY);
|
||||
var lineColor = TooltipHelper.GetLineColor(tooltip, chart.theme);
|
||||
@@ -589,6 +593,8 @@ namespace XCharts.Runtime
|
||||
float pX = grid.context.x + grid.context.width;
|
||||
pY = (float) (grid.context.y + splitWidth * yAxis.context.pointerValue -
|
||||
(yAxis.boundaryGap ? 0 : splitWidth / 2));
|
||||
if (pY < grid.context.y)
|
||||
break;
|
||||
Vector3 p1 = new Vector3(grid.context.x, pY);
|
||||
Vector3 p2 = new Vector3(grid.context.x, pY + tooltipSplitWid);
|
||||
Vector3 p3 = new Vector3(pX, pY + tooltipSplitWid);
|
||||
|
||||
Reference in New Issue
Block a user