mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-19 15:00:08 +00:00
优化BarChart在Tooltip的Trigger为Item时的表现
This commit is contained in:
@@ -76,6 +76,7 @@ slug: /changelog
|
||||
|
||||
日志详情:
|
||||
|
||||
* (2023.08.10) 优化`BarChart`在`Tooltip`的`Trigger`为`Item`时的表现
|
||||
* (2023.08.09) 增加`Axis`可通过设置`IconStyle`的`color`为`clear`来实现动态图标颜色的支持
|
||||
* (2023.08.08) 增加`Pie`对`LabelLine`的`lineEndX`的支持
|
||||
* (2023.08.05) 整理`Examples`的代码,删除不必要的用例
|
||||
|
||||
@@ -80,17 +80,17 @@ namespace XCharts.Example
|
||||
|
||||
void OnDraw(VertexHelper vh)
|
||||
{
|
||||
Debug.Log("OnDraw");
|
||||
//Debug.Log("OnDraw");
|
||||
}
|
||||
|
||||
void OnDrawBeforeSerie(VertexHelper vh, Serie serie)
|
||||
{
|
||||
Debug.Log("OnDrawBeforeSerie: " + serie.index);
|
||||
//Debug.Log("OnDrawBeforeSerie: " + serie.index);
|
||||
}
|
||||
|
||||
void OnDrawAfterSerie(VertexHelper vh, Serie serie)
|
||||
{
|
||||
Debug.Log("OnDrawAfterSerie: " + serie.index);
|
||||
//Debug.Log("OnDrawAfterSerie: " + serie.index);
|
||||
if (serie.index != 0) return;
|
||||
var dataPoints = serie.context.dataPoints;
|
||||
if (dataPoints.Count > 0)
|
||||
@@ -107,7 +107,7 @@ namespace XCharts.Example
|
||||
|
||||
void OnDrawTop(VertexHelper vh)
|
||||
{
|
||||
Debug.Log("OnDrawTop");
|
||||
//Debug.Log("OnDrawTop");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -454,10 +454,10 @@ namespace XCharts.Runtime
|
||||
tooltip.context.pointer = chart.pointerPos;
|
||||
if (m_PointerContainer is GridCoord)
|
||||
{
|
||||
GetAxisCategory(m_PointerContainer.index, ref dataIndex, ref category);
|
||||
if (tooltip.trigger == Tooltip.Trigger.Axis)
|
||||
{
|
||||
isTriggerByAxis = true;
|
||||
GetAxisCategory(m_PointerContainer.index, ref dataIndex, ref category);
|
||||
if (series.Count <= 1)
|
||||
{
|
||||
showCategory = true;
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace XCharts.Runtime
|
||||
string marker, string itemFormatter, string numericFormatter, string ignoreDataDefaultContent,
|
||||
ref List<SerieParams> paramList, ref string title)
|
||||
{
|
||||
UpdateCoordSerieParams(ref paramList, ref title, dataIndex, showCategory, category,
|
||||
UpdateCoordSerieParams(ref paramList, ref title, dataIndex, true, category,
|
||||
marker, itemFormatter, numericFormatter, ignoreDataDefaultContent);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user