Im running into an issue when setting Line colors, I’ve been playing around with it a while and wondering if its a possible bug.
Basically the Line Color is not being set to what I specify, and it is being set to the same as the area around the legends border, the keys border specifically, which Im also not setting.
I have code like this
//Red defined as <color name="Red">#FF0000</color> int color = getResources().getColor(R.color.RED); shinobiSeries = new LineSeries(); shinobiSeries.setTitle("Title"; shinobiDataAdapter = new SimpleDataAdapter<Double, Double>(); shinobiSeries.setDataAdapter(shinobiDataAdapter); LineSeriesStyle lss = shinobiSeries.getStyle(); lss.setAreaColor(color); //The TOP of gradient lss.setLineColor(color); lss.setAreaColorGradient(Color.TRANSPARENT); //Bottom of gradiant lss.setFillStyle(FillStyle.GRADIENT);
My legend is styled as so:
Legend legend = shinobiChartLandscape.getLegend(); legend.setPlacement(Placement.INSIDE_PLOT_AREA); legend.setPosition(Position.TOP_LEFT); legend.setMaxSeriesPerRow(1); legend.setVisibility(1); LegendStyle ls = legend.getStyle(); ls.setTextColor(Color.WHITE); ls.setPadding(0); ls.setBackgroundColor(Color.TRANSPARENT); ls.setBorderColor(Color.TRANSPARENT); ls.setTextSize(10f); ls.setSymbolLabelGap(0); ls.setBorderWidth(0); ls.setSymbolCornerRadius(5f); ls.setRowVerticalMargin(0);
You can see a picture here of what it displays (http://imgur.com/nmpKuJM) The Legend and fill area are correctly set to RED (#FF0000) while the line and Legend key box are set to sometwhere around #202020, which I have not defined anywhere.
Im wondering if its possible that somewhere the color is accidently set to an ID rather than converting the ID to a color? Ive seen results like this before in that case.
I’ve searched my code, and cant find the source of error, not saying its not there though