Package org.openrefine.browsing.facets
Class ScatterplotFacet.ScatterplotFacetConfig
- java.lang.Object
-
- org.openrefine.browsing.facets.ScatterplotFacet.ScatterplotFacetConfig
-
- All Implemented Interfaces:
Serializable
,FacetConfig
- Enclosing class:
- ScatterplotFacet
public static class ScatterplotFacet.ScatterplotFacetConfig extends Object implements FacetConfig, Serializable
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected String
baseColor_str
protected String
color_str
String
columnName_x
String
columnName_y
ScatterplotFacet.Dimension
dim_x
ScatterplotFacet.Dimension
dim_y
double
dot
protected String
expression_x
protected String
expression_y
double
fromX
double
fromY
double
maxX
double
maxY
double
minX
double
minY
protected String
name
ScatterplotFacet.Rotation
rotation
int
size
double
toX
double
toY
-
Constructor Summary
Constructors Constructor Description ScatterplotFacetConfig(String name, String expressionX, String expressionY, String columnNameX, String columnNameY, int size, String color, String baseColor, double dot, double fromX, Double toX, double fromY, double minX, double maxX, double minY, double maxY, Double toY, ScatterplotFacet.Dimension dimX, ScatterplotFacet.Dimension dimY, ScatterplotFacet.Rotation r)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ScatterplotFacet
apply(ColumnModel columnModel, Map<String,OverlayModel> overlayModels, long projectId)
Instantiates the given facet on a particular column model.Color
getBaseColor()
Color
getColor()
Set<String>
getColumnDependencies()
Computes the set of columns the facet depends on.Evaluable
getEvaluableX()
Evaluable
getEvaluableY()
String
getJsonType()
The facet type as stored in json.boolean
isNeutral()
A neutral facet is a facet that does not filter out any row, i.e. it is in its initial, reset state.ScatterplotFacet.ScatterplotFacetConfig
renameColumnDependencies(Map<String,String> substitutions)
Updates the facet config after a renaming of columns.
-
-
-
Field Detail
-
name
protected final String name
-
expression_x
protected final String expression_x
-
expression_y
protected final String expression_y
-
columnName_x
public final String columnName_x
-
columnName_y
public final String columnName_y
-
dim_x
public ScatterplotFacet.Dimension dim_x
-
dim_y
public ScatterplotFacet.Dimension dim_y
-
rotation
public ScatterplotFacet.Rotation rotation
-
fromX
public double fromX
-
toX
public double toX
-
fromY
public double fromY
-
toY
public double toY
-
minX
public double minX
-
maxX
public double maxX
-
minY
public double minY
-
maxY
public double maxY
-
dot
public final double dot
-
size
public final int size
-
color_str
protected String color_str
-
baseColor_str
protected String baseColor_str
-
-
Constructor Detail
-
ScatterplotFacetConfig
public ScatterplotFacetConfig(String name, String expressionX, String expressionY, String columnNameX, String columnNameY, int size, String color, String baseColor, double dot, double fromX, Double toX, double fromY, double minX, double maxX, double minY, double maxY, Double toY, ScatterplotFacet.Dimension dimX, ScatterplotFacet.Dimension dimY, ScatterplotFacet.Rotation r)
-
-
Method Detail
-
getColor
public Color getColor()
-
getBaseColor
public Color getBaseColor()
-
getJsonType
public String getJsonType()
Description copied from interface:FacetConfig
The facet type as stored in json.- Specified by:
getJsonType
in interfaceFacetConfig
-
getColumnDependencies
public Set<String> getColumnDependencies()
Description copied from interface:FacetConfig
Computes the set of columns the facet depends on. If the facet relies on an unknown set of columns, or if it is not row-wise, this returns null.- Specified by:
getColumnDependencies
in interfaceFacetConfig
- Returns:
- the set of column names the facet depends on.
-
renameColumnDependencies
public ScatterplotFacet.ScatterplotFacetConfig renameColumnDependencies(Map<String,String> substitutions)
Description copied from interface:FacetConfig
Updates the facet config after a renaming of columns.- Specified by:
renameColumnDependencies
in interfaceFacetConfig
- Returns:
- null if the update could not be performed, or the new facet config if the update could be performed.
-
isNeutral
public boolean isNeutral()
Description copied from interface:FacetConfig
A neutral facet is a facet that does not filter out any row, i.e. it is in its initial, reset state. Neutral facets are still useful to visualize the distribution of values in a column.- Specified by:
isNeutral
in interfaceFacetConfig
-
apply
public ScatterplotFacet apply(ColumnModel columnModel, Map<String,OverlayModel> overlayModels, long projectId)
Description copied from interface:FacetConfig
Instantiates the given facet on a particular column model. This allows to check the validity of the configuration against a particular table schema (checking that the dependent columns exist, for instance).- Specified by:
apply
in interfaceFacetConfig
- Parameters:
columnModel
- the header of the table the facet is applied to.overlayModels
- the overlay models of the table the facet is applied to (can be accessed by expressions evaluated by the facet)projectId
- the id of the project this facet is evaluated on- Returns:
- a computed facet on the given project.
-
getEvaluableX
public Evaluable getEvaluableX()
-
getEvaluableY
public Evaluable getEvaluableY()
-
-