We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Thanks for amazing library.
I try to draw a ComboLineColumnChartData chart as below :
private void setValShowProperandChart() { ColumnChartData columns = generateColumnData(); LineChartData lines = generateLineData(); data = new ComboLineColumnChartData(columns, lines); calculateAverages(); periodchart.setComboLineColumnChartData(data); periodchart.setOnValueTouchListener(new ValueTouchListener()); periodchart.setZoomEnabled(false); periodchart.setZoomType(ZoomType.HORIZONTAL); periodchart.setViewportCalculationEnabled(false); Axis axisX = new Axis(); Axis axisY = new Axis().setHasLines(true); axisX.setName("Cycle"); axisY.setName("Length"); data.setAxisXBottom(axisX); data.setAxisYLeft(axisY); Viewport v = new Viewport(periodchart.getMaximumViewport()); v.left = (float) -0.5; v.right = mmmax; v.top = v.top + 4; periodchart.setMaximumViewport(v); v.bottom = 0; v.top = v.top + 4; v.right = 5; periodchart.setCurrentViewport(v); } private LineChartData generateLineData() { ArrayList<Integer> periodData = dbMain.getListForChartPeriod(); List<Line> lines = new ArrayList<Line>(); List<PointValue> values = new ArrayList<PointValue>(); if (periodData.size() < 2) { if (tv_warn1 != null) tv_warn1.setVisibility(View.VISIBLE); } else { for (int j = 0; j < periodData.size(); ++j) { values.add(new PointValue(j, periodData.get(j))); } Line line = new Line(values); line.setColor(getActivity().getResources().getColor(R.color.colorAccent)); line.setCubic(false); lines.add(line); line.setHasLabelsOnlyForSelected(true); } LineChartData lineChartData = new LineChartData(lines); return lineChartData; } private ColumnChartData generateColumnData() { ArrayList<Integer> listForChartCycles = dbMain.getListForChartCycles(); int numColumns = listForChartCycles.size(); List<Column> columns = new ArrayList<Column>(); if (numColumns < 2) { if (tv_warn1 != null) tv_warn1.setVisibility(View.VISIBLE); } else { if (tv_warn1 != null) tv_warn1.setVisibility(View.GONE); List<SubcolumnValue> values; for (int i = 0; i < numColumns; ++i) { values = new ArrayList<>(); values.add(new SubcolumnValue(listForChartCycles.get(i), getResources().getColor(R.color.gray400))); columns.add(new Column(values).setHasLabels(true)); } } ColumnChartData columnChartData = new ColumnChartData(columns); return columnChartData; }
when i Run(shift+f10) it on emulator everything is missed up(green rectangles):
Then i run it using Apply changes a Restart Activity (Ctrl+f10) ,the chart is perfectly work:
Where is my wrong?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Thanks for amazing library.
I try to draw a ComboLineColumnChartData chart as below :
when i Run(shift+f10) it on emulator everything is missed up(green rectangles):
Then i run it using Apply changes a Restart Activity (Ctrl+f10) ,the chart is perfectly work:
Where is my wrong?
The text was updated successfully, but these errors were encountered: