Git Product home page Git Product logo

react-native-mp-android-chart's People

Contributors

cesardeazevedo avatar mskec avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

react-native-mp-android-chart's Issues

Cannot read property 'bool' of undefined

While running the application after adding mp library getting the following Error

Application app has not been registered.

Hint: This error often happens when you're running the packager (local dev server) from a wrong folder. For example you have multiple apps and the packager is still running for the app you were working on before.
If this is the case, simply kill the old packager instance (e.g. close the packager terminal window) and start the packager in the correct app folder (e.g. cd into app folder and run 'npm start').

This error can also happen due to a require() error during initialization or failure to call AppRegistry.registerComponent

Screenshot_1565154229

Prevent user interactions (tap and zoom)

Hi there @mskec !

Great job integrating the MPAndroidChart lib in React-Native.
I was wondering if there is a way to prevent user interactions such as taps and zooms on the graphs ?

Thx for your answer,
Have a nice day

Custom markers

I am interested to add to my charts custom markers.
I am using LinearChart and I want to know if is it possible and how can I add extra info to markers, not just yValue?
Thank you.

IMarker usage

Is it possible to use the IMarker interface in react native, how do you implement it?

Problem with running

I've problem, when i'm trying to run my app im getting this error :
zrzut ekranu 2018-08-14 o 21 28 24

Here is my code :

import React from 'react';
import {Modal,View,Text,Button, StyleSheet, Dimensions} from 'react-native';
import {BarChart} from 'react-native-mp-android-chart';

const deviceWidth = Dimensions.get('window').width;
const deviceHeight = Dimensions.get('window').height;

const MarkerDetail = (props) => {

let modalContent = null;

let variable = {
    data: {
        datasets: [{
            yValues: [100, 105, 102, 110],
            label: 'Data set 1',
            config: {
                color: 'teal'
            }
        }, {
            yValues: [110, 100, 105, 108],
            label: 'Data set 2',
            config: {
                color: 'orange'
            }
        }],
        xValues: ['Q1', 'Q2', 'Q3', 'Q4']
    }
};

if(props.selectedStation){
    modalContent = (
        <View >
            <View style = {styles.headerBar}>
        <Text style ={styles.header}>{props.selectedStation.stationName}
        </Text>
            <Button title="X" style = {styles.closeButton}
                    onPress = {props.onModalClosed}
                    color= "#2dc997"
            />
            </View>
            <View>
                <BarChart
                    style={styles.chart}
                    data={variable.data}
                    animation={{durationX: 2000}}
                />
            </View>
        </View>
    );
}

return(
  <Modal visible ={props.selectedStation !== null}  animationType={"slide"}>
      <View style = {styles.modalContainer}>
          {modalContent}
      </View>
  </Modal>
);

};

const styles = StyleSheet.create({
modalContainer: {
width: deviceWidth,
height: deviceHeight
},
headerBar: {
backgroundColor: '#2dc997',
height: deviceHeight / 20,
marginTop: 5,
flexDirection:'row',
flexWrap:'wrap'
},
header: {
color: 'white',
fontWeight: 'bold',
fontSize: 20,
textAlign: 'center',
padding: 3,
width: deviceWidth * 9 /10

},
closeButton: {
    width: deviceWidth * 1/ 10,
    color : '#2dc997',
},
chart: {
    height: deviceHeight / 8,
    width: 300
}

});

export default MarkerDetail;

Anny suggestion ? I was trying to do it by google suggestions but im stuck

Update pie chart data

I'm getting this error when updating data of a pie chart that is being obtained from a database.

"Error while updating property 'data' of a view managed by: MPAndroidPieChart"

Can I dynamatically load data and perform some advanced data setting?

My problem is something likes PhilJay/MPAndroidChart#789

When scaleX in LineChart, I want to load more detailed data , can I listen to the scaleX event and use https://github.com/PhilJay/MPAndroidChart/wiki/Dynamic-&-Realtime-Data to load more data?

And my data is something like

x y
2016-01-01 15:00:00 GMT 25
2016-01-01 22:00:00 GMT 58
2016-01-02 08:00:00 GMT 36
2016-01-02 14:00:00 GMT 12
2016-01-02 19:00:00 GMT 29

It seems that it don't intervals with the date correctly, intervals are all the same. Can I use https://github.com/PhilJay/MPAndroidChart/wiki/Setting-Data to adjust data to have interval the same as numbers ?

copy from mskec/react-native-mp-android-chart-example#2

How can i add a gradient as background?

I am triying to imitate this issue: PhilJay/MPAndroidChart#104

That is shown in this example image in MPAndroidChart home page
https://camo.githubusercontent.com/e9f3408cc22c2896a897e9ed92a2fd2cbcf40493/68747470733a2f2f7261772e6769746875622e636f6d2f5068696c4a61792f4d50416e64726f696443686172742f6d61737465722f73637265656e73686f74732f6c696e655f63686172745f6772616469656e742e706e67

Is it possible to do it in react native?

Another question, it is possible to hide the label color icon?, i use an empty label but it stills shows it.

Thanks
Claudio

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.