Hi,
is it possible to change color of each bar in BarSeries for example when a value is above a threshold.
# edited in paint
thanks
Igor
BarSeries change color for some bars
Moderator: Queue Moderators
- ArctionPasi
- Posts: 1367
- Joined: Tue Mar 26, 2013 10:57 pm
- Location: Finland
- Contact:
Re: BarSeries change color for some bars
Hi Igor,
that's very difficult question. Two approaches come to my mind now:
1) Creating one bar series for each color, and setting the data items in series by the color
2) StockSeries allows coloring by CustomStockDataAppearance event. Maybe replacing BarSeries with stock series would suit your application.
that's very difficult question. Two approaches come to my mind now:
1) Creating one bar series for each color, and setting the data items in series by the color
2) StockSeries allows coloring by CustomStockDataAppearance event. Maybe replacing BarSeries with stock series would suit your application.
LightningChart Support Team, PT
Re: BarSeries change color for some bars
1) I've created 3 BarSeries (one for default, one for warning level => Orange, and one for error level => Red). The bar values has the same indices. Now the bars are drawn side by side. Is it possible to overlay a BarSeries with the other?
In my mind I thought I would limit the specific bar series values to the threshold value and show instead another BarSeries value.
2) What's about the performance. Could I get performance issues with about 500-800 "bars" using e.g. NVidia GTX 950 and Core i7 4.Gen.
In my mind I thought I would limit the specific bar series values to the threshold value and show instead another BarSeries value.
2) What's about the performance. Could I get performance issues with about 500-800 "bars" using e.g. NVidia GTX 950 and Core i7 4.Gen.
Re: BarSeries change color for some bars
what if I use a BarSeries for each value? So I could change the color for each bar.
-
- Posts: 555
- Joined: Mon Mar 14, 2016 9:22 am
Re: BarSeries change color for some bars
Hi Igor,
Please modify _chart.ViewXY.BarViewOptions accordingly. For example,
would use Location on axis for grouping. Other useful options: BarSpacing, Stacking (in your case 'None'), KeepBaseLevelAtAxisMinimum.
It should not be any problems to create 1000 bars. Although both approaches (multiple series and multiple-values in series) will work, less BarSeries should be more efficient.
All the best,
Kestutis
Please modify _chart.ViewXY.BarViewOptions accordingly. For example,
Code: Select all
_chart.ViewXY.BarViewOptions.Grouping = BarsGrouping.ByLocation;
would use Location on axis for grouping. Other useful options: BarSpacing, Stacking (in your case 'None'), KeepBaseLevelAtAxisMinimum.
It should not be any problems to create 1000 bars. Although both approaches (multiple series and multiple-values in series) will work, less BarSeries should be more efficient.
All the best,
Kestutis
Last edited by ArctionKestutis on Thu Jun 30, 2016 7:15 am, edited 1 time in total.
Re: BarSeries change color for some bars
ok, I got it
I've create a BarSeries for each value. In the rare extreme usecase with 800 BarSeries the GPU usage of a Quadro M4000 is about 50% by 4K Resolution .. thats ok.
thanks for your help
I've create a BarSeries for each value. In the rare extreme usecase with 800 BarSeries the GPU usage of a Quadro M4000 is about 50% by 4K Resolution .. thats ok.
Code: Select all
ViewXY.BarViewOptions.BarSpacing = 2;
ViewXY.BarViewOptions.Grouping = BarsGrouping.ByIndexFitWidth;
ViewXY.BarViewOptions.Stacking = BarsStacking.None;
ViewXY.BarViewOptions.IndexGroupingFitGroupDistance = 1;
ViewXY.BarViewOptions.IndexGroupingFitSideMargins = 1;
Code: Select all
_barSeries = new BarSeries(_viewXy, _viewXy.XAxes[0], _viewXy.YAxes[0]);
_barSeries.Title.Visible = false;
_barSeries.Shadow.Visible = false;
_barSeries.LabelStyle.Visible = false;
_barSeries.Fill.GradientFill = GradientFill.Solid;
_barSeries.Fill.Color = _colDefault;
_barSeries.BorderWidth = 0;