-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from happinessworks/master
Fix missing second-last label and axis line
- Loading branch information
Showing
3 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<html><head> | ||
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | ||
<script type="text/javascript" src="raphael.min.js"></script> | ||
<script type="text/javascript" src="../compiled/charts.js"></script> | ||
<script type="text/javascript" src="broken.js"></script> | ||
</head> | ||
<body> | ||
<div id="container"> | ||
<div class="app-1col" id="chart1" style="width: 900px; height: 300px; padding: 20px; margin-top:20px; margin-bottom:20px;"></div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
$(document).ready(function() { | ||
var monthly_sales = [ | ||
[new Date("2012-09-01T01:00:00+01:00"), 1486], | ||
[new Date("2012-10-01T01:00:00+01:00"), 952], | ||
[new Date("2012-11-01T00:00:00+00:00"), 2461], | ||
[new Date("2012-12-01T00:00:00+00:00"), 631], | ||
[new Date("2013-01-01T00:00:00+00:00"), 3644], | ||
[new Date("2013-02-01T00:00:00+00:00"), 0], | ||
[new Date("2013-03-01T00:00:00+00:00"), 0], | ||
[new Date("2013-04-01T01:00:00+01:00"), 0], | ||
[new Date("2013-05-01T01:00:00+01:00"), 0], | ||
[new Date("2013-06-01T01:00:00+01:00"), 0], | ||
[new Date("2013-07-01T01:00:00+01:00"), 0], | ||
] | ||
var chart1 = new Charts.LineChart('chart1', { | ||
show_grid: true, | ||
show_y_labels: true, | ||
show_x_labels:true, | ||
label_max: false, | ||
label_min: false, | ||
multi_axis: false, | ||
max_y_labels: 9, | ||
max_x_labels: 48, | ||
x_padding: 55, | ||
y_padding:40, | ||
x_label_size: 13, | ||
label_format: "%m/%Y", | ||
y_axis_scale: [0, 8000] | ||
}); | ||
|
||
chart1.add_line({ | ||
data: monthly_sales, | ||
options: { | ||
line_color: "#16728c", | ||
dot_color: "#16a2cb", | ||
dot_stroke_size: 1, | ||
dot_stroke_color: "#16728c", | ||
area_opacity: 0.3, | ||
dot_size: 5, | ||
line_width: 1, | ||
smoothing: 0 | ||
} | ||
}); | ||
chart1.draw(); | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters