<script type="text/javascript" src="../tests/multi_csv.js"></script>
<script type="text/javascript" src="../tests/multiple_axes.js"></script>
<script type="text/javascript" src="../tests/multiple_axes-old.js"></script>
+ <script type="text/javascript" src="../tests/numeric-labels.js"></script>
<script type="text/javascript" src="../tests/no_hours.js"></script>
<script type="text/javascript" src="../tests/parser.js"></script>
<script type="text/javascript" src="../tests/pathological_cases.js"></script>
var setName = this.setNames[setIdx];
var axis = this.dygraph_.axisPropertiesForSeries(setName);
// TODO (konigsberg): use optionsForAxis instead.
- var logscale = this.dygraph_.attributes_.getForSeries("logscale", setIdx);
+ var logscale = this.dygraph_.attributes_.getForSeries("logscale", setName);
// Preallocating the size of points reduces reallocations, and therefore,
// calls to collect garbage.
var setName = this.setNames[setIdx];
var axis = this.dygraph_.axisPropertiesForSeries(setName);
// TODO (konigsberg): use optionsForAxis instead.
- var logscale = this.dygraph_.attributes_.getForSeries("logscale", setIdx);
+ var logscale = this.dygraph_.attributes_.getForSeries("logscale", setName);
for (j = 0; j < dataset.length; j++, i++) {
var item = dataset[j];
* the value for the axis is returned (and afterwards, the global value.)
*
* @param {string} name the name of the option.
- * @param {string|number} series the series to search. Can be the string representation
- * or 0-offset series number.
+ * @param {string} series the series to search.
*/
DygraphOptions.prototype.getForSeries = function(name, series) {
// Honors indexes as series.
- var seriesName = (typeof(series) == "number") ? this.labels[series] : series;
-
- if (seriesName === this.dygraph_.highlightSet_) {
+ if (series === this.dygraph_.highlightSet_) {
if (this.highlightSeries_.hasOwnProperty(name)) {
return this.highlightSeries_[name];
}
}
- if (!this.series_.hasOwnProperty(seriesName)) {
+ if (!this.series_.hasOwnProperty(series)) {
throw "Unknown series: " + series;
}
- var seriesObj = this.series_[seriesName];
+ var seriesObj = this.series_[series];
var seriesOptions = seriesObj["options"];
if (seriesOptions.hasOwnProperty(name)) {
return seriesOptions[name];
/**
* Return the y-axis for a given series, specified by name.
*/
-DygraphOptions.prototype.axisForSeries = function(seriesName) {
- return this.series_[seriesName].yAxis;
+DygraphOptions.prototype.axisForSeries = function(series) {
+ return this.series_[series].yAxis;
};
/**