mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
SPRINT-19: added stacked bar chart, more widget metadata
This commit is contained in:
@ -350,6 +350,8 @@ public class ChartData extends QWidgetData
|
|||||||
private String label;
|
private String label;
|
||||||
private List<Number> data;
|
private List<Number> data;
|
||||||
private String color;
|
private String color;
|
||||||
|
private String backgroundColor;
|
||||||
|
private List<String> urls;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -376,12 +378,35 @@ public class ChartData extends QWidgetData
|
|||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Getter for color
|
** Getter for backgroundColor
|
||||||
**
|
**
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
public String getColor()
|
public String getBackgroundColor()
|
||||||
{
|
{
|
||||||
return color;
|
return backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for backgroundColor
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setBackgroundColor(String backgroundColor)
|
||||||
|
{
|
||||||
|
this.backgroundColor = backgroundColor;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for backgroundColor
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public Dataset withBackgroundColor(String backgroundColor)
|
||||||
|
{
|
||||||
|
this.backgroundColor = backgroundColor;
|
||||||
|
return (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -452,6 +477,40 @@ public class ChartData extends QWidgetData
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
return (this);
|
return (this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for urls
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public List<String> getUrls()
|
||||||
|
{
|
||||||
|
return urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for urls
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setUrls(List<String> urls)
|
||||||
|
{
|
||||||
|
this.urls = urls;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for urls
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public Dataset withUrls(List<String> urls)
|
||||||
|
{
|
||||||
|
this.urls = urls;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,6 +29,8 @@ package com.kingsrook.qqq.backend.core.model.dashboard.widgets;
|
|||||||
public class StatisticsData extends QWidgetData
|
public class StatisticsData extends QWidgetData
|
||||||
{
|
{
|
||||||
private Number count;
|
private Number count;
|
||||||
|
private String countFontSize;
|
||||||
|
private String countURL;
|
||||||
private Number percentageAmount;
|
private Number percentageAmount;
|
||||||
private String percentageLabel;
|
private String percentageLabel;
|
||||||
private boolean isCurrency = false;
|
private boolean isCurrency = false;
|
||||||
@ -59,6 +61,74 @@ public class StatisticsData extends QWidgetData
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for countURL
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public String getCountURL()
|
||||||
|
{
|
||||||
|
return countURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for countURL
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setCountURL(String countURL)
|
||||||
|
{
|
||||||
|
this.countURL = countURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for countURL
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public StatisticsData withCountURL(String countURL)
|
||||||
|
{
|
||||||
|
this.countURL = countURL;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for countFontSize
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public String getCountFontSize()
|
||||||
|
{
|
||||||
|
return countFontSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for countFontSize
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setCountFontSize(String countFontSize)
|
||||||
|
{
|
||||||
|
this.countFontSize = countFontSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for countFontSize
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public StatisticsData withCountFontSize(String countFontSize)
|
||||||
|
{
|
||||||
|
this.countFontSize = countFontSize;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Getter for count
|
** Getter for count
|
||||||
**
|
**
|
||||||
|
@ -45,6 +45,7 @@ public enum WidgetType
|
|||||||
QUICK_SIGHT_CHART("quickSightChart"),
|
QUICK_SIGHT_CHART("quickSightChart"),
|
||||||
STATISTICS("statistics"),
|
STATISTICS("statistics"),
|
||||||
SIMPLE_STATISTICS("simpleStatistics"),
|
SIMPLE_STATISTICS("simpleStatistics"),
|
||||||
|
STACKED_BAR_CHART("stackedBarChart"),
|
||||||
STEPPER("stepper"),
|
STEPPER("stepper"),
|
||||||
TABLE("table"),
|
TABLE("table"),
|
||||||
USA_MAP("usaMap"),
|
USA_MAP("usaMap"),
|
||||||
|
@ -48,6 +48,8 @@ public class QWidgetMetaData implements QWidgetMetaDataInterface
|
|||||||
private QPermissionRules permissionRules;
|
private QPermissionRules permissionRules;
|
||||||
|
|
||||||
private List<WidgetDropdownData> dropdowns;
|
private List<WidgetDropdownData> dropdowns;
|
||||||
|
private boolean storeDropdownSelections;
|
||||||
|
|
||||||
protected Map<String, Serializable> defaultValues = new LinkedHashMap<>();
|
protected Map<String, Serializable> defaultValues = new LinkedHashMap<>();
|
||||||
|
|
||||||
|
|
||||||
@ -342,6 +344,40 @@ public class QWidgetMetaData implements QWidgetMetaDataInterface
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for storeDropdownSelections
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public boolean getStoreDropdownSelections()
|
||||||
|
{
|
||||||
|
return storeDropdownSelections;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for storeDropdownSelections
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public void setStoreDropdownSelections(boolean storeDropdownSelections)
|
||||||
|
{
|
||||||
|
this.storeDropdownSelections = storeDropdownSelections;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Fluent setter for storeDropdownSelections
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public QWidgetMetaData withStoreDropdownSelections(boolean storeDropdownSelections)
|
||||||
|
{
|
||||||
|
this.storeDropdownSelections = storeDropdownSelections;
|
||||||
|
return (this);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Fluent setter for dropdowns
|
** Fluent setter for dropdowns
|
||||||
**
|
**
|
||||||
|
@ -126,10 +126,21 @@ public interface QWidgetMetaDataInterface extends MetaDataWithPermissionRules
|
|||||||
boolean getIsCard();
|
boolean getIsCard();
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Setter for type
|
** Setter for isCard
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
void setIsCard(boolean isCard);
|
void setIsCard(boolean isCard);
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for storeDropdownSelections
|
||||||
|
*******************************************************************************/
|
||||||
|
boolean getStoreDropdownSelections();
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Setter for storeDropdownSelections
|
||||||
|
*******************************************************************************/
|
||||||
|
void setStoreDropdownSelections(boolean storeDropdownSelections);
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
** Getter for defaultValues
|
** Getter for defaultValues
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
@ -43,6 +43,7 @@ public class QFrontendWidgetMetaData
|
|||||||
private final String icon;
|
private final String icon;
|
||||||
private final Integer gridColumns;
|
private final Integer gridColumns;
|
||||||
private final boolean isCard;
|
private final boolean isCard;
|
||||||
|
private final boolean storeDropdownSelections;
|
||||||
|
|
||||||
private boolean hasPermission;
|
private boolean hasPermission;
|
||||||
|
|
||||||
@ -63,6 +64,7 @@ public class QFrontendWidgetMetaData
|
|||||||
this.icon = widgetMetaData.getIcon();
|
this.icon = widgetMetaData.getIcon();
|
||||||
this.gridColumns = widgetMetaData.getGridColumns();
|
this.gridColumns = widgetMetaData.getGridColumns();
|
||||||
this.isCard = widgetMetaData.getIsCard();
|
this.isCard = widgetMetaData.getIsCard();
|
||||||
|
this.storeDropdownSelections = widgetMetaData.getStoreDropdownSelections();
|
||||||
|
|
||||||
hasPermission = PermissionsHelper.hasWidgetPermission(actionInput, name);
|
hasPermission = PermissionsHelper.hasWidgetPermission(actionInput, name);
|
||||||
}
|
}
|
||||||
@ -144,4 +146,15 @@ public class QFrontendWidgetMetaData
|
|||||||
return hasPermission;
|
return hasPermission;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Getter for storeDropdownSelections
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
public boolean getStoreDropdownSelections()
|
||||||
|
{
|
||||||
|
return storeDropdownSelections;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user