This topic contains 3 replies, has 3 voices, and was last updated by Madhur 8 years ago.
- Topic
Hi,
I have created a widget with Google Visualizations Gauge chart. The chart comes up, but I am having little problems. Please tell me what I am doing wrong.
First the code to make sure that I have done everything correctly:
dashboardchart.html.twig code:
1234567891011121314{% block content %}<div id="statistics" style="width:400px; height:120px;"></div>{% endblock content %}{% block javascripts %}<script type="text/javascript" src="https://www.google.com/jsapi"></script><script type="text/javascript">google.load("visualization", "1", {packages:["gauge"]});google.setOnLoadCallback(function() {var chart = new google.visualization.Gauge($('#statistics').get(0));chart.draw(google.visualization.arrayToDataTable([['Label', 'Value'],['Memory', 80]]), {width: 400, height: 120,redFrom: 90, redTo: 100,yellowFrom:75, yellowTo: 90,minorTicks: 5});});</script>{% endblock %}dashboard.yml code:
1234567oro_dashboard_config:widgets:gauge_chart:label: 'gauge chart'route: oro_dashboard_widgetroute_parameters: { bundle: PGAClientVisitBundle, name: dashboardchart }acl: clientvisit.visitreport_viewNow the problems:
1. When I try to add this widget in my dashboard by clicking on the Add button in the Add widget form, the add button keeps on rotating. I have to click on the close button and refresh the page. Then the widget is visible.
2. The chart is hanging in the air, it doesn’t have the white container box around it. If I extend the twig template file from OroDashboardBundle:Dashboard:widget.html.twig, the the white container box comes up, but then the chart itself is not loaded and the whole dashboard page does not load.Please see the images below to understand exactly what I am taking about:
When I try to add the widget:
When the widget is added:
The forum ‘OroCRM – Installation/Technical Issues or Problems’ is closed to new topics and replies.