Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
ordinalScaleStringNumber = ordinalScaleStringNumber.domain(['negative', 'neutral', 'positive']);
// range(...) -----------------------------------------------------------------
ordinalScaleStringString = ordinalScaleStringString.range(['crimson', 'midnightblue', 'seagreen']);
rangeStrings = ordinalScaleStringString.range();
ordinalScaleStringNumber = ordinalScaleStringNumber.range([-1, 0, 1]);
rangeNumbers = ordinalScaleStringNumber.range();
// unknown(...) and d3Scale.scaleImplicit --------------------------------------
let implicit: { name: 'implicit' } = d3Scale.scaleImplicit;
ordinalScaleStringString = ordinalScaleStringString.unknown(d3Scale.scaleImplicit);
ordinalScaleStringNumber = ordinalScaleStringNumber.unknown(0);
let unknownValue: string | { name: 'implicit' } = ordinalScaleStringString.unknown();
if (typeof unknownValue === 'string') {
console.log(unknownValue);
} else {
console.log(unknownValue.name);
}
// (...) value mapping from domain to output -----------------------------------
outputString = ordinalScaleStringString('neutral');
outputNumber = ordinalScaleStringNumber('negative');
domainStrings = ordinalScaleStringString.domain();
ordinalScaleStringNumber = ordinalScaleStringNumber.domain(['negative', 'neutral', 'positive']);
// range(...) -----------------------------------------------------------------
ordinalScaleStringString = ordinalScaleStringString.range(['crimson', 'midnightblue', 'seagreen']);
ordinalScaleStringString = ordinalScaleStringString.range(schemePuRd[3]);
rangeStrings = ordinalScaleStringString.range();
ordinalScaleStringNumber = ordinalScaleStringNumber.range([-1, 0, 1]);
rangeNumbers = ordinalScaleStringNumber.range();
// unknown(...) and d3Scale.scaleImplicit --------------------------------------
const implicit: { name: 'implicit' } = d3Scale.scaleImplicit;
ordinalScaleStringString = ordinalScaleStringString.unknown(d3Scale.scaleImplicit);
ordinalScaleStringNumber = ordinalScaleStringNumber.unknown(0);
const unknownValue: string | { name: 'implicit' } = ordinalScaleStringString.unknown();
if (typeof unknownValue === 'string') {
console.log(unknownValue);
} else {
console.log(unknownValue.name);
}
// (...) value mapping from domain to output -----------------------------------
outputString = ordinalScaleStringString('neutral');
ordinalScaleStringNumber = ordinalScaleStringNumber.domain(['negative', 'neutral', 'positive']);
// range(...) -----------------------------------------------------------------
ordinalScaleStringString = ordinalScaleStringString.range(['crimson', 'midnightblue', 'seagreen']);
ordinalScaleStringString = ordinalScaleStringString.range(schemePuRd[3]);
rangeStrings = ordinalScaleStringString.range();
ordinalScaleStringNumber = ordinalScaleStringNumber.range([-1, 0, 1]);
rangeNumbers = ordinalScaleStringNumber.range();
// unknown(...) and d3Scale.scaleImplicit --------------------------------------
const implicit: { name: 'implicit' } = d3Scale.scaleImplicit;
ordinalScaleStringString = ordinalScaleStringString.unknown(d3Scale.scaleImplicit);
ordinalScaleStringNumber = ordinalScaleStringNumber.unknown(0);
const unknownValue: string | { name: 'implicit' } = ordinalScaleStringString.unknown();
if (typeof unknownValue === 'string') {
console.log(unknownValue);
} else {
console.log(unknownValue.name);
}
// (...) value mapping from domain to output -----------------------------------
outputString = ordinalScaleStringString('neutral');
outputNumber = ordinalScaleStringNumber('negative');
domainStrings = ordinalScaleStringString.domain();
ordinalScaleStringNumber = ordinalScaleStringNumber.domain(['negative', 'neutral', 'positive']);
// range(...) -----------------------------------------------------------------
ordinalScaleStringString = ordinalScaleStringString.range(['crimson', 'midnightblue', 'seagreen']);
rangeStrings = ordinalScaleStringString.range();
ordinalScaleStringNumber = ordinalScaleStringNumber.range([-1, 0, 1]);
rangeNumbers = ordinalScaleStringNumber.range();
// unknown(...) and d3Scale.scaleImplicit --------------------------------------
let implicit: { name: 'implicit' } = d3Scale.scaleImplicit;
ordinalScaleStringString = ordinalScaleStringString.unknown(d3Scale.scaleImplicit);
ordinalScaleStringNumber = ordinalScaleStringNumber.unknown(0);
let unknownValue: string | { name: 'implicit' } = ordinalScaleStringString.unknown();
if (typeof unknownValue === 'string') {
console.log(unknownValue);
} else {
console.log(unknownValue.name);
}
// (...) value mapping from domain to output -----------------------------------
outputString = ordinalScaleStringString('neutral');