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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T22:00:54+00:00 2026-05-13T22:00:54+00:00

I discovered Microsoft’s .Net charting controls from another post here, and so far I

  • 0

I discovered Microsoft’s .Net charting controls from another post here, and so far I love them. For anyone needing it, here is the link:
http://code.msdn.microsoft.com/mschart

I do everything during runtime, such as creating series and slapping them on a chart area. I can successfully create a Candlestick chart, by supplying it with an X value and 4 Y values, and when I add it to the chart like so:

// "Price" is the .Name property of this series
chart1.Series.Add(priceseries);

It works great. Next, I pored through the samples that came with this lovely control for the financial formulas. The sample says to use the moving average formula (just using this as an example, I can’t get any of them to work), the code is this:

chart1.DataManipulator.FinancialFormula(FinancialFormula.MovingAverage,"5","Input","Simple");

Where “5” is the period to use, so that can be whatever I want. “Input” is the data source series it seems, and “Simple” is the output series. To spin this into a way that works with my code, I created a button and did this:

    private void button1_Click(object sender, EventArgs e)
    {
        chart1.DataManipulator.FinancialFormula(FinancialFormula.MovingAverage, "5", "Price", "SMA");     
    }

Nice and simple, ya? Well, as soon as I click that button, my chart control displays a big, red, unhappy X and NOT the moving average series (which I named “SMA”) on the chart in any way, shape, or form.

Adding to the above code, I have tried pre-creating the “SMA” series, I have tried adding the “SMA” series to the chart after doing the financialformula call, and both end up with the big mean red X. Going through the sample code again, it appears that the single line of code is all that is needed to generate the extra series of data, but I’m stuck! It doesn’t help that the red X has no debugging info whatsoever 🙁

Any ideas on how to get rid of the big X, and have it display the new series of data instead?

Update:
Just as a test, I removed the bit about adding the series to Chart1, then I added the chart1.DataManipulator bit right after it. As expected, the initial series that has all my initial data doesn’t appear (because I removed the part adding it to the chart), but when the next line of code does the formula application – no big red X. There is no data shown, but no error code either – so I guess that is an improvement? This is leading me to believe that there is some sort of problem with either the initial dataset I’m applying the formula to, or something having to do with the view/boundaries of the chart control itself. If I find anything more on that track, I will post it as a second update.

  • 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-13T22:00:55+00:00Added an answer on May 13, 2026 at 10:00 pm

    I discovered the source of my problem:

    priceseries.IsXValueIndexed = true;
    

    I did this initially to omit any blank data points (which would be the weekends in a stock price scenario). When I changed the value to false, all of a sudden the application of the formula worked fine. The downside is that I have blank spots for weekend dates where there is no data! But that is another issue I can work through on my own.

    For anyone else having this issue, see this reference article for additional information:
    http://msdn.microsoft.com/en-us/library/dd456699(VS.100).aspx

    The note about grouping your data first is no joke. Do not omit any data points!

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

Sidebar

Related Questions

I recently discovered a .NET XmlDiffPatch library written by Microsoft. It allows calculate differences
I've discovered this folder in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files and have a few questions. What
I discovered https://developers.google.com/speed/pagespeed/ the other day and have improved my website's page speed from
I discovered that it is possible to extract the hard-coded strings from a binary.
UPDATE : I've discovered there is a Microsoft Connect item raised for this issue
Some days ago I discovered a thing which is called the ASP.NET MVP framework
Microsoft has changed the authentication model for new CRM sites from LiveID to Microsoft
When I discovered MVC (first with ASP.NET MVC), I thought it was the holy
We're looking at upgrading from Visual Studio 2005 to Visual Studio 2008. I discovered
I think Microsoft must have a reason for enhancing ASP.Net with RAZOR syntax. On

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.