Area chart in multiple panes

5 posts, 1 answers
  1. Pedro
    Pedro avatar
    6 posts
    Member since:
    Mar 2012

    Posted 18 Apr Link to this post

    Hi! I need to be able to create graphs in multiple panes. But when I define an area chart in a second pane the colors stay above the line. I need it to stay under so that it makes more sense. 

     

    I'll leave an atachment with an example

     

    Any help?

  2. Answer
    Patrick
    Admin
    Patrick avatar
    174 posts

    Posted 18 Apr Link to this post

    Hello Pedro,

    After recreating your issue with 3 Kendo Area Charts in this Telerik Dojo, I've found a solution for you.

    Please take a look at the following sample which illustrates how to set the CategoryAxis in the series.

    In the first Dojo, the categoryAxis is not set in the series.  By default, all charts will share the first categoryAxis.
    $("#chart").kendoChart({.
      ...
      series: [
        { data: [1, 2, 3, 1], axis: "firstValueAxis", type: "area" },
        { data: [1, 3, 2, 1], axis: "firstValueAxis", type: "line" },
        ...
      ],

    In the second Dojo, I included series.CategoryAxis so the series know which categoryAxis to use:
    $("#chart").kendoChart({
      ...
      series: [
        { data: [1, 2, 3, 1], axis: "firstValueAxis", categoryAxis: "firstCategoryAxis", type: "area" },
        { data: [1, 3, 2, 1], axis: "firstValueAxis", categoryAxis: "firstCategoryAxis",  type: "line" },
        ...
      ],

    Hope this helps!

    Regards,
    Patrick
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
  3. Kendo UI is VS 2017 Ready
  4. Pedro
    Pedro avatar
    6 posts
    Member since:
    Mar 2012

    Posted 19 Apr Link to this post

    It was exactly this that I needed. Thanks!!!
  5. Pedro
    Pedro avatar
    6 posts
    Member since:
    Mar 2012

    Posted 19 Apr Link to this post

    It was exactly this that I needed. Thanks!!!
  6. Patrick
    Admin
    Patrick avatar
    174 posts

    Posted 19 Apr Link to this post

    Hi Pedro,

    Glad to help, and that everything is working!

    Regards,
    Patrick
    Telerik
     
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
     
Back to Top
Kendo UI is VS 2017 Ready