Skip to content
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

LimitLine Props #38

Open
donaldbenas opened this issue Oct 3, 2016 · 2 comments
Open

LimitLine Props #38

donaldbenas opened this issue Oct 3, 2016 · 2 comments

Comments

@donaldbenas
Copy link

Please help me on how to implement limitLine in LineChart!..

@hongyin163
Copy link
Owner

@donaldbenas
you can refer to mpandroidchart ,and add limitline config to this project,thanks

@donaldbenas
Copy link
Author

donaldbenas commented Oct 13, 2016

@hongyin163
i found few example but i dont know how to implement it.

YAxis leftAxis = chart.getAxisLeft();
LimitLine ll = new LimitLine(140f, "Critical Blood Pressure");
ll.setLineColor(Color.RED);
ll.setLineWidth(4f);
ll.setTextColor(Color.BLACK);
ll.setTextSize(12f);
leftAxis.addLimitLine(ll);

how do you implement it in react-native-chart-android with my example code?

<LineChart
ref={ref => this.lineChartRef = ref}
style={{flex:1, height: 300, margin: 16, marginTop: 0, marginBottom: 20}}
visibleXRange={[0,7]}
xAxis={{drawGridLines:false,gridLineWidth:1,position:"BOTTOM"}}
yAxisRight={{enable:false}}
yAxis={{startAtZero:false,drawGridLines:false, drawLimitLinesBehindData: true, position:"INSIDE_CHART"}}
yAxisLeft={{limitLine: [{enableDashedLine: true, lineWidth: 2, labelPosition: 'RIGHT_TOP', textSize: 10}]}}
drawGridBackground={false}
description={"Day/Month"}
legend={{enable:false,position:'ABOVE_CHART_LEFT',direction:"LEFT_TO_RIGHT"}}
data={v}/>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants