OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Show only the first 2 bars on the Y-Axis using Chart.js?

  • Thread starter Thread starter vkandvia
  • Start date Start date
V

vkandvia

Guest
I have a bar graph which needs to display a set of values like Total Likes (likes on Facebook+Twitter+LinkenIn...) Total Comments(comments on Facebook+Twitter+LinkenIn...)

My dataset currently holds Total Likes, Total Comments, Facebook Likes, Twitter likes etc) I need the Facebook Likes, Twitter likes etc in my dataset since I need to show them in a tool tip.

So how do I limit my bar chart to only the first two bars in the group? Havent found an option when I was going through the chart.js APIs.

Sample graph

<p>I have a bar graph which needs to display a set of values like
Total Likes (likes on Facebook+Twitter+LinkenIn...)
Total Comments(comments on Facebook+Twitter+LinkenIn...)</p>
<p>My dataset currently holds Total Likes, Total Comments, Facebook Likes, Twitter likes etc)
I need the Facebook Likes, Twitter likes etc in my dataset since I need to show them in a tool tip.</p>
<p>So how do I limit my bar chart to only the first two bars in the group? Havent found an option when I was going through the chart.js APIs.</p>
<p><a href="https://i.sstatic.net/6HNPZfCB.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6HNPZfCB.png" alt="Sample graph" /></a></p>
 

Latest posts

Top