Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
425
ChartLayer: How to display ChartText on top of line
posted

I have a line graph in a ChartLayer. I've set the ChartType of my ChartLayerAppearance to LineChart and I've created a LineChartAppearance as well for containing my ChartText This has been added the the ChartLayerAppearance. Everything looks as it should except that the line is overlapping it's datapoint labels. Below is an excerpt from my program showing what I've done to create the layer and such: 

Dim layer1 As New ChartLayerAppearance
layer1.AxisX = x
layer1.AxisY = y
layer1.ChartArea = area
layer1.ChartType = ChartType.LineChart
layer1.AxisY.Labels.FontColor = Color.DarkRed
layer1.Series.Add(series1)

Dim appearance As New LineChartAppearance
Dim chartText As New ChartTextAppearance
chartText.Row = -2
chartText.Column = -2
chartText.ItemFormatString = y.Labels.ItemFormatString
chartText.VerticalAlign = StringAlignment.Far
chartText.ChartTextFont = New System.Drawing.Font("Microsoft Sans Serif", 7.8)
chartText.ClipText = False
chartText.Visible = chkToggleDataLabels.Checked
appearance.ChartText.Add(chartText)
layer1.ChartTypeAppearance = appearance

ucResult.CompositeChart.ChartLayers.Add(layer1)
Any ideas what might be causing this or how I might fix it?
 
Thank you