Skip to content

Commit

Permalink
Rename timePoints to labels
Browse files Browse the repository at this point in the history
  • Loading branch information
larsac07 committed Aug 13, 2015
1 parent 92ee3c7 commit fc2b22c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion demos/3dbars-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'year',
timePoints: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
labels: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
series: [0, 1], // The series which holds points to update
autoPlay : true,
updateInterval: 10,
Expand Down
2 changes: 1 addition & 1 deletion demos/areaspline-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'Week',
timePoints: [
labels: [
"Week 31", "Week 32", "Week 33", "Week 34",
"Week 35", "Week 36", "Week 37", "Week 38",
"Week 39", "Week 40", "Week 41"
Expand Down
2 changes: 1 addition & 1 deletion demos/bars-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'year',
timePoints: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
labels: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
series: [0, 1], // The series which holds points to update
updateInterval: 20,
magnet: {
Expand Down
2 changes: 1 addition & 1 deletion demos/map-australia-bubbles-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'year',
timePoints: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
labels: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
loop: true,
series: 1, // The series which holds points to update
updateInterval: 50,
Expand Down
2 changes: 1 addition & 1 deletion demos/map-australia-colors-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'year',
timePoints: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
labels: [2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010],
series: 0, // The series which holds points to update
updateInterval: 50,
magnet: {
Expand Down
2 changes: 1 addition & 1 deletion demos/map-world-bubbles-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'year',
timePoints: [
labels: [
1960, 1961, 1962, 1963, 1964, 1965, 1966, 1967, 1968, 1969,
1970, 1971, 1972, 1973, 1974, 1975, 1976, 1977, 1978, 1979,
1980, 1981, 1982, 1983, 1984, 1985, 1986, 1987, 1988, 1989,
Expand Down
2 changes: 1 addition & 1 deletion demos/pie-demo/demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $(function () {
timeline: {
enabled: true,
axisLabel: 'year',
timePoints: [2005, 2006, 2007, 2008, 2009],
labels: [2005, 2006, 2007, 2008, 2009],
loop: true,
series: [0, 1], // The series which holds points to update
updateInterval: 20,
Expand Down
10 changes: 5 additions & 5 deletions timeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
} else { // Only one series with data
this.dataSeries[settings.series] = this.chart.series[settings.series];
}
this.timePoints = settings.timePoints;
this.labels = settings.labels;
this.loop = settings.loop === true;
this.paused = true;
this.updateInterval = 10;
Expand Down Expand Up @@ -70,9 +70,9 @@
this.playRange = H.createElement('input', {
id: 'play-range',
type: 'range',
value: this.timePoints.length - 1,
value: this.labels.length - 1,
min: 0,
max: this.timePoints.length - 1,
max: this.labels.length - 1,
step: this.step
}, null, this.playControls, null);

Expand All @@ -81,7 +81,7 @@
id: 'play-output',
name: this.timelineSettings.axisLabel
}, null, this.playControls, null);
this.playOutput.innerHTML = this.timePoints[this.timePoints.length - 1];
this.playOutput.innerHTML = this.labels[this.labels.length - 1];

// Bind controls to events
Highcharts.addEvent(this.playPauseBtn, 'click', function () {
Expand Down Expand Up @@ -223,7 +223,7 @@

// Moves output value to data point
Timeline.prototype.attractToStep = function () {
this.playOutput.innerHTML = this.timePoints[this.round(this.playRange.value)];
this.playOutput.innerHTML = this.labels[this.round(this.playRange.value)];
};

// Returns an integer rounded up, down or even depending on
Expand Down

0 comments on commit fc2b22c

Please sign in to comment.