Skip to content

Commit

Permalink
fix: add isCategory property for TimeCat scale.
Browse files Browse the repository at this point in the history
  • Loading branch information
simaQ committed May 2, 2018
1 parent 423b05c commit 6299df3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@antv/f2",
"version": "3.1.4",
"version": "3.1.5-beta.1",
"description": "A canvas library which providing 2d draw for G2.",
"keywords": [
"canvas",
Expand Down
5 changes: 5 additions & 0 deletions src/scale/time-cat.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ class TimeCategory extends Category {
* @type {Array}
*/
this.values = [];
/**
* 是否分类度量
* @type {Boolean}
*/
this.isCategory = true;
}

init() {
Expand Down
1 change: 1 addition & 0 deletions test/unit/scale/cat-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@ describe('scale time cat', function() {
expect(scale.type).to.be.equal('timeCat');
expect(scale.mask).to.be.equal('YYYY/MM/DD');
expect(scale.sortable).to.be.true;
expect(scale.isCategory).to.be.true;
});

it('translate', function() {
Expand Down

0 comments on commit 6299df3

Please sign in to comment.