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

VS 2010 Charts - Can you specify a row rather than a column for YValueMembers

$
0
0
Hi,

I have some data in a datatable which is the source of a DGV and the layout is just fine.

I need to chart the table where the Y values of each series is a complete row, not a complete column:

This code works fine, but the data is charted the wrong way round for what I need:
Code:

dtSVD_Dynamic.Columns.Add("KinEV", GetType(Decimal))
      For intSheet_Col_Count = 2 To 16 ' This loop adds columns called "20°C", "30°C", "40°C", "50°C",.......
            dtSVD_Dynamic.Columns.Add(wksData_File.Cells(1, intSheet_Col_Count).value & "°C", GetType(Decimal))
        Next intSheet_Col_Count
           
With embChartSVD_Dynamic
.DataSource = dtSVD_Dynamic
.Series.Add(dtSVD_Dynamic.Columns(1).ColumnName)
.Series(0).XValueMember = "KinEV"
.Series(0).YValueMembers = dtSVD_Dynamic.Columns(1).ColumnName
end with


How do I specify the names of the rows for YValueMembers when the rows don't have a RowName?

I could probably add each point individually or probably easier is just to create a 2nd table with the axes transposed, but beofre I do that I wanted to check there wasn't a better way.

Many Thanks

Kristian

Viewing all articles
Browse latest Browse all 27081

Trending Articles



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