lecho / hellocharts-android

Charts library for Android compatible with API 8+, several chart types with scaling, scrolling and animations 📊
Apache License 2.0
7.43k stars 1.61k forks source link

tsChart is not Resolved in Android Studio #528

Closed HazyIAm closed 5 years ago

HazyIAm commented 5 years ago

I'm trying to get thingspeak.com graphs on my mobile app that I am making. I am following: https://github.com/MacroYau/ThingSpeakAndroid This tells me that to get the graphs of the channel I have to use :

LineChartView chartView = (LineChartView) findViewById(R.id.chart); tsChart = new ThingSpeakLineChart(CHANNEL_ID, FIELD_ID); tsChart.setListener(new ThingSpeakLineChart.ChartDataUpdateListener() { @Override public void onChartDataUpdated(long channelId, int fieldId, String title, LineChartData lineChartData, Viewport maxViewport, Viewport initialViewport) { chartView.setLineChartData(lineChartData); chartView.setMaximumViewport(maxViewport); chartView.setCurrentViewport(initialViewport); } }); tsChart.loadChartData();

However I'm getting the error : "Cannot resolve symbol tsChart". Why is that? I have added the library and included all dependencies.

HazyIAm commented 5 years ago

Found the solution.......