C# Chart Data 입력방법 및 X-Label 자동입력 결과

C# 에서 MSchart는 의외로 다양한 입력형태를 제공하고 있다.
많은 편리함을 제공한다

  1. series.Points.AddXY
    private void SplineChartExample()
    {
        this.chartControl.Series.Clear();
        this.chartControl.Titles.Add("Total Income");
        Series series = this.chartControl.Series.Add("Total Income");
        series.ChartType = SeriesChartType.Spline;
        series.Points.AddXY("September", 100);
        series.Points.AddXY("Obtober", 300);
        series.Points.AddXY("November", 800);
        series.Points.AddXY("December", 200);
        series.Points.AddXY("January", 600);
        series.Points.AddXY("February", 400);
    }
    

  2. series.Points.AddXY
    public void GraphGenerate(Chart grph)
    {           DateTime[] dtx;
                double[][] DyArr = new double[2][];
                #region Data Generate
                ////////////////////////////////////////////////////////
                // Make Data
                Random r = new Random();
                DateTime start = DateTime.Parse(xtxt);
                int cnt = int.Parse(scnt);
                dtx = new DateTime[cnt];
                DyArr[0] = new double[cnt];
                DyArr[1] = new double[cnt];
                for (int i = 0; i < cnt; i++)
                {
                    dtx[i] = start.AddMinutes(5*i);
                    DyArr[0][i] = Math.Sin(Math.PI * 0.1 * i)*r.Next(-1,100);
                    DyArr[1][i] = Math.Cos(Math.PI * 0.1 * i) * r.Next(-10, 50);
                }
                #endregion
                #region Draw Chart
                for (int i = 0; i < cnt; i++)
                {
                    sers[0].Points.AddXY(dtx[i], DyArr[0][i]);
                    sers[1].Points.AddXY(dtx[i], DyArr[1][i]);
                }
               #endregion
    }
    

  3. series.Points.DataBindXY
    public void GraphGenerate(Chart grph)
    {           DateTime[] dtx;
                double[][] DyArr = new double[2][];
                #region Data Generate
                ////////////////////////////////////////////////////////
                // Make Data
                Random r = new Random();
                DateTime start = DateTime.Parse(xtxt);
                int cnt = int.Parse(scnt);
                dtx = new DateTime[cnt];
                DyArr[0] = new double[cnt];
                DyArr[1] = new double[cnt];
                for (int i = 0; i < cnt; i++)
                {
                    dtx[i] = start.AddMinutes(5*i);
                    DyArr[0][i] = Math.Sin(Math.PI * 0.1 * i)*r.Next(-1,100);
                    DyArr[1][i] = Math.Cos(Math.PI * 0.1 * i) * r.Next(-10, 50);
                }
                #endregion
                #region Draw Chart
               sers[0].Points.DataBindXY(dtx, DyArr[0]);
               sers[1].Points.DataBindXY(dtx, DyArr[1]);
               #endregion
    }
    

“C# Chart Data 입력방법 및 X-Label 자동입력 결과”의 33개의 댓글

  1. 핑백: C# Chart 사용법 요약 – 개발자의일상

  2. I simply want to tell you that I am all new to weblog and definitely liked this page. Most likely I’m want to bookmark your blog . You absolutely have great posts. Bless you for sharing with us your web page.

  3. There are some interesting times in this write-up yet I don?t recognize if I see all of them facility to heart. There is some validity yet I will certainly take hold opinion till I check into it even more. Great article, many thanks and also we want more! Included in FeedBurner too

  4. And Im running from a standard users account with strict limitations, which I think may be the limiting factor, but Im running the cmd as the system I am currently working on.

  5. With havin so much written content do you ever run into any problems of plagorism or copyright violation? My blog has a lot of completely unique content I’ve either written myself or outsourced but it looks like a lot of it is popping it up all over the web without my agreement. Do you know any ways to help protect against content from being ripped off? I’d certainly appreciate it.

  6. Thanks for giving your ideas on this blog. Furthermore, a delusion regarding the banking institutions intentions whenever talking about property foreclosure is that the loan company will not have my repayments. There is a degree of time that the bank will take payments in some places. If you are as well deep inside hole, they will commonly call that you pay the actual payment completely. However, i am not saying that they will not take any sort of repayments at all. In the event you and the financial institution can manage to work something out, this foreclosure course of action may cease. However, if you ever continue to miss payments underneath the new system, the property foreclosures process can pick up from where it was left off.

  7. After study a few of the post on your internet site currently, and also I genuinely like your means of blog writing. I bookmarked it to my book marking internet site checklist and also will certainly be checking back quickly. Pls look into my website as well as well as let me recognize what you assume.

  8. Nice post. I find out something much harder on distinct blogs everyday. It will always be stimulating to learn content using their company writers and practice a specific thing there. I’d choose to apply certain with the content on my own weblog regardless of whether you don’t mind. Natually I’ll supply you with a link on the internet weblog. Appreciate your sharing.

  9. Aw, this was an actually wonderful article. In suggestion I wish to place in creating such as this furthermore? requiring time and actual effort to make a great post? however what can I claim? I postpone alot and by no means appear to get something done.

  10. I was very pleased to locate this web-site. I intended to many thanks for your time for this wonderful read!! I definitely taking pleasure in every bit of it and I have you bookmarked to take a look at brand-new things you blog post.

  11. Aw, this was an actually great blog post. In idea I wish to put in composing like this additionally? taking time and also actual initiative to make a very good article? however what can I say? I postpone alot and by no means appear to obtain something done.

  12. Can I just say what a relief to discover somebody who really understands what theyre discussing online. You absolutely recognize just how to bring an issue to light and make it vital. More people require to read this and also comprehend this side of the tale. I cant believe youre not more preferred since you absolutely have the present.

  13. Oh my goodness! an incredible post guy. Thanks However I am experiencing issue with ur rss. Don?t recognize why Not able to register for it. Exists anyone getting identical rss trouble? Any individual who recognizes kindly respond. Thnkx

  14. When I originally commented I clicked the -Alert me when new comments are included- checkbox as well as currently each time a comment is added I obtain 4 e-mails with the exact same remark. Is there any way you can eliminate me from that service? Thanks!

  15. An outstanding share, I simply provided this onto a colleague that was doing a little analysis on this. And also he actually acquired me morning meal because I discovered it for him. smile. So let me reword that: Thnx for the reward! However yeah Thnkx for spending the moment to discuss this, I feel highly about it and love reading more on this topic. Preferably, as you come to be knowledge, would certainly you mind upgrading your blog site with more details? It is very handy for me. Huge thumb up for this article!

  16. There are some interesting points in this short article yet I don?t recognize if I see every one of them facility to heart. There is some legitimacy yet I will take hold point of view until I check into it even more. Great short article, thanks and we desire more! Included in FeedBurner too

  17. After research study a few of the post on your web site currently, and I truly like your way of blog writing. I bookmarked it to my bookmark website checklist and also will be inspecting back soon. Pls check out my website also as well as let me recognize what you assume.

  18. I was extremely happy to locate this web-site. I intended to thanks for your time for this remarkable read!! I absolutely appreciating every little bit of it and also I have you bookmarked to have a look at brand-new stuff you blog post.

댓글 남기기