Thursday, December 6, 2012

YII Framework - Highcharts Extension - datetime issue Resolved


$this->Widget('ext.highcharts.HighchartsWidget', array(
   'options'=>'{
      "title": { "text": "MYSQL Replication" },
      "xAxis": {
      "title": { "text": "Month" },
"type": "datetime",
            "dateTimeLabelFormats": {
                "day": "%e"  
            }
      },
      "yAxis": {
         "title": { "text": "Time" },
"type": "datetime",
        "dateTimeLabelFormats": {
                "hour": "%H"
            }
      },
      "tooltip": {
            "xDateFormat": "%Y-%m-%d"
        },      
      "series": [
{ "name": "success", "data": [[x_ms,y_ms],[x_ms,y_ms]],"pointStart": utc_ms, "pointInterval": date_ms},
         { "name": "failure", "data": [[x_ms,y_ms],[x_ms,y_ms]],"pointStart": utc_ms, "pointInterval": date_ms}
      ]
   }'
));

<script src="http://code.highcharts.com/highcharts.js"></script>

No comments:

Post a Comment