Empirical
Public Types | Public Member Functions | Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE > Class Template Reference

#include <visualizations.h>

Inheritance diagram for emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >:
emp::web::D3Visualization emp::web::internal::WidgetFacet< D3Visualization > emp::web::Widget

Public Types

using INFO_TYPE = D3VisualizationInfo
 
using return_t = D3Visualization
 

Public Member Functions

 LineGraph (std::string x_var="", std::string y_var="", int w=800, int h=400)
 
 ~LineGraph ()
 
virtual void Setup ()
 
X_SCALE_TYPE * GetXScale ()
 
Y_SCALE_TYPE * GetYScale ()
 
D3::Axis< X_SCALE_TYPE > * GetXAxis ()
 
D3::Axis< Y_SCALE_TYPE > * GetYAxis ()
 
D3::LineGeneratorGetLineGenerator ()
 
D3::CSVDatasetGetDataset ()
 
D3::ToolTipGetToolTip ()
 
std::function< double(DATA_TYPE)> GetXAccessor ()
 
std::function< double(DATA_TYPE)> GetYAccessor ()
 
std::function< double(DATA_TYPE)> GetScaledX ()
 
std::function< double(DATA_TYPE)> GetScaledY ()
 
void SetXScale (X_SCALE_TYPE *scale)
 
void SetYScale (Y_SCALE_TYPE *scale)
 
void SetXAxis (D3::Axis< X_SCALE_TYPE > *ax)
 
void SetYAxis (D3::Axis< Y_SCALE_TYPE > *ax)
 
void SetLineGenerator (D3::LineGenerator *line)
 
void SetDataset (D3::CSVDataset *d)
 
void SetTooltipFunction (std::string func)
 
void SetXAccessor (std::string func)
 
void SetYAccessor (std::string func)
 
void DrawPointsFromDataset ()
 Draw points and lines for data in this object's dataset object. More...
 
void LoadDataFromFile (std::string filename)
 Load data from the file at [filename]. Expected to be a CSV dataset. More...
 
void AddDataPoint (DATA_TYPE data_point)
 Smoothly (i.e. with animation) add data_point to the graph. More...
 
template<typename T >
void Redraw (D3::SelectionOrTransition< T > &s)
 
void DrawData (bool backlog=false)
 
void Clear ()
 
int GetWidth () const
 
double GetWidth ()
 Get the width of this Widget on screen. More...
 
int GetHeight () const
 
double GetHeight ()
 Get the height of this Widget on screen. More...
 
D3::SelectionGetSVG ()
 
std::string GetID ()
 
const std::string & GetID () const
 What is the HTML string ID for this Widget? More...
 
void SetDrawCallback (std::string func)
 
void CallDrawCallback ()
 
return_tSetCSS (const std::string &setting, SETTING_TYPE &&value)
 Set a specific CSS value for this widget. More...
 
return_tSetCSS (const std::string &setting1, T1 &&val1, const std::string &setting2, T2 &&val2, OTHER_SETTINGS...others)
 Multiple CSS settings can be provided simultaneously. More...
 
return_tSetCSS (const Style &in_style)
 
return_tSetAttr (const std::string &setting, SETTING_TYPE &&value)
 Set a specific Attribute value for this widget. More...
 
return_tSetAttr (const std::string &setting1, T1 &&val1, const std::string &setting2, T2 &&val2, OTHER_SETTINGS...others)
 Multiple Attributes can be provided simultaneously. More...
 
return_tSetAttr (const Attributes &in_attr)
 
return_tOn (const std::string &event_name, const std::function< void()> &fun)
 
return_tOn (const std::string &event_name, const std::function< void(MouseEvent evt)> &fun)
 
return_tOn (const std::string &event_name, const std::function< void(double, double)> &fun)
 
return_tOnResize (T &&arg)
 Provide a function to be called when the window is resized. More...
 
return_tOnClick (T &&arg)
 Provide a function to be called when the mouse button is clicked in this Widget. More...
 
return_tOnDoubleClick (T &&arg)
 Provide a function to be called when the mouse button is double clicked in this Widget. More...
 
return_tOnMouseDown (T &&arg)
 Provide a function to be called when the mouse button is pushed down in this Widget. More...
 
return_tOnMouseUp (T &&arg)
 Provide a function to be called when the mouse button is released in this Widget. More...
 
return_tOnMouseMove (T &&arg)
 Provide a function to be called whenever the mouse moves in this Widget. More...
 
return_tOnMouseOut (T &&arg)
 Provide a function to be called whenever the mouse leaves the Widget. More...
 
return_tOnMouseOver (T &&arg)
 Provide a function to be called whenever the mouse moves over the Widget. More...
 
return_tOnMouseWheel (T &&arg)
 Provide a function to be called whenever the mouse wheel moves in this Widget. More...
 
return_tOnKeydown (T &&arg)
 Provide a function to be called whenever a key is pressed down in this Widget. More...
 
return_tOnKeypress (T &&arg)
 Provide a function to be called whenever a key is pressed down and released in this Widget. More...
 
return_tOnKeyup (T &&arg)
 Provide a function to be called whenever a key is pressed released in this Widget. More...
 
return_tOnCopy (T &&arg)
 Provide a function to be called whenever text is copied in this Widget. More...
 
return_tOnCut (T &&arg)
 Provide a function to be called whenever text is cut in this Widget. More...
 
return_tOnPaste (T &&arg)
 Provide a function to be called whenever text is pasted in this Widget. More...
 
return_tSetWidth (double w, const std::string &unit="px")
 
return_tSetHeight (double h, const std::string &unit="px")
 
return_tSetSize (double w, double h, const std::string &unit="px")
 
return_tCenter ()
 Move this widget to the center of its container. More...
 
return_tSetPosition (int x, int y, const std::string &unit="px", const std::string &pos_type="absolute", const std::string &x_anchor="left", const std::string &y_anchor="top")
 Set the x-y position of this widget within its container. More...
 
return_tSetPositionRT (int x, int y, const std::string &unit="px")
 Set the x-y position of this Widget within its container, using the TOP-RIGHT as an anchor. More...
 
return_tSetPositionRB (int x, int y, const std::string &unit="px")
 Set the x-y position of this Widget within its container, using the BOTTOM-RIGHT as an anchor. More...
 
return_tSetPositionLB (int x, int y, const std::string &unit="px")
 Set the x-y position of this Widget within its container, using the BOTTOM-LEFT as an anchor. More...
 
return_tSetPositionFixed (int x, int y, const std::string &unit="px")
 Set the x-y position of this Widget, fixed within the browser window. More...
 
return_tSetPositionFixedRT (int x, int y, const std::string &unit="px")
 Set the x-y position of the top-right corner this Widget, fixed within the browser window. More...
 
return_tSetPositionFixedRB (int x, int y, const std::string &unit="px")
 Set the x-y position of the bottom-right corner this Widget, fixed within the browser window. More...
 
return_tSetPositionFixedLB (int x, int y, const std::string &unit="px")
 Set the x-y position of the bottom-left corner this Widget, fixed within the browser window. More...
 
return_tSetFloat (const std::string &f="left")
 Set this Widget to float appropriately within its containter. More...
 
return_tSetOverflow (const std::string &o="auto")
 Setup how this Widget should handle overflow. More...
 
return_tSetScroll ()
 Setup how this Widget to always have scrollbars. More...
 
return_tSetScrollAuto ()
 Setup how this Widget to have scrollbars if needed for overflow. More...
 
return_tSetResizable ()
 Setup how this Widget to be user-resizable. More...
 
return_tSetResizableX ()
 Setup how this Widget for the x only to be user-resizable. More...
 
return_tSetResizableY ()
 Setup how this Widget for the y only to be user-resizable. More...
 
return_tSetResizableOff ()
 Setup how this Widget to NOT be resizable. More...
 
return_tSetFont (const Font &font)
 Provide a Font object to setup the font for this widget. More...
 
return_tSetFont (const std::string &font)
 Setup the Font to be used in this Widget. More...
 
return_tSetFontSize (int s)
 Setup the size of the Font to be used in this Widget. More...
 
return_tSetFontSizeVW (double s)
 Setup the size of the Font to be used in this Widget in units of % of viewport width. More...
 
return_tSetCenterText ()
 Align text to be centered. More...
 
return_tSetBackground (const std::string &v)
 Set the background color of this Widget. More...
 
return_tSetColor (const std::string &v)
 Set the foreground color of this Widget. More...
 
return_tSetOpacity (double v)
 Set the opacity level of this Widget. More...
 
return_tSetBorder (const std::string &border_info)
 Set information about the Widget board. More...
 
return_tSetPadding (double p, const std::string &unit="px")
 The the number of pixels (or alternate unit) for the padding around cells (used with Tables) More...
 
bool IsNull () const
 Test if this widget is valid. More...
 
std::string InfoTypeName () const
 Some debugging helpers... More...
 
bool IsInactive () const
 Test if the activity state of this widget is currently INACTIVE. More...
 
bool IsWaiting () const
 Test if the activity state of this widget is currently WAITING. More...
 
bool IsFrozen () const
 Test if the activity state of this widget is currently FROZEN. More...
 
bool IsActive () const
 Test if the activity state of this widget is currently ACTIVE. More...
 
bool AppendOK () const
 Is it okay to add more internal Widgets into this one? More...
 
void PreventAppend ()
 Disallow further appending to this Widget. More...
 
bool IsButton () const
 Is this Widget a Button? More...
 
bool IsCanvas () const
 Is this Widget a Canvas? More...
 
bool IsImage () const
 Is this Widget an Image? More...
 
bool IsSelector () const
 Is this Widget a Selector? More...
 
bool IsDiv () const
 Is this Widget a Div? More...
 
bool IsTable () const
 Is this Widget a Table? More...
 
bool IsText () const
 Is this Widget a Text? More...
 
virtual std::string GetCSS (const std::string &setting)
 
virtual bool HasCSS (const std::string &setting)
 Determine is a CSS trait has been set on this Widget. More...
 
virtual std::string GetAttr (const std::string &setting)
 Retrieve a specific attribute associated with this Widget. More...
 
virtual bool HasAttr (const std::string &setting)
 Determine is an attribute has been set on this Widget. More...
 
bool operator== (const Widget &in) const
 Are two Widgets refering to the same HTML object? More...
 
bool operator!= (const Widget &in) const
 Are two Widgets refering to differnt HTML objects? More...
 
 operator bool () const
 Conver Widget to bool (I.e., is this Widget active?) More...
 
double GetXPos ()
 Get the X-position of this Widget within its parent. More...
 
double GetYPos ()
 Get the Y-position of this Widget within its parent. More...
 
double GetInnerWidth ()
 Get the width of this Widget not including padding. More...
 
double GetInnerHeight ()
 Get the height of this Widget not including padding. More...
 
double GetOuterWidth ()
 Get the width of this Widget including all padding. More...
 
double GetOuterHeight ()
 Get the height of this Widget including all padding. More...
 
void Activate ()
 Make this widget live, so changes occur immediately (once document is ready) More...
 
void Freeze ()
 Record changes internally, but keep static screen until Activate() is called. More...
 
virtual void Deactivate (bool top_level=true)
 
bool ToggleActive ()
 Doggle between Active and Deactivated. More...
 
void Redraw ()
 Clear and redraw the current widget on the screen. More...
 
WidgetFind (const std::string &test_name)
 Look up previously created elements, by type. More...
 
WidgetAddDependant (const Widget &w)
 Add a dependant to this Widget that should be redrawn when it is. More...
 
virtual void PrepareAppend ()
 Setup << operator to redirect to Append; option preparation can be overridden. More...
 
template<typename IN_TYPE >
Widget operator<< (IN_TYPE &&in_val)
 
std::string GetInfoType () const
 Debug... More...
 

Public Attributes

D3::Selection exit
 
emp::vector< std::string > variables
 
FunctionSet< void()> pending_funcs
 
bool init = false
 
std::string draw_data_callback = "__default_draw_data_callback"
 Callback function for drawing data after rescale animation. More...
 

Protected Types

enum  ActivityState { INACTIVE, WAITING, FROZEN, ACTIVE }
 
using WidgetInfo = internal::WidgetInfo
 

Protected Member Functions

D3VisualizationInfoInfo ()
 
const D3VisualizationInfoInfo () const
 
virtual void DoCSS (const std::string &setting, const std::string &value)
 
virtual void DoAttr (const std::string &setting, const std::string &value)
 
virtual void DoListen (const std::string &event_name, size_t fun_id)
 
template<typename FWD_TYPE >
WidgetForwardAppend (FWD_TYPE &&arg)
 If an Append doesn't work with current class, forward it to the parent and try there. More...
 
WidgetSetInfo (WidgetInfo *in_info)
 Set the information associated with this widget. More...
 
WidgetInfooperator-> ()
 Internally, we can treat a Widget as a pointer to its WidgetInfo. More...
 

Static Protected Member Functions

static WidgetInfoInfo (const Widget &w)
 Give derived classes the ability to access widget info. More...
 

Protected Attributes

double y_min = 1000
 
double y_max = 0
 
double x_min = 1000
 
double x_max = 0
 
X_SCALE_TYPE * x_scale
 
Y_SCALE_TYPE * y_scale
 
D3::Axis< X_SCALE_TYPE > * x_axis
 
D3::Axis< Y_SCALE_TYPE > * y_axis
 
D3::LineGeneratorline_gen
 
D3::ToolTiptip
 
D3::CSVDatasetdataset
 
std::deque< DATA_TYPE > data
 
DATA_TYPE prev_data = {{-1,-1}}
 
std::function< double(DATA_TYPE)> return_x = [](DATA_TYPE d){ return d[0]; }
 
std::function< double(DATA_TYPE)> return_y = [](DATA_TYPE d){ return d[1]; }
 
std::function< double(DATA_TYPE)> y
 
std::function< double(DATA_TYPE)> x
 
double axis_width = 60
 
double y_margin = 10
 
double x_margin = 30
 
WidgetInfoinfo
 Information associated with this widget. More...
 

Static Protected Attributes

static const std::string no_name = "(none)"
 Default name for un-initialized widgets. More...
 

Member Typedef Documentation

Member Enumeration Documentation

enum emp::web::Widget::ActivityState
protectedinherited

Four activity states for any widget: INACTIVE - Not be in DOM at all. WAITING - Will become active once the page finishes loading. FROZEN - Part of DOM, but not updating on the screen. ACTIVE - Fully active; changes are reflected as they happen.

Enumerator
INACTIVE 
WAITING 
FROZEN 
ACTIVE 

Constructor & Destructor Documentation

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::LineGraph ( std::string  x_var = "",
std::string  y_var = "",
int  w = 800,
int  h = 400 
)
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::~LineGraph ( )
inline

Member Function Documentation

void emp::web::Widget::Activate ( )
inherited

Make this widget live, so changes occur immediately (once document is ready)

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::AddDataPoint ( DATA_TYPE  data_point)
inline

Smoothly (i.e. with animation) add data_point to the graph.

Widget & emp::web::Widget::AddDependant ( const Widget w)
inherited

Add a dependant to this Widget that should be redrawn when it is.

bool emp::web::Widget::AppendOK ( ) const
inherited

Is it okay to add more internal Widgets into this one?

void emp::web::D3Visualization::CallDrawCallback ( )
inlineinherited
return_t& emp::web::internal::WidgetFacet< D3Visualization >::Center ( )
inlineinherited

Move this widget to the center of its container.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::Clear ( )
inline
void emp::web::Widget::Deactivate ( bool  top_level = true)
virtualinherited

Record changes internally and REMOVE from screen until Activate is called. (Argument is for recursive, internal use only.)

Reimplemented in emp::web::Div.

virtual void emp::web::internal::WidgetFacet< D3Visualization >::DoAttr ( const std::string &  setting,
const std::string &  value 
)
inlineprotectedvirtualinherited

Attr-related options may be overridden in derived classes that have multiple attributes. By default DoAttr will track the new information and apply it (if active) to the widget.

virtual void emp::web::internal::WidgetFacet< D3Visualization >::DoCSS ( const std::string &  setting,
const std::string &  value 
)
inlineprotectedvirtualinherited

CSS-related options may be overridden in derived classes that have multiple styles. By default DoCSS will track the new information and apply it (if active) to the widget.

virtual void emp::web::internal::WidgetFacet< D3Visualization >::DoListen ( const std::string &  event_name,
size_t  fun_id 
)
inlineprotectedvirtualinherited

Listener options may be overridden in derived classes that have multiple listen targets. By default DoListen will track new listens and set them up immediately, if active.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::DrawData ( bool  backlog = false)
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::DrawPointsFromDataset ( )
inline

Draw points and lines for data in this object's dataset object.

Widget& emp::web::Widget::Find ( const std::string &  test_name)
inherited

Look up previously created elements, by type.

template<typename FWD_TYPE >
Widget& emp::web::Widget::ForwardAppend ( FWD_TYPE &&  arg)
protectedinherited

If an Append doesn't work with current class, forward it to the parent and try there.

void emp::web::Widget::Freeze ( )
inherited

Record changes internally, but keep static screen until Activate() is called.

std::string emp::web::Widget::GetAttr ( const std::string &  setting)
virtualinherited

Retrieve a specific attribute associated with this Widget.

std::string emp::web::Widget::GetCSS ( const std::string &  setting)
virtualinherited

Retrieve a specific CSS trait associated with this Widget. Note: CSS-related options may be overridden in derived classes that have multiple styles.

Reimplemented in emp::web::TableWidget, emp::web::TableCell, emp::web::TableCol, emp::web::TableColGroup, emp::web::TableRowGroup, and emp::web::TableRow.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::CSVDataset* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetDataset ( )
inline
int emp::web::D3Visualization::GetHeight ( ) const
inlineinherited
double emp::web::Widget::GetHeight ( )
inherited

Get the height of this Widget on screen.

std::string emp::web::D3Visualization::GetID ( )
inlineinherited
const std::string & emp::web::Widget::GetID ( ) const
inherited

What is the HTML string ID for this Widget?

std::string emp::web::Widget::GetInfoType ( ) const
inherited

Debug...

double emp::web::Widget::GetInnerHeight ( )
inherited

Get the height of this Widget not including padding.

double emp::web::Widget::GetInnerWidth ( )
inherited

Get the width of this Widget not including padding.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::LineGenerator* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetLineGenerator ( )
inline
double emp::web::Widget::GetOuterHeight ( )
inherited

Get the height of this Widget including all padding.

double emp::web::Widget::GetOuterWidth ( )
inherited

Get the width of this Widget including all padding.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetScaledX ( )
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetScaledY ( )
inline
D3::Selection* emp::web::D3Visualization::GetSVG ( )
inlineinherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::ToolTip* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetToolTip ( )
inline
int emp::web::D3Visualization::GetWidth ( ) const
inlineinherited
double emp::web::Widget::GetWidth ( )
inherited

Get the width of this Widget on screen.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetXAccessor ( )
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::Axis<X_SCALE_TYPE>* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetXAxis ( )
inline
double emp::web::Widget::GetXPos ( )
inherited

Get the X-position of this Widget within its parent.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
X_SCALE_TYPE* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetXScale ( )
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetYAccessor ( )
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::Axis<Y_SCALE_TYPE>* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetYAxis ( )
inline
double emp::web::Widget::GetYPos ( )
inherited

Get the Y-position of this Widget within its parent.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
Y_SCALE_TYPE* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::GetYScale ( )
inline
bool emp::web::Widget::HasAttr ( const std::string &  setting)
virtualinherited

Determine is an attribute has been set on this Widget.

bool emp::web::Widget::HasCSS ( const std::string &  setting)
virtualinherited

Determine is a CSS trait has been set on this Widget.

D3VisualizationInfo* emp::web::D3Visualization::Info ( )
inlineprotectedinherited
const D3VisualizationInfo* emp::web::D3Visualization::Info ( ) const
inlineprotectedinherited
static WidgetInfo* emp::web::Widget::Info ( const Widget w)
inlinestaticprotectedinherited

Give derived classes the ability to access widget info.

std::string emp::web::Widget::InfoTypeName ( ) const
inherited

Some debugging helpers...

bool emp::web::Widget::IsActive ( ) const
inherited

Test if the activity state of this widget is currently ACTIVE.

bool emp::web::Widget::IsButton ( ) const
inherited

Is this Widget a Button?

bool emp::web::Widget::IsCanvas ( ) const
inherited

Is this Widget a Canvas?

bool emp::web::Widget::IsDiv ( ) const
inherited

Is this Widget a Div?

bool emp::web::Widget::IsFrozen ( ) const
inherited

Test if the activity state of this widget is currently FROZEN.

bool emp::web::Widget::IsImage ( ) const
inherited

Is this Widget an Image?

bool emp::web::Widget::IsInactive ( ) const
inherited

Test if the activity state of this widget is currently INACTIVE.

bool emp::web::Widget::IsNull ( ) const
inlineinherited

Test if this widget is valid.

bool emp::web::Widget::IsSelector ( ) const
inherited

Is this Widget a Selector?

bool emp::web::Widget::IsTable ( ) const
inherited

Is this Widget a Table?

bool emp::web::Widget::IsText ( ) const
inherited

Is this Widget a Text?

bool emp::web::Widget::IsWaiting ( ) const
inherited

Test if the activity state of this widget is currently WAITING.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::LoadDataFromFile ( std::string  filename)
inline

Load data from the file at [filename]. Expected to be a CSV dataset.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::On ( const std::string &  event_name,
const std::function< void()> &  fun 
)
inlineinherited

Provide an event and a function that will be called when that event is triggered. In this case, the function as no arguments.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::On ( const std::string &  event_name,
const std::function< void(MouseEvent evt)> &  fun 
)
inlineinherited

Provide an event and a function that will be called when that event is triggered. In this case, the function takes a mouse event as an argument, with full info about mouse.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::On ( const std::string &  event_name,
const std::function< void(double, double)> &  fun 
)
inlineinherited

Provide an event and a function that will be called when that event is triggered. In this case, the function takes two doubles which will be filled in with mouse coordinates.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnClick ( T &&  arg)
inlineinherited

Provide a function to be called when the mouse button is clicked in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnCopy ( T &&  arg)
inlineinherited

Provide a function to be called whenever text is copied in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnCut ( T &&  arg)
inlineinherited

Provide a function to be called whenever text is cut in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnDoubleClick ( T &&  arg)
inlineinherited

Provide a function to be called when the mouse button is double clicked in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnKeydown ( T &&  arg)
inlineinherited

Provide a function to be called whenever a key is pressed down in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnKeypress ( T &&  arg)
inlineinherited

Provide a function to be called whenever a key is pressed down and released in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnKeyup ( T &&  arg)
inlineinherited

Provide a function to be called whenever a key is pressed released in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnMouseDown ( T &&  arg)
inlineinherited

Provide a function to be called when the mouse button is pushed down in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnMouseMove ( T &&  arg)
inlineinherited

Provide a function to be called whenever the mouse moves in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnMouseOut ( T &&  arg)
inlineinherited

Provide a function to be called whenever the mouse leaves the Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnMouseOver ( T &&  arg)
inlineinherited

Provide a function to be called whenever the mouse moves over the Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnMouseUp ( T &&  arg)
inlineinherited

Provide a function to be called when the mouse button is released in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnMouseWheel ( T &&  arg)
inlineinherited

Provide a function to be called whenever the mouse wheel moves in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnPaste ( T &&  arg)
inlineinherited

Provide a function to be called whenever text is pasted in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::OnResize ( T &&  arg)
inlineinherited

Provide a function to be called when the window is resized.

emp::web::Widget::operator bool ( ) const
inlineinherited

Conver Widget to bool (I.e., is this Widget active?)

bool emp::web::Widget::operator!= ( const Widget in) const
inlineinherited

Are two Widgets refering to differnt HTML objects?

WidgetInfo* emp::web::Widget::operator-> ( )
inlineprotectedinherited

Internally, we can treat a Widget as a pointer to its WidgetInfo.

template<typename IN_TYPE >
Widget emp::web::Widget::operator<< ( IN_TYPE &&  in_val)
inherited
bool emp::web::Widget::operator== ( const Widget in) const
inlineinherited

Are two Widgets refering to the same HTML object?

virtual void emp::web::Widget::PrepareAppend ( )
inlinevirtualinherited

Setup << operator to redirect to Append; option preparation can be overridden.

Reimplemented in emp::web::TableWidget.

void emp::web::Widget::PreventAppend ( )
inherited

Disallow further appending to this Widget.

void emp::web::Widget::Redraw ( )
inherited

Clear and redraw the current widget on the screen.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
template<typename T >
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::Redraw ( D3::SelectionOrTransition< T > &  s)
inline

Redraws all data on the given selection or transition, which should contain an SVG canvas. Useful if you've adjusted scales.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetAttr ( const std::string &  setting,
SETTING_TYPE &&  value 
)
inlineinherited

Set a specific Attribute value for this widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetAttr ( const std::string &  setting1,
T1 &&  val1,
const std::string &  setting2,
T2 &&  val2,
OTHER_SETTINGS...  others 
)
inlineinherited

Multiple Attributes can be provided simultaneously.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetAttr ( const Attributes in_attr)
inlineinherited

Allow multiple Attr settings to be provided as a single object. (still go through DoAttr given need for virtual re-routing.)

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetBackground ( const std::string &  v)
inlineinherited

Set the background color of this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetBorder ( const std::string &  border_info)
inlineinherited

Set information about the Widget board.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetCenterText ( )
inlineinherited

Align text to be centered.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetColor ( const std::string &  v)
inlineinherited

Set the foreground color of this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetCSS ( const std::string &  setting,
SETTING_TYPE &&  value 
)
inlineinherited

Set a specific CSS value for this widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetCSS ( const std::string &  setting1,
T1 &&  val1,
const std::string &  setting2,
T2 &&  val2,
OTHER_SETTINGS...  others 
)
inlineinherited

Multiple CSS settings can be provided simultaneously.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetCSS ( const Style in_style)
inlineinherited

Allow multiple CSS settings to be provided as a single object. (still go through DoCSS given need for virtual re-routing.)

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetDataset ( D3::CSVDataset d)
inline
void emp::web::D3Visualization::SetDrawCallback ( std::string  func)
inlineinherited

This callback function will be called every time data is done being drawn. Can be a string represnting the name of a function in Javascript (can be in the current window, the emp namespace, or the d3 namespace)

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetFloat ( const std::string &  f = "left")
inlineinherited

Set this Widget to float appropriately within its containter.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetFont ( const Font font)
inlineinherited

Provide a Font object to setup the font for this widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetFont ( const std::string &  font)
inlineinherited

Setup the Font to be used in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetFontSize ( int  s)
inlineinherited

Setup the size of the Font to be used in this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetFontSizeVW ( double  s)
inlineinherited

Setup the size of the Font to be used in this Widget in units of % of viewport width.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetHeight ( double  h,
const std::string &  unit = "px" 
)
inlineinherited

Update the height of this Widget.

Parameters
unitdefaults to pixels ("px"), but can also be a measured distance (e.g, "inches") or a percentage("%")
Widget & emp::web::Widget::SetInfo ( WidgetInfo in_info)
protectedinherited

Set the information associated with this widget.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetLineGenerator ( D3::LineGenerator line)
inline
return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetOpacity ( double  v)
inlineinherited

Set the opacity level of this Widget.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetOverflow ( const std::string &  o = "auto")
inlineinherited

Setup how this Widget should handle overflow.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPadding ( double  p,
const std::string &  unit = "px" 
)
inlineinherited

The the number of pixels (or alternate unit) for the padding around cells (used with Tables)

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPosition ( int  x,
int  y,
const std::string &  unit = "px",
const std::string &  pos_type = "absolute",
const std::string &  x_anchor = "left",
const std::string &  y_anchor = "top" 
)
inlineinherited

Set the x-y position of this widget within its container.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionFixed ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of this Widget, fixed within the browser window.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionFixedLB ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of the bottom-left corner this Widget, fixed within the browser window.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionFixedRB ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of the bottom-right corner this Widget, fixed within the browser window.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionFixedRT ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of the top-right corner this Widget, fixed within the browser window.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionLB ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of this Widget within its container, using the BOTTOM-LEFT as an anchor.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionRB ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of this Widget within its container, using the BOTTOM-RIGHT as an anchor.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetPositionRT ( int  x,
int  y,
const std::string &  unit = "px" 
)
inlineinherited

Set the x-y position of this Widget within its container, using the TOP-RIGHT as an anchor.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetResizable ( )
inlineinherited

Setup how this Widget to be user-resizable.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetResizableOff ( )
inlineinherited

Setup how this Widget to NOT be resizable.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetResizableX ( )
inlineinherited

Setup how this Widget for the x only to be user-resizable.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetResizableY ( )
inlineinherited

Setup how this Widget for the y only to be user-resizable.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetScroll ( )
inlineinherited

Setup how this Widget to always have scrollbars.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetScrollAuto ( )
inlineinherited

Setup how this Widget to have scrollbars if needed for overflow.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetSize ( double  w,
double  h,
const std::string &  unit = "px" 
)
inlineinherited

Update the size (width and height) of this widget.

Parameters
unitdefaults to pixels ("px"), but can also be a measured distance (e.g, "inches") or a percentage("%")
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetTooltipFunction ( std::string  func)
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
virtual void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::Setup ( )
inlinevirtual

Initializes the graph. This function is called automatically when the emp::Document this has been added to is ready.

Reimplemented from emp::web::D3Visualization.

return_t& emp::web::internal::WidgetFacet< D3Visualization >::SetWidth ( double  w,
const std::string &  unit = "px" 
)
inlineinherited

Update the width of this Widget.

Parameters
unitdefaults to pixels ("px"), but can also be a measured distance (e.g, "inches") or a percentage("%")
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetXAccessor ( std::string  func)
inline

Set the function that is used to get the x variable from within a DATA_TYPE object. For instance, the default accessor assumes that DATA_TYPE is an array with two elements (x, y): [](DATA_TYPE d) {return d[0];} This accessor will be fed into the x_scale to get x values scaled to the plotting area. Can be a string represnting the name of a function in Javascript (can be in the current window, the emp namespace, or the d3 namespace)

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetXAxis ( D3::Axis< X_SCALE_TYPE > *  ax)
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetXScale ( X_SCALE_TYPE *  scale)
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetYAccessor ( std::string  func)
inline

Set the function that is used to get the y variable from within a DATA_TYPE object. For instance, the default accessor assumes that DATA_TYPE is an array with two elements (x, y): [](DATA_TYPE d) {return d[1];} This accessor will be fed into the y_scale to get y values scaled to the plotting area. Can be a string represnting the name of a function in Javascript (can be in the current window, the emp namespace, or the d3 namespace)

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetYAxis ( D3::Axis< Y_SCALE_TYPE > *  ax)
inline
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
void emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::SetYScale ( Y_SCALE_TYPE *  scale)
inline
bool emp::web::Widget::ToggleActive ( )
inherited

Doggle between Active and Deactivated.

Member Data Documentation

double emp::web::D3Visualization::axis_width = 60
protectedinherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::deque<DATA_TYPE> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::data
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::CSVDataset* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::dataset
protected
std::string emp::web::D3Visualization::draw_data_callback = "__default_draw_data_callback"
inherited

Callback function for drawing data after rescale animation.

template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::Selection emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::exit
WidgetInfo* emp::web::Widget::info
protectedinherited

Information associated with this widget.

bool emp::web::D3Visualization::init = false
inherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::LineGenerator* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::line_gen
protected
const std::string emp::web::Widget::no_name = "(none)"
staticprotectedinherited

Default name for un-initialized widgets.

FunctionSet<void()> emp::web::D3Visualization::pending_funcs
inherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
DATA_TYPE emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::prev_data = {{-1,-1}}
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::return_x = [](DATA_TYPE d){ return d[0]; }
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::return_y = [](DATA_TYPE d){ return d[1]; }
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::ToolTip* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::tip
protected
emp::vector<std::string> emp::web::D3Visualization::variables
inherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::x
protected
Initial value:
= [this](DATA_TYPE d){
return x_scale->ApplyScale(this->return_x(d));
}
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::Axis<X_SCALE_TYPE>* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::x_axis
protected
double emp::web::D3Visualization::x_margin = 30
protectedinherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
double emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::x_max = 0
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
double emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::x_min = 1000
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
X_SCALE_TYPE* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::x_scale
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
std::function<double(DATA_TYPE)> emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::y
protected
Initial value:
= [this](DATA_TYPE d){
return y_scale->ApplyScale(this->return_y(d));
}
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
D3::Axis<Y_SCALE_TYPE>* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::y_axis
protected
double emp::web::D3Visualization::y_margin = 10
protectedinherited
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
double emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::y_max = 0
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
double emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::y_min = 1000
protected
template<typename DATA_TYPE = emp::array<double, 2>, typename X_SCALE_TYPE = D3::LinearScale, typename Y_SCALE_TYPE = D3::LinearScale>
Y_SCALE_TYPE* emp::web::LineGraph< DATA_TYPE, X_SCALE_TYPE, Y_SCALE_TYPE >::y_scale
protected

The documentation for this class was generated from the following file: