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 7823441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T08:14:53+00:00 2026-06-02T08:14:53+00:00

How can you bind data from an SQL Server to a telerik line chart?

  • 0

How can you bind data from an SQL Server to a telerik line chart?

At the moment my setup is that I have a scheduled task which retrieves some information (for the sake of simplicity, let’s say this is just an integer value). This information is then stored in my database, along with the datetime the scheduled task was run at.

What I would like to do is create a graph of this integer over time (with the value marked along the Y axis and time along the X).

Most of the bindings examples on the Teleriks website involve a static class, where data is hardcoded into the XAML file.

What is the best way for me to go about structuring and retrieving the data as I would like to ?

I was looking at this example, however it does not go into much detail for how the data is actually retrieved from the binding and how the binding works.

Thanks very much.

  • 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-02T08:14:54+00:00Added an answer on June 2, 2026 at 8:14 am

    well recently I was involved in such a project and here is how I did mine(although mine was a little complicated as I had to show multiple lines on same chart), hope it helps you.

    My Data table was in the following format :

    Tours   dtMonthno   dtMonth               dtYear
    115                1    Jan                 2012
    102                2    Feb                 2012
    105                3    Mar                 2012
    78                 4    Apr                 2012
    

    and my code is as follow, where the y-axis is Tours and x-axis is the dtMonthno(actual month number):

               DataTable dt = GetGroupChartData(Convert.ToDateTime(txtStartDate.Text), Convert.ToDateTime(txtEndDate.Text + " 23:59"));
    
                ChartSeries chartSeries = new ChartSeries();
                radGroups.Clear();
                chartSeries.DataYColumn = "Tours";
                radGroups.ChartTitle.TextBlock.Text = "Groups";
                chartSeries.Name = "Tours";
    
                radGroups.PlotArea.XAxis.LayoutMode = Telerik.Charting.Styles.ChartAxisLayoutMode.Inside;
                chartSeries.Appearance.LineSeriesAppearance.Color = System.Drawing.Color.Blue; 
    
                //set y axis color
                radGroups.PlotArea.YAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red;
                radGroups.PlotArea.YAxis.Appearance.Width = 3;
                radGroups.PlotArea.YAxis.Appearance.Color = System.Drawing.Color.Red; 
                chartSeries.Type = ChartSeriesType.Line;
    
                radGroups.PlotArea.XAxis.DataLabelsColumn = "dtMonth";
                radGroups.PlotArea.XAxis.AxisLabel.TextBlock.Text = "Months";
    
                //set x axis color
                radGroups.PlotArea.XAxis.AxisLabel.TextBlock.Appearance.TextProperties.Color = System.Drawing.Color.Red; 
                radGroups.PlotArea.XAxis.Appearance.Width = 3;
                radGroups.PlotArea.XAxis.Appearance.Color = System.Drawing.Color.Red;
                radGroups.AddChartSeries(chartSeries);
    
                // visually enhance the data points
                chartSeries.Appearance.PointMark.Dimensions.Width = 5;
                chartSeries.Appearance.PointMark.Dimensions.Height = 5;
                chartSeries.Appearance.PointMark.FillStyle.MainColor = System.Drawing.Color.Black;
                chartSeries.Appearance.PointMark.Visible = true;
    
                radGroups.DataSource = dt;
                radGroups.DataBind();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple gridview: A sql datasource to bind data from table data
Here is something I need to accomplish: WPF datagrid display/bind data from SQL through
I have binded the accdb to combobox but it can not bind the data
Any idea how one can bind binary data to a ComponentOne WebReport control?
how can I bind custom data to a user? Eg: User logs in >
Can I data bind two proporties values in a single textblock. For Example some
I have a user control where the XAML of the control can bind to
I have a table in SQL Server which looks like this: ID Code Name
I'm using Oracle 9.2 with Weblogic 8 server. I'm getting the Data from a
I'm trying to bind to some XML data from my WPF application. I've set

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.