Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2015
547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 1.97 KB | None | 0 0
  1.         var chart = new AmCharts.AmSerialChart();
  2.         chart.type = "serial";
  3.         chart.theme = "light";
  4.         chart.dataProvider = [{
  5.             "timeOfDay": "18:20",
  6.             "value": 100
  7.         }, {
  8.             "timeOfDay": "19:40",
  9.             "value": 80
  10.         }, {
  11.             "timeOfDay": "21:40",
  12.             "value": 20
  13.         }, {
  14.             "timeOfDay": "22:40",
  15.             "value": 50
  16.         }, {
  17.             "timeOfDay": "23:00",
  18.             "value": 50
  19.         }, {
  20.             "timeOfDay": "23:20",
  21.             "value": 50
  22.         }];
  23.         chart.valueAxes = [{
  24.             "axisAlpha": 0,
  25.             "position": "left"
  26.         }];
  27.         chart.graphs = [{
  28.             "id":"g1",
  29.             "balloonText": "[[category]]<br><b><span style='font-size:14px;'>[[value]]</span></b>",
  30.             "lineColor": "#d1655d",
  31.             "lineThickness": 2,
  32.             "negativeLineColor": "#637bb6",
  33.             "type": "step",
  34.             "valueField": "value"
  35.         }];
  36.         chart.chartScrollBar = {
  37.             "graph":"g1",
  38.             "gridAlpha":0,
  39.             "color":"#888888",
  40.             "scrollbarHeight":55,
  41.             "backgroundAlpha":0,
  42.             "selectedBackgroundAlpha":0.1,
  43.             "selectedBackgroundColor":"#888888",
  44.             "graphFillAlpha":0,
  45.             "autoGridCount":true,
  46.             "selectedGraphFillAlpha":0,
  47.             "graphLineAlpha":0.2,
  48.             "graphLineColor":"#c2c2c2",
  49.             "selectedGraphLineColor":"#888888",
  50.             "selectedGraphLineAlpha":1
  51.         };
  52.         chart.chartCursor = {
  53.             "categoryBalloonDateFormat": "JJ:NN:SS",
  54.             "cursorPosition" : "mouse",
  55.             "bulletsEnabled" : true,
  56.             "cursorAlpha": 0,
  57.             "fullWidth":true
  58.         };
  59.         chart.dataDateFormat = "JJ:NN:SS";
  60.         chart.categoryField = "timeOfDay";
  61.         chart.categoryAxis = {
  62.             "minPeriod": "mm", // Can be changed for example "5mm"
  63.             "parseDates": true,
  64.             "minorGridAlpha": 0.1,
  65.             "minorGridEnabled": true
  66.         };
  67.         chart.export = {
  68.             "enabled": true
  69.         };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement