52 TPie(
const char *,
const char *,
Int_t,
Float_t *,
Int_t *cols =
nullptr,
const char *lbls[] =
nullptr);
#define ClassDefOverride(name, id)
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t np
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char text
Option_t Option_t TPoint TPoint const char y1
TH1 is the base class of all histogram classes in ROOT.
This class displays a legend box (TPaveText) containing several legend entries.
The TNamed class is the base class for all named ROOT classes.
A slice of a piechart, see the TPie class.
void SetEntryVal(Int_t, Double_t)
Set the value of a slice.
TPieSlice * GetSlice(Int_t i)
Return the reference to the slice of index 'id'.
Float_t fLabelsOffset
LabelsOffset offset of label.
void SetAngularOffset(Double_t)
Set the global angular offset for slices in degree [0,360].
void Paint(Option_t *) override
Paint a Pie chart in a canvas.
Double_t GetEntryVal(Int_t)
Return the value associated with the slice number "i".
TString fLabelFormat
Format format of the slices' label.
Float_t * fSlices
!Subdivisions of the slices
void SetX(Double_t)
Set X value.
Double_t fAngularOffset
Offset angular offset for the first slice.
void SortSlices(Bool_t amode=kTRUE, Float_t merge_thresold=.0)
This method, mainly intended for internal use, ordered the slices according their values.
void SetEntryFillStyle(Int_t, Int_t)
Set the fill style for the "i" slice.
TPie()
Default constructor.
~TPie() override
Destructor.
void SetFractionFormat(const char *)
Set numeric format in the label, is used if the label format there is the modifier frac,...
Float_t fAngle3D
The angle of the pseudo-3d view.
Double_t fHeight
Height of the slice in pixel.
const char * GetPercentFormat()
void SetPercentFormat(const char *)
Set the numeric format for the percent value of a slice, default: %3.1f.
void SetLabels(const char *[])
Set the labels for all the slices.
void SetY(Double_t)
Set Y value.
TLegend * GetLegend()
If created before by Paint option or by MakeLegend method return the pointer to the legend,...
Bool_t fIs3D
! true if the pseudo-3d is enabled
void Init(Int_t np, Double_t ao, Double_t x, Double_t y, Double_t r)
Common initialization for all constructors.
Int_t GetEntryFillColor(Int_t)
Return the color of the slice number "i".
void SetLabelsOffset(Float_t)
Set the distance between the label end the external line of the TPie.
void SetEntryRadiusOffset(Int_t, Double_t)
Set the distance, in the direction of the radius of the slice.
Double_t GetAngularOffset()
void DrawGhost()
This method is for internal use.
Float_t GetLabelsOffset()
TLegend * fLegend
!Legend for this piechart
void SetLabelFormat(const char *)
This method is used to customize the label format.
Double_t fRadius
Radius Pie radius.
const char * GetFractionFormat()
TPieSlice ** fPieSlices
[fNvals] Slice array of this pie-chart
void ExecuteEvent(Int_t, Int_t, Int_t) override
Execute the mouse events.
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Evaluate the distance to the chart in gPad.
void SetEntryLineStyle(Int_t, Int_t)
Set the style for the slice's outline. "i" is the slice number.
void MakeSlices(Bool_t force=kFALSE)
Make the slices.
void SetEntryFillColor(Int_t, Int_t)
Set the color for the slice "i".
void SetEntryLineWidth(Int_t, Int_t)
Set the width of the slice's outline. "i" is the slice number.
const char * GetLabelFormat()
void SetCircle(Double_t x=.5, Double_t y=.5, Double_t rad=.4)
Set the coordinates of the circle that describe the pie:
const char * GetEntryLabel(Int_t)
Returns the label of the entry number "i".
TString fValueFormat
Vform numeric format for the value.
TString fFractionFormat
Rform numeric format for the fraction of a slice.
void SetAngle3D(Float_t val=30.)
Set the value of for the pseudo 3D view angle, in degree.
Double_t GetEntryRadiusOffset(Int_t)
Return the radial offset's value for the slice number "i".
Int_t GetEntryFillStyle(Int_t)
Return the style use to fill the slice number "i".
const char * GetValueFormat()
void SetRadius(Double_t)
Set the pie chart's radius' value.
void SavePrimitive(std::ostream &out, Option_t *opts="") override
Save primitive as a C++ statement(s) on output stream out.
TString fPercentFormat
Pfrom numeric format for the percent of a slice.
TLegend * MakeLegend(Double_t x1=.65, Double_t y1=.65, Double_t x2=.95, Double_t y2=.95, const char *leg_header="")
This method create a legend that explains the contents of the slice for this pie-chart.
Int_t fNvals
Number of elements.
Int_t DistancetoSlice(Int_t, Int_t)
Returns the slice number at the pixel position (px,py).
Int_t GetEntryLineStyle(Int_t)
Return the style used to outline thi "i" slice.
Float_t fSum
!Sum for the slice values
Double_t fY
Y coordinate of the pie centre.
void SetEntryLabel(Int_t, const char *text="Slice")
Set slice number "i" label.
Double_t fX
X coordinate of the pie centre.
void SetHeight(Double_t val=.08)
Set the height, in pixel, for the piechart if is drawn using the pseudo-3d mode.
Int_t GetEntryLineWidth(Int_t)
Return the line width used to outline thi "i" slice.
Int_t GetEntryLineColor(Int_t)
Return the line color used to outline thi "i" slice.
void SetValueFormat(const char *)
Set the numeric format the slices' values.
void SetEntryLineColor(Int_t, Int_t)
Set the color for the slice's outline. "i" is the slice number.
void SetFillColors(Int_t *)
Set the fill colors for all the TPie's slices.
const char * Data() const