veeramani.arthanari

React Native iOS events are not firing

Recommended Posts

I'm trying to log the dataPlotClick event for stacked area 2d chart.

But in iOS, the event is not triggering for any events.

I've not tried yet in Android. But I've to make it work for both Platforms.

Any help will be appreciated.

 

my Code

this.state = {
type: 'column2d',
width: '99%',
height: '95%',
dataFormat: 'json',
dataSource: undefined,
containerBackgroundColor: '#FFFFFF',
calendarReturnsData: undefined,
dataEmptyMessage: 'Insufficient data available',
baseChartMessageFontSize: '16',
baseChartMessageColor: '#454545',
detailsBtnStateHolder: true,
events: {
dataplotclick: (e, a) => {
Alert.alert(`You clicked on ${e.data.categoryLabel}`);
}
}
};
 
In render method, I'm destructuring all the variables and assigning it to Fushion Chart.
 
<FusionCharts
type={type}
width={width}
height={height}
dataFormat={dataFormat}
dataSource={dataSource}
containerBackgroundColor={containerBackgroundColor}
dataEmptyMessage={dataEmptyMessage}
baseChartMessageFontSize={baseChartMessageFontSize}
baseChartMessageColor={baseChartMessageColor}
events={events}
libraryPath={
Platform.OS === 'ios'
? fusionChartiOSPath
: fusionChartAndroidPath
}
/>

Share this post


Link to post
Share on other sites

Hi,

 

This is a know issue of the React native plugin that the events are not working properly. We have it logged, you can check the reported issue in the below link :
https://github.com/fusioncharts/react-native-fusioncharts/issues/48

We are working on it, you could get the update in the comments chain of the above issue.

 

Thanks,

Akash.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now