Skip/Hide Categoryaxis series

0 Answers 41 Views
Charts
Porsha
Top achievements
Rank 1
Porsha asked on 18 Nov 2022, 05:37 PM
Is it possible or work around to skip for example, if I have a chart with the past seven days in the categoryAxis, but to skip the weekends?
Nikolay
Telerik team
commented on 23 Nov 2022, 10:34 AM

Hi Porsha,

Do you need to conditionally hide categoryAxis labels? You can do so using a template function. For example:

categoryAxis: [{
          labels: {
            template: function(e) {
              if (e.value === "Sat" || e.value === "Sun") {
                return " "
              } else {
                return e.value
              }
            }
          },
          categories: ["Mon", "Tu", "Thur", "Sat", "Sun"]
        }],

Dojo demo: https://dojo.telerik.com/uYOyOzoV

Please let me know if this is what you are looking for. In case the inquiry is different please share more details about the case.

Regards,

Nikolay

 

No answers yet. Maybe you can help?

Tags
Charts
Asked by
Porsha
Top achievements
Rank 1
Share this question
or