| COM - VB - XAML Pie Chart Demo
 
 Printed From: Codejock Forums
 Category:  General
 Forum Name:  Samples and Demo Applications
 Forum Description:  Post your samples and demo applications here.
 URL: http://forum.codejock.com/forum_posts.asp?TID=11169
 Printed Date: 31 October 2025 at 6:02am
 Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
 
 
 Topic: COM - VB - XAML Pie Chart Demo
 Posted By: ijwelch
 Subject: COM - VB - XAML Pie Chart Demo
 Date Posted: 22 June 2008 at 2:39am
 
 
        
          | A basic pie chart in XAML. 
 Suggestions and comments welcome.
 
 uploads/20080622_023909_Pie_Chart.zip - uploads/20080622_023909_Pie_Chart.zip
     Output:   
 -------------
 ExtremeSuitePro 12.1.1
 WinXP SP3
 |  
 
 Replies:
 Posted By: ijwelch
 Date Posted: 22 June 2008 at 2:45am
 
 
        
          | Oleg, 
 I was expecting the following markup to work but it just fills the shape with black:
 
 <Canvas>
 <Polygon Points='80,80 159,79 158,78 158,76 158,75 158,73 158,72 158,71 158,69 158,68 158,67 157,65 157,64 157,62 156,61 156,60 156,58 155,57 155,56 155,54 154,53 154,52 153,51 153,49 152,48 152,47 151,45 150,44 150,43 149,42 149,40 148,39'>
 <Polygon.Fill>
 <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5, 0">
 <GradientStop Color="#FFFF00" Offset="0"/>
 <GradientStop Color="#00FF00" Offset="1"/>
 </LinearGradientBrush>
 </Polygon.Fill>
 </Polygon>
 </Canvas>
 
 
 
 -------------
 ExtremeSuitePro 12.1.1
 WinXP SP3
 |  
 Posted By: Oleg
 Date Posted: 22 June 2008 at 8:00am
 
 
        
          | Hi,   LineGradient now works for Borders/Rectangles only. :-(    Things will change with GDI+.   Thanks for doing this. Its great. Some new Arcs and Curves Tags will be added also. :-)   
 -------------
 Oleg, Support Team
 CODEJOCK SOFTWARE SOLUTIONS
 |  
 Posted By: spain_2008
 Date Posted: 30 June 2008 at 7:10am
 
 
        
          | Hola, niños: 
 Qué, dandele a la teclas. Eso está muy bien.
 
 Os dejo un trocito de codigo que seguro que os pondrá cachondos.
 
 private void CambiaAngleMin(Double p)
 {
 
 Polygon A = new Polygon();
 
 int angulo_A, angulo_B;
 
 if (AngleMax < p)
 {
 angulo_A = (int)p;
 
 angulo_B = (int)AngleMax;
 }
 else
 {
 angulo_A = (int)AngleMax;
 
 angulo_B = (int)p;
 }
 A.Points.Add(new Point(55, 55));
 
 
 
 while (angulo_A != angulo_B)
 {
 Point Punto = new Point();
 Double Angulo;
 Double x, y;
 
 // Radianes;
 Angulo = (Math.PI * (angulo_A - 90)) / 180;
 
 x = Math.Cos(Angulo) * 55;
 y = Math.Sin(Angulo) * 55;
 
 x = x + 55;
 y = y + 55;
 
 Punto.X = x;
 Punto.Y = y;
 A.Points.Add(Punto);
 
 angulo_A--;
 }
 
 
 A.Points.Add(new Point(55, 55));
 
 A.Stroke = Brushes.Black;
 A.Fill = Brushes.Red;
 
 
 
 
 PEDRO.Children.Clear();
 PEDRO.Children.Add(A);
 
 }
 
 Saludos.-
 
 
 
 -------------
 Hola, chavales!!!
 |  
 Posted By: braian87b
 Date Posted: 02 July 2008 at 11:01am
 
 
        
          | |  spain_2008 wrote: 
 Hola, niños:
 
 Qué, dandele a la teclas. Eso está muy bien.
 
 what?, giving to the keyboard (means writing code), that is very fine Os dejo un trocito de codigo que seguro que os pondrá cachondos.
 here is a piece of code, im sure; you gonna like it
 cambia: change angulo: angle punto: point PEDRO: personal name, like 'robert'private void CambiaAngleMin(Double p)
 {
 
 Polygon A = new Polygon();
 
 int angulo_A, angulo_B;
 
 if (AngleMax < p)
 {
 angulo_A = (int)p;
 
 angulo_B = (int)AngleMax;
 }
 else
 {
 angulo_A = (int)AngleMax;
 
 angulo_B = (int)p;
 }
 A.Points.Add(new Point(55, 55));
 
 
 
 while (angulo_A != angulo_B)
 {
 Point Punto = new Point();
 Double Angulo;
 Double x, y;
 
 // Radianes;
 Angulo = (Math.PI * (angulo_A - 90)) / 180;
 
 x = Math.Cos(Angulo) * 55;
 y = Math.Sin(Angulo) * 55;
 
 x = x + 55;
 y = y + 55;
 
 Punto.X = x;
 Punto.Y = y;
 A.Points.Add(Punto);
 
 angulo_A--;
 }
 
 
 A.Points.Add(new Point(55, 55));
 
 A.Stroke = Brushes.Black;
 A.Fill = Brushes.Red;
 
 
 
 
 PEDRO.Children.Clear();
 PEDRO.Children.Add(A);
 
 }
 
 Saludos.-
 Greetings.-
 
 | 
 |  
 Posted By: braian87b
 Date Posted: 02 July 2008 at 11:03am
 
 
        
          | and the sing: 
|  spain_2008 wrote: 
 
 Hola, niños:
   Hola, chavales!!! Pues nada vamos a ver si le damos mas vidilla a estos post y dejamos de dejar basura. Consejo: dejad de decir chorradas y pegar codigo que funciones y no tonterias y chorradas. Besos 
 | 
   Hello guys!, well, nothing, lets see if we give more live to this post and we leave the crap. Advise: stop saying "chorradas" (stupid thing) and paste code, what functions and no stupids and "chorradas", kisses     |  
 
 |