Skip to content

Commit

Permalink
Merge branch 'release-1.0.1' into releases
Browse files Browse the repository at this point in the history
  • Loading branch information
danvk committed Aug 29, 2013
2 parents 0668281 + 172be78 commit 2628bb2
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README
@@ -1,5 +1,5 @@
dygraphs JavaScript charting library
Version 1.0.0
Version 1.0.1
Copyright (c) 2006-, Dan Vanderkam.

Documentation: http://dygraphs.com/
Expand Down
32 changes: 32 additions & 0 deletions auto_tests/tests/to_dom_coords.js
Expand Up @@ -165,3 +165,35 @@ ToDomCoordsTestCase.prototype.testAxisTickSize = function() {
assertEquals([200, 0], g.toDomCoords(0, 100));
assertEquals([500, 386], g.toDomCoords(100, 0));
}

ToDomCoordsTestCase.prototype.testChartLogarithmic = function() {
var opts = {
drawXAxis: false,
drawYAxis: false,
drawXGrid: false,
drawYGrid: false,
logscale: true,
rightGap: 0,
valueRange: [1, 4],
dateWindow: [0, 10],
width: 400,
height: 400,
colors: ['#ff0000']
}

var graph = document.getElementById("graph");
g = new Dygraph(graph, [ [1,1], [4,4] ], opts);

var epsilon = 1e-8;
assertEqualsDelta([0, 4], g.toDataCoords(0, 0), epsilon);
assertEqualsDelta([0, 1], g.toDataCoords(0, 400), epsilon);
assertEqualsDelta([10, 4], g.toDataCoords(400, 0), epsilon);
assertEqualsDelta([10, 1], g.toDataCoords(400, 400), epsilon);
assertEqualsDelta([10, 2], g.toDataCoords(400, 200), epsilon);

assertEquals([0, 0], g.toDomCoords(0, 4));
assertEquals([0, 400], g.toDomCoords(0, 1));
assertEquals([400, 0], g.toDomCoords(10, 4));
assertEquals([400, 400], g.toDomCoords(10, 1));
assertEquals([400, 200], g.toDomCoords(10, 2));
}
1 change: 1 addition & 0 deletions docs/header.html
Expand Up @@ -45,6 +45,7 @@ <h1 class="navbar-brand"><a href="/">dygraphs</a></h1>
<li role="presentation"><a role="menuitem" tabindex="-1" href="data.html">Data Format</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="annotations.html">Annotations</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="css.html">CSS Reference</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="versions.html">Version History</a></li>
<li role="presentation" class="divider"></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="ie.html">Notes on Internet Explorer</a></li>
<li role="presentation"><a role="menuitem" tabindex="-1" href="gwt.html">Notes on GWT</a></li>
Expand Down
17 changes: 17 additions & 0 deletions docs/site.css
Expand Up @@ -128,3 +128,20 @@ pre{
#current-release p:last-child {
margin-bottom: 0;
}

/* When you visit dygraphs.com/options.html#errorBars, the fixed top nav
* obscures the top 100px of content for that anchor. This is a workaround.
* See http://stackoverflow.com/questions/9047703/fixed-position-navbar-obscures-anchors
*/
a[name] {
padding-top: 100px; /* matches body { padding-top } */
margin-top: -100px; /* matches body { padding-top } */
display: inline-block; /* required for webkit browsers */
}
@media screen and (min-width: 768px) and (max-width: 992px) {
a[name] {
padding-top: 130px; /* matches body { padding-top } */
margin-top: -130px; /* matches body { padding-top } */
display: inline-block; /* required for webkit browsers */
}
}
37 changes: 37 additions & 0 deletions docs/versions.html
@@ -0,0 +1,37 @@
<!--#include virtual="header.html" -->

<style>
.versions {
margin-top: 20px;
}
.versions td {
vertical-align: top;
}
.versions td:first-child {
text-align: right;
padding-right: 20px;
font-weight: bold;
}
.date {
font-size: small;
color: darkgray;
font-weight: normal;
}
</style>

<h2>Version History</h2>

<p>For links to download each release, see the <a href="/download.html">Downloads</a> page.</p>

<table class="versions">
<tr>
<td>1.0.1<p class="date">2013-08-29</p></td>
<td>Minor bug fixes and updates to web site.</td>
</tr>
<tr>
<td>1.0.0<p class="date">2013-08-14</p></td>
<td>Initial Release. See <a href="http://blog.dygraphs.com/2013/08/announcing-dygraphs-100.html">blog post</a>.</td>
</tr>
</table>

<!--#include virtual="footer.html" -->
4 changes: 2 additions & 2 deletions dygraph.js
Expand Up @@ -80,7 +80,7 @@ var Dygraph = function(div, data, opts, opt_fourth_param) {
};

Dygraph.NAME = "Dygraph";
Dygraph.VERSION = "1.0.0";
Dygraph.VERSION = "1.0.1";
Dygraph.__repr__ = function() {
return "[" + this.NAME + " " + this.VERSION + "]";
};
Expand Down Expand Up @@ -857,7 +857,7 @@ Dygraph.prototype.toDataYCoord = function(y, axis) {
var yRange = this.yAxisRange(axis);

if (typeof(axis) == "undefined") axis = 0;
if (!this.axes_[axis].logscale) {
if (!this.attributes_.getForAxis("logscale", axis)) {
return yRange[0] + (area.y + area.h - y) / area.h * (yRange[1] - yRange[0]);
} else {
// Computing the inverse of toDomCoord.
Expand Down
2 changes: 2 additions & 0 deletions generate-download.py
Expand Up @@ -65,6 +65,8 @@ def file_links(release):
%(previous_lis)s
</ul>
<p>See <a href="/versions.html">Version History</a> for more information on each release.</p>
<!--#include virtual="footer.html" -->
''' % {
Expand Down
10 changes: 9 additions & 1 deletion release.sh
Expand Up @@ -42,11 +42,19 @@ if [ $? -ne 0 ]; then
exit 1
fi

# Everything is good. Tag this release and push it.
# Everything is good.
# Switch to the "releases" branch, merge this change and tag it.
echo "Switching branches to do the release."
git checkout releases
git merge --no-ff $branch

COMMIT=$(git rev-parse HEAD)
echo "Tagging commit $COMMIT as version $VERSION"
git tag -a "v$VERSION" -m "Release of version $VERSION"
git push --tags

echo "Release was successful!"
echo "Don't forget to merge changes on this branch back into master."

# Discourage users from working on the "releases" branch.
git checkout master
6 changes: 6 additions & 0 deletions releases.json
@@ -1,4 +1,10 @@
[
{
"version": "1.0.1",
"files": [
"dygraph-combined.js"
]
},
{
"version": "1.0.0",
"files": [
Expand Down

0 comments on commit 2628bb2

Please sign in to comment.