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
Hello Bryan,
Looking at the provided code, it seems that everything is correct. I made small sample for you where I`m using ChartTextAppearance. Could you please take a look at the attached sample and let me know if you think that I didn`t reproduce your scenario. Please feel free to modify this sample or send another one with your issue and I`ll be glad to research it for you.
Regards
Here is the sample