mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
修复GridCoord在设置背景色且Serie开启Clip时会覆盖图表的问题
This commit is contained in:
@@ -80,6 +80,7 @@ slug: /changelog
|
||||
|
||||
## master
|
||||
|
||||
* (2025.04.07) 修复`GridCoord`在设置背景色且Serie开启Clip时会覆盖图表的问题
|
||||
* (2025.04.07) 修复`Gantt`甘特图年份大于2038时显示异常的问题
|
||||
* (2025.04.07) 修复`Axis`的`Time`时间轴无法显示大于2038的年份的问题
|
||||
* (2025.04.06) 修复`Axis`的`Time`时间轴在有`DataZoom`缩放时文本显示异常的问题
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace XCharts.Runtime
|
||||
{
|
||||
var grid = component;
|
||||
grid.painter = chart.painter;
|
||||
grid.refreshComponent = delegate()
|
||||
grid.refreshComponent = delegate ()
|
||||
{
|
||||
grid.UpdateRuntimeData(chart);
|
||||
chart.OnCoordinateChanged();
|
||||
@@ -51,6 +51,7 @@ namespace XCharts.Runtime
|
||||
|
||||
public override void DrawBase(VertexHelper vh)
|
||||
{
|
||||
DrawBackground(vh, component);
|
||||
if (!SeriesHelper.IsAnyClipSerie(chart.series))
|
||||
{
|
||||
DrawCoord(vh, component);
|
||||
@@ -64,7 +65,7 @@ namespace XCharts.Runtime
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawCoord(VertexHelper vh, GridCoord grid)
|
||||
private void DrawBackground(VertexHelper vh, GridCoord grid)
|
||||
{
|
||||
if (!grid.show) return;
|
||||
if (!ChartHelper.IsClearColor(grid.backgroundColor))
|
||||
@@ -75,6 +76,11 @@ namespace XCharts.Runtime
|
||||
var p4 = new Vector2(grid.context.x + grid.context.width, grid.context.y);
|
||||
UGL.DrawQuadrilateral(vh, p1, p2, p3, p4, grid.backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawCoord(VertexHelper vh, GridCoord grid)
|
||||
{
|
||||
if (!grid.show) return;
|
||||
if (grid.showBorder)
|
||||
{
|
||||
var borderWidth = grid.borderWidth == 0 ? chart.theme.axis.lineWidth * 2 : grid.borderWidth;
|
||||
|
||||
Reference in New Issue
Block a user