brandon
Posts: 16
Joined: Tue Sep 07, 2010 6:21 am

yAxis problem

In this chart, value "2605" and "0" are in the same horizontal line.
Is there an option in yAxis can change the value "2605" created by Highcharts.js ,keeping the customized number and "0" in the same horizontal line?
download.jpg
download.jpg (104.78 KiB) Viewed 3508 times
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: yAxis problem

This values is connected with your series data. Have you tried alignTicks? http://www.highcharts.com/ref/#chart
Slawek Kolodziej
Highcharts support team
brandon
Posts: 16
Joined: Tue Sep 07, 2010 6:21 am

Re: yAxis problem

hfrntt wrote:This values is connected with your series data. Have you tried alignTicks? http://www.highcharts.com/ref/#chart
It is not what i mean,thanks all the same!
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: yAxis problem

Hmm so I'm not sure what do you mean. If by "change value" you mean format it, use label formatter, otehrwise please explain what do you want to achieve.
Slawek Kolodziej
Highcharts support team
brandon
Posts: 16
Joined: Tue Sep 07, 2010 6:21 am

Re: yAxis problem

download.jpg
download.jpg (45.53 KiB) Viewed 3480 times
sorry for my poor english!
by default,"2605" align to "0".
the value of the first point of the blue line in the chart is ÔÇ£2597.5ÔÇØ,so the first point is below the red line.
I want the first point of the blue line align to the particular value "0".
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: yAxis problem

You can do it, but it'll be complicated. (You have to calculate scale, based plotY on first points of series and then setExtreme). But then your tick shouldn't be alligned.)
Slawek Kolodziej
Highcharts support team
brandon
Posts: 16
Joined: Tue Sep 07, 2010 6:21 am

Re: yAxis problem

hfrntt wrote:You can do it, but it'll be complicated. (You have to calculate scale, based plotY on first points of series and then setExtreme). But then your tick shouldn't be alligned.)
thanks,I'll try do that!
by the way,could you show me some examples about the function "setExtreme" and functions of the chart not documented?

I'm looking for some callback functions those can draw lines,circles and so on,as well, developers can bind events on those graphics.
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: yAxis problem

I'm looking for some callback functions those can draw lines,circles and so on,as well, developers can bind events on those graphics.
Take a look to this thread: http://highslide.com/forum/viewtopic.php?f=9&t=5849
Slawek Kolodziej
Highcharts support team
brandon
Posts: 16
Joined: Tue Sep 07, 2010 6:21 am

Re: yAxis problem

hfrntt wrote:You can do it, but it'll be complicated. (You have to calculate scale, based plotY on first points of series and then setExtreme). But then your tick shouldn't be alligned.)
any other functions should I call or override besides "setExtremes"?
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: yAxis problem

Just call setExtremes, but you have to calculate values of those extremes.
Slawek Kolodziej
Highcharts support team
brandon
Posts: 16
Joined: Tue Sep 07, 2010 6:21 am

Re: yAxis problem

hfrntt wrote:Just call setExtremes, but you have to calculate values of those extremes.
Is it possible to add some options to Axis to make this easier?

just like:

Code: Select all

yAxis: [{
		title: {
			text: 'yAxis one'
		},
		opposite: false,
                [color=#FF0000]bindGridLine:{
                  to:1,                    //bind chart.yAxis[0] to chart.yAxis[1]
                  values:[100,0]      //two values from chart.yAxis[0] and chart.yAxis[1]
               }[/color]
	},{
		title: {
			text: 'yAxis two'
		},
		opposite: true
	}]
hfrntt
Posts: 6393
Joined: Mon Aug 30, 2010 8:41 am
Contact: Website

Re: yAxis problem

You can post a feature request on http://highcharts.uservoice.com/
Slawek Kolodziej
Highcharts support team

Return to “Highcharts Usage”