SPRINT-19: added stacked bar chart, more widget metadata

This commit is contained in:
Tim Chamberlain
2023-01-24 15:52:15 -06:00
parent 41fcb09c70
commit a05e74a7d0
6 changed files with 195 additions and 5 deletions

View File

@ -350,6 +350,8 @@ public class ChartData extends QWidgetData
private String label;
private List<Number> data;
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;
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);
}
}
}
}

View File

@ -29,6 +29,8 @@ package com.kingsrook.qqq.backend.core.model.dashboard.widgets;
public class StatisticsData extends QWidgetData
{
private Number count;
private String countFontSize;
private String countURL;
private Number percentageAmount;
private String percentageLabel;
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
**

View File

@ -45,6 +45,7 @@ public enum WidgetType
QUICK_SIGHT_CHART("quickSightChart"),
STATISTICS("statistics"),
SIMPLE_STATISTICS("simpleStatistics"),
STACKED_BAR_CHART("stackedBarChart"),
STEPPER("stepper"),
TABLE("table"),
USA_MAP("usaMap"),

View File

@ -47,7 +47,9 @@ public class QWidgetMetaData implements QWidgetMetaDataInterface
private QPermissionRules permissionRules;
private List<WidgetDropdownData> dropdowns;
private List<WidgetDropdownData> dropdowns;
private boolean storeDropdownSelections;
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
**

View File

@ -126,10 +126,21 @@ public interface QWidgetMetaDataInterface extends MetaDataWithPermissionRules
boolean getIsCard();
/*******************************************************************************
** Setter for type
** Setter for isCard
*******************************************************************************/
void setIsCard(boolean isCard);
/*******************************************************************************
** Getter for storeDropdownSelections
*******************************************************************************/
boolean getStoreDropdownSelections();
/*******************************************************************************
** Setter for storeDropdownSelections
*******************************************************************************/
void setStoreDropdownSelections(boolean storeDropdownSelections);
/*******************************************************************************
** Getter for defaultValues
*******************************************************************************/

View File

@ -43,6 +43,7 @@ public class QFrontendWidgetMetaData
private final String icon;
private final Integer gridColumns;
private final boolean isCard;
private final boolean storeDropdownSelections;
private boolean hasPermission;
@ -63,6 +64,7 @@ public class QFrontendWidgetMetaData
this.icon = widgetMetaData.getIcon();
this.gridColumns = widgetMetaData.getGridColumns();
this.isCard = widgetMetaData.getIsCard();
this.storeDropdownSelections = widgetMetaData.getStoreDropdownSelections();
hasPermission = PermissionsHelper.hasWidgetPermission(actionInput, name);
}
@ -144,4 +146,15 @@ public class QFrontendWidgetMetaData
return hasPermission;
}
/*******************************************************************************
** Getter for storeDropdownSelections
**
*******************************************************************************/
public boolean getStoreDropdownSelections()
{
return storeDropdownSelections;
}
}