Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9157081
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:55:34+00:00 2026-06-17T12:55:34+00:00

I want create nodes and edges so I used the combined chart with scatter

  • 0

I want create nodes and edges so I used the combined chart with scatter plot and line graph. But I am not able to connect one root node to its child nodes..Instead it just connects all the child nodes and only two child nodes are connected to root…Can any body tell me where I am going wrong …Below the code I used

public GraphicalView combinedChart(){

       int[] x = {3};

       double[] values = {50};

       XYSeries series = new XYSeries("App");
       int length = x.length;

       for (int k = 0;k < length; k++)
       {
           series.add(x[k], values[k]); 
       }

       int[] x1 = {1,2,4,5};

       double[] values1 = {70,30,30,70};

       XYSeries series1 = new XYSeries("Info");
       int length1 = x1.length;

       for (int k = 0;k < length1; k++)
       {
           series1.add(x1[k], values1[k]); 
       }

       /*int[] x2 = {1,5};

       double[] values2 = {70,70};

       XYSeries series2 = new XYSeries("Dest");
       int length2 = x2.length;

       for (int k = 0;k < length2; k++)
       {
           series2.add(x2[k], values2[k]); 
       }*/


        int[] x3 = {3,1,3,2,3,4,3,5};
        int[] y3 = {50,70,50,30,50,30,50,70};

        TimeSeries series3 = new TimeSeries("Line1");

        for(int i=0; i<x3.length; i++){
            series3.add(x3[i], y3[i]);
        }

       XYMultipleSeriesDataset dataset = new XYMultipleSeriesDataset();
       dataset.addSeries(series);
       dataset.addSeries(series1);
       //dataset.addSeries(series2);
       dataset.addSeries(series3);

       XYMultipleSeriesRenderer mRenderer = new XYMultipleSeriesRenderer();
       XYSeriesRenderer renderer = new XYSeriesRenderer();
       XYSeriesRenderer renderer1 = new XYSeriesRenderer();
       //XYSeriesRenderer renderer2 = new XYSeriesRenderer();
       XYSeriesRenderer renderer3 = new XYSeriesRenderer();

       renderer.setColor(Color.BLUE);
       renderer.setPointStyle(PointStyle.SQUARE);
       renderer.setFillPoints(true);

       renderer1.setColor(Color.GREEN);
       renderer1.setPointStyle(PointStyle.CIRCLE);
       renderer1.setFillPoints(true);

       /*renderer2.setColor(Color.MAGENTA);
       renderer2.setPointStyle(PointStyle.CIRCLE);
       renderer2.setFillPoints(true);*/

       renderer3.setColor(Color.RED);

       mRenderer.addSeriesRenderer(renderer);
       mRenderer.addSeriesRenderer(renderer1);
       //mRenderer.addSeriesRenderer(renderer2);
       mRenderer.addSeriesRenderer(renderer3);
       mRenderer.setPointSize(10f);

       String[] types = new String[] { ScatterChart.TYPE,ScatterChart.TYPE,LineChart.TYPE};
       final GraphicalView lv = ChartFactory.getCombinedXYChartView(this, dataset, mRenderer, types);

      // final GraphicalView lv = ChartFactory.getScatterChartView(this, dataset, mRenderer);
       return lv;

   }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T12:55:35+00:00Added an answer on June 17, 2026 at 12:55 pm

    AChartEngine is for displaying charts of data and not for displaying graphs. I suggest you add your values to the series, with X in ascending order, otherwise you will get unpredictable behavior.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to create xml from my object, but instead of xml nodes I'd
Is there any good library for some graph-app? I want to create nodes, add
Hey I want to plot a graph of 128 nodes (labeled 1 to 128)
I want to create some DOM nodes with jQuery, append them to the html
I want to create a native (c++) module for node.js which is able to
I want to draw graphs (nodes and edges) in Java. However, since I don't
I want to create a frontpage view that will display all the nodes in
I want to create my own expandable/collapsable tree-like UserControl, which nodes are the Border
Given a table holding edges in a directed graph like this: CREATE TABLE edges
When I create a node I want it to programmatically create some nodes that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.