mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-23 09:20:08 +00:00
[feature][tooltip] support {c0} for itemFormatter (#205)
This commit is contained in:
@@ -439,17 +439,12 @@ namespace XCharts.Runtime
|
||||
float currCos = Mathf.Cos(currAngle * Mathf.Deg2Rad);
|
||||
var radius1 = labelLine.lineType == LabelLine.LineType.HorizontalLine ?
|
||||
serie.context.outsideRadius : outSideRadius;
|
||||
var radius2 = serie.context.outsideRadius + labelLine.lineLength1;
|
||||
var radius3 = insideRadius + (outSideRadius - insideRadius) / 2;
|
||||
if (radius1 < serie.context.insideRadius) radius1 = serie.context.insideRadius;
|
||||
radius1 -= 0.1f;
|
||||
var pos0 = new Vector3(center.x + radius3 * currSin, center.y + radius3 * currCos);
|
||||
var pos1 = new Vector3(center.x + radius1 * currSin, center.y + radius1 * currCos);
|
||||
var pos2 = serieData.context.labelPosition;
|
||||
if (pos2.x == 0)
|
||||
{
|
||||
//pos2 = new Vector3(center.x + radius2 * currSin, center.y + radius2 * currCos);
|
||||
}
|
||||
Vector3 pos4, pos6;
|
||||
var horizontalLineCircleRadius = labelLine.lineWidth * 4f;
|
||||
var lineCircleDiff = horizontalLineCircleRadius - 0.3f;
|
||||
|
||||
@@ -510,7 +510,7 @@ namespace XCharts.Runtime
|
||||
return;
|
||||
|
||||
itemFormatter = SerieHelper.GetItemFormatter(serie, serieData, itemFormatter);
|
||||
if (serie.placeHolder || TooltipHelper.IsIgnoreItemFormatter(itemFormatter))
|
||||
if (serie.placeHolder || TooltipHelper.IsIgnoreFormatter(itemFormatter))
|
||||
return;
|
||||
|
||||
var param = serie.context.param;
|
||||
@@ -550,7 +550,7 @@ namespace XCharts.Runtime
|
||||
return;
|
||||
|
||||
itemFormatter = SerieHelper.GetItemFormatter(serie, serieData, itemFormatter);
|
||||
if (serie.placeHolder || TooltipHelper.IsIgnoreItemFormatter(itemFormatter))
|
||||
if (serie.placeHolder || TooltipHelper.IsIgnoreFormatter(itemFormatter))
|
||||
return;
|
||||
|
||||
var colorIndex = chart.GetLegendRealShowNameIndex(serieData.name);
|
||||
|
||||
Reference in New Issue
Block a user