Class StudioChartsPreviewLoader

java.lang.Object
io.jmix.chartsflowui.kit.meta.loader.StudioChartsPreviewLoader
All Implemented Interfaces:
StudioPreviewComponentLoader

public class StudioChartsPreviewLoader extends Object implements StudioPreviewComponentLoader
Studio preview loader for the charts:chart component.

A real JmixChart is used: even without data ECharts draws the declared title, legend and axes, which is exactly what the runtime shows for an empty chart. Only the visual skeleton of the options is mapped (title text, legend, axis types, series names) — data bindings and the rest of the extensive options model stay design-time-irrelevant.

  • Field Details

  • Constructor Details

    • StudioChartsPreviewLoader

      public StudioChartsPreviewLoader()
  • Method Details

    • isSupported

      public boolean isSupported(org.dom4j.Element element)
      Description copied from interface: StudioPreviewComponentLoader
      Define the element that this loader can load.
      Specified by:
      isSupported in interface StudioPreviewComponentLoader
    • load

      public @Nullable com.vaadin.flow.component.Component load(org.dom4j.Element componentElement, org.dom4j.Element viewElement)
      Description copied from interface: StudioPreviewComponentLoader
      Create vaadin component from component xml element.
      Specified by:
      load in interface StudioPreviewComponentLoader
      Parameters:
      componentElement - xml element of component
      viewElement - xml element of view containing componentElement
      See Also:
      • Element
    • load

      public @Nullable com.vaadin.flow.component.Component load(org.dom4j.Element componentElement, org.dom4j.Element viewElement, StudioPreviewEnvironment environment)
      Description copied from interface: StudioPreviewComponentLoader
      Create vaadin component from component xml element, with access to Studio-resolved context (e.g. localized messages, entity property captions).
      Specified by:
      load in interface StudioPreviewComponentLoader
      Parameters:
      componentElement - xml element of component
      viewElement - xml element of view containing componentElement
      environment - Studio-side environment; StudioPreviewEnvironment.NOOP when unavailable
      See Also:
      • Element
    • loadTitle

      protected void loadTitle(org.dom4j.Element componentElement, StudioPreviewEnvironment environment, JmixChart chart)
    • loadAxes

      protected void loadAxes(org.dom4j.Element componentElement, JmixChart chart)
    • loadSeries

      protected void loadSeries(org.dom4j.Element componentElement, JmixChart chart)
    • createSeries

      protected @Nullable AbstractSeries<?> createSeries(String tagName)