Skip to content

Instantly share code, notes, and snippets.

@Shestac92
Created November 5, 2020 07:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Shestac92/472b9512eabc07ff9864c1a90b02f0a7 to your computer and use it in GitHub Desktop.
Save Shestac92/472b9512eabc07ff9864c1a90b02f0a7 to your computer and use it in GitHub Desktop.
2x-Ordinal Cartesian chart
AnyChartView anyChartView = findViewById(R.id.any_chart_view);
List<DataEntry> data = new ArrayList<>();
data.add(new CustomDataEntry("2020/05/23", "TripTone360"));
data.add(new CustomDataEntry("2025/05/23", "Trip"));
Cartesian chart = AnyChart.cartesian();
chart.xAxis(0).enabled(true);
chart.yAxis(0).enabled(true);
JumpLine series = chart.jumpLine(data);
Ordinal yScale = Ordinal.instantiate();
chart.yScale(yScale);
anyChartView.setChart(chart);
private class CustomDataEntry extends DataEntry {
CustomDataEntry(String x, String value) {
setValue("x", x);
setValue("value", value);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment