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

ValueAxis custom numeric values

3 Answers 55 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 21 Nov 2018, 08:37 AM

Hello everyone,

I can't find a solution for my problem. I want to have a chart valueAxis where I can put in an array of numeric values like in category axis (categories? any[]). 

In the attached image you can see what I mean. As info: I'm getting these Y-Axis values from backend and I have to show them. So it is not linear and not a log axis :( 

 

Any ideas? 

 

Greetings 

Martin

3 Answers, 1 is accepted

Sort by
0
Martin
Top achievements
Rank 1
answered on 22 Nov 2018, 01:13 PM

No ideas here? Maybe my explanation wasn't good enought. So on my chart y-axis I need to have following values:

4000  - |
            |
250    - |
            |
125    - |
            |
60      - |
            |
10      - |
            |
0        - |_________________________________

It is not a logarithmic chart. Is there a way to skip for example everything between 0 and 10, 10 and 60 etc? Im looking since days for a solution. 

0
Dimiter Topalov
Telerik team
answered on 23 Nov 2018, 07:33 AM
Hi Martin,

The desired layout and rendering is not available out-of-the-box, but can be achieved via introducing custom "scaling" that will map the real data values to ones that will yield properly positioned labels on the value axis. The text in the value axis labels can be arbitrary and customized as per the requirements via the ValueAxisLabels' content option.

Here are couple of examples, demonstrating the described approach:

https://stackblitz.com/edit/angular-kt8jpc-uuaagn?file=app/app.component.ts

https://stackblitz.com/edit/angular-kt8jpc-k19sqq?file=app/app.component.ts

I hope this helps, but note that due to the lack of obvious pattern in the value axis values, mapping the data to achieve the desired rendering via the described approach might be a non-trivial task.

Regards,
Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Martin
Top achievements
Rank 1
answered on 23 Nov 2018, 09:16 AM

Hello Dimiter,

thank you for this! Yesterday I found the content option and solved it with the exactly same way how you did it. But a really big thanks for your intension!

 

Best regards,

Martin

Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Answers by
Martin
Top achievements
Rank 1
Dimiter Topalov
Telerik team
Share this question
or