我正在尝试将html转换为画布,并使用画布图像在excel中导出,但是转换本身时,图表比例特别模糊,如下所示:-
在浏览器窗口中绘制了Highchart,然后使用该图表的div元素将其转换为svg,如下所示:-
import React from 'react'
import { View, Text, Button, StyleSheet } from 'react-native';
import NavigationContext from './MyContext'
export default class UserScreen extends React.Component {
constructor(props) {
super(props)
}
_navigate = () => {
this.props.navigation.navigate('Page2')
}
render() {
return (
<NavigationContext.Consumer>
{
({ userId }) => {
return (
<View style={styles.container}>
<Text>Page 1</Text>
<Text>{`UserId ${userId}`}</Text>
<Button onPress={this._navigate} title="Navigate to page 2" />
</View>)
}
}
</NavigationContext.Consumer>
)
}
}