Class SVGGenerator

java.lang.Object
com.vaadin.flow.component.charts.export.SVGGenerator
All Implemented Interfaces:
AutoCloseable

public class SVGGenerator extends Object implements AutoCloseable

Use instances of this class to generate SVG strings from chart Configuration instances. You must close the generator when you're done with it. You can use a try-with-resources block to close it automatically. You must have NodeJS installed for this to work.


CSS styling is not supported.


Example usage:

  Configuration configuration = new Configuration();
  // ...
  try (SVGGenerator generator = new SVGGenerator()) {
      String svg = generator.generate(configuration);
  }
  
Since:
21.0