Skip to content

Infragistics Community Forum / Web / Ignite UI for jQuery / Hide/Show axis label in a multi series chart

Hide/Show axis label in a multi series chart

New Discussion
Shashidhar Dasyam
Shashidhar Dasyam asked on Jun 6, 2014 5:59 PM

I am plotting two different line series on a single chart. Both of these line charts share X-axis which is a date axis.

I know I can show/hide labels at axis level but I would like to show no date label for a chosen series. Is this something possible? Please let me know; thanks.

Sign In to post a reply

Replies

  • 0
    Zdravko Kolev
    Zdravko Kolev answered on May 20, 2014 11:23 AM

    Hello,

     Thank you for using our forum.

     I hope that I understand correctly your question, you want to show/hide nor all labels at once, but to show/hide particular labels. For example you want to show/hide the second series date label? Currently this is not possible, you can show/hide label with the option labelVisibility which specifies whether the labels are visible or collapsed. This option is for all the labels of the axis.

     Code snippet:

    1. $("#chart").igDataChart({
    2.                 width: "100%",
    3.                 height: "400px",
    4.                 title: "Population per Country",
    5.                 titleTextColor: "green",
    6.                 subtitle: "Five largest projected populations for 2015",
    7.                 dataSource: data,
    8.                 axes: [
    9.                     {
    10.                         name: "NameAxis",
    11.                         type: "categoryX",
    12.                         title: "Country",
    13.                         label: "CountryName"
    14.                     },
    15.                     {
    16.                         name: "PopulationAxis",
    17.                         type: "numericY",
    18.                         minimumValue: 0,
    19.                         title: "Millions of People",
    20.                         labelVisibility: "visible"
    21.                     }
    22.                 ],
    23.                 series: [

     If you have other questions, do not hesitate to contact me again.

  • 0
    Zdravko Kolev
    Zdravko Kolev answered on May 26, 2014 7:11 AM

    Hello,

    I am just following up to see if you need further assistance.

    • 0
      Shashidhar Dasyam
      Shashidhar Dasyam answered on May 27, 2014 9:07 PM

      Thanks for the help. 

      Let me give you little intro. My requirement is to draw a trend line chart based on the line chart data. I am deriving the data points for trnd line and plotting it through another line series in the same chart. But i wanted it to be shown just like a 'trendline' chart; no datapoints, no x-axis labels. That's what brought me here.

      Hiding labels for individual series line is not possible per design. Is it possible to hide data points altogether atleast? Please let me know; thanks in advance.

      • 0
        Zdravko Kolev
        Zdravko Kolev answered on May 28, 2014 1:35 PM

        Hello Shashidhar Dasyam,

         As I am understanding you are asking how to hide data points altogether. Please refer to the online sample below regarding show/hide Chart Elements. Try to check/uncheck Line series and Line markers checkboxes, notice how the whole Line series is set to be hidden. I hope you will find this sample helpful, if not, could you please send me capture that is showing what exactly you want to hide.

         Chart elements: http://igniteui.com/data-chart/chart-elements

         Looking forward to hearing from you.

      • 0
        Shashidhar Dasyam
        Shashidhar Dasyam answered on May 29, 2014 8:55 PM

        Great; I missed that page somehow.

      • 0
        Zdravko Kolev
        Zdravko Kolev answered on May 30, 2014 5:57 AM

        Let me know if I may be of further assistance.

        Thank you for using our controls.

      • 0
        Graham Murray
        Graham Murray answered on May 31, 2014 6:28 PM

        Please note, also, the igSparkline component which is specifically designed for showing a lightweight trend.

      • 0
        Shashidhar Dasyam
        Shashidhar Dasyam answered on Jun 6, 2014 5:59 PM

        Thanks; I was aware of the sparkline but that's not what I was looking for.

        Anyways I found this thing. When I turned off the marker types, the axis labels are hidden by themselves. I am wondering why no one mentioned that, which is a perfect answer to my issue. Anyways thanks for the help.

  • You must be logged in to reply to this topic.
Discussion created by
Favorites
Replies
Created On
Last Post
Discussion created by
Shashidhar Dasyam
Favorites
0
Replies
8
Created On
Jun 06, 2014
Last Post
11 years, 8 months ago

Suggested Discussions

Created by

Created on

Jun 6, 2014 5:59 PM

Last activity on

Feb 23, 2026 6:31 AM