diff --git a/src/generate.ts b/src/generate.ts index bf1390d6..d24aaf73 100644 --- a/src/generate.ts +++ b/src/generate.ts @@ -6,7 +6,7 @@ import {ENUMERATOR_INDEX} from '../src/enumerator'; import {QueryConfig, DEFAULT_QUERY_CONFIG} from './config'; import {SpecQueryModel} from './model'; import {Property} from './property'; -import {EncodingQuery, ScaleQuery} from './query/encoding'; +import {EncodingQuery} from './query/encoding'; import {SpecQuery} from './query/spec'; import {Schema} from './schema'; import {Dict} from './util'; @@ -37,12 +37,12 @@ export function generate(specQ: SpecQuery, schema: Schema, opt: QueryConfig = DE ENCODING_QUERY_INDEX[channel] = specQM.getEncodingQueryByChannel(channel); }); - const y_encQ = ENCODING_QUERY_INDEX[Channel.Y]; - if (y_encQ !== undefined) { + const yEncQ = ENCODING_QUERY_INDEX[Channel.Y]; + if (yEncQ !== undefined) { if (ENCODING_QUERY_INDEX[Channel.ROW] || - schema.cardinality(y_encQ) > 10) { + schema.cardinality(yEncQ) > 10) { - if (y_encQ.scale === undefined) { + if (yEncQ.scale === undefined) { specQM.setEncodingProperty( specQM.getEncodingQueryIndexByChannel(Channel.Y), Property.SCALE, @@ -51,7 +51,7 @@ export function generate(specQ: SpecQuery, schema: Schema, opt: QueryConfig = DE ); } - if (y_encQ.scale) { + if (yEncQ.scale) { specQM.setEncodingProperty( specQM.getEncodingQueryIndexByChannel(Channel.Y), Property.SCALE_BANDSIZE, @@ -62,12 +62,12 @@ export function generate(specQ: SpecQuery, schema: Schema, opt: QueryConfig = DE } } - const x_encQ = ENCODING_QUERY_INDEX[Channel.X]; - if (x_encQ !== undefined) { + const xEncQ = ENCODING_QUERY_INDEX[Channel.X]; + if (xEncQ !== undefined) { if (ENCODING_QUERY_INDEX[Channel.COLUMN] || - schema.cardinality(x_encQ) > 10) { + schema.cardinality(xEncQ) > 10) { - if (x_encQ.scale === undefined) { + if (xEncQ.scale === undefined) { specQM.setEncodingProperty( specQM.getEncodingQueryIndexByChannel(Channel.X), Property.SCALE, @@ -76,7 +76,7 @@ export function generate(specQ: SpecQuery, schema: Schema, opt: QueryConfig = DE ); } - if (x_encQ.scale) { + if (xEncQ.scale) { specQM.setEncodingProperty( specQM.getEncodingQueryIndexByChannel(Channel.X), Property.SCALE_BANDSIZE, @@ -95,11 +95,11 @@ export function generate(specQ: SpecQuery, schema: Schema, opt: QueryConfig = DE answerSet = answerSet.map(function(specQM) { ENCODING_QUERY_INDEX[Channel.COLOR] = specQM.getEncodingQueryByChannel(Channel.COLOR); - const color_encQ = ENCODING_QUERY_INDEX[Channel.COLOR]; - if ((color_encQ !== undefined) && (color_encQ.type === Type.NOMINAL) && - (schema.cardinality(color_encQ) > 10)) { + const colorEncQ = ENCODING_QUERY_INDEX[Channel.COLOR]; + if ((colorEncQ !== undefined) && (colorEncQ.type === Type.NOMINAL) && + (schema.cardinality(colorEncQ) > 10)) { - if (color_encQ.scale === undefined) { + if (colorEncQ.scale === undefined) { specQM.setEncodingProperty( specQM.getEncodingQueryIndexByChannel(Channel.COLOR), Property.SCALE, @@ -108,7 +108,7 @@ export function generate(specQ: SpecQuery, schema: Schema, opt: QueryConfig = DE ); } - if (color_encQ.scale) { + if (colorEncQ.scale) { specQM.setEncodingProperty( specQM.getEncodingQueryIndexByChannel(Channel.COLOR), Property.SCALE_RANGE,