Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8496273
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:48:24+00:00 2026-06-10T23:48:24+00:00

I am trying to bind a DataTable with a MS Chart. The Chart contains

  • 0

I am trying to bind a DataTable with a MS Chart. The Chart contains two series, that are two columns of the DataTable. I am using VB in Visual Studio 2010. Here is my code:

Public tableTempJDL As DataTable = New DataTable("TempJDL")    
'tableTempJDL is then filled

With Me.ChartBHKW
    .DataSource = tableTempJDL

    .Series(0).Name = oGebäude.Art
    .Series(0).ChartType = DataVisualization.Charting.SeriesChartType.Spline
    .Series(1).Name = oBHKW.Modell
    .Series(1).ChartType = DataVisualization.Charting.SeriesChartType.Spline

    .Series(0).XValueMember = Convert.ToString(tableTempJDL.Columns("Stunden"))
    .Series(0).YValueMembers = Convert.ToString(tableTempJDL.Columns("PthObjekt"))

    .Series(1).XValueMember = Convert.ToString(tableTempJDL.Columns("Stunden"))
    .Series(1).YValueMembers = Convert.ToString(tableTempJDL.Columns("PthBHKW"))

    .DataBind() '<-- ArgumentOutOfRangeException
End With

I get an ArgumentOutOfRangeException error: “Only 1 Y values can be set for this data series”. And this even though I have two series in my Chart settings.

I would like to avoid to build the chart myself, and I really need two series, not two points for each XValue.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T23:48:26+00:00Added an answer on June 10, 2026 at 11:48 pm

    The code is actually perfectly ok, except for the fact that the column “PthObjekt” does not exist.

    I just find strange to get an error at the DataBind saying that I can’t have a more than one series, instead of an error at the line

    .Series(0).YValueMembers = Convert.ToString(tableTempJDL.Columns("PthObjekt"))
    

    I don’t understand how this line can be executed without error… Anyways.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to bind a 1-many mapping using KnockoutJS, where 1 zip code can
I am trying bind data from database into rich textbox here is my code:
I'm trying to bind a XAML ComboBox so that its list items are the
Here is my code Dim dt As DataTable = New DataTable(Intervenant) For Each column
Trying to bind a String to a RichTextBox.Text property so that when the String
I am trying to bind a copy of datatable to the gridview, but it
I am trying to bind a filtered csv file to a datatable. I use
Does anyone work with Infragistics UltraChart? I'm trying to bind a DataTable with elevation
I'm trying to bind column visibility to that of another element like this: <Window
I am trying to bind a datatable to a repeater. To do this, according

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.