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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T04:33:28+00:00 2026-05-18T04:33:28+00:00

We are using the dotNETCHARTING to portray our charts, they accepts Series for their

  • 0

We are using the dotNETCHARTING to portray our charts, they accepts Series for their SeriesCollection. This is a new chart I’m working on, all the previous ones have a 1:1 relation between value shown and value extracted. Now I have a list of values to show as a list of values 12:12.

I currently have my 2 lists of data showing (Actual vs Budgetted over the past 12 months) – but in a single Series, where they should be 2 Series. I have the data sorted and listed as needed, well almost listed right.

Restrictions: .NET 3.5 (VS2008), dotNETCHARTING.

It will be a very sad solution if I had to create 12 SQLs for each month and 12 for the budgetted. From what I see that is not necessary, as soon as I find a way to seperate each list into seperate Series.

Each Module has a List<ModuleValue>, I have tried with a Dictionary<int, List<ModuleValue>> so that each series of values (12months) could have a seperate List.

I have tried the For each list of Values, add each value in the list to a Series, repeat until out of List of values. (Foreach in a Foreach)

My question is: Can anyone give me some pointers to a possible solution. Graph below is per say correct, if there weren’t lined up one after the other, but started and ended at the same timeframe (month). Eg budget for Jan compares to actual for Jan. I’m not asking about the dotNETCHARTING module, they have plenty of help. I’m asking for this mid-between and how it feeds the data to the module.

Main logic body:

        protected override void CreateChildControls()
        {
            base.CreateChildControls();

            //_chart.Type = ChartType.Combo;
            _chart.DefaultSeries.Type = SeriesType.Line;

// Up for change - between here
            IList listSeries = new List();
            listSeries.Add(GetSeries(_module)); // This line should be listSeries = GetMultipleSeries(_module); or to that effect.

            foreach (var series in listSeries)
            {
                _chart.SeriesCollection.Add(series);
            }
// Up for change - and here

            // This shows the title above the chart:
            _chart.Title = _module.Title;
            // This shows the title below the chart:
            //_chart.XAxis.Label = new Label(_module.Title);

            _chart.TitleBox.Line.Color = Charter.BackgroundColor;

            base.SetAreaStyles();
            base.SetLinkUrl(_module.LinkUrl);
        }

This logic is the old logic, should remain as is – because all the other charts rely on it.
Can be used as a point of reference. Consider this logic locked.

        protected Series GetSeries(FrontModule module)
        {
            Series series = new Series(module.Title);

            foreach (var value in module.Values)
            {
                string sFieldTitle = value.Text;

                Element element = new Element(sFieldTitle, value.Value);

                element.Color = Charter.GetColor(value.ColorIndex);

                series.Elements.Add(element);

                string sToolTip = string.Format
                    ("{0}: {1:N0}"
                    , value.Tooltip
                    , value.Value);

                element.ToolTip = sToolTip;

                if (!string.IsNullOrEmpty(value.LinkUrl))
                {
                    element.URL = Page.ResolveUrl(value.LinkUrl);
                }

                ChartTooltip += string.Concat(sToolTip, ", ");
            }

            ChartTooltip += "\n";

            return series;
        }

This is the new Logic and should be changed to reflect the desired logic. Consider this as free as can be.

        protected List GetMultipleSeries(FrontModule module)
        {
            List listSeries = new List();
            Series series = new Series(module.Title);

            foreach (var keyPair in module.DictionaryValues)
            {
                string sFieldTitle = keyPair.Value.Text;

                Element element = new Element(sFieldTitle, keyPair.Value.Value);

                element.Color = Charter.GetColor(keyPair.Value.ColorIndex);

                series.Elements.Add(element);

                string sToolTip = string.Format
                    ("{0}: {1:N0}"
                    , keyPair.Value.Tooltip
                    , keyPair.Value.Value);

                element.ToolTip = sToolTip;

                if (!string.IsNullOrEmpty(keyPair.Value.LinkUrl))
                {
                    element.URL = Page.ResolveUrl(keyPair.Value.LinkUrl);
                }

                ChartTooltip += string.Concat(sToolTip, ", ");

            }

            listSeries.Add(series);

            ChartTooltip += "\n";

            return listSeries;
        }

alt text

This is how it shouldn’t be, listing data in a sequal line. Though it shows it has all the required data.

I’d appreciate anything you could add. Thank you.

  • 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-05-18T04:33:28+00:00Added an answer on May 18, 2026 at 4:33 am

    You need two Series objects:

        protected List GetMultipleSeries(FrontModule module)
        {
            List listSeries = new List();
            Series seriesActual = new Series(module.Title);
            Series seriesBudgetted = new Series(module.Title);
    
            foreach (var keyPair in module.DictionaryValues)
            {
                string sFieldTitle = keyPair.Value.Text;
    
                Element element = new Element(sFieldTitle, keyPair.Value.Value);
    
                element.Color = Charter.GetColor(keyPair.Value.ColorIndex);
    
                // Is is actual or budgetted
                if (keyPair.Value.IsActual)
                    seriesActual.Elements.Add(element);
                else
                    seriesBudgetted.Elements.Add(element);
    
                string sToolTip = string.Format
                    ("{0}: {1:N0}"
                    , keyPair.Value.Tooltip
                    , keyPair.Value.Value);
    
                element.ToolTip = sToolTip;
    
                if (!string.IsNullOrEmpty(keyPair.Value.LinkUrl))
                {
                    element.URL = Page.ResolveUrl(keyPair.Value.LinkUrl);
                }
    
                ChartTooltip += string.Concat(sToolTip, ", ");
    
            }
    
            listSeries.Add(seriesActual);
            listSeries.Add(seriesBudgetted);
    
            ChartTooltip += "\n";
    
            return listSeries;
        }
    

    I’m assuming you have some way of testing whether the points are actual or budgetted for the if statement.

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

Sidebar

Related Questions

using this http://bl.ocks.org/950642 we can see how to add images to nodes, the question
Using CI for the first time and i'm smashing my head with this seemingly
Using the Redis info command, I am able to get all the stats of
Using NSDateComponents I know how to get the day component, but this gives me
I am looking people's opinion and experience on using chart controls within an ASP.NET
using a binary search tree I need to add to a vector all int
Using Yii, I want to delete all the rows that are not from today.
I am using dotnetCHARTING: the dll is installed in the GAC and referenced in
using file_get_contents , I open an Internet URL and get the contents of this
Using Java, how can I extract all the links from a given web page?

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.