Ejemplo n.º 1
0
        private void Form14_Load(object sender, EventArgs e)
        {
            using (StraatrovenEntities db = new StraatrovenEntities())
            {
                var data = db.hsp200k();

                Hcol = new ColumnSeries()
                {
                    Title = "Overvallen per buurt", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                HcolO = new ColumnSeries()
                {
                    Title = "Prijzen in euro(x1000)", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };

                Axis ax = new Axis()
                {
                    Separator = new Separator()
                    {
                        Step = 1, IsEnabled = false
                    }
                };
                ax.Labels         = new List <string>();
                ax.LabelsRotation = 45;
                foreach (var x in data)

                {
                    Hcol.Values.Add(x.ov);
                    HcolO.Values.Add(x.hsp);


                    ax.Labels.Add(x.bn);
                    //ax.Labels.Add(x.bn);
                }

                cartesianChart1.Series.Add(Hcol);
                cartesianChart1.Series.Add(HcolO);
                cartesianChart1.LegendLocation = LegendLocation.Bottom;

                //cartesianChart1.Series = new SeriesCollection
                //{
                //    Hcol,
                //    HcolO,

                //};


                cartesianChart1.AxisX.Add(ax);
                cartesianChart1.AxisY.Add(new Axis
                {
                    LabelFormatter = value => value.ToString(),
                    Separator      = new Separator()
                });
            }
        }
Ejemplo n.º 2
0
        private void Form4_Load(object sender, EventArgs e)
        {
            using (StraatrovenEntities db = new StraatrovenEntities())
            {
                var data = db.wr();

                LineSeries col = new LineSeries()
                {
                    Title = "Gemiddelde temperatuur bij overvallen in graden Celsius per dag", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                LineSeries colO = new LineSeries()
                {
                    Title = "Gemiddelde temperatuur in graden Celsius per dag", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };


                Axis ax = new Axis()
                {
                    Separator = new Separator()
                    {
                        Step = 1, IsEnabled = false
                    }
                };
                ax.Labels         = new List <string>();
                ax.LabelsRotation = 45;


                foreach (var a in data)

                {
                    col.Values.Add(a.ov);
                    colO.Values.Add(a.tmp);
                    ax.Labels.Add(a.mnd.ToString());
                }



                cartesianChart1.Series.Add(col);
                cartesianChart1.Series.Add(colO);
                cartesianChart1.LegendLocation = LegendLocation.Bottom;
                cartesianChart1.AxisX.Add(ax);
                cartesianChart1.AxisY.Add(new Axis
                {
                    LabelFormatter = value => value.ToString(),
                    Separator      = new Separator()
                });
            }
        }
Ejemplo n.º 3
0
        private void Form6_Load(object sender, EventArgs e)
        {
            using (StraatrovenEntities db = new StraatrovenEntities())
            {
                var data = db.wzA();

                Col = new LineSeries()
                {
                    Title = "Werkzoekende totaal", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                ColO = new LineSeries()
                {
                    Title = "Werkzoekenden 15 t/m 24 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                ColT = new LineSeries()
                {
                    Title = "Werkzoekenden 25 t/m 34 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                ColTr = new LineSeries()
                {
                    Title = "Werkzoekenden 35 t/m 44 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                ColF = new LineSeries()
                {
                    Title = "Werkzoekenden 45 t/m 54 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                ColFi = new LineSeries()
                {
                    Title = "Werkzoekenden 55 t/m 65 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                ColS = new LineSeries()
                {
                    Title = "Overvallen per buurt", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };


                Axis ax = new Axis()
                {
                    Separator = new Separator()
                    {
                        Step = 1, IsEnabled = false
                    }
                };
                ax.Labels         = new List <string>();
                ax.LabelsRotation = 45;
                foreach (var x in data)

                {
                    Col.Values.Add(x.wzA);
                    ColO.Values.Add(x.wz15);
                    ColT.Values.Add(x.wz25);
                    ColTr.Values.Add(x.wz35);
                    ColF.Values.Add(x.wz45);
                    ColFi.Values.Add(x.wz55);
                    ColS.Values.Add(x.ov);
                    ax.Labels.Add(x.bn);
                    //ax.Labels.Add(x.bn);
                }

                cartesianChart1.Series.Add(Col);
                cartesianChart1.Series.Add(ColO);
                cartesianChart1.Series.Add(ColT);
                cartesianChart1.Series.Add(ColTr);
                cartesianChart1.Series.Add(ColF);
                cartesianChart1.Series.Add(ColFi);
                cartesianChart1.Series.Add(ColS);
                cartesianChart1.LegendLocation = LegendLocation.Bottom;


                //cartesianChart1.Series = new SeriesCollection
                //{
                //    Col,
                //    ColO,
                //    ColT,
                //    ColTr,
                //    ColF,
                //    ColFi,
                //    ColS,

                //};


                cartesianChart1.AxisX.Add(ax);
                cartesianChart1.AxisY.Add(new Axis
                {
                    LabelFormatter = value => value.ToString(),
                    Separator      = new Separator()
                });
            }
        }
Ejemplo n.º 4
0
        private void Form11_Load(object sender, EventArgs e)
        {
            using (StraatrovenEntities db = new StraatrovenEntities())
            {
                var data = db.wrP();

                PieSeries col = new PieSeries()
                {
                    Title = "Rest", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries colO = new PieSeries()
                {
                    Title = "Sneeuw", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries colT = new PieSeries()
                {
                    Title = "IJsvorming", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries colTr = new PieSeries()
                {
                    Title = "Regen", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries colF = new PieSeries()
                {
                    Title = "Mist", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries colFi = new PieSeries()
                {
                    Title = "Onweer", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };


                //Axis ax = new Axis() { Separator = new Separator() { Step = 1, IsEnabled = false } };
                //ax.Labels = new List<string>();
                //ax.LabelsRotation = 45;


                foreach (var a in data)

                {
                    col.Values.Add(a.rest);
                    colO.Values.Add(a.sneeuw);
                    colT.Values.Add(a.ijsvorming);
                    colTr.Values.Add(a.regen);
                    colF.Values.Add(a.mist);
                    colFi.Values.Add(a.onweer);
                    //ax.Labels.Add(a.mnd.ToString());
                }



                pieChart1.Series.Add(col);
                pieChart1.Series.Add(colO);
                pieChart1.Series.Add(colT);
                pieChart1.Series.Add(colTr);
                pieChart1.Series.Add(colF);
                pieChart1.Series.Add(colFi);
                pieChart1.LegendLocation = LegendLocation.Bottom;


                //cartesianChart1.AxisX.Add(ax);
                //cartesianChart1.AxisY.Add(new Axis
                //{
                //    LabelFormatter = value => value.ToString(),
                //    Separator = new Separator()
                //});
            }
        }
Ejemplo n.º 5
0
        private void Form5_Load(object sender, EventArgs e)
        {
            using (StraatrovenEntities db = new StraatrovenEntities())
            {
                var data = db.wzP();

                //PieSeries Col = new PieSeries() { Title = "Werkzoekende totaal", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
                PieSeries ColO = new PieSeries()
                {
                    Title = "Werkzoekenden 15 t/m 24 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries ColT = new PieSeries()
                {
                    Title = "Werkzoekenden 25 t/m 34 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries ColTr = new PieSeries()
                {
                    Title = "Werkzoekenden 35 t/m 44 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries ColF = new PieSeries()
                {
                    Title = "Werkzoekenden 45 t/m 54 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries ColFi = new PieSeries()
                {
                    Title = "Werkzoekenden 55 t/m 65 jaar oud", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };
                PieSeries ColS = new PieSeries()
                {
                    Title = "Totaal overvallen", DataLabels = true, Values = new ChartValues <int>(), LabelPoint = point => point.Y.ToString()
                };

                //RowSeries ColSe = new RowSeries() { Title = "Werkzoekende 15 jaar oud", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
                //RowSeries ColE = new RowSeries() { Title = "Werkzoekende 25 jaar oud", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
                //RowSeries ColN = new RowSeries() { Title = "Werkzoekende 35 jaar oud", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
                //RowSeries ColTe = new RowSeries() { Title = "Werkzoekende 45 jaar oud", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
                //RowSeries ColEl = new RowSeries() { Title = "Werkzoekende 55 jaar oud", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };
                //RowSeries ColTw = new RowSeries() { Title = "Overvallen", DataLabels = true, Values = new ChartValues<int>(), LabelPoint = point => point.Y.ToString() };

                //Axis ax = new Axis() { Separator = new Separator() { Step = 1, IsEnabled = false } };
                //ax.Labels = new List<string>();
                //ax.LabelsRotation = 45;


                //cartesianChart1.AxisY.Add(new Axis
                //{
                //    Labels = new[] { "werkzoekende 15", "werkzoekende 25", "werkzoekende 35", "werkzoekende 45", "werkzoekende 55"}
                //});

                //cartesianChart1.AxisX.Add(new Axis
                //{
                //    LabelFormatter = value => value.ToString("N")
                //});


                foreach (var x in data)

                {
                    //Col.Values.Add(x.wzA);
                    ColO.Values.Add(x.wz15);
                    ColT.Values.Add(x.wz25);
                    ColTr.Values.Add(x.wz35);
                    ColF.Values.Add(x.wz45);
                    ColFi.Values.Add(x.wz55);
                    ColS.Values.Add(x.overvallen);

                    //ColSe.Values.Add(x.wz15);
                    //ColE.Values.Add(x.wz25);
                    //ColN.Values.Add(x.wz35);
                    //ColTe.Values.Add(x.wz45);
                    //ColEl.Values.Add(x.wz55);
                    //ColTw.Values.Add(x.overvallen);


                    //ax.Labels.Add(x.bn);
                    //ax.Labels.Add(x.bn);
                }

                //pieChart1.Series.Add(Col);
                pieChart1.Series.Add(ColO);
                pieChart1.Series.Add(ColT);
                pieChart1.Series.Add(ColTr);
                pieChart1.Series.Add(ColF);
                pieChart1.Series.Add(ColFi);
                pieChart1.Series.Add(ColS);
                pieChart1.LegendLocation = LegendLocation.Bottom;

                //cartesianChart1.Series.Add(ColSe);
                //cartesianChart1.Series.Add(ColE);
                //cartesianChart1.Series.Add(ColN);
                //cartesianChart1.Series.Add(ColTe);
                //cartesianChart1.Series.Add(ColEl);
                //cartesianChart1.Series.Add(ColTw);
                //cartesianChart1.LegendLocation = LegendLocation.Bottom;



                //pieChart1.Series = new SeriesCollection
                //{
                //    Col,
                //    ColO,
                //    ColT,
                //    ColTr,
                //    ColF,
                //    ColFi,
                //    ColS,

                //};


                //cartesianChart1.AxisX.Add(ax);
                //cartesianChart1.AxisY.Add(new Axis
                //{
                //    LabelFormatter = value => value.ToString(),
                //    Separator = new Separator()
                //});
            }
        }