Please see the attachment.
Is there a way increase the size of the error bars with the Chart Makers height and width. Could you please post some sample code. Here is my code currently to increase the size of the Chart Markers.
Code: Select all
public void ChangeChartMarkersSize(double value)
{
try
{
ChartMarkerHeightValue = (float)value;
ChartMarkerWidthValue = (float)value;
if (Chart.ViewXY == null || Chart.ViewXY.FreeformPointLineSeries.Count < 1)
{
return;
}
for (int i = 0; i < Chart.ViewXY.FreeformPointLineSeries.Count; i++)
{
foreach (var item in Chart.ViewXY.FreeformPointLineSeries[i].SeriesEventMarkers)
{
item.Symbol.Height = (float)value;
item.Symbol.Width = (float)value;
}
}
}
catch (Exception exception)
{
SystemDebugLogLogger.LogError(exception);
}
}
Code: Select all
public SeriesEventMarker CreateMarker(string text, double xVal, double yVal,
Shape shape, float angle)
{
//height = ChartMarkerHeightValue;
//width = ChartMarkerWidthValue;
//m_SeriesEventMarkerFontSize = ChartDataLabelFontSizeValue;
SeriesEventMarker marker = new SeriesEventMarker();
marker.MouseInteraction = true;
marker.MoveByMouse = false;
marker.Label.Font = m_ChartFontForSeriesEventMarker;
marker.Label.Font.Size = ChartDataLabelFontSizeValue; //this line may not be needed
marker.Label.Text = text;
marker.Label.HorizontalAlign = AlignmentHorizontal.Center;
marker.Label.Color = Colors.Black;
switch (VerticalChartDataLabelAlignment)
{
case ChartMarkerLabelPosition.Top:
{
marker.Label.VerticalAlign = AlignmentVertical.Top;
break;
}
case ChartMarkerLabelPosition.Bottom:
{
marker.Label.VerticalAlign = AlignmentVertical.Bottom;
break;
}
}
//marker.Label.VerticalAlign = AlignmentVertical.Top;
//marker.Label.Font = new WpfFont(FontFamily.GenericSansSerif, 10f, FontStyle.Bold);
marker.Symbol.Shape = shape;
marker.Symbol.Angle = angle;
marker.Symbol.Width = ChartMarkerWidthValue;
marker.Symbol.Height = ChartMarkerHeightValue;
marker.XValue = xVal;
marker.YValue = yVal;
marker.VerticalPosition = SeriesEventMarkerVerticalPosition.AtYValue;
return marker;
}