Skip to content

Commit

Permalink
Merge branch 'master' into docs-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
paleface001 committed Nov 15, 2019
2 parents e5a9f32 + 804f9d7 commit 267df03
Show file tree
Hide file tree
Showing 17 changed files with 4,479 additions and 32 deletions.
4 changes: 2 additions & 2 deletions __tests__/unit/theme/index-spec.ts
Expand Up @@ -26,7 +26,7 @@ describe('theme', () => {
registerTheme('test-pie', { b: 2 });

// not exist
expect(getTheme('test-circle')).toEqual(getGlobalTheme());
expect(getTheme('test-pie')).toEqual({ ...getGlobalTheme(), b: 2 });
expect(getTheme('test-circle')).toEqual({});
expect(getTheme('test-pie')).toEqual({ b: 2 });
});
});
31 changes: 31 additions & 0 deletions examples/area/stack/demo/area-large-data.js
@@ -0,0 +1,31 @@
import { StackArea } from '@antv/g2plot';

fetch('../data/emissions.json')
.then((res) => res.json())
.then((data) => {
const plot = new StackArea(document.getElementById('container'), {
title: {
visible: true,
text: 'The causes of CO2 emissions',
},
width: 600,
height: 600,
padding: 'auto',
data,
xField: 'year',
yField: 'value',
seriesField: 'category',
xAxis: {
type: 'time',
},
yAxis: {
label: {
// 数值格式化为千分位
formatter: (v) => `${v}`.replace(/\d{1,3}(?=(\d{3})+$)/g, (s) => `${s},`),
},
},
responsive: true,
});

plot.render();
});
5 changes: 5 additions & 0 deletions examples/area/stack/demo/meta.json
Expand Up @@ -18,6 +18,11 @@
"filename": "line-label.js",
"title": "堆叠面积图 - 尾部跟随标签",
"screenshot": "https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*rSBPRpGX3yEAAAAAAAAAAABkARQnAQ"
},
{
"filename": "area-large-data.js",
"title": "The causes of CO2 emissions",
"screenshot": "https://gw.alipayobjects.com/mdn/rms_d314dd/afts/img/A*rSBPRpGX3yEAAAAAAAAAAABkARQnAQ"
}
]
}

0 comments on commit 267df03

Please sign in to comment.