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

Kendo Stock Chart Max Value Error

14 Answers 46 Views
Charts
This is a migrated thread and some comments may be shown as answers.
Burak
Top achievements
Rank 2
Burak asked on 26 Mar 2014, 03:23 PM
Hello! I have this chart I am drawing with area chart up top, and a navigator at the bottom. Tho I have only daily data from 2010/01/01 to 2014/12/31, when using StockCharts, I get extra categoryAxis values from 2015... I cannot block this, is it a bug or a fixable problem?

Data;

[{
"date": "2010-01-01",
"revenue": 3370,
"costs": 1381,
"income": 1989
}, ....

{
"date": "2014-12-31",
"revenue": 4854,
"costs": 744,
"income": 4110
}]

I attached the resulting error;
Any help appreciated!!






14 Answers, 1 is accepted

Sort by
0
T. Tsonev
Telerik team
answered on 28 Mar 2014, 01:42 PM
Hello,

I tested this scenario with the latest version here:
http://trykendoui.telerik.com/ePuM

It seems to work fine. Can you spot any other differences with your setup?
What version are you using? 

Regards,
T. Tsonev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Burak
Top achievements
Rank 2
answered on 28 Mar 2014, 01:48 PM
Hello!

Thanks for the reply, I must say the demo you have sent is also problematic. Just try to click on the graph, or move it a bit and go back to the end again, you will see the 2015 peeking from the end :) My version is the latest free version I guess from the "kendoui.complete.2013.3.1324.trial"

The bug shows itself after you interact with the chart, it does not appear before interaction

You should try this demo on your website, even it has the same issue...
http://demos.telerik.com/kendo-ui/dataviz/financial/index.html


0
Accepted
T. Tsonev
Telerik team
answered on 28 Mar 2014, 02:22 PM
Hi,

Indeed this is not the expected behavior. A temporary workaround is to set the roundToBaseUnit property to false:
      categoryAxis: {
        roundToBaseUnit: false
      }


-- Live demo --

We'll investigate and try to come up with a proper fix.

Regards,
T. Tsonev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Accepted
T. Tsonev
Telerik team
answered on 28 Mar 2014, 02:24 PM
Hi,

Indeed this is not the expected behavior. A temporary workaround is to set the roundToBaseUnit property to false:
      categoryAxis: {
        roundToBaseUnit: false
      }


-- Live demo --

We'll investigate and try to come up with a proper fix.

Regards,
T. Tsonev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Burak
Top achievements
Rank 2
answered on 31 Mar 2014, 01:01 PM
Hey!

I have an update for this issue, your fix solved the problem, but the problem in navigator still persists...
See the attached image;

I have added the roundToBaseUnit: false in the categoryAxis of navigator but it still looks like this.
Thanks.
0
T. Tsonev
Telerik team
answered on 02 Apr 2014, 08:49 AM
Hello,

I can't quite get to the same result using only the two data points from the last sample.

Can you spot any differences between my demo and your actual code in terms of configuration and data?
http://trykendoui.telerik.com/ePuM/2

Regards,
T. Tsonev
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
Burak
Top achievements
Rank 2
answered on 02 Apr 2014, 10:45 AM
Hello again,

I added my crazy amount of data in it; and using the 
aggregate: "sum" I got a similar result;

It probably gets not the data of the whole month but the data of only one day, and that is why that sharp decline is occuring.

http://trykendoui.telerik.com/ePuM/5
0
Burak
Top achievements
Rank 2
answered on 02 Apr 2014, 10:46 AM
*and I am using <aggregate: "sum"> because I want the navigator chart to look like my main chart...
0
T. Tsonev
Telerik team
answered on 04 Apr 2014, 08:33 AM
Hello,

The aggregate in itself is not a problem. What causes the drop is that the last points gets data only for a single date.

The navigator is aggregating the data too coarsely with just 1 point per month. 
December is the last month and gets an additional data point for the last day, just so the time line is true to the data range.

We can  add more data points to avoid this:

categoryAxis: {
    autoBaseUnitSteps: {
        // The navigator won't group data into weeks by default
        weeks: [1] 
    }    
}

-- Live demo --

This will allow the navigator to drop into weekly resolution for the minor ticks. This is currently disabled and we'll investigate if it makes sense to enable it by default.

I hope this helps.

Regards,
T. Tsonev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Burak
Top achievements
Rank 1
answered on 18 Apr 2014, 06:47 AM
This problem is my only one left. I can't seem to get rid of this issue... Even if I add more data points, it again shows lower points at the end of my chart, I need to get the last fraction of my baseUnit to be shown on the end of the X axis; last day of the last month, if I am in "months" baseUnit, last month of the last year, if I am in "years", last day of the last week, if I am in "weeks", I cannot do this since I cannot get the "baseUnit" and decide the ranges at the same time, it has to be done by source code itself.

Because when I am in "months", I only want to see monthly sums, so it is silly to see a month with one day, at the end, plus I am making my legend items follow their respective data points, with low values at the end, they always end up near the zero and cause a silly look.

The source code should see that with "sum" aggregation, it should not seperate the parts of the given baseUnit, if it is "months" you should not seperate a month into 2 and show a lesser sum of it.

Thanks, and hope you can find a solution to this :)
0
T. Tsonev
Telerik team
answered on 21 Apr 2014, 03:22 PM
Hi,

We can force the navigator to display the last month as a single point by setting:
      navigator: {
        categoryAxis: {
          roundToBaseUnit: true
        }
      }


-- Live demo --

The problem is that this gets us back to square one and triggers the bug that you initially experienced.
We'll investigate it and get back to you in a few weeks time. I can't suggest any additional workarounds for the moment.

As a token of gratitude for your involvement your Telerik points have been updated.

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
Burak
Top achievements
Rank 1
answered on 22 Apr 2014, 05:58 AM
Hey again, thanks for the fix.

I must say I completely forgot about this option... And with making it to true, now my old bug is also not visible. My company bought the commercial version and with the newest release I guess there is no more hint of the old bug.

Thanks again!
0
Burak
Top achievements
Rank 1
answered on 24 Apr 2014, 10:31 AM
Hey again, about the max number of dates in the categoryAxis...

I need to have a dynamic "maxDateGroups" option.
If I give less than 32 into that option, I cannot get to see days, since I have no skipping days option.
And with 32 value, weeks and months labels gets too tight and they go on top of each other...
Is there a way to implement the following logic?

maxDateGroups: {
            years: [10],
            months: [16],
            weeks: [16],
            days: [32]
}

Thanks and hope to solve this problem...
0
T. Tsonev
Telerik team
answered on 28 Apr 2014, 08:36 AM
Hi,

This is not possible to do right now, but we'll definitely consider such "adaptive labels" feature. The manual configuration seems like an overkill and we prefer to make it automatic, based on distance between labels.

For the time being you can perhaps consider showing the labels vertically:
categoryAxis: {
  labels: {
    rotation: -90
  }
}


This way you'll get consistent label distribution regardless of their format and length.

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
Burak
Top achievements
Rank 2
Answers by
T. Tsonev
Telerik team
Burak
Top achievements
Rank 2
Burak
Top achievements
Rank 1
Share this question
or