android - aChartEngine Line Graph setYAxisMax for add padding to graph -
I'm trying to add some padding to my graph by setting min and My XYMultipleSeriesRenderer code is below: If I set the differenx maxx value, then I can see that if I change the max value of my graph, then the graph did not change! I try by setting the maximum Y value of lines +/- 1, or +/- 100, I try with int or double but nothing! Why does not my graph padding change by changing the values of Y axis? You can try: The second parameter stands for the top margin of the graph. or
/ / custom render XYMultipleSeriesRenderer Renderer = New XYMultipleSeriesRenderer (); // Background Renderer Set padded background color (color similar color ("#fffff"); renderer.setMarginsColor (Color.parseColor ("#FFFFFF")); Renderer.setPointSize (pointStrokeWidth); Renderer.setPanEnabled (true, true); //renderer.setPanEnabled(false); Renderer.setShowLegend (wrong); // renderer.setZoomEnabled (false); renderer.setInScroll (true); Renderer.setClickEnabled (true); renderer.setXLabels (0); // setcale // renderer.setscale (float) 1.5); //renderer.setShowAxes(true); // Label padding and size renderer.setShowCustomTextGrid (true); Renderer.setLabelsTextSize (20); Renderer.setXAxisMin (-0.2f); Double maxx = dashboard .getDaysDashboard () Size () - 0.9 F; Renderer.setXAxisMax (max); Renderer.setYAxisMin (-0.3f); Double max = dashboard. MaxNumberOfContent () - 5.0F; Log D. (Tag, "max y:" + max); Renderer.setYAxisMax (Maxy); // y renderer .set YLabelsPadding (20); Renderer.setYLabelsAlign (Align.LEFT); // x Renderer. STXLables Padding (20); Renderer.setXLabelsAlign (Align.CENTER); // margin - An array containing values of margin size, in this order: // top, left, bottom, right int [] margin = {10, 30, 0, 10}; Renderer.setMargins (margin);
mRenderer.setMargins (new Int [] {0, 50, 0, 0} );
mRenderer.setXLabelsPadding (10); MRenderer.setYLabelsPadding (10);
Comments
Post a Comment