Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27329

VS 2010 Chart object and custom data point labels - Can set, but not displayed...

$
0
0
Hi,

I have set some custom datapoint labels, but they are not showing or if they do when setting IsValueShownAsLabel=true then they display the Y axis values.
Code:

        With embChartTabPage12
            .DataSource = dtPCA_Loading
            .ChartAreas(0).AxisX.Title = "Comp1"
            .ChartAreas(0).AxisX.Interval = Math.Round(((.ChartAreas(0).AxisX.Maximum - .ChartAreas(0).AxisX.Minimum) / 10), 2)
            .ChartAreas(0).AxisX.LabelStyle.Format = "#.##"
            .ChartAreas(0).AxisX.Crossing = 0
            .ChartAreas(0).AxisY.Title = "Comp2"
            .ChartAreas(0).AxisY.LabelStyle.Angle = -90
            .ChartAreas(0).AxisY.Crossing = 0

            .Series(0).Name = "Data"
            .Series(0).XValueMember = "Comp1"
            .Series(0).YValueMembers = "Comp2"
            .Series(0).ChartType = SeriesChartType.Point
            .Series(0).MarkerSize = 9
            intSource_Col_Count = 8
                    Dim point As System.Windows.Forms.DataVisualization.Charting.DataPoint
            For Each point In .Series(0).Points
                point.IsValueShownAsLabel = True
                point.Label = wksCDautoexperiment.Cells(22, intSource_Col_Count).value & strUnits
                intSource_Col_Count = intSource_Col_Count + 8
            Next
            .Series(0).IsValueShownAsLabel = True

I don't know where I should put the IsValueShownAsLabel line and whether I should set it at the point or series level.

Thanks

Kristian

Viewing all articles
Browse latest Browse all 27329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>