-1

I am using achartengine for graph ploting . I have issues with matching points with a straight line . Like If I have to make a line for a week and let say I don't have points for any two days (Tuesday and wed.) Now how I am gonna match point of Monday directly to Thursday and so on .

This is the code I am using for making chart .

multiRenderer.addSeriesRenderer(dataRenderer);
                mChart = ChartFactory.getLineChartView(PatientHome.this,dataset, multiRenderer);

                // adding the view to the linearlayout
                final LinearLayout l = new LinearLayout(this);
                l.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT,
                        100));
                l.addView(mChart);
                l.setPadding(5, 10, 0, 0);
                final int p = pos;
                runOnUiThread(new Runnable() {
                    public void run() {
                        chartContainer.addView(l, p);
                    }
                });
                pos++;
                }
KDDhiman
  • 21
  • 4

1 Answers1

0

I will assume that you are using TimeSeries, for your data points. You could use instead regular XYSeries that will have consecutive numbers, and add your own labels to X axis like with something like this:

for (int i = 0; i < yourData.size(); i++) {
        multiRenderer.addXTextLabel(i, yourDataLabel);
    }
smiki
  • 116
  • 1
  • 7