Giter Site home page Giter Site logo

Comments (4)

imaximova avatar imaximova commented on July 23, 2024

Can you send the code, please?

from anychart-android.

shubhamphal avatar shubhamphal commented on July 23, 2024

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.

Shestac92 avatar Shestac92 commented on July 23, 2024

@shubhamphal
You should isolate a quote mark in the following line:
series3.name("Topper\\'s SGPA");
This will solve your issue.

from anychart-android.

shubhamphal avatar shubhamphal commented on July 23, 2024

Thanks a lot !! It worked

from anychart-android.

Related Issues (20)

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.