Skip to content

Commit

Permalink
Merge branch 'develop' into Issue-#2196
Browse files Browse the repository at this point in the history
  • Loading branch information
01es committed Apr 17, 2024
2 parents 63678ed + b2b6550 commit 6d6f10b
Show file tree
Hide file tree
Showing 30 changed files with 2,025 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ public DomElement render() {
.attr("data-change-reason", "[[dataChangeReason]]")
.attr("retrieved-entities", "{{retrievedEntities}}")
.attr("all-retrieved-entities", "{{allRetrievedEntities}}")
.attr("rendering-hints", "{{renderingHints}}")
.attr("all-rendering-hints", "{{allRenderingHints}}")
.attr("retrieved-totals", "{{retrievedTotals}}")
.attr("centre-selection", "[[centreSelection]]")
.attr("centre-state", "[[currentState]]")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.web.centre.api.actions.EntityActionConfig;

/**
* A contract for specifying a tap/double-click action for data points in a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotAction<T extends AbstractEntity<?>> extends IScatterPlotDone<T> {

/**
* Assigns an action for a scatter plot.
*
* @param action
* @return
*/
IScatterPlotDone<T> withAction(EntityActionConfig action);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

/**
* A contract to obtain a string representation for a data source and a property name within the data source to calculate the boundaries of values for a scatter plot axis (OY or OX).
*
* @author TG Team
*/
public interface IScatterPlotAxisBoundaryConfig {

/**
* Returns a string representation of a data source and a property name within the data source to calculate the boundaries of values for a scatter plot axis (OY or OX).
* @return
*/
String getSource();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.processors.metamodel.IConvertableToPath;

/**
* A contract to specify a property name that references the data used for calculating the boundaries of values for a scatter plot axis.
*
* @author TG Team
*/
public interface IScatterPlotAxisBoundaryProp {

/**
* Sets a property name that references the data used for calculating the boundaries of values for a scatter plot axis.
*
* @param propertyName
* @return
*/
IScatterPlotAxisBoundaryConfig prop(IConvertableToPath propertyName);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract for specifying the bottom margin of a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotBottomMargin<T extends AbstractEntity<?>> extends IScatterPlotRightMargin<T> {

IScatterPlotRightMargin<T> bottomMargin(int px);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract to specify a title for the domain axis (x-axis) of a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotDomainAxisTitle<T extends AbstractEntity<?>> extends IScatterPlotTopMargin<T> {

IScatterPlotTopMargin<T> withDomainAxisTitle(String title);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.processors.metamodel.IConvertableToPath;

/**
* A contract to specify property name and axis boundary configuration that is used to configure the domain axis for scatter plot (x-axis).
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotDomainProperty<T extends AbstractEntity<?>> {

/**
* Assigns property name and configuration of x-axis range
*
* @param propertyName
* @return
*/
IScatterPlotStyleProperty<T> configDomainProperty(IConvertableToPath propertyName, IScatterPlotAxisBoundaryConfig axisBoundaryConfig);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.web.view.master.api.IMaster;

/**
* A contract to complete a scatter plot configuration.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotDone<T extends AbstractEntity<?>> {

/**
* Indicates the end of a scatter plot configuration.
*
* @return
*/
IMaster<T> done();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract to specify a type of entities that are displayed on a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotEntityType<T extends AbstractEntity<?>> {

/**
* Specifies a type of entities displayed on a scatter plot.
*
* @param entityType
* @return
*/
IScatterPlotRangeProperty<T> setChartEntityType(Class<? extends AbstractEntity<?>> entityType);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract for specifying the left margin of a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotLeftMargin<T extends AbstractEntity<?>> extends IScatterPlotBottomMargin<T> {

IScatterPlotBottomMargin<T> leftMargin(int px);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

import java.util.Map;

/**
* A contract to specify a legend item for a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotLegend <T extends AbstractEntity<?>> extends IScatterPlotAction<T> {

/**
* Adds a new legend item to a scatter plot legend.
*
* @param style specifies a style for corresponding data points, rendered by a scatter plot.
* @param title a textual description of the data points rendered with the specified style.
* @return
*/
IScatterPlotLegend<T> addLegendItem(Map<String, String> style, String title);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract to start a configuration for a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotMasterBuilder<T extends AbstractEntity<?>> {

/**
* Starts a scatter plot configuration for a specified master entity type that gets executed/saved upon opening.
* This execution/saving is useful if one needs to do some computation before the data can be rendered.
* For example, to compute the values for the range axis (OY), which currently only supports categorical values.
*
* @param entityType
* @return
*/
IScatterPlotEntityType<T> forEntityWithSaveOnActivation(Class<T> entityType);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract to specify a title for the range axis (y-axis) of a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotRangeAxisTitle<T extends AbstractEntity<?>> extends IScatterPlotDomainAxisTitle<T> {

IScatterPlotRangeAxisTitle<T> withRangeAxisTitle(String title);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.processors.metamodel.IConvertableToPath;

/**
* A contract to specify a property name and an axis boundary configuration that is used for the range axis of a scatter plot (y-axis).
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotRangeProperty<T extends AbstractEntity<?>> {

/**
* Assigns a range property name (y-axis values) and a configuration of its boundary.
*
* @param propertyName
* @param rangeConfig
* @return
*/
IScatterPlotDomainProperty<T> configRangeProperty(IConvertableToPath propertyName, IScatterPlotAxisBoundaryConfig rangeConfig);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract for specifying the right margin of a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotRightMargin<T extends AbstractEntity<?>> extends IScatterPlotTooltip<T> {

IScatterPlotTooltip<T> rightMargin(int px);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.processors.metamodel.IConvertableToPath;

/**
* A contract to specify a property name or a key that should be used to associate styles for rendering values on a scatter plot (shapes, their size, colours, etc.).
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotStyleProperty<T extends AbstractEntity<?>> {

/**
* Assigns a property name that is used to retrieve styles for scatter plot values.
*
* @param propertyName
* @return
*/
IScatterPlotTitle<T> setStylePropertyName(IConvertableToPath propertyName);

/**
* Assigns a key that is used to retrieve styles for scatter plot values.
*
* @param key
* @return
*/
IScatterPlotTitle<T> setStyleKey(String key);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract to specify a scatter plot title. A scatter plot title is optional, it can be empty or omitted completely.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotTitle<T extends AbstractEntity<?>> extends IScatterPlotRangeAxisTitle<T> {

IScatterPlotRangeAxisTitle<T> withTitle(String title);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;
import ua.com.fielden.platform.processors.metamodel.IConvertableToPath;

/**
* A contract for configuring a tooltip entry for a scatter plot data point.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotTooltip<T extends AbstractEntity<?>> extends IScatterPlotLegend<T> {

/**
* Adds a property name of the master entity type to represent an entry in a tooltip.
* The property title and value are displayed in a tooltip.
* There can be several calls to this method and their order defines the order of entries in a tooltip.
*
* @param propertyName
* @return
*/
IScatterPlotTooltip<T> addPropertyToTooltip(IConvertableToPath propertyName);

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package ua.com.fielden.platform.web.view.master.scatterplot.api;

import ua.com.fielden.platform.entity.AbstractEntity;

/**
* A contract for specifying the top margin of a scatter plot.
*
* @param <T>
*
* @author TG Team
*/
public interface IScatterPlotTopMargin<T extends AbstractEntity<?>> extends IScatterPlotLeftMargin<T>{

IScatterPlotLeftMargin<T> topMargin(int px);

}
Loading

0 comments on commit 6d6f10b

Please sign in to comment.