hello. many thanks for including Rose Series in the Xamarin.Forms release.
i'm totally lost as to how to use it, tho. and i cannot find any documentation anywhere (maybe I'm just not seeing it...) various code samples online show a .AddXY or .AddPolar function; but all I'm seeing is overloads of .Add(). i've tried many combinations of those but results remain unpredictable. i think i'm missing some key conceptual point.
how can i simply add a few "slices" to a RoseSeries? .Add (Angle, Radius, ....?)
thank you.
Rose Series help
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Rose Series help
Hello,
Once you have the sample project under:
%Program Files%\Steema Software\TeeChart for Xamarin Forms 2015 4.0.2015.02060\Examples\SampleProject
up and running, you can add a single slice to a rose series like this:
Once you have the sample project under:
%Program Files%\Steema Software\TeeChart for Xamarin Forms 2015 4.0.2015.02060\Examples\SampleProject
up and running, you can add a single slice to a rose series like this:
Code: Select all
namespace SampleProject
{
public class App
{
public static Page GetMainPage()
{
var tChart1 = new Steema.TeeChart.Chart();
tChart1.Aspect.View3D = false;
tChart1.Legend.Visible = false;
Steema.TeeChart.Styles.Rose rose = new Steema.TeeChart.Styles.Rose(tChart1.Chart);
rose.Circled = true;
rose.Add(45, 100);
rose.Add(90, 200);
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: Rose Series help
Code: Select all
rose.Add(45, 100, green);
rose.Add(90, 200, green);
Code: Select all
rose.Add(45, 100, green);
rose.Add(90, 200, green);
rose.Add(135, 100, orange);
rose.Add(180, 200, orange);
a) what does the 100 & 200 do? 45 as width in degrees and 90 as start in degrees make sense. 100 or 200 for radius makes sense; but not the two different values.
b) i do not understand why adding another "slice" affects the first.
am i missing something obvious? is there any documentation that would help?
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: Rose Series help
Hello,
This is a little confusing, I agree.
I have made some modifications to the source code so that this code:
now gives this:
I think this should be enough to see what is happening here ... for each slice that is drawn, the position of the last slice is not possible to determine if the slices do not form a complete circle. This is because the slice is a polygon drawn from the first point to the second and so on.
If you think that this source change is sufficient, that with CloseCircle the Chart draws as shown, then I will mark it for production code.
This is a little confusing, I agree.
I have made some modifications to the source code so that this code:
Code: Select all
private void InitializeChart()
{
tChart1.Aspect.ClipPoints = false;
tChart1.Aspect.View3D = false;
Rose rose = new Rose(tChart1.Chart);
rose.Circled = true;
rose.CloseCircle = false;
rose.GetVertAxis.SetMinMax(0, 1000);
rose.Add(14.4, 959.986);
rose.Add(28.8, 137.34);
rose.Add(43.2, 878.4);
}
I think this should be enough to see what is happening here ... for each slice that is drawn, the position of the last slice is not possible to determine if the slices do not form a complete circle. This is because the slice is a polygon drawn from the first point to the second and so on.
If you think that this source change is sufficient, that with CloseCircle the Chart draws as shown, then I will mark it for production code.
Best Regards,
Christopher Ireland / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |