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

mattmay created an issue. See original summary.

thomas_rz’s picture

Assigned: Unassigned » thomas_rz

Hi 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

mattmay’s picture

Sorry 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.

<!--//--><![CDATA[//><!--
 document.addEventListener("DOMContentLoaded", function () {
                     var container = document.getElementById('easychart-chart-1');
                     window.easychart = new ec({element: container});  window.easychart.setConfig({"chart":{"type":"solidgauge","renderTo":{"__EV_STORE_KEY@7":{}}},"xAxis":[{"index":0,"isX":true}],"yAxis":[{"min":0,"max":25000,"title":{"y":-70},"stops":[[0.1,"#DF5353"],[0.5,"#DDDF0D"],[0.9,"#55BF3B"]],"lineWidth":0,"minorTickInterval":null,"tickPixelInterval":400,"tickWidth":0,"labels":{"y":16,"enabled":false},"index":0,"plotBands":[{"shape":"circle","borderWidth":0,"borderColor":"silver","backgroundColor":"#EEE","from":-1.7976931348623157e+308,"innerRadius":"80%","to":1.7976931348623157e+308,"outerRadius":"100%","color":"#EEE"}]}],"title":{"text":null},"pane":{"background":{"backgroundColor":"#EEE","innerRadius":"80%","outerRadius":"100%","borderWidth":0}},"tooltip":{"enabled":false},"legend":{"enabled":false},"credits":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"format":"<div style='text-align:center;'><span style='font-size:30px;color:black;'>{y}</span><br/><span style='font-size:12px;color:silver;'>GWh</span></div>","y":-25,"borderWidth":0,"useHTML":true},"tooltip":{"valueSuffix":"GWh"}}},"series":[{"name":"hernieuwbare energie","data":[{"y":2500,"radius":"100%","innerRadius":"80%"}],"animation":false,"_symbolIndex":0},{"type":"solidgauge","animation":false,"data":[{"y":null}],"_symbolIndex":1}]});  window.easychart.setData([["Scrap",null],["2500",null]]);})
//--><!]]>

And here is what I get on my site.

<!--//--><![CDATA[//><!--
 document.addEventListener("DOMContentLoaded", function () {
                     var container = document.getElementById('easychart-chart-1');
                     window.easychart = new ec({element: container});  window.easychart.setConfigStringified('{"chart":{"type":"solidgauge","renderTo":{"__EV_STORE_KEY@7":{}}},"xAxis":[{"index":0,"isX":true}],"yAxis":[{"min":0,"max":25000,"title":{"y":-70},"stops":[[0.1,"#DF5353"],[0.5,"#DDDF0D"],[0.9,"#55BF3B"]],"lineWidth":0,"minorTickInterval":null,"tickPixelInterval":400,"tickWidth":0,"labels":{"y":16,"enabled":false},"index":0,"plotBands":[{"shape":"circle","borderWidth":0,"borderColor":"silver","backgroundColor":"#EEE","from":-1.7976931348623157e+308,"innerRadius":"80%","to":1.7976931348623157e+308,"outerRadius":"100%","color":"#EEE"}]}],"title":{"text":null},"pane":{"background":{"backgroundColor":"#EEE","innerRadius":"80%","outerRadius":"100%","borderWidth":0}},"tooltip":{"enabled":false},"legend":{"enabled":false},"credits":{"enabled":false},"plotOptions":{"series":{"dataLabels":{"format":"<div style='text-align:center;'><span style='font-size:30px;color:black;'>{y}</span><br/><span style='font-size:12px;color:silver;'>GWh</span></div>","y":-25,"borderWidth":0,"useHTML":true},"tooltip":{"valueSuffix":"GWh"}}},"series":[{"name":"hernieuwbare energie","data":[{"y":2500,"radius":"100%","innerRadius":"80%"}],"animation":false,"_symbolIndex":0},{"type":"solidgauge","animation":false,"data":[{"y":null}],"_symbolIndex":1}]}');  window.easychart.setData([["Scrap",""],["2500",""]]);})
//--><!]]>

I can't figure out where the "Stringified(' " is coming from

mattmay’s picture

I 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.