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

  • SEARCH
  • Home
  • 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 8814737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T04:12:16+00:00 2026-06-14T04:12:16+00:00

Does anyone have a simple example of populating a Highchart with data from a

  • 0

Does anyone have a simple example of populating a Highchart with data from a MS SQL DB using DotNet.Highcarts?

I have the demo working with static data

Highcharts chart = new Highcharts("chart")
        .SetCredits(new Credits { Enabled = false })
        .InitChart(new Chart { DefaultSeriesType = ChartTypes.Column })
        .SetTitle(new Title { Text = "Membership Overview" })
        .SetXAxis(new XAxis { Categories = new[] { "Paid Members", "Active Members", "Retained Members", "New Members", "Lapsed Members" } })
        .SetYAxis(new YAxis
        {
            Min = 0,
            Title = new YAxisTitle { Text = "Total Members" }
        })
        .SetTooltip(new Tooltip { Formatter = "function() { return ''+ this.series.name +': '+ this.y +''; }" })
        .SetPlotOptions(new PlotOptions { Bar = new PlotOptionsBar { Stacking = Stackings.Normal } })
        .SetSeries(new[]
                   {
                       new Series { Name = "Total", Data = new Data(new object[] { 441, 441, 22, 30, 610 }) }
                    });

How can I change the Series to accept data from my DB?

Assuming I need to connect to DB like so:

var newcustomer = db.Customer;

Then do something like this:

new Series
{
    Name = "Total",
    Data = new Data(newcustomer.Select(x => ............

Any help would be appreciated!

  • 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-14T04:12:18+00:00Added an answer on June 14, 2026 at 4:12 am

    For anyone else having a similar issue…

    var paidmembers = (from c in db.Customer
                       where c.CustomerStatusID == 1
                       select c).Count();
    
    var activemembers = (from c in db.Customer
                         where c.CustomerStatusID == 2
                         select c).Count();
    
    new Series {
                Name = "Category",
                Data = new Data(new object[] {paidmembers, activemembers})
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Does anyone have a simple example using ast.NodeVisitor to walk the abstract syntax tree
Does anyone have a simple example of implementing an async validation rule in csla?
Does anyone have a very simple example of how to overload the compound assignment
Does anyone have a simple example of a ListActivity displaying Textviews in a column
Does anyone have a simple code example in linq2sql that demonstrates the difference between
Sorry for such a simple question, but does anyone have a C example of
I'm looking to write a simple proxy server in .NET. Does anyone have any
Have a rather simple question. Does anyone knows if i can use jparallax both
I'm wanting to have a simple duck typing example in C# using dynamic objects.
I have a relatively simple example of an MVC page that is using jQuery

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.