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

Hide horizontal crosshair line and chart vertical lines of x-axis

Is there a way to remove the horizontal line of the crosshair, showing only the vertical one?

And hide the verticals line of a line chart, showing only the horizontal lines?

1 Reply

SK Saravana Kumar Kanagavel Syncfusion Team October 11, 2017 06:10 AM UTC

Hi Marco, 
 
Thanks for contacting Syncfusion Support. 
We have analyzed your query and created a sample based on your requirement. In the sample, we have hide the horizontal line of crosshair and also hide the major grid lines of x axis in chart. 
 
Please refer the code example below 
 
[JS] 
$("#container").ejChart( 
    { 
     primaryXAxis: 
            { 
                majorGridLines:{ visible:false}, 
                crosshairLabel: { visible:true  } 
            }, 
 
           trackAxisToolTip:"trackTooltip" 
    }); 
function trackTooltip(sender){ 
  document.getElementById("container_svg_CrosshairHorizontal").setAttribute("visibility","hidden"); 
}  
 
 
In the above code, we are triggering trackAxisTooltip event. In the event, we have hide the horizontal line of crosshair. 

Kindly find the sample from the below location. 
 


Please find the output of the sample below 
 

Please let us know if you have any concern. 

Regards, 
Saravana Kumar K. 
 


Loader.
Up arrow icon