Comments (4)
Can you send the code, please?
from anychart-android.
Sure here is the code snippet
/*code */
AnyChartView anyChartView = prompt.findViewById(R.id.anychart_performance);
APIlib.getInstance().setActiveAnyChartView(anyChartView);
/*set progress bar*/
anyChartView.setProgressBar(prompt.findViewById(R.id.progress_bar));
Cartesian cartesian = AnyChart.line();
cartesian.animation(true);
cartesian.padding(10d, 20d, 5d, 20d);
cartesian.crosshair().enabled(true);
cartesian.crosshair()
.yLabel(true)
// TODO ystroke
.yStroke((Stroke) null, null, null, (String) null, (String) null);
cartesian.tooltip().positionMode(TooltipPositionMode.POINT);
cartesian.title("SEMESTER-WISE GRADE POINT AVERAGE");
cartesian.yAxis(0).title("SGPA");
cartesian.xAxis(0).labels().padding(5d, 5d, 5d, 5d);
List<DataEntry> seriesData = new ArrayList<>();
for (int i = 0; i < number_of_semesters; i++) {
int sem = i + 1;
seriesData.add(new CustomDataEntry("" + sem, studentsgpa[i], averagesgpa[i], toppersgpa[i]));
}
Set set = Set.instantiate();
set.data(seriesData);
Mapping series1Mapping = set.mapAs("{ x: 'x', value: 'value' }");
Mapping series2Mapping = set.mapAs("{ x: 'x', value: 'value2' }");
Mapping series3Mapping = set.mapAs("{ x: 'x', value: 'value3' }");
Line series1 = cartesian.line(series1Mapping);
series1.name("MY SGPA");
series1.hovered().markers().enabled(true);
series1.hovered().markers()
.type(MarkerType.CIRCLE)
.size(4d);
series1.tooltip()
.position("right")
.anchor(com.anychart.enums.Anchor.LEFT_CENTER)
.offsetX(5d)
.offsetY(5d);
Line series2 = cartesian.line(series2Mapping);
series2.name("AVERAGE SGPA");
series2.hovered().markers().enabled(true);
series2.hovered().markers()
.type(MarkerType.CIRCLE)
.size(4d);
series2.tooltip()
.position("right")
.anchor(com.anychart.enums.Anchor.LEFT_CENTER)
.offsetX(5d)
.offsetY(5d);
Line series3 = cartesian.line(series3Mapping);
series3.name("Topper's SGPA");
series3.hovered().markers().enabled(true);
series3.hovered().markers()
.type(MarkerType.CIRCLE)
.size(4d);
series3.tooltip()
.position("right")
.anchor(com.anychart.enums.Anchor.LEFT_CENTER)
.offsetX(5d)
.offsetY(5d);
cartesian.legend().enabled(true);
cartesian.legend().fontSize(13d);
cartesian.legend().padding(0d, 0d, 10d, 0d);
anyChartView.setChart(cartesian);
from anychart-android.
@shubhamphal
You should isolate a quote mark in the following line:
series3.name("Topper\\'s SGPA");
This will solve your issue.
from anychart-android.
Thanks a lot !! It worked
from anychart-android.
Related Issues (20)
- the problem in treemap HOT 4
- Heatmap Chart not working HOT 1
- Documentation website is down HOT 1
- Feature request Dark Mode HOT 1
- Charts are not displaying HOT 8
- Android: Change background color of a chart HOT 2
- Build issue: Manifest merger failed with multiple errors
- Updating datasets for multiple charts in single view HOT 1
- Download it and run it, click on the page and nothing is displayed HOT 7
- Getting blank page when try to open any graph HOT 2
- Loading MutableLiveData
- tree chart is showing on activity but not showing in fragment HOT 1
- Cannot resolve symbol 'AnyChartView' in Android Studio version Arctic Fox |2020.3.1 Patch 3 HOT 1
- Pie chart is flickering whenever new data is inserted HOT 1
- When I add chart, cant see anything in designer HOT 3
- Changing label color depending on data value
- Bar chart not showing when use more then one view.... HOT 2
- i have problem chart not displaying HOT 3
- Sponsored issue: Java to Kotlin HOT 1
- Vertical Bar data does not refresh when tried to update with new data set. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from anychart-android.