BarSeries with no fill (gone not invisible)


#1

I’m displaying a BarSeries on Android and I would like to have it be just the line, with the interior part of the bar gone. I’d like it to be a fixed width line (say 2dp). I’m aware of SeriesStyle.FillStyle, but that will still show the interior of the bar. In other words, I’m looking more for a line than an empty bar.

Is there a different type of chart or some option on the bar width I could set?

Thanks.


#2

I guess another solution could be to not show the line (contour) but I’d still need to control the width of the area inside the bar…


#3

What I’m looking for is what CandlestickSeriesStyle is offering with setStickWidth, but I need my chart to be flipped (horizontal candlesticks) and not interested in low/high etc, I’m only displaying a single value.


#4

Hi Radu,

There’s no specific option on the bar series or different chart type that would achieve this effect - as you have observed the bars grow as the chart is zoomed in.

One approach you may want to try, however, is to update the interSeriesPadding on the axis as its range changes, using the ShinobiChart.OnAxisRangeChangeListener.

Hope that helps,

Patrick


#5

The bars appear at random intervals (depending on the data), so based on my understanding of interSeriesPadding it wouldn’t work. Is there any possibility of using a flipped candlestick chart (where the candles are horizontal)?


#6

Hi Radu,

Ah I see, yes I was assuming data at regular intervals (including some data points with a value of 0) for the interSeriesPadding.

ShinobiCharts, both for iOS and Android, only provides vertical candlestick charts.

The only other thing I can think of is that it may be possible to make use of the advanced tick mark customisation features coming in the upcoming v1.5 release (essentially drawing the tickmarks on the plot area at differing lengths). However, this would be very fiddly and not really an intended use for these customisation options. Furthermore, this would only work on Ice Cream Sandwich and upwards devices as the ticks are drawn underneath the plot area.

We don’t currently have any plans to add a feature allowing fixed width bars and columns and it’s not something we’ve had requested before. I will however make a note of this but as I said it’s not something we’re planning on introducing at present. Sorry I couldn’t have been of more help!

Kind regards,

Patrick