Topic: Json and jvector map


I want use jvectorMap ( in my application to generate automatic data map.

I make a table, I create javascript, all work fine but

In my controler, i generate json for the data map like this :

def show ...
respond_to do |format|
      format.json { render :json => }

and my config for JvectorMap

    values: 1.json,
    scaleColors: ['#C8EEFF', '#006491'],
    normalizeFunction: 'polynomial',
    hoverOpacity: 0.7,
    hoverColor: false

the json file say (name 1.json) : [{"d01":213,"d02":899,"d03":561....}]

So 2 questions :

- the data doesn't work if i have brackets [] in the file. How to erase or no generate ?

- Can I have a generic name, like data.json, for the json file what I can put in the config of Jvector ?

Last edited by pasqal (2011-11-24 11:07:17)

Re: Json and jvector map

Did you get a solution to this?? Have you successfully used Jvectormap to render Json data? Please let me know soon.