In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how C # draws histograms and line charts. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
The details are as follows
The running effect is as follows:
In fact, it is not difficult to design the bar chart and line chart above, mainly the calculation of each coordinate, which is completely fine work. First of all, a tabControl control is added to the form to toggle the display of bar chart and line chart, display bar chart in tabPage1 and line chart in tabPage2. Then define the Paint event in their respective Page page properties, as you can see in the following code.
The code is as follows:
Add a header file:
Using System.Drawing.Drawing2D
Paint event of tabPage1 (bar chart):
Private void tabPage1_Paint (object sender, PaintEventArgs e) {BackColor = Color.White; / / title Graphics g = tabPage1.CreateGraphics (); Font f = new Font ("Song style", 24, FontStyle.Regular); Pen p = new Pen (Color.Blue); g.DrawString ("Registration and examination Statistics histogram", f, p.Brush, 200,20) / / draw the form for (int I = 0; I
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.