本文整理匯總了TypeScript中vega-lite/build/src/mark.PRIMITIVE_MARKS類的典型用法代碼示例。如果您正苦於以下問題:TypeScript PRIMITIVE_MARKS類的具體用法?TypeScript PRIMITIVE_MARKS怎麽用?TypeScript PRIMITIVE_MARKS使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了PRIMITIVE_MARKS類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1:
[undefined, 'center', null, 'zero', 'normalize'].forEach((_stack: StackOffset) => {
PRIMITIVE_MARKS.forEach((mark) => {
const specQ: SpecQuery = {
mark: mark,
encodings: [
{channel: Channel.X, aggregate: 'sum', field: 'Q', type: Type.QUANTITATIVE},
{channel: Channel.Y, field: 'N', type: Type.NOMINAL}
],
};
assert.isNull(getVlStack(specQ));
});
});
示例2: it
it('should always be disabled if neither x nor y is aggregate', () => {
PRIMITIVE_MARKS.forEach((mark) => {
const specQ: SpecQuery = {
mark: mark,
encodings: [
{channel: Channel.X, field: 'N', type: Type.NOMINAL},
{channel: Channel.Y, field: 'N', type: Type.NOMINAL},
{channel: Channel.COLOR, field: 'N1', type: Type.NOMINAL},
]
};
assert.isNull(stack(specQ));
});
});
示例3:
[undefined, 'center', 'none', 'zero', 'normalize'].forEach((_stack: StackOffset) => {
PRIMITIVE_MARKS.forEach((mark) => {
const specQ: SpecQuery = {
mark: mark,
encodings: [
{channel: Channel.X, field: 'Q', type: Type.QUANTITATIVE},
{channel: Channel.Y, field: 'N', type: Type.NOMINAL},
{channel: Channel.COLOR, field: 'N1', type: Type.NOMINAL},
],
config: {stack: _stack}
};
assert.equal(stack(specQ), null);
});
});