Browse Source

reverted showMinor/MajorLines options

v3_develop
Alex de Mulder 10 years ago
parent
commit
52cd648dea
6 changed files with 6153 additions and 6195 deletions
  1. +6142
    -6148
      dist/vis.js
  2. +0
    -12
      docs/graph2d.html
  3. +0
    -18
      docs/timeline.html
  4. +2
    -8
      lib/timeline/component/DataAxis.js
  5. +0
    -2
      lib/timeline/component/LineGraph.js
  6. +9
    -7
      lib/timeline/component/TimeAxis.js

+ 6142
- 6148
dist/vis.js
File diff suppressed because it is too large
View File


+ 0
- 12
docs/graph2d.html View File

@ -452,18 +452,6 @@ The options colored in green can also be used as options for the groups. All opt
<td>true</td> <td>true</td>
<td>Toggle the drawing of the major labels on the Y axis.</td> <td>Toggle the drawing of the major labels on the Y axis.</td>
</tr> </tr>
<tr>
<td>dataAxis.showMajorLines</td>
<td>Boolean</td>
<td>true</td>
<td>Toggle the drawing of the major lines on the Y axis.</td>
</tr>
<tr>
<td>dataAxis.showMinorLines</td>
<td>Boolean</td>
<td>true</td>
<td>Toggle the drawing of the major lines on the Y axis.</td>
</tr>
<tr> <tr>
<td>dataAxis.icons</td> <td>dataAxis.icons</td>
<td>Boolean</td> <td>Boolean</td>

+ 0
- 18
docs/timeline.html View File

@ -742,24 +742,6 @@ var options = {
<code>showMinorLabels</code> are false, no horizontal axis will be <code>showMinorLabels</code> are false, no horizontal axis will be
visible.</td> visible.</td>
</tr> </tr>
<tr>
<td>showMajorLines</td>
<td>boolean</td>
<td>true</td>
<td>By default, the timeline shows both minor and major date lines on the
time axis. You can use this option to hide the lines from the major dates.
</tr>
<tr>
<td>showMinorLines</td>
<td>boolean</td>
<td>true</td>
<td>By default, the timeline shows both minor and major date lines on the
time axis. You can use this option to hide the lines from the minor dates.
</tr>
<tr> <tr>
<td>stack</td> <td>stack</td>
<td>Boolean</td> <td>Boolean</td>

+ 2
- 8
lib/timeline/component/DataAxis.js View File

@ -19,8 +19,6 @@ function DataAxis (body, options, svg, linegraphOptions) {
orientation: 'left', // supported: 'left', 'right' orientation: 'left', // supported: 'left', 'right'
showMinorLabels: true, showMinorLabels: true,
showMajorLabels: true, showMajorLabels: true,
showMinorLines: true,
showMajorLines: true,
icons: true, icons: true,
majorLinesOffset: 7, majorLinesOffset: 7,
minorLinesOffset: 4, minorLinesOffset: 4,
@ -120,8 +118,6 @@ DataAxis.prototype.setOptions = function (options) {
'orientation', 'orientation',
'showMinorLabels', 'showMinorLabels',
'showMajorLabels', 'showMajorLabels',
'showMajorLines',
'showMinorLines',
'icons', 'icons',
'majorLinesOffset', 'majorLinesOffset',
'minorLinesOffset', 'minorLinesOffset',
@ -428,11 +424,9 @@ DataAxis.prototype._redrawLabels = function () {
if (y >= 0) { if (y >= 0) {
this._redrawLabel(y - 2, step.getCurrent(decimals), orientation, 'yAxis major', this.props.majorCharHeight); this._redrawLabel(y - 2, step.getCurrent(decimals), orientation, 'yAxis major', this.props.majorCharHeight);
} }
if (this.options.showMajorLines == true) {
this._redrawLine(y, orientation, 'grid horizontal major', this.options.majorLinesOffset, this.props.majorLineWidth);
}
this._redrawLine(y, orientation, 'grid horizontal major', this.options.majorLinesOffset, this.props.majorLineWidth);
} }
else if (this.options.showMinorLines == true) {
else {
this._redrawLine(y, orientation, 'grid horizontal minor', this.options.minorLinesOffset, this.props.minorLineWidth); this._redrawLine(y, orientation, 'grid horizontal minor', this.options.minorLinesOffset, this.props.minorLineWidth);
} }

+ 0
- 2
lib/timeline/component/LineGraph.js View File

@ -50,8 +50,6 @@ function LineGraph(body, options) {
dataAxis: { dataAxis: {
showMinorLabels: true, showMinorLabels: true,
showMajorLabels: true, showMajorLabels: true,
showMinorLines: true,
showMajorLines: true,
icons: false, icons: false,
width: '40px', width: '40px',
visible: true, visible: true,

+ 9
- 7
lib/timeline/component/TimeAxis.js View File

@ -40,8 +40,6 @@ function TimeAxis (body, options) {
// TODO: implement timeaxis orientations 'left' and 'right' // TODO: implement timeaxis orientations 'left' and 'right'
showMinorLabels: true, showMinorLabels: true,
showMajorLabels: true, showMajorLabels: true,
showMajorLines: true,
showMinorLines: true,
format: null format: null
}; };
this.options = util.extend({}, this.defaultOptions); this.options = util.extend({}, this.defaultOptions);
@ -67,7 +65,13 @@ TimeAxis.prototype = new Component();
TimeAxis.prototype.setOptions = function(options) { TimeAxis.prototype.setOptions = function(options) {
if (options) { if (options) {
// copy all options that we know // copy all options that we know
util.selectiveExtend(['orientation', 'showMinorLabels', 'showMajorLabels', 'showMinorLines', 'showMajorLines','hiddenDates', 'format'], this.options, options);
util.selectiveExtend([
'orientation',
'showMinorLabels',
'showMajorLabels',
'hiddenDates',
'format'
], this.options, options);
// apply locale to moment.js // apply locale to moment.js
// TODO: not so nice, this is applied globally to moment.js // TODO: not so nice, this is applied globally to moment.js
@ -226,11 +230,9 @@ TimeAxis.prototype._repaintLabels = function () {
} }
this._repaintMajorText(x, step.getLabelMajor(), orientation); this._repaintMajorText(x, step.getLabelMajor(), orientation);
} }
if (this.options.showMajorLines == true) {
this._repaintMajorLine(x, orientation);
}
this._repaintMajorLine(x, orientation);
} }
else if (this.options.showMinorLines == true) {
else {
this._repaintMinorLine(x, orientation); this._repaintMinorLine(x, orientation);
} }

Loading…
Cancel
Save