Syncfusion의 설명서를 읽었으며 Syncfusion Circle 게이지의 포인터 팁을 추가하는 방법을 찾지 못하는 것 같습니다. 계기는 캔버스를 사용하여 그려지며 syncfusion 라이브러리는 꽤 강렬합니다. 나는 독서를 넘어서 많은 것을 시도하지 않았으며 거기에있는 것들을 약간 실험했습니다. 그림자를 쫓는 데 너무 많은 시간을 소모하기를 원하지 않습니다. 현재 게이지를 만들 때 나는 아래처럼 뭔가를 던지고 있습니다. 우리는 이미 툴팁을 구현하고 있지만, 포인터와 관련된 것들을 선택하는 것은 선택의 여지가있다. 나는이 순간에 더 명확하게하기 위해 내가 무엇을 제공 할 수 있는지 확신 할 수 없다.Syncfusion을 사용할 때 동그라미 게이지 포인터에 툴팁 추가
.Scales(sc =>
{
sc.StartAngle(180)
.SweepAngle(180)
.ShowRanges(true)
.ShowLabels(false)
.ShowPointers(showpointer)
.Radius(radius)
.Minimum(Model.Scaling.Min)
.Maximum(Model.Scaling.Max)
.ShowScaleBar(false)
.MajorIntervalValue(majorIntervalValue)
.Ticks(tick =>
{
tick.Color("#FFFFFF").Height(0).Width(0).Add();
tick.Color("#FFFFFF").Height(0).Width(0).Add();
})
.CustomLabels(cl =>
{
cl.Value(String.Format(gaugeFormatString, gaugeValue))
.Color("black")
.Font(f => f.Size("40px")
.FontFamily("Arial, Sans-Serif")
.FontStyle("bold")
)
.Position(p => p.X(xLabelPosition).Y(yLabelPosition)).Add();
//.Position(p => p.X(xLabelPosition)).Add();
//.PositionBuilder()
})
.Ranges(ran =>
{
if (Model.Thresholds != null)
{
if (thresholdDirection)
{
if (gaugeValue <= (threshold * 100))
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#3AB54B").Border(bor => bor.Color("#3Ab54B")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#B0D2C8").Border(bor => bor.Color("#B0D2C8")).Add();
}
else if (gaugeValue < (secondaryThreshold * 100))
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#f5e132").Border(bor => bor.Color("#f5e132")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#f1ecbc").Border(bor => bor.Color("#f1ecbc")).Add();
}
else
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#e60000").Border(bor => bor.Color("#e60000")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#ff6666").Border(bor => bor.Color("#ff6666")).Add();
}
}
else
{
if (gaugeValue >= (threshold * 100) && threshold > 0)
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#3AB54B").Border(bor => bor.Color("#3Ab54B")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#B0D2C8").Border(bor => bor.Color("#B0D2C8")).Add();
}
else if (gaugeValue > (secondaryThreshold * 100) && secondaryThreshold > 0)
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#f5e132").Border(bor => bor.Color("#f5e132")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#f1ecbc").Border(bor => bor.Color("#f1ecbc")).Add();
}
else
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#e60000").Border(bor => bor.Color("#e60000")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#ff6666").Border(bor => bor.Color("#ff6666")).Add();
}
}
}
else
{
ran.Size(gaugethickness).StartValue(0).EndValue(gaugeValue).BackgroundColor("#428bca").Border(bor => bor.Color("#428bca")).Add();
ran.Size(gaugethickness).StartValue(gaugeValue).EndValue(100).BackgroundColor("#a6bfd5").Border(bor => bor.Color("#a6bfd5")).Add();
}
})
.Pointers(po =>
{
if (threshold > 0)
{
po.BackgroundColor("#3AB54B")
.Border(bor => bor.Color("#3AB54B").Width(0))
.Type(PointerType.Marker)
.MarkerType(MarkerType.Rectangle)
.Length(5)
//.BackgroundColor(colorthresholdone)
.Width(gaugethickness + 10)
.Value(threshold * 100)
.DistanceFromScale(5)
.PointerValueText(pov => pov.ShowValue(false).Distance(-5)
.Opacity(1)
.autoAngle(false)
.Angle(0)
.Font(fo => fo.Size("15px")
.FontFamily("Arial, Sans-Serif")
.FontStyle("Normal")
)
)
.Add();
}
if (secondaryThreshold > 0)
{
po.BackgroundColor("#f5e132")
.Border(bor => bor.Color("#f5e132").Width(0))
.Type(PointerType.Marker)
.MarkerType(MarkerType.Rectangle)
.Length(5)
//.BackgroundColor(colorthreshholdtwo)
.Width(gaugethickness + 10)
.Value(secondaryThreshold * 100)
.DistanceFromScale(5)
.PointerValueText(pov => pov.ShowValue(false).Distance(-5)
.Opacity(1)
.autoAngle(false)
.Angle(0)
.Font(fo => fo.Size("15px")
.FontFamily("Arial, Sans-Serif")
.FontStyle("Normal")
)
)
.Add();
}
})
.Add();
})