Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Monomer.Graph.GraphData
Synopsis
- data GraphData s e = GraphData {
- _gdPoints :: [(Double, Double)]
- _gdColor :: Maybe Color
- _gdHoverColor :: Maybe Color
- _gdActiveColor :: Maybe Color
- _gdBorderColor :: Maybe Color
- _gdWidth :: Maybe Double
- _gdRadius :: Maybe Double
- _gdSeparate :: Maybe Bool
- _gdFill :: Maybe Bool
- _gdFillAlpha :: Maybe Double
- _gdDuration :: Maybe Millisecond
- _gdFinishedReq :: [WidgetRequest s e]
- _gdChangeReq :: [Int -> (Double, Double) -> WidgetRequest s e]
- _gdEnterReq :: [Int -> WidgetRequest s e]
- _gdLeaveReq :: [Int -> WidgetRequest s e]
- _gdClickReq :: [Int -> WidgetRequest s e]
- graphPoint :: (Double, Double) -> GraphData s e
- graphPoints :: [(Double, Double)] -> GraphData s e
- graphColor :: Color -> GraphData s e
- graphHoverColor :: Color -> GraphData s e
- graphActiveColor :: Color -> GraphData s e
- graphBorderColor :: Color -> GraphData s e
- graphWidth :: Double -> GraphData s e
- graphRadius :: Double -> GraphData s e
- graphSeparate :: GraphData s e
- graphSeparate_ :: Bool -> GraphData s e
- graphFill :: GraphData s e
- graphFill_ :: Bool -> GraphData s e
- graphFillAlpha :: Double -> GraphData s e
- graphDuration :: Millisecond -> GraphData s e
- graphOnFinished :: WidgetEvent e => e -> GraphData s e
- graphOnFinishedReq :: WidgetRequest s e -> GraphData s e
- graphOnChange :: WidgetEvent e => (Int -> (Double, Double) -> e) -> GraphData s e
- graphOnChangeReq :: (Int -> (Double, Double) -> WidgetRequest s e) -> GraphData s e
- graphOnEnter :: WidgetEvent e => (Int -> e) -> GraphData s e
- graphOnEnterReq :: (Int -> WidgetRequest s e) -> GraphData s e
- graphOnLeave :: WidgetEvent e => (Int -> e) -> GraphData s e
- graphOnLeaveReq :: (Int -> WidgetRequest s e) -> GraphData s e
- graphOnClick :: WidgetEvent e => (Int -> e) -> GraphData s e
- graphOnClickReq :: (Int -> WidgetRequest s e) -> GraphData s e
Documentation
Options for graph data:
graphPoint
: render single point.graphPoints
: use multiple points.graphColor
: set the color.graphHoverColor
: set the color of hovered point.graphActiveColor
: set the color of dragged point.graphBorderColor
: set the color of point border.graphWidth
: set the width of the line.graphRadius
: set the radius of the points.graphSeparate
: whether the points should be rendered separately.graphFill
: whether to fill the area surrounded by points.graphFillAlpha
: transparency level of the filled area.graphDuration
: how long the animation lasts in ms.graphOnFinished
: event to raise when animation is complete.graphOnFinishedReq
:WidgetRequest
to generate when animation is complete.graphOnChange
: event to raise when a point is dragged.graphOnChangeReq
:WidgetRequest
to generate when a point is dragged.graphOnEnter
: event to raise when mouse enters point area.graphOnEnterReq
:WidgetRequest
to generate when mouse enters point area.graphOnLeave
: event to raise when mouse leaves point area.graphOnLeaveReq
:WidgetRequest
to generate when mouse leaves point area.graphOnClick
: event to raise when a point is clicked.graphOnClickReq
:WidgetRequest
to generate when a point is clicked.
Constructors
GraphData | |
Fields
|
graphColor :: Color -> GraphData s e Source #
Set the color (if this option is not used then the graph will not be rendered).
graphHoverColor :: Color -> GraphData s e Source #
Set the color of hovered point (if this option is not used then
the color set by graphColor
is used).
graphActiveColor :: Color -> GraphData s e Source #
Set the color of dragged point (if this option is not used then
the color set by graphColor
is used).
graphBorderColor :: Color -> GraphData s e Source #
Set the color of point border. The width of the border will be half
the width set by graphWidth
.
graphWidth :: Double -> GraphData s e Source #
Width of the line connecting provided points. If only single point is rendered then its radius will be twice the width.
graphRadius :: Double -> GraphData s e Source #
Radius of the provided points if they are rendered separately. The
difference between graphWidth
and graphRadius
is that the former
is given in pixels and renders the same when the scale changes while
the latter is given in units of the Cartesian coordinate system and
hence the points become bigger or smaller when the scale changes.
graphSeparate :: GraphData s e Source #
Do not connect the points and render them separately. Used when all points in the collection must have the same color.
graphSeparate_ :: Bool -> GraphData s e Source #
Whether the points should be rendered separately.
graphFill_ :: Bool -> GraphData s e Source #
Whether to fill the area surrounded by provided points.
graphFillAlpha :: Double -> GraphData s e Source #
Transparency level of the filled area.
graphDuration :: Millisecond -> GraphData s e Source #
How long the animation lasts in ms. Animation starts when graph data changes (for example, point positions or color).
graphOnFinished :: WidgetEvent e => e -> GraphData s e Source #
Raises an event when animation is complete.
graphOnFinishedReq :: WidgetRequest s e -> GraphData s e Source #
Generates a WidgetRequest
when animation is complete.
graphOnChange :: WidgetEvent e => (Int -> (Double, Double) -> e) -> GraphData s e Source #
Raises an event when a point is dragged by passing its index and
new coordinates. This option is ignored if graphSeparate
is not
enabled.
graphOnChangeReq :: (Int -> (Double, Double) -> WidgetRequest s e) -> GraphData s e Source #
Generates a WidgetRequest
when a point is dragged by passing its
index and new coordinates. This option is ignored if graphSeparate
is not enabled.
graphOnEnter :: WidgetEvent e => (Int -> e) -> GraphData s e Source #
Raises an event when mouse enters point area by passing its index.
This option is ignored if graphSeparate
is not enabled.
graphOnEnterReq :: (Int -> WidgetRequest s e) -> GraphData s e Source #
Generates a WidgetRequest
when mouse enters point area by passing
its index. This option is ignored if graphSeparate
is not enabled.
graphOnLeave :: WidgetEvent e => (Int -> e) -> GraphData s e Source #
Raises an event when mouse leaves point area by passing its index.
This option is ignored if graphSeparate
is not enabled.
graphOnLeaveReq :: (Int -> WidgetRequest s e) -> GraphData s e Source #
Generates a WidgetRequest
when mouse leaves point area by passing
its index. This option is ignored if graphSeparate
is not enabled.
graphOnClick :: WidgetEvent e => (Int -> e) -> GraphData s e Source #
Raises an event when a point is clicked by passing its index. This
option is ignored if graphSeparate
is not enabled.
graphOnClickReq :: (Int -> WidgetRequest s e) -> GraphData s e Source #
Generates a WidgetRequest
when a point is clicked by passing its
index. This option is ignored if graphSeparate
is not enabled.