We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Custom X labels with multiples XName

Hi,

I want set a custom labels in xAxis. I want something similar at this



In my case, The XValues are grouped by week and Staus. The Xaxis labels and tooltip is wrong in this case.

Also, The Serie rotation (Line), I want set a range from 0 to 5, but in aspx:

            <Axes>
                <ej:Axis MajorGridLines-Visible="false" Orientation="Vertical" RowIndex="0" OpposedPosition="true"
                    AxisLine-Visible="false" Name="yAxis" Title-Text="Rotacion">                   
                     <Range Min="0" Interval="0.2" Max="5" />
                </ej:Axis>
            </Axes>

I get an error.

I attacha an exmaple for the custom grids


Attachment: WebApplication2_67791e68.zip

5 Replies

SK Sanjith Kesavan Syncfusion Team November 28, 2015 03:52 AM UTC

Hi Manolo,

Thanks for contacting Syncfusion support. We have analyzed your query and screenshot. We can customize the label text using the axesLabelRendering event. Please find the below code example
[JS]


In the above code example we have subscribed the axesLabelRendering event and modified the label text. Please find the below screenshot.

Currently we are not having support grouping the labels. So we have logged feature request on this. We have branch incident in your account for the better follow-up. You can follow the feature request in that incident. But we can achieve your requirement through work around using annotation. Please find the following code example.
[JS]


In the above code example, we get the x and y value of the labels and place the annotation in that particular position. Please find the below screenshot.


In the range minimum and maximum values are object. So we cannot set the range for the chart in the design page. We have to set the range in the code behind. Please find the below code example.


In the above code example, we have set the minimum and maximum value for the line series in the code behind.
We have prepared the sample as per your requirement. Please find the sample from below location.

Sample Link: https://www.syncfusion.com/downloads/support/forum/121284/ze/WebApplication2-975828118
Please let us know if you have any concern.

Regards,
Sanjith K


SK Sanjith Kesavan Syncfusion Team November 28, 2015 11:25 AM UTC

Hi Manolo,

We have logged issue report on giving minimum and maximum value for the range in the designer page. And we have created separate incident under your account for the better follow-up.

Please let us know if you have any concern.

Regards,
Sanjith K


MA Manolo November 30, 2015 04:00 PM UTC

Thanks a lot!




MA Manolo December 1, 2015 08:06 AM UTC

Only a comment.

I've update to last version, 13.3451.0.18, and I get an error on annotations in X value

<Annotations>
             <ej:Annotations Visible="true" Content="annotation" CoordinateUnit="Pixels"  X="150" Y="200" Region="Chart"></ej:Annotations>
             <ej:Annotations Visible="true" Content="annotation1" CoordinateUnit="Pixels" X="450" Y="400" Region="Chart"></ej:Annotations>
             <ej:Annotations Visible="true" Content="annotation2" CoordinateUnit="Pixels" X="750" Y="400" Region="Chart"></ej:Annotations>
             <ej:Annotations Visible="true" Content="annotation3" CoordinateUnit="Pixels" X="1050" Y="400" Region="Chart"></ej:Annotations>
         </Annotations>

I solve it removing X and Y attributes, but, maybe, other customers have problems

Thanks


SK Sanjith Kesavan Syncfusion Team December 1, 2015 03:19 PM UTC

Hi Manolo,

Sorry for the inconvenience caused. In the annotation X and Y values are object. So we cannot set X and Y values in the design page. We have to set the X and Y values for the annotation in the code behind. Please find the below code example.

 


 

In the above screenshot we have set the X and Y positions for the annotations.

 

We have modified the sample as per your requirement. Please find the sample from the below location.

Sample Link: https://www.syncfusion.com/downloads/support/forum/121284/ze/WebApplication-534065814

 

We have logged issue report on “Giving X and Y value for the annotation in the designer page”. And we have created separate incident under your account for the better follow-up.


Please let us know if you have any concern.

Regards,
Sanjith K


Loader.
Up arrow icon