This is a migrated thread and some comments may be shown as answers.

Column Charts - Changing Column Width

8 Answers 563 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Steve
Top achievements
Rank 1
Veteran
Steve asked on 14 Jan 2021, 01:17 AM

I'm using the StandAlone Designer and I have simple Column Chart using Categories (see attached image).  I believe the system resizes the column widths based on the data, and that the SpacingSlotCount property will effect this. I have tried this and while setting to say 100 will reduce the column widths drastically, no setting will causes the width to increase.

Is there any way to do this in the report designer, or do I need to save report as XML and make the changes there?

 

 

8 Answers, 1 is accepted

Sort by
0
Mads
Telerik team
answered on 18 Jan 2021, 10:47 AM

Hello Steve,

I have spent some time looking into this and trying to reproduce the graph from the screenshot. The quick answer to you question is that SpacingSlotCount can be set in the Designer, as mentioned in this article, 'How to Change the Gap Between the Bars'. You can set this value to a negative number, but I do not believe this is exactly what you are looking for.

Firstly, you say you want to decrease the space between the columns/ increase column width. Just to make sure, I want to mention that the reason for each column to be so narrow is because the Category is set in the graph. Though it seems that each data-entry (e.g. 810A, 810D, 820A and so on) only has 1 column each. 

The series seems to be set to the 000X(e.g. 810A, 820D++) value, and the category seem to be set to the same value, but without the charater at the end (810, 820 and so on). The graph can be created without setting any category value, which will result in a graph like seen in the screenshot below

Is this closer to what you are expecting? If not, you can try setting the SpacingSlotCount to different values in the original graph. I attached the report I recreated to this reply for you to have a look.

I hope the information is useful. Let me know if it works out, have any challenges, or any other questions.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Steve
Top achievements
Rank 1
Veteran
answered on 18 Jan 2021, 11:32 AM

Mads,

Thanks for the reply.  In the data the first 3 digits represent a department and the A / D postfix character designate A - administration or D - Direct, so we are trying to show the ratio of admin to direct, so having them separated (ie categories) enables this comparison to be easily seen.  Tried all sorts of values, including negatives for SpacingSlotCount but couldn't get anything that really worked.

 

0
Steve
Top achievements
Rank 1
Veteran
answered on 18 Jan 2021, 09:07 PM
Gave up on trying to correctly format the Clustered Bar Chart, went with Stacked Bar Chart and got result as shown...
0
Steve
Top achievements
Rank 1
Veteran
answered on 18 Jan 2021, 09:49 PM

Found issue with stacked bar chart and trying to assign a fixed color palette, the stacked bar chart wants to alternate the colors, so when one category only has a single value then the colors do not hold for each category value  ie administration start showing in green etc...

I would have thought, for such a simple plot it would be easy, but it doesn't seem to be,  am I missing something here?

0
Steve
Top achievements
Rank 1
Veteran
answered on 18 Jan 2021, 10:16 PM

Mads,

Using your example chart, if I set the color palette to 2 colors so as to get 'direct' in one color and 'admin' in another, as soon as there is missing data the series data palette switches.  For instance, in the attached image, the top plot is as per your data, the 2nd plot is with the 820A data removed.

 

0
Accepted
Mads
Telerik team
answered on 21 Jan 2021, 09:03 AM

Hi Steve,

Based on the explanation in the first reply after my post, maybe something like the chart in the screenshot below is more like what you want?

This report is attached to this reply. I will explain what I did differently.

In the data-source I tried recreating based on your screenshot, I had one value like 810A, 810D, 820A, 820D, and so on. As part of the data-source properties I created two calculated fields that extract what department, and whether it is A or D. The expressions for these two fields are the following:

= Substr(Fields.name, 3,3)

= CInt(Substr(Fields.name, 0,3))

The first expression gets the 4th character, which is the A or D. The second expression gets the first 3 numbers and converts it into an integer. 

Next, to create the chart, I set "A or D" value as Series, "Department number" as a category, and then the value as a value. This way, I believe the colors stay correct and you get the spacing in between each department.

 

The reason the first chart created so much space between the columns was that for each category (e.g. 810, 820, and so on on the X axis), it created space for all the different series. To explain this in a different way; When the chart is split up into categories, for each category, every series(the different items listed on the side of the graph with the color) is repeated.

While with this approach above, the only A / D is repeated per category.

I hope this information is useful and helps you create the graph you want. Let me know if it works out or if I can help you out any further.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

0
Steve
Top achievements
Rank 1
Veteran
answered on 26 Jan 2021, 11:22 PM
Thanks Mads, yes by restructuring the data I was able to get the appearance I wanted.  Be nice if there was a property setting to control category spacing...
0
Mads
Telerik team
answered on 29 Jan 2021, 03:39 PM

Hi Steve,

That is great to hear! Thanks for the update. Let me provide additional information on the category spacing below.

The space between the categories can be increased by changing CoordinateSystems > cartesianCoordinateSystem1 > XAxis > Scale > SpacingSlotCount.

However, if you are referring to removing space between the columns in the initial graph, setting this value to a negative value will potentially hide columns/data. Note that with the setup of data, each category has to make space for every series which in that design causes each category to make space for the 13 series/columns.

Let me know if there is anything else, I can help with, or if you have any further questions.

Regards, Mads Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Report Designer (standalone)
Asked by
Steve
Top achievements
Rank 1
Veteran
Answers by
Mads
Telerik team
Steve
Top achievements
Rank 1
Veteran
Share this question
or