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

Column chart showing too many labels

1 Answer 225 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Ian
Top achievements
Rank 2
Ian asked on 22 Jul 2013, 08:34 PM
In the attached screenshot you can see that my financial data is date based. Sept, Dec and March (Quarters)

When I chart these 3 data points in a column chart, the chart adds Set,Oct,Nov,Dec,Jan,Feb,March.

I only want Sep,Dec and March to show and the columns to be then just really thick.

Is this possible?

Here's my chart:

Html.Kendo().Chart<AccountPerformance>(Model.Results)
                  .Name("chartPCT")
                  .Title("% Return")
                  .Legend(legend => legend.Visible(false))
                  .Series(series =>
                  series.Column(model => model.Metrics.Return)
                      .Name(Model.ColumnTitle)
                      .Labels(false))
                  .ValueAxis(axis => axis
                      .Numeric()
                      .Labels(labels => labels.Format("{0}%")))
                  .CategoryAxis(axis => axis
                      .Date()
                      .MajorGridLines(builder => builder.Visible(false))
                      .Categories(model => model.ObservationDate)
                      .Labels(labels => labels.Format("MMM")))
                  .SeriesDefaults(builder => builder.Column().NegativeColor("#BE2D55").Color("#C0BD7F"))
                  .Tooltip(tooltip => tooltip
                      .Visible(true)
                      .Color("white")
                      .Background("black")
                      .Format("{0:P2}")
                      .Template("#= value #")
                  )                                                        
                  .Render();

1 Answer, 1 is accepted

Sort by
0
Iliana Dyankova
Telerik team
answered on 24 Jul 2013, 04:34 PM
Hello Ian,

I am afraid Kendo UI Chart does not support baseUnit Quarters. As a possible workaround I can suggest you setting baseUnit months and baseUnitStep 3, however keep in mind we cannot guarantee which will be the first month on the categoryAxis. 

Regarding the bars' width, you should adjust gap / spacing options (as demonstrated in this online demo).

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Charts
Asked by
Ian
Top achievements
Rank 2
Answers by
Iliana Dyankova
Telerik team
Share this question
or