Kendo Stock Chart - Xaxis limitation

8 posts, 0 answers
  1. Muralidharan
    Muralidharan avatar
    12 posts
    Member since:
    Dec 2014

    Posted 07 Jul 2015 Link to this post

    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,

     

  2. Muralidharan
    Muralidharan avatar
    12 posts
    Member since:
    Dec 2014

    Posted 07 Jul 2015 in reply to Muralidharan Link to this post

    Forgot to attach the image.

     

    Thanks

  3. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 09 Jul 2015 Link to this post

    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!
     
  4. Mathias
    Mathias avatar
    15 posts
    Member since:
    Oct 2014

    Posted 09 Jul 2015 Link to this post

    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

     

  5. Muralidharan
    Muralidharan avatar
    12 posts
    Member since:
    Dec 2014

    Posted 10 Jul 2015 in reply to T. Tsonev Link to this post

    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,

  6. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 14 Jul 2015 Link to this post

    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!
     
  7. Muralidharan
    Muralidharan avatar
    12 posts
    Member since:
    Dec 2014

    Posted 16 Jul 2015 in reply to T. Tsonev Link to this post

    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, 

     

  8. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 17 Jul 2015 Link to this post

    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!
     
Back to Top