Custom labeling highcharts json.net to geckoboard

130 Views Asked by At

I'm using json.net to build and push a highchart to a Geckoboard. Geckoboard doesn't give any example to set the lang options (even if they did I don't exaclty know where I would set them). I know there is custom formatting, but I receive a 400 bad request when I try to pass in a Javascript function to format:

            new JProperty("yAxis",
                new JArray(
                    new JObject(
                        new JProperty("title",
                            new JObject(
                                new JProperty("style",
                                    new JObject(
                                        new JProperty("color", "#b9bbbb")
                                    )
                                ),
                                new JProperty("text", "Sales Orders")
                            )
                        ),
                        new JProperty("labels",
                            new JObject(
                                new JProperty("formatter",new JRaw("function(){return this.value/100;}"))
                            )
                        )
                    ),
                    new JObject(
                        new JProperty("title",
                            new JObject(
                                new JProperty("text","Ad Cost"),
                                new JProperty("style",
                                    new JObject(
                                        new JProperty("color","#FFFFFF")
                                    )
                                )
                            )
                        ),
                        new JProperty("opposite","true")


                    )
                 )

            ),

This is based of the jsfiddle provided by Highcharts: http://jsfiddle.net/gh/get/jquery/1.7.2/highslide-software/highcharts.com/tree/master/samples/highcharts/xaxis/labels-formatter-linked/

The relevant part of the string that I am posting to Geckoboard:

      "yAxis": [
    {
      "title": {
        "style": {
          "color": "#b9bbbb"
        },
        "text": "Name Of Axis"
      },
      "labels": {
        "formatter": function(){return this.value/100;}
      }
    },

Any help would be greatly appreciated.

1

There are 1 best solutions below

0
On BEST ANSWER

Geckoboard responded to my inquiry (submitted a help ticket) and they said that they don't support this implementation at this time.