mirror of
https://github.com/XCharts-Team/XCharts.git
synced 2026-05-24 18:00:26 +00:00
[feature][polar] support bar and ring polar
This commit is contained in:
@@ -29,6 +29,11 @@ namespace XCharts.Runtime
|
||||
return (value + context.startAngle + 360) % 360;
|
||||
}
|
||||
|
||||
public float GetValueAngle(double value)
|
||||
{
|
||||
return (float) (value + context.startAngle + 360) % 360;
|
||||
}
|
||||
|
||||
public override void SetDefaultValue()
|
||||
{
|
||||
m_Show = true;
|
||||
|
||||
@@ -139,7 +139,13 @@ namespace XCharts.Runtime
|
||||
{
|
||||
var lineWidth = angleAxis.axisLine.GetWidth(chart.theme.axis.lineWidth);
|
||||
var outsideRaidus = radius + lineWidth * 2;
|
||||
UGL.DrawDoughnut(vh, cenPos, radius, outsideRaidus, lineColor, Color.clear);
|
||||
UGL.DrawDoughnut(vh, cenPos, radius, outsideRaidus, lineColor, ColorUtil.clearColor32);
|
||||
if (polar.context.insideRadius > 0)
|
||||
{
|
||||
radius = polar.context.insideRadius;
|
||||
outsideRaidus = radius + lineWidth * 2;
|
||||
UGL.DrawDoughnut(vh, cenPos, radius, outsideRaidus, lineColor, ColorUtil.clearColor32);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user