Exemple #1
0
        private void LoadView()
        {
            // Paste your license key here.
            mNChartView.Chart.LicenseKey = "";

            // Margin
            mNChartView.Chart.PolarSystem.Margin = new NChartMargin(10.0f, 10.0f, 10.0f, 40.0f);

            // Create brushes.
            brushes    = new NChartBrush[3];
            brushes[0] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.38), (int)(255 * 0.8), (int)(255 * 0.92)));
            brushes[1] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.8), (int)(255 * 0.86), (int)(255 * 0.22)));
            brushes[2] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.9), (int)(255 * 0.29), (int)(255 * 0.51)));

            for (int i = 0; i < 3; ++i)
            {
                // Create series that will be displayed on the chart.
                NChartPieSeries series = new NChartPieSeries();

                // Set data source for the series.
                series.DataSource = this;

                // Set tag of the series.
                series.Tag = i;

                // Set brush that will fill that series with color.
                series.Brush = brushes[i % brushes.Length];

                // Add series to the chart.
                mNChartView.Chart.AddSeries(series);
            }

            // Update data in the chart.
            mNChartView.Chart.UpdateData();
        }
Exemple #2
0
        public HeatmapChartController(NChartView view)
        {
            mNChartView = view;

            // Create brushes.
            brushes    = new NChartBrush[3];
            brushes[0] = new NChartSolidColorBrush(Color.Argb(255, (int)(0.38 * 255), (int)(0.8 * 255), (int)(0.91 * 255)));
            brushes[1] = new NChartSolidColorBrush(Color.Argb(255, (int)(0.8 * 255), (int)(0.86 * 255), (int)(0.22 * 255)));
            brushes[2] = new NChartSolidColorBrush(Color.Argb(255, (int)(0.9 * 255), (int)(0.29 * 255), (int)(0.51 * 255)));
        }
		public DifferentChartsViewController () : base ()
		{
			m_rand = new Random ();

			// Create brushes.
			brushes = new NChartSolidColorBrush[3];
			brushes [0] = NChartSolidColorBrush.SolidColorBrushWithColor (UIColor.FromRGB (97, 206, 231));
			brushes [1] = NChartSolidColorBrush.SolidColorBrushWithColor (UIColor.FromRGB (203, 220, 56));
			brushes [2] = NChartSolidColorBrush.SolidColorBrushWithColor (UIColor.FromRGB (229, 74, 131));
		}
        public TimeAxisViewController() : base()
        {
            m_rand = new Random();

            // Create brushes.
            brushes     = new NChartSolidColorBrush[3];
            brushes [0] = new NChartSolidColorBrush(UIColor.FromRGB(97, 206, 231));
            brushes [1] = new NChartSolidColorBrush(UIColor.FromRGB(203, 220, 56));
            brushes [2] = new NChartSolidColorBrush(UIColor.FromRGB(229, 74, 131));
        }
        public PieViewController() : base()
        {
            m_rand = new Random();

            // Create brushes.
            brushes = new NChartSolidColorBrush[] {
                new NChartSolidColorBrush(UIColor.FromRGB(97, 206, 231)),
                new NChartSolidColorBrush(UIColor.FromRGB(203, 220, 56)),
                new NChartSolidColorBrush(UIColor.FromRGB(229, 74, 131)),
            };
        }
Exemple #6
0
        public HighlightViewController() : base()
        {
            m_zoomed            = false;
            m_prevSelectedPoint = null;
            m_rand = new Random();

            // Create brushes.
            brushes     = new NChartSolidColorBrush[3];
            brushes [0] = new NChartSolidColorBrush(UIColor.FromRGB(97, 206, 231));
            brushes [1] = new NChartSolidColorBrush(UIColor.FromRGB(203, 220, 56));
            brushes [2] = new NChartSolidColorBrush(UIColor.FromRGB(229, 74, 131));
        }
Exemple #7
0
        private void LoadView()
        {
            // Paste your license key here.
            mNChartView.Chart.LicenseKey = "";

            // Margin
            mNChartView.Chart.PolarSystem.Margin = new NChartMargin(10.0f, 10.0f, 10.0f, 40.0f);

            // Create brushes.
            brushes    = new NChartBrush[3];
            brushes[0] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.38), (int)(255 * 0.8), (int)(255 * 0.92)));
            brushes[1] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.8), (int)(255 * 0.86), (int)(255 * 0.22)));
            brushes[2] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.9), (int)(255 * 0.29), (int)(255 * 0.51)));

            for (int i = 0; i < 3; ++i)
            {
                // Create series that will be displayed on the chart.
                NChartPieSeries series = new NChartPieSeries();

                // Set data source for the series.
                series.DataSource = this;

                // Set tag of the series.
                series.Tag = i;

                // Set brush that will fill that series with color.
                series.Brush = brushes[i % brushes.Length];

                // Add series to the chart.
                mNChartView.Chart.AddSeries(series);
            }

            // Set delegate to the chart.
            mNChartView.Chart.Delegate = this;

            // Update data in the chart.
            mNChartView.Chart.UpdateData();


            // We set the minimal zoom to 0.85 (its default is 1.0) because we will
            // then shift the highlighted sectors of the pie away from the center.
            // We need to zoom out the pie to prevent the shifted sectors from hiding
            // behind the screen's border.
            // If the minimal zoom is larger than the zoom we set by zoomTo:duration:delay:,
            // chart will be bounced back to the minimal zoom immediately.
            mNChartView.Chart.MinZoom = 0.85f;
            zoomed = false;

            // Uncomment this line to get the animated transition.
            //			mNChartView.Chart.playTransition(1.0f, false);
        }
		private void LoadView ()
		{
			// Paste your license key here.
			mNChartView.Chart.LicenseKey = "";

			// Margin
			mNChartView.Chart.PolarSystem.Margin = new NChartTypes.Margin (10.0f, 10.0f, 10.0f, 40.0f);

			// Create brushes.
			brushes = new NChartBrush[3];
			brushes [0] = new NChartSolidColorBrush (Color.Argb (255, (int)(255 * 0.38), (int)(255 * 0.8), (int)(255 * 0.92)));
			brushes [1] = new NChartSolidColorBrush (Color.Argb (255, (int)(255 * 0.8), (int)(255 * 0.86), (int)(255 * 0.22)));
			brushes [2] = new NChartSolidColorBrush (Color.Argb (255, (int)(255 * 0.9), (int)(255 * 0.29), (int)(255 * 0.51)));

			for (int i = 0; i < 3; ++i) {
				// Create series that will be displayed on the chart.
				NChartPieSeries series = new NChartPieSeries ();

				// Set data source for the series.
				series.DataSource = this;

				// Set tag of the series.
				series.Tag = i;

				// Set brush that will fill that series with color.
				series.Brush = brushes [i % brushes.Length];

				// Add series to the chart.
				mNChartView.Chart.AddSeries (series);
			}

			// Set delegate to the chart.
			mNChartView.Chart.Delegate = this;

			// Update data in the chart.
			mNChartView.Chart.UpdateData ();


			// We set the minimal zoom to 0.85 (its default is 1.0) because we will
			// then shift the highlighted sectors of the pie away from the center.
			// We need to zoom out the pie to prevent the shifted sectors from hiding
			// behind the screen's border.
			// If the minimal zoom is larger than the zoom we set by zoomTo:duration:delay:,
			// chart will be bounced back to the minimal zoom immediately.
			mNChartView.Chart.MinZoom = 0.85f;
			zoomed = false;

			// Uncomment this line to get the animated transition.
//			mNChartView.Chart.playTransition(1.0f, false);
		}
		private void LoadView ()
		{
			// Paste your license key here.
			mNChartView.Chart.LicenseKey = "";

			// Create brushes.
			brushes = new NChartBrush[3];
			brushes [0] = new NChartSolidColorBrush (Color.Argb (255, (int)(0.38 * 255), (int)(0.8 * 255), (int)(0.91 * 255)));
			brushes [1] = new NChartSolidColorBrush (Color.Argb (255, (int)(0.8 * 255), (int)(0.86 * 255), (int)(0.22 * 255)));
			brushes [2] = new NChartSolidColorBrush (Color.Argb (255, (int)(0.9 * 255), (int)(0.29 * 255), (int)(0.51 * 255)));

			// Switch this field to view all types of series.
			type = SeriesType.Column2D;

			// Switch on antialiasing.
			mNChartView.Chart.ShouldAntialias = true;

			if (type >= SeriesType.Column3D) {
				// Switch 3D on.
				mNChartView.Chart.DrawIn3D = true;
				mNChartView.Chart.CartesianSystem.Margin = new NChartTypes.Margin (50.0f, 50.0f, 10.0f, 20.0f);
				mNChartView.Chart.PolarSystem.Margin = new NChartTypes.Margin (50.0f, 50.0f, 10.0f, 20.0f);
			} else {
				mNChartView.Chart.CartesianSystem.Margin = new NChartTypes.Margin (10.0f, 10.0f, 10.0f, 20.0f);
				mNChartView.Chart.PolarSystem.Margin = new NChartTypes.Margin (10.0f, 10.0f, 10.0f, 20.0f);
			}

			// Set data source for the size axis to provide sizes for bubbles.
			mNChartView.Chart.SizeAxis.DataSource = this;

			// Create series that will be displayed on the chart.
			CreateSeries ();

			// Update data in the chart.
			mNChartView.Chart.UpdateData ();
		}
		private void LoadView ()
		{
			// Paste your license key here.
			mNChartView.Chart.LicenseKey = "";

			// Margin
			mNChartView.Chart.PolarSystem.Margin = new NChartTypes.Margin (10.0f, 10.0f, 10.0f, 40.0f);

			// Create brushes.
			brushes = new NChartBrush[3];
			brushes [0] = new NChartSolidColorBrush (Color.Argb (255, (int)(255 * 0.38), (int)(255 * 0.8), (int)(255 * 0.92)));
			brushes [1] = new NChartSolidColorBrush (Color.Argb (255, (int)(255 * 0.8), (int)(255 * 0.86), (int)(255 * 0.22)));
			brushes [2] = new NChartSolidColorBrush (Color.Argb (255, (int)(255 * 0.9), (int)(255 * 0.29), (int)(255 * 0.51)));

			// Set up the time axis.
			mNChartView.Chart.TimeAxis.TickShape = NChartTypes.TimeAxisTickShape.Line;
			mNChartView.Chart.TimeAxis.TickTitlesFont = new NChartFont (NChartFont.FontDefaultBold, NChartFont.StyleNormal, 11);
			mNChartView.Chart.TimeAxis.TickTitlesLayout = NChartTypes.TimeAxisLabelsLayout.ShowFirstLastLabelsOnly;
			mNChartView.Chart.TimeAxis.TickTitlesPosition = NChartTypes.TimeAxisLabelsPosition.Beneath;
			mNChartView.Chart.TimeAxis.TickTitlesColor = Color.Argb (255, 135, 135, 135);
			mNChartView.Chart.TimeAxis.TickColor = Color.Argb (255, 110, 110, 110);
			mNChartView.Chart.TimeAxis.Margin = new NChartTypes.Margin (20.0f, 20.0f, 10.0f, 0.0f);
			mNChartView.Chart.TimeAxis.AutohideTooltip = false;

			// Create the time axis tooltip.
			mNChartView.Chart.TimeAxis.Tooltip = new NChartTimeAxisTooltip ();
			mNChartView.Chart.TimeAxis.Tooltip.TextColor = Color.Argb (255, 140, 140, 140);
			mNChartView.Chart.TimeAxis.Tooltip.Font = new NChartFont (16);
			mNChartView.Chart.TimeAxis.TickTitlesFont = new NChartFont (NChartFont.FontDefaultBold, NChartFont.StyleNormal, 16);

			// Set images for the time axis.
			SetImagesForTimeAxis (Resource.Drawable.slider_light, Resource.Drawable.handler_light, Resource.Drawable.play_light,
				Resource.Drawable.play_pushed_light, Resource.Drawable.pause_light, Resource.Drawable.pause_pushed_light);

				
			// Visible time axis.
			mNChartView.Chart.TimeAxis.Visible = true;

			// Set animation time in seconds.
			mNChartView.Chart.TimeAxis.AnimationTime = 3.0f;

			// Switch 3D on.
			mNChartView.Chart.DrawIn3D = true;

			// Switch on antialiasing.
			mNChartView.Chart.ShouldAntialias = true;

			// Create series.
			for (int i = 0; i < 3; ++i) {
				NChartBubbleSeries series = new NChartBubbleSeries ();
				series.DataSource = this;
				series.Tag = i;
				// Add series to the chart.
				mNChartView.Chart.AddSeries (series);
			}
			mNChartView.Chart.CartesianSystem.XAxis.HasOffset = false;
			mNChartView.Chart.CartesianSystem.YAxis.HasOffset = false;
			mNChartView.Chart.CartesianSystem.ZAxis.HasOffset = false;

			// Set data source for the size axis to provide ticks.
			mNChartView.Chart.TimeAxis.DataSource = this;

			// Set data source for the size axis to provide sizes for bubbles.
			mNChartView.Chart.SizeAxis.DataSource = this;

			// Reset animation.
			mNChartView.Chart.TimeAxis.Stop ();
			mNChartView.Chart.TimeAxis.GoToFirstTick ();

			// Update data in the chart.
			mNChartView.Chart.UpdateData ();
		}
Exemple #11
0
        private void LoadView()
        {
            // Paste your license key here.
            mNChartView.Chart.LicenseKey = "";

            // Margin
            mNChartView.Chart.PolarSystem.Margin = new NChartMargin(10.0f, 10.0f, 10.0f, 40.0f);

            // Create brushes.
            brushes     = new NChartBrush[3];
            brushes [0] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.38), (int)(255 * 0.8), (int)(255 * 0.92)));
            brushes [1] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.8), (int)(255 * 0.86), (int)(255 * 0.22)));
            brushes [2] = new NChartSolidColorBrush(Color.Argb(255, (int)(255 * 0.9), (int)(255 * 0.29), (int)(255 * 0.51)));

            // Set up the time axis.
            mNChartView.Chart.TimeAxis.TickShape          = NChartTimeAxisTickShape.Line;
            mNChartView.Chart.TimeAxis.TickTitlesFont     = new NChartFont(NChartFont.FontDefaultBold, NChartFont.StyleNormal, 11);
            mNChartView.Chart.TimeAxis.TickTitlesLayout   = NChartTimeAxisLabelsLayout.ShowFirstLastLabelsOnly;
            mNChartView.Chart.TimeAxis.TickTitlesPosition = NChartTimeAxisLabelsPosition.Beneath;
            mNChartView.Chart.TimeAxis.TickTitlesColor    = Color.Argb(255, 135, 135, 135);
            mNChartView.Chart.TimeAxis.TickColor          = Color.Argb(255, 110, 110, 110);
            mNChartView.Chart.TimeAxis.Margin             = new NChartMargin(20.0f, 20.0f, 10.0f, 0.0f);
            mNChartView.Chart.TimeAxis.AutohideTooltip    = false;

            // Create the time axis tooltip.
            mNChartView.Chart.TimeAxis.Tooltip           = new NChartTimeAxisTooltip();
            mNChartView.Chart.TimeAxis.Tooltip.TextColor = Color.Argb(255, 140, 140, 140);
            mNChartView.Chart.TimeAxis.Tooltip.Font      = new NChartFont(11);

            // Set images for the time axis.
            SetImagesForTimeAxis(Resource.Drawable.slider_light, Resource.Drawable.handler_light, Resource.Drawable.play_light,
                                 Resource.Drawable.play_pushed_light, Resource.Drawable.pause_light, Resource.Drawable.pause_pushed_light);


            // Visible time axis.
            mNChartView.Chart.TimeAxis.Visible = true;

            // Set animation time in seconds.
            mNChartView.Chart.TimeAxis.AnimationTime = 3.0f;

            // Switch 3D on.
            mNChartView.Chart.DrawIn3D = true;

            // Switch on antialiasing.
            mNChartView.Chart.ShouldAntialias = true;

            // Create series.
            for (int i = 0; i < 3; ++i)
            {
                NChartBubbleSeries series = new NChartBubbleSeries();
                series.DataSource = this;
                series.Tag        = i;
                // Add series to the chart.
                mNChartView.Chart.AddSeries(series);
            }
            mNChartView.Chart.CartesianSystem.XAxis.HasOffset = false;
            mNChartView.Chart.CartesianSystem.YAxis.HasOffset = false;
            mNChartView.Chart.CartesianSystem.ZAxis.HasOffset = false;

            // Set data source for the size axis to provide ticks.
            mNChartView.Chart.TimeAxis.DataSource = this;

            // Set data source for the size axis to provide sizes for bubbles.
            mNChartView.Chart.SizeAxis.DataSource = this;

            // Reset animation.
            mNChartView.Chart.TimeAxis.Stop();
            mNChartView.Chart.TimeAxis.GoToFirstTick();

            // Update data in the chart.
            mNChartView.Chart.UpdateData();
        }