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

Max value per datapoint in a column chart [closed]

  • Thread starter Thread starter Emirr
  • Start date Start date
E

Emirr

Guest
Some smaller values are almost not noticeble.

// my chart that didn't work as a normal image :)
My current code

Code:
let recentRunhourGraph = Highcharts.chart(recentRunhourC, {
      chart: {
        type: "column"
      },
      title: {
        text: "RecentRunningHours",
        align: 'left'
      },
      xAxis: [{
        categories: [
          "Today",
          "Yesterday",
          "ThisMonth",
          "LastMonth",
          "ThisYear",
          "LastYear",
        ],
      }],
      yAxis: [{
        title: {
          text: "Hours"
        },
        // max: 24,
      }],
      plotOptions: {
        line: {
          dataLabels: {
              enabled: true
          },
        },
      },
      series: [{ // Empty data
        data: [2,5,84,73,600, 900],
        name: "Hours"
      }],
    });

I have tried using serveral yAxises but i want to only use 1 series per datasets beacuse there will be more items like fuel consumptions too.

Is there a way to set a yAxis per data column value or set the max value per column?

Simply I want that some columns with low values like "today" should be more visable beacuse other columns like "lastyear" have much higher values and makes the smaller valued columns almost invisible.

I am open to using other chart and solutions to solve my problem.

<p>Some smaller values are almost not noticeble.</p>
<p>// my chart that didn't work as a normal image :)
<a href=" " rel="nofollow noreferrer"> </a></p>
<p>My current code</p>
<pre class="lang-js prettyprint-override"><code>let recentRunhourGraph = Highcharts.chart(recentRunhourC, {
chart: {
type: "column"
},
title: {
text: "RecentRunningHours",
align: 'left'
},
xAxis: [{
categories: [
"Today",
"Yesterday",
"ThisMonth",
"LastMonth",
"ThisYear",
"LastYear",
],
}],
yAxis: [{
title: {
text: "Hours"
},
// max: 24,
}],
plotOptions: {
line: {
dataLabels: {
enabled: true
},
},
},
series: [{ // Empty data
data: [2,5,84,73,600, 900],
name: "Hours"
}],
});
</code></pre>
<p>I have tried using serveral yAxises but i want to only use 1 series per datasets beacuse there will be more items like fuel consumptions too.</p>
<p>Is there a way to set a yAxis per data column value or set the max value per column?</p>
<p>Simply I want that some columns with low values like "today" should be more visable beacuse other columns like "lastyear" have much higher values and makes the smaller valued columns almost invisible.</p>
<p>I am open to using other chart and solutions to solve my problem.</p>
 

Latest posts

M
Replies
0
Views
1
Mohit Pant
M
Top