vega-lite
Advanced tools
Comparing version 1.0.15 to 1.0.16
{ | ||
"description": "Stock price average broken down by quarter.", | ||
"data": {"url": "data/stocks.csv", "formatType":"csv"}, | ||
"data": {"url": "data/stocks.csv"}, | ||
"mark": "line", | ||
@@ -5,0 +5,0 @@ "encoding": { |
{ | ||
"description": "Stock price mean per quarter broken down by years.", | ||
"data": {"url": "data/stocks.csv", "formatType":"csv"}, | ||
"data": {"url": "data/stocks.csv"}, | ||
"mark": "point", | ||
@@ -5,0 +5,0 @@ "encoding": { |
{ | ||
"name": "vega-lite", | ||
"author": "Jeffrey Heer, Dominik Moritz, Kanit \"Ham\" Wongsuphasawat", | ||
"version": "1.0.15", | ||
"version": "1.0.16", | ||
"collaborators": [ | ||
@@ -6,0 +6,0 @@ "Kanit Wongsuphasawat <kanitw@gmail.com> (http://kanitw.yellowpigz.com)", |
@@ -16,3 +16,3 @@ "use strict"; | ||
if (data.values && data.values.length > 0) { | ||
sourceData.values = model.data().values; | ||
sourceData.values = data.values; | ||
sourceData.format = { type: 'json' }; | ||
@@ -26,5 +26,6 @@ } | ||
} | ||
var dataFormat = model.data().format || {}; | ||
var dataFormat = data.format || {}; | ||
var formatType = dataFormat.type || data['formatType']; | ||
sourceData.format = | ||
util_1.extend({ type: dataFormat.type ? model.data().format.type : defaultExtension }, dataFormat.property ? { property: dataFormat.property } : {}, dataFormat.feature ? | ||
util_1.extend({ type: formatType ? formatType : defaultExtension }, dataFormat.property ? { property: dataFormat.property } : {}, dataFormat.feature ? | ||
{ feature: dataFormat.feature } : | ||
@@ -31,0 +32,0 @@ dataFormat.mesh ? |
@@ -25,3 +25,3 @@ import {DataFormat, SOURCE} from '../../data'; | ||
if (data.values && data.values.length > 0) { | ||
sourceData.values = model.data().values; | ||
sourceData.values = data.values; | ||
sourceData.format = { type: 'json' }; | ||
@@ -37,6 +37,9 @@ } else if (data.url) { | ||
} | ||
const dataFormat: DataFormat = model.data().format || {}; | ||
const dataFormat: DataFormat = data.format || {}; | ||
// For backward compatability for former `data.formatType` property | ||
const formatType: DataFormat = dataFormat.type || data['formatType']; | ||
sourceData.format = | ||
extend( | ||
{ type: dataFormat.type ? model.data().format.type : defaultExtension }, | ||
{ type: formatType ? formatType : defaultExtension }, | ||
dataFormat.property ? { property: dataFormat.property } : {}, | ||
@@ -43,0 +46,0 @@ // Feature and mesh are two mutually exclusive properties |
@@ -51,3 +51,3 @@ /* | ||
/** | ||
* A URL from which to load the data set. Use the formatType property | ||
* A URL from which to load the data set. Use the format.type property | ||
* to ensure the loaded data is correctly parsed. | ||
@@ -54,0 +54,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
2359802
32441