WebContent/highcharts4/js/modules/data.src.js
(开头部分) 26KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/**
* @license Highcharts JS v4.1.5 (2015-04-13)
* Data module
*
* (c) 2012-2014 Torstein Honsi
*
* License: www.highcharts.com/license
*/
// JSLint options:
/*global jQuery, HighchartsAdapter */
(function (Highcharts) {
// Utilities
var each = Highcharts.each,
pick = Highcharts.pick,
inArray = HighchartsAdapter.inArray,
splat = Highcharts.splat,
SeriesBuilder;
// The Data constructor
var Data = function (dataOptions, chartOptions) {
this.init(dataOptions, chartOptions);
};
// Set the prototype properties
Highcharts.extend(Data.prototype, {
/**
* Initialize the Data object with the given options
*/
init: function (options, chartOptions) {
this.options = options;
this.chartOptions = chartOptions;
this.columns = options.columns || this.rowsToColumns(options.rows) || [];
this.firstRowAsNames = pick(options.firstRowAsNames, true);
this.decimalRegex = options.decimalPoint && new RegExp('^([0-9]+)' + options.decimalPoint + '([0-9]+)$');
// This is a two-dimensional array holding the raw, trimmed string values
// with the same organisation as the columns array. It makes it possible
// for example to revert from interpreted timestamps to string-based
// categories.
this.rawColumns = [];
// No need to parse or interpret anything
if (this.columns.length) {
this.dataFound();
// Parse and interpret
} else {
// Parse a CSV string if options.csv is given
this.parseCSV();
// Parse a HTML table if options.table is given
this.parseTable();
// Parse a Google Spreadsheet
后面还有 893 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
