-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add post enumeration modification to generate.ts #187
Conversation
- add nominalScaleForHighCardinality config - add smallBandSizeForFacet config - add smallBandSizeForHighCardinality config
82edc38
to
d460213
Compare
@@ -150,6 +156,11 @@ export const DEFAULT_QUERY_CONFIG: QueryConfig = { | |||
preferredNominalAxis: Channel.Y, // nominal on y makes it easier to read. | |||
preferredFacet: Channel.ROW, // row make it easier to scroll than column | |||
|
|||
// what should their default values be? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you look at VLUI?
@@ -96,6 +96,12 @@ export interface QueryConfig { | |||
// Effectiveness Preference | |||
maxGoodCardinalityForColor?: number; // FIXME: revise | |||
maxGoodCardinalityForFacet?: number; // FIXME: revise | |||
|
|||
// POST ENUMERATION MODIFICATION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We call it stylize - this is inconsistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move this above
// Effectiveness Preference
and change Effectiveness Preference to ALL CAPS.
|
let specM = SpecQueryModel.build({ | ||
mark: Mark.BAR, | ||
encodings: [ | ||
{channel: Channel.Y, field: 'Q', scale: {name: 'scale', values: [true, false]}, type: Type.QUANTITATIVE} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Q bandSize?????
|
||
describe('stylize', () => { | ||
describe('smallBandSizeForHighCardinalityOrFacet', () => { | ||
it('should assign a bandSize of 12 if cardinality of Y is over 10 and bandSize is not already set', () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't you have to add one case when it's already set?
encQIndex[Channel.COLOR] = specM.getEncodingQueryByChannel(Channel.COLOR); | ||
|
||
const colorEncQ = encQIndex[Channel.COLOR]; | ||
if ((colorEncQ !== undefined) && (colorEncQ.type === Type.NOMINAL) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why 10
? Use value in the config.
fix #176
fix Change Nominal Color Scale Range Based on cardinality #101