Currently, I am utilizing flot for graphing purposes and facing difficulties when trying to pass the tickSize along with my JSON data. In this scenario, I am utilizing MVC to transmit the JSON within a model. Below is an excerpt of code demonstrating how I extract the JSON in my JavaScript function:
var json = '<%=Model.Json %>';
var data = jQuery.parseJSON(json);
This is an example of how the JSON appears upon leaving the controller:
{\"GraphData\":[{\"X\":1333929600000,\"Y\":0.0},{\"X\":1333670400000,\"Y\":0.46}],\"Max\":1333324800000,\"Min\":1333929600000,\"TickSize\":\"[1, 'day']\"}
The issue lies specifically with the "TickSize" component. It seems that the square brackets around "[1, 'day']" are causing some parsing challenges since typically, [] implies an array. However, Flot requires the tick size to be in that particular format. How should I structure my JSON so that I can properly access the TickSize value?