Hello
I experienced some weird behaviours on refreshing chart. At the bottom of this message you find a fully working sample showing those weird behaviours. Some appearing effects are unpredictable. All over there is no error message in the console.log.
There are two categories in the column chart you can switch by using the two buttons at bottom of the chart. By default category 1 with 11 columns while max 8 will be displayed. Category 2 has one column. You can pan the chart (required for category 1 to show hidden ones).
Case 1:
Sliding category 1 to the most right shows a placeholder after column K (probably for the column in category 2).
Case 2:
Switch between category 1 and 2: works fine even tough the column of category 2 is not centered. As soon as you try to pan the column in category 2 it gots resized and centered. Furthermore you can move (pan) the column in category 2 out of the chart on the right side.
Case 3:
Slide to the right side (most right column) in category 1. Now switch to category 2: You will not see the column of it and the value axis is set to : 0, 0.2, 0.4, ...
You can move the column of category 2 into the chart by pressed mouse button while move it to the right. You see the column appearing. If you drag the column over the middle of the chart it disappears right away. If you move the column out of the chart on the right side the whole chart disappears sometimes or won't reappear
Tested in Chrome, Firefox and Safari (all on Mac), all with the described behaviours.
<!DOCTYPE html>
<html>
<head>
<meta charset=
"UTF-8"
>
<link href=
"http://kendo.cdn.telerik.com/2019.3.917/styles/kendo.common.min.css"
rel=
"stylesheet"
/>
<script src=
"https://code.jquery.com/jquery-3.4.1.min.js"
integrity=
"sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin=
"anonymous"
></script>
<script src=
"http://kendo.cdn.telerik.com/2019.3.917/js/kendo.all.min.js"
></script>
</head>
<script>
$(document).ready(
function
() {
var
dataList = [
// Category 1
{
'cat1'
:
'A'
,
'value'
: 1 },
{
'cat1'
:
'B'
,
'value'
: 7 },
{
'cat1'
:
'C'
,
'value'
: 2 },
{
'cat1'
:
'D'
,
'value'
: 8 },
{
'cat1'
:
'E'
,
'value'
: 5 },
{
'cat1'
:
'F'
,
'value'
: 2 },
{
'cat1'
:
'G'
,
'value'
: 9 },
{
'cat1'
:
'H'
,
'value'
: 3 },
{
'cat1'
:
'I'
,
'value'
: 7 },
{
'cat1'
:
'J'
,
'value'
: 4 },
{
'cat1'
:
'K'
,
'value'
: 1 },
// Category 2
{
'cat2'
:
'L'
,
'value'
: 5 }
];
$(
"#chart"
).kendoChart({
dataSource: {
data: dataList
},
series: [{
type:
"column"
,
aggregate:
"sum"
,
field:
"value"
,
categoryField:
"cat1"
}],
pannable: {
lock:
"y"
},
categoryAxis: {
min: 1,
max: 8,
majorGridLines: {
visible:
false
}
}
});
});
// Switch category (over buttons)
function
showCategory (category) {
var
chart = $(
"#chart"
).data(
"kendoChart"
);
chart.options.series[0].categoryField = category;
chart.refresh();
}
</script>
<body>
<div id="chart" style="width: 1000px;"></div>
<button id=
"cat1"
type=
"button"
onclick=
"showCategory('cat1');"
>Show category 1</button>
<button id=
"cat2"
type=
"button"
onclick=
"showCategory('cat2');"
>Show category 2</button>
</body>
</html>
Am I missing something or is there anything I can do/set to avoid these "glitches" before refreshing the chart?
Regards