-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not working latest version of react native cli and java version 11 #165
Comments
I have the same problem. I can provide more information about it: Example project to reproduce the error 👉 here. React:
Android:
Error:
|
hi osvald0 |
@rexin1995 I tried that option too but I got more errors. I removed |
Any comment about this issue? |
Did you manage to get any further @osvald0? Are the devs even paying attention to this package or updating it? Seems like the documentation is outdated and will not work with later versions of Expo. |
@kristianfjelde Nothing from my last message :( |
no more updates yet
…On Mon, 16 Jan 2023 at 18:28, Osvaldo Colina ***@***.***> wrote:
@kristianfjelde <https://github.com/kristianfjelde> Nothing from my last
message :(
—
Reply to this email directly, view it on GitHub
<#165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP5SQ6TKZPO3BL7WQXPGZKLWSVAXFANCNFSM6AAAAAARJ2OHMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
@rexin1995 Could you fix the problem? It looks like the packages is abandoned. The last commit was 9 month ago. |
This is the workaround I made to continue using fusioncharts until they update the package or we switch to another chart library.
You need to pay around the styling because the web version works a little bit different. |
Another option is to create a web project only to "host" the fusioncharts project. From the react native project:
And the react web project should be something like this:
It isn't perfect and both options have advantages and disadvantages. But It's the best I have right now with the lack of support from the fusioncharts team. |
Thanks, I'll check it out.
…On Thu, 2 Mar 2023 at 18:31, Osvaldo Colina ***@***.***> wrote:
Another option is to create a web project only to "host" the fusioncharts
project.
From the react native project:
import React from 'react';
import WebView from 'react-native-webview';
import { StyleSheet, View } from 'react-native';
const FusionCharts = (chartConfig) => {
const encodedConfig = encodeURI(JSON.stringify(chartConfig));
return (
<View style={styles.chartContainer}>
<WebView
source={{
uri: `http://my_web_url.com?chart=${encodedConfig}` <http://my_web_url.com?chart=$%7BencodedConfig%7D>,
}}
/>
</View>
);
};
const styles = StyleSheet.create({
chartContainer: {
height: 400,
width: '100%',
},
});
export default FusionCharts;
And the react web project should be something like this:
import FusionCharts from "fusioncharts";
import ReactFC from "react-fusioncharts";
import Charts from "fusioncharts/fusioncharts.charts";
import FusionTheme from "fusioncharts/themes/fusioncharts.theme.fusion";
import { Routes, Route, useLocation } from "react-router-dom";
FusionCharts.options.license({
key: 'LICENSE_KEY HERE',
creditLabel: false,
});
ReactFC.fcRoot(FusionCharts, Charts, FusionTheme);
const decodeParams = (url) => {
return decodeURIComponent(decodeURIComponent(url.split('chart=')[1]));
}
const App = () => {
return (
<Routes>
<Route path="/" element={<Home />} />
</Routes>
);
}
const Home = () => {
const { search } = useLocation();
const data = decodeParams(search);
return (
<ReactFC {...JSON.parse(data)} />
);
}
export default App;
It isn't perfect and both options have advantages and disadvantages. But
It's the best I have right now with the lack of support from the
fusioncharts team.
—
Reply to this email directly, view it on GitHub
<#165 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AP5SQ6QY7DFKNF5OZKMOZ2DW2CK3ZANCNFSM6AAAAAARJ2OHMY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Since expo dependency is mandatory not syncing with the latest version of react native CLI
The text was updated successfully, but these errors were encountered: