|
|
@@ -132,7 +132,7 @@ function barConfig(model) {
|
|
|
fontSize: getFontSize() * .7
|
|
|
},
|
|
|
axisLabel: {
|
|
|
- rotate: getScreenSize().width * layout.w / xf.length / 100 < 60 ? 45 : 0,
|
|
|
+ rotate: getScreenSize().width * layout.w / xf.length / 100 < 80 ? 45 : 0,
|
|
|
interval: 0,
|
|
|
textStyle: {
|
|
|
fontSize: getFontSize() * .7
|
|
|
@@ -198,7 +198,7 @@ function lineConfig(model) {
|
|
|
fontSize: fontSize || getFontSize() * .7
|
|
|
},
|
|
|
axisLabel: {
|
|
|
- rotate: getScreenSize().width * layout.w / xf.length / 100 < 60 ? 45 : 0,
|
|
|
+ rotate: getScreenSize().width * layout.w / xf.length / 100 < 80 ? 45 : 0,
|
|
|
interval: 0,
|
|
|
textStyle: {
|
|
|
fontSize: fontSize || getFontSize() * .7
|
|
|
@@ -413,17 +413,7 @@ function getScreenSize() {
|
|
|
|
|
|
function getFontSize() {
|
|
|
let {height, width} = getScreenSize();
|
|
|
- if(width > 1000) {
|
|
|
- return 24;
|
|
|
- }else if(width > 800) {
|
|
|
- return 22;
|
|
|
- }else if(width > 500) {
|
|
|
- return 20;
|
|
|
- }else if(width > 300) {
|
|
|
- return 18;
|
|
|
- }else {
|
|
|
- return 16
|
|
|
- }
|
|
|
+ return width / 300 * 2 + 16 + Math.round(width/1000) * 2;
|
|
|
}
|
|
|
|
|
|
export {converter};
|