fidel1
(fidel Lagos)
October 31, 2017, 4:28pm
1
Hi
I try to use a very simple chart
Chart chart = new Chart();
chart.setSizeFull();
//
Configuration conf = chart.getConfiguration();
conf.setTitle(“Chart”);
conf.getChart().setType(ChartType.LINE);
Random randomGenerator = new Random();
//
DataSeries dataprom = new DataSeries(“Promo”);
for(int i = 1; i < 10; i++ ) {
// Shoe size on the X-axis, age on the Y-axis
dataprom.add(new DataSeriesItem(
i,
randomGenerator.nextInt(10) ) );
}
conf.addSeries(dataprom);
but I get this error
Widgetset does not contain implementation for com.vaadin.addon.charts.Chart. Check its component connector’s @Connect mapping, widgetsets GWT module description file and re-compile your widgetset. In case you have downloaded a vaadin add-on package, you might want to refer to add-on instructions.
my aplication was initialy created with vaadin 7 and then migrated to vaadin 8
but I get that error with both chart version
vaadin 8
com.vaadin
vaadin-charts
4.0.0
and vaadin 7
com.vaadin
vaadin-charts
3.2.0
thanks for any help
fidel1
(fidel Lagos)
October 31, 2017, 6:13pm
2
this is the widgetSet I am using
(my aplication was initialy created with vaadin 7 and then migrated to vaadin 8)
@Widgetset (“com.vaadin.v7.Vaadin7WidgetSet”) // actual
public class MyAppUI extends UI {
mcollovati
(Marco Collovati)
November 1, 2017, 11:16am
3
Hi,
you should recompile the widgetset after adding chart dependecy.
Launch mvn clean vaadin:update-widgetset vaadin:compile
and remove @Widgetset annotation from UI class; maven plugin will automatically generate a AppWidgetset
that will be used by default by the UI.
See
https://vaadin.com/docs/v8/framework/addons/addons-maven.html
and
https://vaadin.com/docs/v8/charts/java-api/charts-getting-started.html
for further information.
HTH
Marco
fidel1
(fidel Lagos)
November 1, 2017, 3:06pm
4
thanks Marco
I try to compile from eclipse using maven eclipse plugin
right click in proyect → run as → maven build
and I set in goals:
clean vaadin:update-widgetset vaadin:compile
but I get an error
[ERROR]
Failed to execute goal com.vaadin:vaadin-maven-plugin:8.0.0:compile (default-cli) on project promoMkt: Command [[
[ERROR]
C:\Program Files\Java\jdk1.8.0_131\jre\bin\java -Xmx2G -Xss1024k -classpath (list of jars) …
I have this references in pom.xml (my aplication was initialy created with vaadin 7 and then migrated to vaadin 8)
[color=#3498db]
com.vaadin
vaadin-server
8.0.0
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-server</artifactId>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-client</artifactId>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-client-compiled</artifactId>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-shared</artifactId>
<version>8.0.0</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-compatibility-themes</artifactId>
<version>8.0.0</version>
</dependency>
[/color]
[color=#9b59b6]
[b]
com.vaadin.addon
vaadin-charts
<version>3.2.0</version>
[/b]
[/color]
[color=#3498db]
com.fasterxml.jackson.core
jackson-annotations
${jackson.version}
com.fasterxml.jackson.core
jackson-core
${jackson.version}
[/color]
I have to use maven in a command line?
I am using the rigth version of vaadin charts?
thanks for your help
mcollovati
(Marco Collovati)
November 4, 2017, 2:51pm
5
Hi,
sorry for late response.
With Vaadin 8.x you should use charts 4.x.
Can you post the whole maven execution output? you may also add the -e flag (eg mvn -e vaadin:compile)
Mariana8
(Mariana Soares)
January 12, 2018, 6:01pm
6
Creo que tengo el mismo error. Al usar jFreeChart se me genera un internal error. Las dependencias que agregue son :
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jcommon</artifactId>
<version>1.0.21</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jfree/jfreechart -->
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.19</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.vaadin.addon/jfreechartwrapper -->
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>jfreechartwrapper</artifactId>
<version>2.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jfree/jfreesvg -->
<dependency>
<groupId>org.jfree</groupId>
<artifactId>jfreesvg</artifactId>
<version>2.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-svggen -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.7</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.xmlgraphics/batik-util -->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-util</artifactId>
<version>1.7</version>
</dependency>
usando vaadin 6.
Podrias ayudarme. En el error sale algo del widgetset