Skip to content

Commit

Permalink
feat: support controlling the chart type from column definetion
Browse files Browse the repository at this point in the history
  • Loading branch information
hyyan committed Jul 19, 2019
1 parent fb5f948 commit 13a5871
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions BBjGridExWidgetColumns.bbj
Expand Up @@ -571,6 +571,20 @@ class public BBjGridExWidgetDefaultColumnDefinition extends BBjGridExWidgetColum
rem */
field public JsonObject Icons! = new JsonObject()
rem /**
rem * Defines the chart data type that should be used for a column·
rem * There are two types of charting ranges; a category range that is highlighted in green and a series range that is
rem * highlighted in blue·
rem * A category range can only contain cells from a single column, whereas a series range can contain
rem * values from many columns·
rem * Columns can be explicitly configured or left for the grid to infer the type based on the data contained in the cells
rem * where columns containing string values will map to 'categories' and columns containing number values will map to 'series'
rem * charting columns·
rem *
rem * <br><b><small>#Configuration</small></b>
rem * <br><b><small>#ColumnsRerender</small></b>.
rem */
field public BBjString ChartType! = null()
rem /**
rem * Get pinned left constant
rem *
rem * @return BBjString <b>left</b>
Expand Down Expand Up @@ -618,6 +632,30 @@ class public BBjGridExWidgetDefaultColumnDefinition extends BBjGridExWidgetColum
method public static BBjString COLUMN_GROUP_CLOSED()
methodret "closed"
methodend
rem /**
rem * A constant which defines column chart category
rem *
rem * @return BBjString <b>category</b>
rem */
method public static BBjString CHART_TYPE_CATEGORY()
methodret "category"
methodend
rem /**
rem * A constant which defines column chart series
rem *
rem * @return BBjString <b>series</b>
rem */
method public static BBjString CHART_TYPE_SERIES()
methodret "series"
methodend
rem /**
rem * A constant which defines column chart excluded, columns which set chart type to excluded will be excluded from charts
rem *
rem * @return BBjString <b>excluded</b>
rem */
method public static BBjString CHART_TYPE_EXCLUDED()
methodret "excluded"
methodend
rem /**
rem * Create a BBjGridExWidgetExpression from string and set it as value getter
rem *
Expand Down Expand Up @@ -915,6 +953,7 @@ class public BBjGridExWidgetDefaultColumnDefinition extends BBjGridExWidgetColum
column!.addProperty("valueSetter",#getValueSetterExpression().toString(),err=*next)
column!.addProperty("valueParser",#getValueParserExpression().toString(),err=*next)
column!. add("icons",iff(#getIcons().entrySet().size() <> 0 , #getIcons() , null()),err=*next)
column!.addProperty("chartDataType",#getChartType(),err=*next)
filterEnabled! = #getEnableFilter()
filter! = #getFilter()

Expand Down

0 comments on commit 13a5871

Please sign in to comment.