I am working on an Android application. In my app, I have to show bar charts with many colors, 4J library used. I use the code from the following link.
The problem now is that I can only show fixed bars if the number of times is greater than the screen, then I could not scroll to see the remaining tabs. Here's my screenshot.
The following time code I use to generate bar charts Have done My problems 1) According to the data, the graph should be shown 17 times but it is showing only 8 times [from now, 2002 to 2018 Only to 2009). How can I see the remaining bars with a horizontal scroll? 2) If the number of bars is low, then I can see the label [shows the color in which the data]. See image below see if the number is high then Can not see See iamge first. 3) I want to know that there is no way to give a different background color for the border. Score and I mean for years Please help me find a solution Therefore, your This will give zooming functionality to Hopefully this will be helpful ... Public Stabilized String MillBarTrul () {Barchart Team Team = Plots.numberchartplot (Data. Ndataata (25, 43, 12, 30,32,25, 43, 12, 30,32,25 , 25, 43, 12, 30, 32, 25), BlueVoillet, "Team A"); Barchart Plot Team 2 = Plots.number chartplat (data.NewData (8, 35, 11, 5, 9, 25, 35, 11, 5, 9, 25, 25, 43, 12, 30, 32, 25), orange, "Team B"); Barchartplate Team 3 = Plots.number chart plot (data, new data) (10, 20, 30, 30, 15, 32, 20, 30, 30, 15, 32, 25, 43, 12, 30, 32, 25) , "Team C"); // Instantating Chart Bar chart chart = GCARTS Newbert Chart (Team 1, Team 2, Team 3); // Definition axis information and styles Axis style axis style = axis style. Nxxstyle (Black, 13, Axis Textilement, CA); Axislabs score = axislabsfactory NXaxis label ("score", 50.0); Score .Setaxis Style (axis style); Axisables year = axisablesfactree.Newaxylabel ("year", 50.0); Year .setAxisStyle (axis style); // Adding the axis information to the chart Chart.addXAxisLabels (AxisLabelsFactory.newAxisLabels ("2002", "2003", "2004", "2005", "2006", "2007", "2008", "2009", "2010" , "2011", "2012", "2013", "2014", "2015", "2016", "2017", "2018")); Chart.addYAxisLabels (axislabsfactine.New annumerarxexilables (0, 100)); Chart.addYXxLabels (score); Chart.addXAxisLabels (year); Chart.setSize (600, 450); Chart.setBarWidth (50); Chart.setSpaceWithinGroupsOfBars (20); Chart.setDataStacked (true); Chart.setTitle ("Team Score", Black, 16); Chart.setGrid (100, 10, 3, 2); Chart.setBackgroundFill (fills NewSolphil) (Elisabeth); Fill the linear gradient fills = fills. NewLeanGradientFill (0, Lavender, 100); Fill.addColorAndOffset (White, 0); Chart.setAreaFill (fill); String url = chart.toURLString (); Return Normal (URL); }
chart uses
WebView to display the 4J chart.
WebView
yourWebView.getSettings (). SetBuiltInZoomControls (true);
WebView ,
No comments:
Post a Comment