Giter Club home page Giter Club logo

Comments (8)

liamjones avatar liamjones commented on June 14, 2024 4

@Jay2009 Below is what we've done as a workaround for now. It's not ideal but might help you (as long as you don't need react-native-skia for anything bar react-native-echarts on iOS).

@shopify/react-native-skia 0.1.234 is the last version that will render text in react-native-echarts. That version will crash/lock up an iOS app on RN 0.73.8 (the version of RN we're using, I haven't tried 0.74.x yet) but seems to work fine on Android. We want Skia rendering for slow Android devices as it's faster than SVG rendering. The iOS devices will use SVG rendering for now (since they have generally stronger performance).

How to set this up:

  • Downgrade @shopify/react-native-skia to 0.1.234 in your package.json.
  • Disable auto-linking of the module on iOS only by putting the following in your react-native.config.js (there's no point linking it if we can't use it):
module.exports = {
    dependencies: {
        '@shopify/react-native-skia': {
            platforms: {
                ios: null
            }
        }
    }
}
  • Update our React component to use either SkiaChart or SvgChart depending on platform:
const SomeComponent = () => {
    const PlatformSpecificChartTag = Platform.OS === 'ios' ? SvgChart : SkiaChart
    return <PlatformSpecificChartTag option={...} etc />
}

from react-native-echarts.

zhiqingchen avatar zhiqingchen commented on June 14, 2024 1

use rnsvg or lower version of rnskia

from react-native-echarts.

zhiqingchen avatar zhiqingchen commented on June 14, 2024 1

#16
@AlejandroRM-DEV

from react-native-echarts.

nipunadodan avatar nipunadodan commented on June 14, 2024 1

use rnsvg or lower version of rnskia

I switched to SvgChart and it worked, but is there any implication I should be aware of?

Thank you.

Yes, I'm aware. SvgCharts works but it's slow to respond to gestures. That's why I explicitly need SkiaChart to work.

from react-native-echarts.

liamjones avatar liamjones commented on June 14, 2024 1

Now that react-native-skia have documented that text in ImageSVG tags is not going to be supported could we add that to the known issues on #16?

from react-native-echarts.

zhiqingchen avatar zhiqingchen commented on June 14, 2024

Shopify/react-native-skia#2404

from react-native-echarts.

AlejandroRM-DEV avatar AlejandroRM-DEV commented on June 14, 2024

use rnsvg or lower version of rnskia

I switched to SvgChart and it worked, but is there any implication I should be aware of?

Thank you.

from react-native-echarts.

Jay2009 avatar Jay2009 commented on June 14, 2024

@nipunadodan yes I am having exactly same issue with you.
so any solution yet?

from react-native-echarts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.