Line chart with category type. Smooth baseUnit swith while zoom out.

4 posts, 1 answers
  1. Jose Mejia
    Jose  Mejia avatar
    107 posts
    Member since:
    May 2009

    Posted 09 Jun 2015 Link to this post

    Hi.

    Here is my code sample

    Now I can show maximum 30 points with 15 min. interval. But I want to be able to switch to hours smoothly when user continues zooming out.

    Basically, I have to scenarios:

    1) user select some time interval based on datepickers and I decide appropriate baseUnit;

    2) user uses zoom out to get to appropriate baseUnit.

    Lets handle second scenario. My situation is very similiar to this demo -- http://demos.telerik.com/kendo-ui/line-charts/date-axis

    But I'm using category type of categoryAxis. When I start to play with date type I can't understand how it works... For example on my local data when I select days(and I have more then two weeks of one 15 min data) it always show to category (two points) and scrolling and zooming logic works very very strange.My ideal soultion for provided sample is following -- when there is already thirty 15min intervals (or 30 points) and user continues zoom out he smoothly gets to hours with the same scrolling and zooming functionality (lets consider no gaps). When he reaches say 24 hour intervals (24 points) and continue zooming he gets  'days' baseUnit and so on.

    Is it achievable?

     

    Thanks in advance.

     

  2. T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 11 Jun 2015 Link to this post

    Hi,

    I'd like to ask if you've considered using the stock chart for this scenario? It will work with line series as well.

    It might be easier to setup than trying to implement the same functionality from scratch. What do you think?

    Regards,
    T. Tsonev
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Jose Mejia
    Jose  Mejia avatar
    107 posts
    Member since:
    May 2009

    Posted 11 Jun 2015 in reply to T. Tsonev Link to this post

    Hi.

    Thank you for response. You get the point. It is basically what stock charts are doing -- zooming out automatically switching to years, month, days , hours... But I have few question:

    1) Is it possible to customize  T shape point to simple point like in line charts? I guess yes...

    2) Does it support multiply axis on chart like this?

    3) Can it be used with angular js?

    4) Does it support custom aggregation? 

    Thanks in advance.

     

     

     

     

     

     

     

     

  4. Answer
    T. Tsonev
    Admin
    T. Tsonev avatar
    2817 posts

    Posted 15 Jun 2015 Link to this post

    Hello,

    I can confirm on all points:

    1) Line series are supported with the caveat that the slope might be incorrect if there's missing data at the ends. The stock chart will discards data points outside the visible range and will not a plot a continuous line in the direction of the points that are left outside the screen.

    2) Indeed. The configuration is pretty much the same.

    3) Yes, the same basic concepts apply. Check out the regular chart AngularJS demo.

    4) Yes, it's configured per-series.

    I hope this 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