Socket
Socket
Sign inDemoInstall

vega-lite

Package Overview
Dependencies
Maintainers
2
Versions
470
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vega-lite - npm Package Compare versions

Comparing version 1.0.14 to 1.0.15

2

package.json
{
"name": "vega-lite",
"author": "Jeffrey Heer, Dominik Moritz, Kanit \"Ham\" Wongsuphasawat",
"version": "1.0.14",
"version": "1.0.15",
"collaborators": [

@@ -6,0 +6,0 @@ "Kanit Wongsuphasawat <kanitw@gmail.com> (http://kanitw.yellowpigz.com)",

@@ -169,3 +169,3 @@ "use strict";

}
var fieldTitle = fielddef_1.title(model.fieldDef(channel));
var fieldTitle = fielddef_1.title(model.fieldDef(channel), model.config());
var maxLength;

@@ -172,0 +172,0 @@ if (axis.titleMaxLength) {

@@ -228,3 +228,3 @@ import {AxisOrient} from '../axis';

// if not defined, automatically determine axis title from field def
const fieldTitle = fieldDefTitle(model.fieldDef(channel));
const fieldTitle = fieldDefTitle(model.fieldDef(channel), model.config());

@@ -231,0 +231,0 @@ let maxLength;

@@ -38,3 +38,3 @@ "use strict";

var def = getLegendDefWithScale(model, channel);
def.title = title(legend, fieldDef);
def.title = title(legend, fieldDef, config);
var format = common_1.numberFormat(fieldDef, legend.format, config);

@@ -63,7 +63,7 @@ if (format) {

exports.parseLegend = parseLegend;
function title(legend, fieldDef) {
function title(legend, fieldDef, config) {
if (typeof legend !== 'boolean' && legend.title) {
return legend.title;
}
return fielddef_1.title(fieldDef);
return fielddef_1.title(fieldDef, config);
}

@@ -70,0 +70,0 @@ exports.title = title;

import {COLOR, SIZE, SHAPE, Channel} from '../channel';
import {Config} from '../config';
import {FieldDef} from '../fielddef';

@@ -54,3 +55,3 @@ import {Legend} from '../legend';

// 1.1 Add properties with special rules
def.title = title(legend, fieldDef);
def.title = title(legend, fieldDef, config);
const format = numberFormat(fieldDef, legend.format, config);

@@ -84,3 +85,3 @@ if (format) {

export function title(legend: Legend, fieldDef: FieldDef) {
export function title(legend: Legend, fieldDef: FieldDef, config: Config) {
if (typeof legend !== 'boolean' && legend.title) {

@@ -90,3 +91,3 @@ return legend.title;

return fieldTitle(fieldDef);
return fieldTitle(fieldDef, config);
}

@@ -93,0 +94,0 @@

@@ -99,2 +99,3 @@ "use strict";

timeFormat: '%Y-%m-%d',
countTitle: 'Number of Records',
cell: exports.defaultCellConfig,

@@ -101,0 +102,0 @@ mark: exports.defaultMarkConfig,

@@ -421,2 +421,8 @@ import {ScaleConfig, FacetScaleConfig, defaultScaleConfig, defaultFacetScaleConfig} from './scale';

/**
* Default axis and legend title for count fields.
* @type {string}
*/
countTitle?: string;
/** Cell Config */

@@ -447,2 +453,3 @@ cell?: CellConfig;

timeFormat: '%Y-%m-%d',
countTitle: 'Number of Records',

@@ -449,0 +456,0 @@ cell: defaultCellConfig,

@@ -59,5 +59,4 @@ "use strict";

exports.isMeasure = isMeasure;
exports.COUNT_TITLE = 'Number of Records';
function count() {
return { field: '*', aggregate: aggregate_1.AggregateOp.COUNT, type: type_1.QUANTITATIVE, title: exports.COUNT_TITLE };
return { field: '*', aggregate: aggregate_1.AggregateOp.COUNT, type: type_1.QUANTITATIVE };
}

@@ -107,3 +106,3 @@ exports.count = count;

exports.cardinality = cardinality;
function title(fieldDef) {
function title(fieldDef, config) {
if (fieldDef.title != null) {

@@ -113,3 +112,3 @@ return fieldDef.title;

if (isCount(fieldDef)) {
return exports.COUNT_TITLE;
return config.countTitle;
}

@@ -116,0 +115,0 @@ var fn = fieldDef.aggregate || fieldDef.timeUnit || (fieldDef.bin && 'bin');

@@ -6,2 +6,3 @@ // utility for a field definition object

import {Bin} from './bin';
import {Config} from './config';
import {Legend} from './legend';

@@ -159,6 +160,4 @@ import {Scale, ScaleType} from './scale';

export const COUNT_TITLE = 'Number of Records';
export function count(): FieldDef {
return { field: '*', aggregate: AggregateOp.COUNT, type: QUANTITATIVE, title: COUNT_TITLE };
return { field: '*', aggregate: AggregateOp.COUNT, type: QUANTITATIVE};
}

@@ -218,3 +217,3 @@

export function title(fieldDef: FieldDef) {
export function title(fieldDef: FieldDef, config: Config) {
if (fieldDef.title != null) {

@@ -224,3 +223,3 @@ return fieldDef.title;

if (isCount(fieldDef)) {
return COUNT_TITLE;
return config.countTitle;
}

@@ -227,0 +226,0 @@ const fn = fieldDef.aggregate || fieldDef.timeUnit || (fieldDef.bin && 'bin');

@@ -11,3 +11,3 @@ "use strict";

exports.facet = require('./facet');
exports.fieldDef = require('./fieldDef');
exports.fieldDef = require('./fielddef');
exports.legend = require('./legend');

@@ -20,3 +20,3 @@ exports.mark = require('./mark');

exports.stack = require('./stack');
exports.timeUnit = require('./timeUnit');
exports.timeUnit = require('./timeunit');
exports.transform = require('./transform');

@@ -23,0 +23,0 @@ exports.type = require('./type');

@@ -10,3 +10,3 @@ export import axis = require('./axis');

export import facet = require('./facet');
export import fieldDef = require('./fieldDef');
export import fieldDef = require('./fielddef');
export import legend = require('./legend');

@@ -19,3 +19,3 @@ export import mark = require('./mark');

export import stack = require('./stack');
export import timeUnit = require('./timeUnit');
export import timeUnit = require('./timeunit');
export import transform = require('./transform');

@@ -22,0 +22,0 @@ export import type = require('./type');

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc