Class ChartToJsonConverter

java.lang.Object
io.jmix.reports.entity.charts.ChartToJsonConverter

@Component("report_ChartToJsonConverter") @Scope("prototype") public class ChartToJsonConverter extends Object
  • Field Details

  • Constructor Details

    • ChartToJsonConverter

      public ChartToJsonConverter()
    • ChartToJsonConverter

      public ChartToJsonConverter(String resultFileName)
  • Method Details

    • getSharedGson

      public static com.google.gson.Gson getSharedGson()
    • createGsonBuilder

      public static com.google.gson.GsonBuilder createGsonBuilder()
      Returns:
      default GSON builder for configuration serializer.
    • convertSerialChart

      public String convertSerialChart(SerialChartDescription description, List<Map<String,Object>> data)
    • exportConfig

      protected void exportConfig(HashMap<String,Object> chart)
    • convertPieChart

      public String convertPieChart(PieChartDescription description, List<Map<String,Object>> data)
    • mergeJsonObjects

      protected void mergeJsonObjects(com.google.gson.JsonObject source, com.google.gson.JsonObject config)
    • mergeJsonArrays

      protected void mergeJsonArrays(com.google.gson.JsonArray source, com.google.gson.JsonArray config)
    • addProperty

      protected void addProperty(com.google.gson.JsonObject jsonObject, String property, Object value)
    • addField

      protected void addField(List<String> fields, @Nullable String field)
    • join

      protected String join(Object... objects)