Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
145
rated 0 times [  151] [ 6]  / answers: 1 / hits: 18740  / 12 Years ago, mon, december 3, 2012, 12:00:00

I am using [highcharts][1] to plot a graph between a range of values from data base. I want by X Axis values to start from the user input.



For example, if the user wants the values between range 50 and 100, I want my x axis to start from 50.



The range would be of variable size. The size of the data is large so I can't do something like getting all and using min and max for display.



Thanks in advance.



This is my chart object. I have two input fields for user that I use to query the database and return rows in between.



I use multiple type of graphs. The problem is that I have no idea on how to define the start of X axis as 50 if I am getting data from database between 50 and 100. It shows 50 values but start them from 0 upto 50.



I tried min 10 and so. That do start from that value but skips the first 10 or so values.



The input field has id 'lower' and 'upper'.






var options = {
chart: {
renderTo: ctn.attr('id'),
type: $('#graph_type option:selected').val(),
zoomType: 'x'
},
title: {
text: $('#graph_title').val()
},
subtitle: {
text: Graph - + (graph_no + 1)
},
xAxis: {

title: {
text: $('#x_label').val()
}
},
yAxis: {
title: {
text: $('#y_label').val()
}
},

credits: {
enabled: false
},
series: []
};

More From » highcharts

 Answers
23

Thanks everyone for the response. I found the solution. Min max was not actually doing as I wanted it to.



I found the solution.



To start the x axis value from desired value use



plotOptions:
<your_graph_type>:{
pointStart: <your_value>
}

[#81633] Sunday, December 2, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
piper

Total Points: 734
Total Questions: 93
Total Answers: 112

Location: Burundi
Member since Wed, Apr 6, 2022
2 Years ago
piper questions
Thu, Apr 22, 21, 00:00, 3 Years ago
Thu, Mar 11, 21, 00:00, 3 Years ago
Wed, Jun 12, 19, 00:00, 5 Years ago
Tue, Jun 11, 19, 00:00, 5 Years ago
;