ultimatepp/examples/ScatterCtrl_Demo/tab4_Formatting.cpp
koldo daaab683d5 ScatterCtrl_Demo: Files renamed
git-svn-id: svn://ultimatepp.org/upp/trunk@8786 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2015-08-02 20:10:37 +00:00

34 lines
No EOL
1 KiB
C++

#include "ScatterCtrl_Demo.h"
void Tab4_Formatting::Init()
{
CtrlLayout(*this);
SizePos();
scatter.SetRange(13, 50)
.SetMajorUnits(1, 10)
.SetXYMin(0, -20);
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").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").Units("ºC").MarkStyle<CircleMarkPlot>();
scatter.Graduation_FormatX(ScatterCtrl::MON)
.SetLabelY("Temperature")
.SetMarkWidth(1, 4)
.SetMinXmin(0).SetMaxXmax(13);
}
ScatterDemo *Construct4()
{
static Tab4_Formatting tab;
return &tab;
}
INITBLOCK {
RegisterExample("Formatting", Construct4, __FILE__);
}