mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-16 14:16:09 -06:00
ScatterCtrl_Demo: Included units
git-svn-id: svn://ultimatepp.org/upp/trunk@6705 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
a5fcb16a32
commit
15dd22a6e2
3 changed files with 8 additions and 7 deletions
|
|
@ -11,13 +11,13 @@ void Tab4::Init()
|
|||
scatter.SetMouseHandling(true).ShowContextMenu();
|
||||
|
||||
s1 <<Pointf(1,-6)<<Pointf(2,-4)<<Pointf(3,2)<<Pointf(4,8)<<Pointf(5,8)<<Pointf(6,15)<<Pointf(7,20)<<Pointf(8,25)<<Pointf(9,14)<<Pointf(10,10)<<Pointf(11,3)<<Pointf(12,-11);
|
||||
scatter.AddSeries(s1).Legend("2005");
|
||||
scatter.AddSeries(s1).Legend("2005").Units("ºC");
|
||||
|
||||
s2 <<Pointf(1,-12)<<Pointf(2,-7)<<Pointf(3,0)<<Pointf(4,2)<<Pointf(5,10)<<Pointf(6,18)<<Pointf(7,25)<<Pointf(8,26)<<Pointf(9,15)<<Pointf(10,12)<<Pointf(11,7)<<Pointf(12,-6);
|
||||
scatter.AddSeries(s2).Legend("2006").MarkStyle<CircleMarkPlot>();
|
||||
scatter.AddSeries(s2).Legend("2006").Units("ºC").MarkStyle<CircleMarkPlot>();
|
||||
|
||||
scatter.Graduation_FormatX(ScatterCtrl::MON)
|
||||
.SetLabelY("Temperature [176 C]")
|
||||
.SetLabelY("Temperature")
|
||||
.SetMarkWidth(1, 4)
|
||||
.SetMinXmin(0).SetMaxXmax(13);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ void Tab7::Init()
|
|||
{
|
||||
CtrlLayout(*this);
|
||||
HSizePos().VSizePos();
|
||||
scatter.SetRange(80, 100);
|
||||
|
||||
bAddSeries <<= THISBACK(AddSeries);
|
||||
bRemoveLastSeries <<= THISBACK(RemoveLastSeries);
|
||||
|
|
|
|||
|
|
@ -13,17 +13,17 @@ void Tab8::Init()
|
|||
scatter.AddSeries(s3).Legend("Device 1").PlotStyle<BarSeriesPlot>(barWidth).NoMark().Stroke(2, Gray()).Dash(LINE_SOLID).Fill(LtGray());
|
||||
|
||||
s1<<Pointf(1,-6)<<Pointf(2,-4)<<Pointf(3,2)<<Pointf(4,8)<<Pointf(5,8)<<Pointf(6,15)<<Pointf(7,20)<<Pointf(8,30)<<Pointf(9,14)<<Pointf(10,10)<<Pointf(11,3)<<Pointf(12,-11);
|
||||
scatter.AddSeries(s1).Legend("Temperature").Stroke(3, Null).Dash(LINE_DASHED).MarkStyle<SquareMarkPlot>();
|
||||
scatter.AddSeries(s1).Legend("Temperature").Units("ºC").Stroke(3, Null).Dash(LINE_DASHED).MarkStyle<SquareMarkPlot>();
|
||||
|
||||
s2 <<Pointf(1,1008)<<Pointf(2,1012)<<Pointf(3,1016)<<Pointf(4,1012)<<Pointf(5,1008)<<Pointf(6,1016)<<Pointf(7,1012)<<Pointf(8,1004)<<Pointf(9,1000)<<Pointf(10,1001)<<Pointf(11,1000)<<Pointf(12,1002);
|
||||
scatter.AddSeries(s2).Legend("Pressure").Stroke(3, Null).Dash("15 6 6 6 3 6 6 6").SetDataPrimaryY(false);
|
||||
scatter.AddSeries(s2).Legend("Pressure").Units("mBar").Stroke(3, Null).Dash("15 6 6 6 3 6 6 6").SetDataPrimaryY(false);
|
||||
scatter.SetDrawY2Reticle();
|
||||
|
||||
scatter.cbModifFormatX = THISBACK(MyFormat);
|
||||
scatter.cbModifFormatDeltaX = THISBACK(MyFormatDelta);
|
||||
scatter.SetMaxRange(40).SetMinRange(2, 20)
|
||||
.SetLabelY("Temperature [C]")
|
||||
.SetLabelY2("Pressure [mBar]")
|
||||
.SetLabelY("Temperature")
|
||||
.SetLabelY2("Pressure")
|
||||
.SetMarkWidth(1, 4);
|
||||
scatter.ShowInfo()
|
||||
.ShowContextMenu();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue