Wt  3.3.8
Public Member Functions | List of all members
Wt::Chart::CurveLabel Class Reference

A curve label. More...

Public Member Functions

 CurveLabel (const WDataSeries &series, const WPointF &point, const WString &label)
 Create a new curve label. More...
 
void setSeries (const WDataSeries &series)
 Set the series this curve label is associated with.
 
const WDataSeriesseries () const
 Get the series this curve label is associated with. More...
 
void setPoint (const WPointF &point)
 Set the point in model coordinates this label is associated with.
 
const WPointFpoint () const
 Get the point in model coordinates this label is associated with. More...
 
void setLabel (const WString &label)
 Set the label that should be drawn in the box.
 
const WStringlabel () const
 Get the label that should be drawn in the box. More...
 
void setOffset (const WPointF &offset)
 Set the offset the text should be placed at. More...
 
const WPointFoffset () const
 Get the offset the text should be placed at. More...
 
void setWidth (int width)
 Set the width of the box in pixels. More...
 
int width () const
 Get the width of the box in pixels. More...
 
void setLinePen (const WPen &pen)
 Set the pen to use for the connecting line. More...
 
const WPenlinePen () const
 Get the pen to use for the connecting line. More...
 
void setTextPen (const WPen &pen)
 Set the pen for the text in the box.
 
const WPentextPen () const
 Get the pen for the text in the box. More...
 
void setBoxBrush (const WBrush &brush)
 Set the brush to use for the box around the text. More...
 
const WBrushboxBrush () const
 Get the brush to use for the box around the text. More...
 
void setMarkerBrush (const WBrush &brush)
 Set the brush used to fill the circle at point().
 
const WBrushmarkerBrush () const
 Get the brush used to fill the circle at point(). More...
 

Detailed Description

A curve label.

Curve labels can be added with WCartesianChart::addCurveLabel(). They are associated with a particular series, and are drawn at the given point in model coordinates. When the chart is transformed (zoom or pan) or the associated series is manipulated, the curve label's position will change, but not its size.

CurveLabel.png
A curve label

Constructor & Destructor Documentation

Wt::Chart::CurveLabel::CurveLabel ( const WDataSeries series,
const WPointF point,
const WString label 
)

Create a new curve label.

Create a new curve label for given series, at the given point with the given text.

Member Function Documentation

const WBrush& Wt::Chart::CurveLabel::boxBrush ( ) const

Get the brush to use for the box around the text.

See also
setBoxBrush()
const WString& Wt::Chart::CurveLabel::label ( ) const

Get the label that should be drawn in the box.

See also
setLabel()
const WPen& Wt::Chart::CurveLabel::linePen ( ) const

Get the pen to use for the connecting line.

See also
setLinePen()
const WBrush& Wt::Chart::CurveLabel::markerBrush ( ) const

Get the brush used to fill the circle at point().

See also
setMarkerBrush()
const WPointF& Wt::Chart::CurveLabel::offset ( ) const

Get the offset the text should be placed at.

See also
setOffset()
const WPointF& Wt::Chart::CurveLabel::point ( ) const

Get the point in model coordinates this label is associated with.

See also
setPoint()
const WDataSeries& Wt::Chart::CurveLabel::series ( ) const

Get the series this curve label is associated with.

See also
setSeries()
void Wt::Chart::CurveLabel::setBoxBrush ( const WBrush brush)

Set the brush to use for the box around the text.

This sets the brush used to fill the box with the text defined in label().

void Wt::Chart::CurveLabel::setLinePen ( const WPen pen)

Set the pen to use for the connecting line.

This sets the pen to use for the line connecting the point to the box with the label at offset pixels from the point.

void Wt::Chart::CurveLabel::setOffset ( const WPointF offset)

Set the offset the text should be placed at.

The offset is defined in pixels, with x values going from left to right, and y values from top to bottom.

The default offset is (60, -20), which means the middle of the label() is drawn 60 pixels to the right, and 20 pixels above the point.

void Wt::Chart::CurveLabel::setWidth ( int  width)

Set the width of the box in pixels.

If the width is 0 (the default), server side font metrics will be used to determine the size of the box.

const WPen& Wt::Chart::CurveLabel::textPen ( ) const

Get the pen for the text in the box.

See also
setTextPen()
int Wt::Chart::CurveLabel::width ( ) const

Get the width of the box in pixels.

See also
setWidth()

Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11