Setting formatter callback using highcharts-convert.js -


I am using highcharts-convert.js which is to create PDF charts on serverside. I want to set the data labels format for a column chart (). As this is a function, I can not write it in my output JSN file which is the input for Highcharch-convert.JS. So I think that I should put it in my callback.js and call it like this:

Highchurch-convert.js -infile infile.js -outfile outfile.pdf -width 1000-callback js

But I can not set the formatter function in callback.js. I tried to do this:

  function (charts) {var labelFormatter = function (p) { If (this.y == 0) {return ''; } And {return.y}}; Chart.series.dataLabels.formatter = labelFormatter; }   

But this gives me this error:

  Type error: 'undefined' is not an object (evaluation 'chart.series.dataLabels.formatter = labelFormatter ')   

I tried to put the formatter function outside the definition of callback, but highchurch-convert.js would not accept it. How do I set up Data Labell Format Callback for HighChurchConvert.JS?

The server exporting an input file for good, high quality should not be true JSON. In general, work in that JSON is supported. Just use it as an example: <">" "" "" "": [{"Data": [29.9, 71.5, 106.4], "Data Label": {"Enabled": True, "Formatter ": Function (p) {if (this.y == 0) {return ''}} else {return.y + 'a';}}}}]}

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -