This is a migrated thread and some comments may be shown as answers.

Kendo Stock Chart - Xaxis limitation

7 Answers 117 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Muralidharan
Top achievements
Rank 1
Muralidharan asked on 07 Jul 2015, 12:11 PM

Is there any option to bind Integer value in xaxis?

Our requirement is, we need to bind the Integer value in xAxis of Main chart and bind the Date value inxAxis of Navigator chart.

Please see the attachement,

 

Thanks,

 

7 Answers, 1 is accepted

Sort by
0
Muralidharan
Top achievements
Rank 1
answered on 07 Jul 2015, 12:14 PM

Forgot to attach the image.

 

Thanks

0
T. Tsonev
Telerik team
answered on 09 Jul 2015, 07:56 AM
Hi,

The stock chart axes must be all bound to the same date-time field otherwise the navigation will not function.

What you can do instead is to customize the axis label template. This will do if you only need to show a different value there, but it will not change the behavior of the chart. For example:
$("#chart").kendoStockChart({
  categoryAxis: {
    labels: {
      template: "#: dataItem.Number #"
    }
  }
  ...


Does this make sense for your scenario?

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Mathias
Top achievements
Rank 1
answered on 09 Jul 2015, 12:50 PM

hi there

had a similar problem,

solved it with "panes" and "selection"

 http://www.telerik.com/forums/combination-of-to-charts-draw-area-set-size

 may be that can help too

 

regards mathias

 

0
Muralidharan
Top achievements
Rank 1
answered on 10 Jul 2015, 02:17 PM

Thanks for your reply.I have tried your approach in your examples.its working fine. need to to try in our scenario.i will update the status.

am having another doubt.is there any way to bind numeric value in Navigator XAxis also?

 

Thanks,

0
T. Tsonev
Telerik team
answered on 14 Jul 2015, 01:59 PM
Hi,

The suggested approach using multiple panes & axis selection will not work for scatter charts with numeric X-axis.
This axis type does not support selection.

Please, file a request for this feature on our UserVoice portal if you have minute.
This will help us gauge the overall interest and prioritize.

Apologies for the caused inconvenience.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Muralidharan
Top achievements
Rank 1
answered on 16 Jul 2015, 10:24 AM

Hi,

  I have tried  axis label template approach in your Examlpe(using this URL http://dojo.telerik.com/oKoPa),its working fine without any issues.

  but using jsfiddle,its not working.(http://jsfiddle.net/4s71ec1w/13/).

Thanks, 

 

0
T. Tsonev
Telerik team
answered on 17 Jul 2015, 01:34 PM
Hello,

It's just the case that the jsFiddle demo does not have data for the selected period. So the template needs to be a bit more robust:
template:"#: (dataItem && dataItem.Open) ? dataItem.Open : '' #"

An easy way to debug such issues is to log the dataItem content:
template:"#console.log(dataItem) # #: (dataItem && dataItem.Open) ? dataItem.Open : '' #"

This is the updated snippet, I hope it helps.

Regards,
T. Tsonev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Charts
Asked by
Muralidharan
Top achievements
Rank 1
Answers by
Muralidharan
Top achievements
Rank 1
T. Tsonev
Telerik team
Mathias
Top achievements
Rank 1
Share this question
or