= Charts

The Charts add-on provides integration of the https://www.amcharts.com/[amCharts^] JavaScript library in Jmix UI. The add-on includes various types of dynamic charts:

* xref:charts:types/angular-gauge-chart.adoc[AngularGaugeChart]
* xref:charts:types/funnel-chart.adoc[FunnelChart]
* xref:charts:types/gantt-chart.adoc[GanttChart]
* xref:charts:types/pie-chart.adoc[PieChart]
* xref:charts:types/radar-chart.adoc[RadarChart]
* xref:charts:types/serial-chart.adoc[SerialChart]
* xref:charts:types/stock-chart-group.adoc[StockChart]
* xref:charts:types/xy-chart.adoc[XYChart]

AmCharts is distributed under a license, which allows its free use if you keep the link to the library website. Alternatively, you can https://www.amcharts.com/online-store/[purchase^] an AmCharts license for your project and remove the link.

[[installation]]
== Installation

For automatic installation through Jmix Marketplace, follow instructions in the xref:ROOT:add-ons.adoc#installation[Add-ons] section.

For manual installation, do the following:

. Add dependencies to your `build.gradle`:
+
[source,java,indent=0]
----
include::example$/ex1/build.gradle[tags=dependencies]
----

. Remove `implementation 'io.jmix.ui:jmix-ui-widgets-compiled'` dependency.

. Add `compileWidgets` task (change paths according to your application base package):
+
[source,groovy,indent=0]
----
include::example$/ex1/build.gradle[tags=compile-widgets]
----

. Add `jmix.ui.widget-set` property to your `application.properties` file (adjust location according to the `compileWidgets` task above):
+
[source,properties,indent=0]
----
include::example$/ex1/src/main/resources/application.properties[tags=custom-widgetset]
----

To enable using the component in a screen, declare the `chart` namespace in the root element of the screen XML descriptor:

[source, xml,indent=0]
----
include::example$/ex1/src/main/resources/charts/ex1/screen/charts/config/columnline-screen.xml[tags=namespace]
----