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

Radar chart position and label truncating

5 Answers 286 Views
Chart (HTML5)
This is a migrated thread and some comments may be shown as answers.
jmillar
Top achievements
Rank 1
jmillar asked on 11 Mar 2016, 02:03 PM

Hi there;

Two questions:

1.  I'm currently rendering a radar chart inside a DIV, which has text-align set to center.  The chart continually renders on the left side of the DIV, though.  Is there a trick I'm missing?

2.  Some of the x axis labels are truncated.  Is there a way to prevent this?

Thanks,

Jason

<div class="ChartContainer">
<telerik:RadHtmlChart ID="radarRCM" runat="server" Width="400px" >
    <Legend>
        <Appearance Visible="false"></Appearance>
    </Legend>
    <PlotArea>
        <Series>
            <telerik:RadarLineSeries DataFieldY="Score" Name="RadarLineSeries1">
                <LabelsAppearance Visible="false"></LabelsAppearance>
            </telerik:RadarLineSeries>
        </Series>
        <XAxis DataLabelsField="Discipline" >
        </XAxis>
    </PlotArea>
 
    <Zoom Enabled="False"></Zoom>
</telerik:RadHtmlChart>
</div>

5 Answers, 1 is accepted

Sort by
0
Stamo Gochev
Telerik team
answered on 16 Mar 2016, 07:36 AM
Hi Jason,

As the chart is rendered in a div element, you need to horizontally center it inside another div, so you can use this:
.RadHtmlChart  {
    margin: 0 auto;
}
Regarding your question about axis labels - you can have a look at the common issues help article and use the suggested approaches for resolving the case.

Regards,
Stamo Gochev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
jmillar
Top achievements
Rank 1
answered on 16 Mar 2016, 11:53 AM

Thanks Stamo - I had looked at rotating the labels, but some of them are quite long and so that won't quite work.  I also tried swapping out the spaces to use the \n character as described in the multiline label article, but with the radar chart it generates a javascript error and the chart won't render.

Does anyone have an experience with this?

J

0
Stamo Gochev
Telerik team
answered on 21 Mar 2016, 06:23 AM
Hi Jason,

Can you send me a sample page that demonstrates the described problem with radar series, so I can investigate the setup and provide you with further suggestions on the case?

Regards,
Stamo Gochev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
0
jmillar
Top achievements
Rank 1
answered on 21 Mar 2016, 11:26 AM

Hi Stamo;

I believe I got it figured out.  I had tried replacing the spaces with \n, but it was just included as a literal in the labels.  It appears I had to escape the backslash, so replacing spaces with \\n worked.

Thanks,

Jason

0
Stamo Gochev
Telerik team
answered on 22 Mar 2016, 06:14 AM
Hello Jason,

I am really glad to hear that you have managed to apply the necessary configuration.

Have a nice day!

Regards,
Stamo Gochev
Telerik
Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Tags
Chart (HTML5)
Asked by
jmillar
Top achievements
Rank 1
Answers by
Stamo Gochev
Telerik team
jmillar
Top achievements
Rank 1
Share this question
or