Package io.jmix.charts.serialization
Class JmixChartSerializer
java.lang.Object
io.jmix.charts.serialization.JmixChartSerializer
- All Implemented Interfaces:
ChartSerializer
,HasDataItemKeyMapper
@Component("ui_JmixChartSerializer")
@Scope("prototype")
public class JmixChartSerializer
extends Object
implements ChartSerializer
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final com.google.gson.Gson
protected ChartDataItemsSerializer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
beforeConvertToJson
(com.google.gson.JsonElement jsonTree, ChartJsonSerializationContext context) protected ChartJsonSerializationContext
serialize
(AbstractChart chart) serializeChanges
(AbstractChart chart, ChartIncrementalChanges changes) void
setDataItemKeyMapper
(Function<DataItem, String> itemKeyMapper) protected void
setItemsSerializer
(ChartDataItemsSerializer chartDataItemsSerializer)
-
Field Details
-
chartGson
protected static final com.google.gson.Gson chartGson -
itemKeyMapper
-
itemsSerializer
-
-
Constructor Details
-
JmixChartSerializer
public JmixChartSerializer()
-
-
Method Details
-
setItemsSerializer
-
serialize
- Specified by:
serialize
in interfaceChartSerializer
-
beforeConvertToJson
protected void beforeConvertToJson(com.google.gson.JsonElement jsonTree, ChartJsonSerializationContext context) -
serializeChanges
- Specified by:
serializeChanges
in interfaceChartSerializer
-
createChartJsonSerializationContext
-
toJson
- Specified by:
toJson
in interfaceChartSerializer
-
getDataItemKeyMapper
- Specified by:
getDataItemKeyMapper
in interfaceHasDataItemKeyMapper
-
setDataItemKeyMapper
- Specified by:
setDataItemKeyMapper
in interfaceHasDataItemKeyMapper
-