/** * Getter for the chart legend. */ public com.anychart.core.ui.Legend legend() { return new com.anychart.core.ui.Legend(jsBase + ".legend()"); } /**
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_chart_common); AnyChartView anyChartView = findViewById(R.id.any_chart_view); anyChartView.setProgressBar(findViewById(R.id.progress_bar)); Pyramid pyramid = AnyChart.pyramid(); List<DataEntry> data = new ArrayList<>(); data.add(new ValueDataEntry("TV promotion", 6371664)); data.add(new ValueDataEntry("Radio promotion", 7216301)); data.add(new ValueDataEntry("Advertising leaflets", 1486621)); data.add(new ValueDataEntry("Before advertising started", 1386622)); pyramid.data(data); Legend legend = pyramid.legend(); legend.enabled(true); legend.position("outside-right"); legend.itemsLayout(LegendLayout.VERTICAL); legend.align(Align.TOP); pyramid.labels(false); anyChartView.setChart(pyramid); } }
pie.legend().title().enabled(true); pie.legend().title() .text("Retail channels") .padding(0d, 0d, 10d, 0d); .position("center-bottom") .itemsLayout(LegendLayout.HORIZONTAL) .align(Align.CENTER);
/** * Setter for custom items. */ public com.anychart.core.ui.Legend items(com.anychart.core.ui.legend.LegendItemProvider[] itemsList) { APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".items(%s);", arrayToString(itemsList))); return this; } /**
/** * Setter for the legend padding in pixels using a single value. */ public com.anychart.core.ui.Legend padding(String[] padding) { APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".padding(%s);", arrayToStringWrapQuotes(padding))); return this; } /**
.minorTicks(true); bubble.legend().enabled(true); bubble.labels().padding(0d, 0d, 10d, 0d);
treeMap.selectionMode(SelectionMode.NONE); treeMap.legend().enabled(true); treeMap.legend() .padding(0d, 0d, 0d, 20d) .position(Orientation.RIGHT) .align(Align.TOP) .itemsLayout(LegendLayout.VERTICAL);
/** * Setter for items formatter. */ public com.anychart.core.ui.Legend itemsFormatter(com.anychart.core.ui.legend.LegendItemProvider[] formatterFunction) { APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".itemsFormatter(%s);", arrayToString(formatterFunction))); return this; } /**
/** * Setter for the legend margin in pixels using a single value. */ public com.anychart.core.ui.Legend margin(String[] margin) { APIlib.getInstance().addJSLine(String.format(Locale.US, jsBase + ".margin(%s);", arrayToStringWrapQuotes(margin))); return this; } /**
/** * Getter for the chart legend. */ public com.anychart.core.ui.Legend legend() { return new com.anychart.core.ui.Legend(jsBase + ".legend()"); } /**
/** * Getter for the chart legend. */ public com.anychart.core.ui.Legend legend() { return new com.anychart.core.ui.Legend(jsBase + ".legend()"); } /**
/** * Getter for the chart legend. */ public com.anychart.core.ui.Legend legend() { return new com.anychart.core.ui.Legend(jsBase + ".legend()"); } /**
/** * Getter for the chart legend. */ public com.anychart.core.ui.Legend legend() { return new com.anychart.core.ui.Legend(jsBase + ".legend()"); } /**