从html转换为画布时的高位图表模糊

时间:2019-02-11 10:15:14

标签: canvas highcharts html2canvas

我正在尝试将html转换为画布,并使用画布图像在excel中导出,但是转换本身时,图表比例特别模糊,如下所示:-

<code>rendered svg image</code>

在浏览器窗口中绘制了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>
    )
  }
}

0 个答案:

没有答案