This is a migrated thread and some comments may be shown as answers.
Why hide a bar series when radChartView is minimized?!
5 Answers 5 Views
This is a migrated thread and some comments may be shown as answers.
Zahra
Top achievements
Rank 1
Zahra asked on 29 Oct 2017, 02:30 PM

Hi

I have multiple datapoints in my barseries but when my radchartview is Smaller than specific size columns that have little value is hidden.

in Q1.png when windows is smaller size than Q2.png

what I do?!!

 

5 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 31 Oct 2017, 08:01 AM
Hello, Zahra,

Thank you for writing.  

Note that by default the BarPointElements have a border 1 px and it participates in the calculation for drawing the rectangle. That is why when the value is so small and the border's width is subtracted the height of the BarPointElement is 0. The possible solution that I can suggest is eliminating the border by using the following code snippet:

BarSeries barSeries = new BarSeries("Performance", "RepresentativeName");
          barSeries.Name = "Q1";
            
          barSeries.DataPoints.Add(new CategoricalDataPoint(177, "Harley"));
          barSeries.DataPoints.Add(new CategoricalDataPoint(128, "White"));
          barSeries.DataPoints.Add(new CategoricalDataPoint(143, "Smith"));
          barSeries.DataPoints.Add(new CategoricalDataPoint(111, "Jones"));
          barSeries.DataPoints.Add(new CategoricalDataPoint(1, "Marshall"));
          this.radChartView1.Series.Add(barSeries);
 
          foreach (BarPointElement  barElement in barSeries.Children)
          {
              barElement.BorderWidth = 0;
          }

I hope this information helps. Should you have further questions I would be glad to help.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Zahra
Top achievements
Rank 1
answered on 08 Nov 2017, 05:59 AM

Hi Dess :)

Thank you for your reply.

Your code worked. Now I have another question. May you help me please?

Question is :  How to set width for bar element or bar series?!

Because when I have one series with one bar element and one category my bar element is so wide.

thanks so much.

0
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 08 Nov 2017, 10:42 AM
Hello, Zahra,    

Thank you for writing back. 

The bar element is automatically stretched considering the ticks' range for the specific value. However, you can control the width by the GapLength property of the horizontal axis. The bigger the gap is, the smaller the bar element is. You can refer to the second part of the following help article for additional information: https://docs.telerik.com/devtools/winforms/chartview/series-types/bar

I hope this information helps. If you have any additional questions, please let me know. 

 Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
m
Top achievements
Rank 1
answered on 25 Jun 2018, 04:21 AM

Hi

I have a question that I don't know where I should ask.

So I apologize if it is irrelevant to this section.

My question is attached in two files.

0
Dess | Tech Support Engineer, Sr.
Telerik team
answered on 25 Jun 2018, 11:10 AM
Hello,    

I would like to note that this thread is related to RadChartView. However, according to the screenshots, your question doesn't seem to be related to RadChartView. I would kindly ask you to submit a support ticket with the relevant product and give us as much detailed information as possible about the exact goal that you are trying to achieve. Thus, our support staff will gladly assist you.

Thank you for your understanding.

Regards,
Dess
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Asked by
Zahra
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Sr.
Telerik team
Zahra
Top achievements
Rank 1
m
Top achievements
Rank 1
Share this question
or