Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Charts are not rendered #1876

Closed
ripla opened this issue Oct 9, 2018 · 2 comments
Closed

Charts are not rendered #1876

ripla opened this issue Oct 9, 2018 · 2 comments
Assignees
Labels
Milestone

Comments

@ripla
Copy link
Contributor

ripla commented Oct 9, 2018

Steps to reproduce

  1. Open Bakery
  2. Create a new template
  3. Add a chart to the template:
<link rel="import" href="bower_components/vaadin-charts/src/vaadin-chart.html">
<link rel="import" href="bower_components/vaadin-charts/src/vaadin-chart-series.html">

<vaadin-chart title="Solar Employment Growth by Sector, 2010-2016" subtitle="Source: thesolarfoundation.com" categories="[2010, 2011, 2012, 2013, 2014, 2015, 206, 2017]">
 <vaadin-chart-series title="Installation" unit="Number of Employees" values="[43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]"></vaadin-chart-series>
 <vaadin-chart-series title="Manufacturing" unit="Number of Employees" values="[24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]"></vaadin-chart-series>
 <vaadin-chart-series title="Sales &amp; Distribution" unit="Number of Employees" values="[11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]"></vaadin-chart-series>
 <vaadin-chart-series title="Project Development" unit="Number of Employees" values="[null, null, 7988, 12169, 15112, 22452, 34400, 34227]"></vaadin-chart-series>
 <vaadin-chart-series title="Other" unit="Number of Employees" values="[12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]"></vaadin-chart-series>
</vaadin-chart>

Actual behavior

Nothing is shown. In addition, these errors are shown in the console of the external preview:

GET http://localhost:51306/project/src/main/resources/static/frontend/bower_components/vaadin-charts/theme/lumo/vaadin-chart.html 404 (Not Found)
GET http://localhost:51306/project/src/main/resources/static/frontend/bower_components/vaadin-charts/theme/lumo/vaadin-chart-series.html 404 (Not Found)

Expected behavior

The chart from this demo is rendered: https://charts.demo.vaadin.com/vaadin-charts/#/line.

IDE, Designer and OS version

IntelliJ 2018, Designer 3.1.2, macOS

@ripla ripla changed the title Charts not showing up Charts are not rendered Oct 9, 2018
@ripla
Copy link
Contributor Author

ripla commented Oct 10, 2018

Discuss with other teams, and figure out a better heuristic for detection.

@ripla
Copy link
Contributor Author

ripla commented Oct 10, 2018

After talking to @alvarezguille, it seems that we should only import the root vaadin-charts.html and nothing else. So one way to look at it is to detect first if a component has the theme folder, and only then import the src file instead of the root one.

@qtdzz qtdzz self-assigned this Oct 15, 2018
@szolo szolo self-assigned this Oct 15, 2018
@szolo szolo added this to the 3.1.4 milestone Oct 25, 2018
@szolo szolo closed this as completed Oct 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants