+1
Under review

column chart limit line

Christopher Hipgrave 5 jaar geleden in API • bijgewerkt door Oystein Bjorke 5 jaar geleden 2
I'm trying to figure out how to create a frequency spectrum chart. I've got the column series bit down but I need to have a limit line in each column (like the image here: http://www.pas-products.com/bilder/24-Octave-Spectrum-Analyzer.gif).

I've tried using stacked column series but I cannot style the column so that I only see the top line. I've also tried StepSeries but they seem to start in the middle of the column instead of the left hand side.

Any ideas?
I've figured out a way of doing this but it's not nice:

I have 4 stacked ColumnSeries:
1 for the value.
1 for the gap between the value and the limit (with fill set to transparent).
1 for the limit (the value is always 1 to produce a line).
1 for the overflow

Then I just do a bit of logic like follows:

for(int i=0; i<data.Length; i++){
   if(data[i].Value > data[i].Limit){
       //set each column value accordingly
   }else{
       //set each column value accordingly
   }
}
+1
Under review
I think it would be better to implement this as a new series type! I am not sure if it is general enough for the core library, but it would be an interesting example in the example library!