mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-14 20:00:09 +00:00
优化LineChart在不使用XAxis1时也能显示XAxis1
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.09.05) Optimize `LineChart` to display `XAxis1` without using `XAxis1`.
|
||||
* (2020.08.29) Added `toColor` and `toColor2` of `LineStyle` to set the horizontal gradient of `LineChart`. Cancel `ItemStyle` to set the horizontal gradient of `LineChart`.
|
||||
* (2020.08.29) Added the `onPointerClickPie` of `PieChart`, a callback function of click pie area.
|
||||
* (2020.08.29) Added the `onPointerClickBar` of `BarChart`, a callback function of click bar.
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
|
||||
# 更新日志
|
||||
|
||||
* (2020.08.29) 增加`LineStyle`的`toColor`和`toColor2`设置`LineChart`的水平渐变,取消通过`ItemStyle`设置`LineChart`的水平渐变。
|
||||
* (2020.09.05) 优化`LineChart`在不使用`XAxis1`时也能显示`XAxis1`
|
||||
* (2020.08.29) 增加`LineStyle`的`toColor`和`toColor2`设置`LineChart`的水平渐变,取消通过`ItemStyle`设置`LineChart`的水平渐变
|
||||
* (2020.08.29) 增加`PieChart`的`onPointerClickPie`点击扇形图扇区回调
|
||||
* (2020.08.29) 增加`BarChart`的`onPointerClickBar`点击柱形图柱条回调
|
||||
* (2020.08.24) 发布`v1.6.0`版本
|
||||
|
||||
@@ -1120,7 +1120,7 @@ namespace XCharts
|
||||
var inverse = xAxis.IsValue() && xAxis.inverse;
|
||||
var offset = AxisHelper.GetAxisLineSymbolOffset(xAxis);
|
||||
var lineY = m_CoordinateY + (xAxis.axisLine.onZero ? m_YAxises[xAxisIndex].runtimeZeroYOffset : 0);
|
||||
if (xAxis.IsValue() && xAxisIndex > 0) lineY += m_CoordinateHeight;
|
||||
if (xAxisIndex > 0) lineY += m_CoordinateHeight;
|
||||
var left = new Vector3(m_CoordinateX - xAxis.axisLine.width - (inverse ? offset : 0), lineY);
|
||||
var right = new Vector3(m_CoordinateX + m_CoordinateWidth + xAxis.axisLine.width + (!inverse ? offset : 0), lineY);
|
||||
ChartDrawer.DrawLine(vh, left, right, xAxis.axisLine.width, m_ThemeInfo.axisLineColor);
|
||||
@@ -1134,7 +1134,7 @@ namespace XCharts
|
||||
var offset = AxisHelper.GetAxisLineSymbolOffset(yAxis);
|
||||
var inverse = yAxis.IsValue() && yAxis.inverse;
|
||||
var lineX = m_CoordinateX + (yAxis.axisLine.onZero ? m_XAxises[yAxisIndex].runtimeZeroXOffset : 0);
|
||||
if (yAxis.IsValue() && yAxisIndex > 0) lineX += m_CoordinateWidth;
|
||||
if (yAxisIndex > 0) lineX += m_CoordinateWidth;
|
||||
var bottom = new Vector3(lineX, m_CoordinateY - yAxis.axisLine.width - (inverse ? offset : 0));
|
||||
var top = new Vector3(lineX, m_CoordinateY + m_CoordinateHeight + yAxis.axisLine.width + (!inverse ? offset : 0));
|
||||
ChartDrawer.DrawLine(vh, bottom, top, yAxis.axisLine.width, m_ThemeInfo.axisLineColor);
|
||||
@@ -1229,6 +1229,7 @@ namespace XCharts
|
||||
var xAxis = m_XAxises[i];
|
||||
var yAxis = m_YAxises[i];
|
||||
if (!xAxis.show) continue;
|
||||
if(m_Tooltip.runtimeXValues[i] < 0) continue;
|
||||
float splitWidth = AxisHelper.GetDataWidth(xAxis, m_CoordinateWidth, dataCount, m_DataZoom);
|
||||
switch (m_Tooltip.type)
|
||||
{
|
||||
@@ -1274,6 +1275,7 @@ namespace XCharts
|
||||
var yAxis = m_YAxises[i];
|
||||
var xAxis = m_XAxises[i];
|
||||
if (!yAxis.show) continue;
|
||||
if(m_Tooltip.runtimeYValues[i] < 0) continue;
|
||||
float splitWidth = AxisHelper.GetDataWidth(yAxis, m_CoordinateHeight, dataCount, m_DataZoom);
|
||||
switch (m_Tooltip.type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user