I am not able to parse the JSON string in D3.js if I keep it. If I mention any JSON file name I am able to display the graph.
CODE
d3.json("mperday.json",function(json){
//graph displayed now
});
var myjson = "[
[
{
"time": "2014-02-19",
"y": 10
}
],
[
{
"time": "2014-02-19",
"y": 12
}
],
[
{
"time": "2014-02-19",
"y": 14
}
]]";
d3.json(myjson,function(json){
//graph not displaying now
});
d3.json(JSON.parse(myjson),function(json){
//graph not displayed now
});
Kindly, provide me some solution.