using System;
using System.Drawing;
using System.Windows.Forms;
//-------------------------------------------------------
using System.Windows.Forms.DataVisualization.Charting;
using System.IO;

namespace Example
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            chart1.ChartAreas.Clear();
            ChartArea chartArea1 = new ChartArea();
            chart1.ChartAreas.Add(chartArea1);
            chartArea1.Area3DStyle.Enable3D = true;
            //-------------------------------------------------------------------------------------
            chart1.Series.Clear();
            Series series1 = new Series();
            series1.Color = Color.Orange;
            series1.IsValueShownAsLabel = true;
            series1.IsVisibleInLegend = false;
            //-------------------------------------------------------------------------------------
            int i = 0;
            foreach (DriveInfo drv in DriveInfo.GetDrives())
                if (drv.IsReady == true)
                {
                    series1.Points.Add(drv.AvailableFreeSpace);
                    series1.Points[i].Label = drv.Name;
                    i++;
                }
            //-------------------------------------------------------------------------------------
            chart1.Series.Add(series1);
            //-------------------------------------------------------------------------------------
            timer1.Start();
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            if (chart1.ChartAreas[0].Area3DStyle.Rotation <= 177)
                chart1.ChartAreas[0].Area3DStyle.Rotation += 3;
            else
                chart1.ChartAreas[0].Area3DStyle.Rotation = -180;
        }
    }
}