Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am getting the following error when I try and use a solid gauge chart.
Uncaught SyntaxError: missing ) after argument list
If I change to a different chart type, it displays correctly.
Below is the output that is triggering the error.
window.easychart = new ec({element: container}); window.easychart.setConfigStringified('{"chart":{"type":"solidgauge","renderTo":{"__EV_STORE_KEY@7":{}}},"xAxis":[{"index":0,"isX":true}],"yAxis":[{"stops":[[0.1,"#55BF3B"],[0.5,"#DDDF0D"],[0.9,"#DF5353"]],"lineWidth":0,"minorTickInterval":null,"tickPixelInterval":400,"tickWidth":0,"labels":{"y":16},"min":0,"max":25000,"title":{"y":-70},"index":0,"plotBands":[{"shape":"arc","borderWidth":1,"borderColor":"silver","backgroundColor":"#EEE","from":-1.7976931348623157e+308,"innerRadius":"80%","to":1.7976931348623157e+308,"outerRadius":"100%","color":"#EEE"}]}],"title":{"text":null},"pane":{"center":["50%","85%"],"size":"120%","startAngle":-90,"endAngle":90,"background":{"backgroundColor":"#EEE","innerRadius":"80%","outerRadius":"100%","shape":"arc"}},"tooltip":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"y":5,"borderWidth":0,"useHTML":true,"enabled":true}}},"series":[{"name":"GWh","dataLabels":{"format":"<div style='text-align:center'><span style='font-size:50px;color:black'>{y}</span><br/><span style='font-size:12px;color:silver'>km/h</span></div>"},"tooltip":{"valueSuffix":"GWh"},"animation":false,"data":[{"y":10000},{"y":25000}],"_symbolIndex":0},{"type":"solidgauge","animation":false,"data":[{"y":null},{"y":10000}],"_symbolIndex":1}],"colors":["#0079ee","#434348","#90ed7d","#f7a35c","#8085e9","#f15c80","#e4d354","#2b908f","#f45b5b","#91e8e1"],"legend":{"enabled":false},"exporting":{"enabled":false},"credits":{"enabled":false}}'); window.easychart.setData([["Scrap",""],["10000",""],["25000","10000"]]);})
Comments
Comment #2
thomas_rz CreditAttribution: thomas_rz as a volunteer commentedHi Mattmay,
First of all, thank you for using/reviewing Easychart and sharing this issue with us.
Can you provide some more details (test-data...) about this issue in order for me to be able to reproduce what happened?
(Looks like I have no trouble saving/displaying a gauge chart: http://easychart.org/issues/node/2824094.)
Best,
Thomas
Comment #3
mattmay CreditAttribution: mattmay commentedSorry for the delay... got tied up on another project. I tested using your demo site and again on my site. I am getting different output for the while using the same values.
Here are the specifics
Drupal: 7.51
Easy Chart Module version :7.3.7
jquery version: 1.7
Libraries
Easy Chart 3.1.4
HighCharts 4.2.6
Chart Type : Solid Gauge
Data Table (Col b blank)
Col A
Scrap
2500
All other settings are default.
Below is the output I get from the test site.
And here is what I get on my site.
I can't figure out where the "Stringified(' " is coming from
Comment #4
mattmay CreditAttribution: mattmay commentedI found the source of the issue. The single quotes in the data label format was causing it to error out. After I took them out, it worked correctly.
I am having the same issue with the first solid gauge (half circle), but it does not seem to be using the data label format on the form.