Improved zebra bar chart

This commit is contained in:
monitor1394
2022-01-06 21:25:18 +08:00
parent 0706757081
commit f64a82b340
5 changed files with 26 additions and 6 deletions

View File

@@ -1696,11 +1696,11 @@ namespace XCharts
}
public void Internal_CheckClipAndDrawZebraLine(VertexHelper vh, Vector3 p1, Vector3 p2, float size, float zebraWidth,
float zebraGap, Color32 color, Color32 toColor, bool clip, Grid grid)
float zebraGap, Color32 color, Color32 toColor, bool clip, Grid grid, float maxDistance)
{
ClampInChart(ref p1);
ClampInChart(ref p2);
UGL.DrawZebraLine(vh, p1, p2, size, zebraWidth, zebraGap, color, toColor);
UGL.DrawZebraLine(vh, p1, p2, size, zebraWidth, zebraGap, color, toColor,maxDistance);
}
protected Color32 GetXLerpColor(Color32 areaColor, Color32 areaToColor, Vector3 pos, Grid grid)

View File

@@ -386,14 +386,14 @@ namespace XCharts
plt = (plb + plt) / 2;
prt = (prt + prb) / 2;
Internal_CheckClipAndDrawZebraLine(vh, plt, prt, barWidth / 2, serie.barZebraWidth, serie.barZebraGap,
barColor, barToColor, serie.clip, grid);
barColor, barToColor, serie.clip, grid, grid.runtimeWidth);
}
else
{
plb = (prb + plb) / 2;
plt = (plt + prt) / 2;
Internal_CheckClipAndDrawZebraLine(vh, plb, plt, barWidth / 2, serie.barZebraWidth, serie.barZebraGap,
barColor, barToColor, serie.clip, grid);
barColor, barToColor, serie.clip, grid, grid.runtimeHeight);
}
}