Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var chart = new AmCharts.AmSerialChart();
- chart.type = "serial";
- chart.theme = "light";
- chart.dataProvider = [{
- "timeOfDay": "18:20",
- "value": 100
- }, {
- "timeOfDay": "19:40",
- "value": 80
- }, {
- "timeOfDay": "21:40",
- "value": 20
- }, {
- "timeOfDay": "22:40",
- "value": 50
- }, {
- "timeOfDay": "23:00",
- "value": 50
- }, {
- "timeOfDay": "23:20",
- "value": 50
- }];
- chart.valueAxes = [{
- "axisAlpha": 0,
- "position": "left"
- }];
- chart.graphs = [{
- "id":"g1",
- "balloonText": "[[category]]<br><b><span style='font-size:14px;'>[[value]]</span></b>",
- "lineColor": "#d1655d",
- "lineThickness": 2,
- "negativeLineColor": "#637bb6",
- "type": "step",
- "valueField": "value"
- }];
- chart.chartScrollBar = {
- "graph":"g1",
- "gridAlpha":0,
- "color":"#888888",
- "scrollbarHeight":55,
- "backgroundAlpha":0,
- "selectedBackgroundAlpha":0.1,
- "selectedBackgroundColor":"#888888",
- "graphFillAlpha":0,
- "autoGridCount":true,
- "selectedGraphFillAlpha":0,
- "graphLineAlpha":0.2,
- "graphLineColor":"#c2c2c2",
- "selectedGraphLineColor":"#888888",
- "selectedGraphLineAlpha":1
- };
- chart.chartCursor = {
- "categoryBalloonDateFormat": "JJ:NN:SS",
- "cursorPosition" : "mouse",
- "bulletsEnabled" : true,
- "cursorAlpha": 0,
- "fullWidth":true
- };
- chart.dataDateFormat = "JJ:NN:SS";
- chart.categoryField = "timeOfDay";
- chart.categoryAxis = {
- "minPeriod": "mm", // Can be changed for example "5mm"
- "parseDates": true,
- "minorGridAlpha": 0.1,
- "minorGridEnabled": true
- };
- chart.export = {
- "enabled": true
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement