I keep running into a Vue warn error when trying to use a chart that has its aggregate prop set to sum and it's baseunit prop set to days,weeks or years. The error says "You may have an infinite update loop in watcher with expression "dataItems" ". I have also attached a picture of the full error for better context. I have tried both the native component chart and the wrapper component chart. Both produce the exact same error. I am currently using Vue 2 to be specific Vue 2.7.0 . I am assuming that being on Vue 2 is causing the error because the code I have attached below works on stackblitz but on stackblitz the dev environment is using Vue 3 not 2.
Here is my code using the native component:
<template>
<div>
<Chart>
<ChartTitle :text="'Daily Max (°C)'" />
<ChartSeries>
<ChartSeriesItem
:type="'line'"
:field="'VisitCount'"
:category-field="'Date'"
:data-items="testor"
:aggregate="'sum'"
:name="'test'"
/>
</ChartSeries>
<ChartCategoryAxis>
<ChartCategoryAxisItem :base-unit="'weeks'" />
</ChartCategoryAxis>
</Chart>
</div>
</template>
<script>
import {
Chart,
ChartTitle,
ChartSeries,
ChartSeriesItem,
ChartCategoryAxis,
ChartCategoryAxisItem,
} from '@progress/kendo-vue-charts';
import 'hammerjs';
export default {
components: {
Chart,
ChartTitle,
ChartSeries,
ChartSeriesItem,
ChartCategoryAxis,
ChartCategoryAxisItem,
},
data: function () {
return {
testor: [
{
VisitCount: 13,
timestamp: '2018-01-01T00:00:00.000',
Date: new Date('2018-01-01T00:00:00.000'),
},
{
VisitCount: 13,
timestamp: '2018-01-01T00:00:00.000',
Date: new Date('2018-01-01T00:00:00.000'),
},
{
VisitCount: 13,
timestamp: '2018-01-05T00:00:00.000',
Date: new Date('2018-01-05T00:00:00.000'),
},
{
VisitCount: 50,
timestamp: '2018-02-01T00:00:00.000',
Date: new Date('2018-02-01T00:00:00.000'),
},
{
VisitCount: 13,
timestamp: '2018-04-01T00:00:00.000',
Date: new Date('2018-04-01T00:00:00.000'),
},
],
};
},
};
</script>
Here is my code using the wrapper component:
<template>
<div>
<chart
ref="chart"
:series-defaults-type="'line'"
:category-axis="axis"
>
<chart-series-item
:name="'test'"
:data="testor"
:category-field="'Date'"
:field="'VisitCount'"
:color="'#f3ac32'"
:aggregate="'sum'"
>
</chart-series-item>
</chart>
</div>
</template>
<script>
import { Chart, ChartSeriesItem } from '@progress/kendo-charts-vue-wrapper';
export default {
name: 'App',
components: {
chart: Chart,
'chart-series-item': ChartSeriesItem,
},
data: function () {
return {
axis: {
baseUnit: 'weeks',
},
testor: [
{
VisitCount: 13,
timestamp: '2018-01-01T00:00:00.000',
Date: new Date('2018-01-01T00:00:00.000'),
},
{
VisitCount: 13,
timestamp: '2018-01-01T00:00:00.000',
Date: new Date('2018-01-01T00:00:00.000'),
},
{
VisitCount: 13,
timestamp: '2018-01-05T00:00:00.000',
Date: new Date('2018-01-05T00:00:00.000'),
},
{
VisitCount: 50,
timestamp: '2018-02-01T00:00:00.000',
Date: new Date('2018-02-01T00:00:00.000'),
},
{
VisitCount: 13,
timestamp: '2018-04-01T00:00:00.000',
Date: new Date('2018-04-01T00:00:00.000'),
},
],
categories: [
1952, 1956, 1960, 1964, 1968, 1972, 1976, 1980, 1984, 1988, 1992, 1996,
2000, 2004, 2008, 2012,
],
tooltiptemplate: '#= series.name #: #= value #',
};
},
};
</script>
I am trying to figure out how to replace the points (open circle dots) on a line chart with just a smooth line. I have been looking through the chart API and thought the solution would be the plot area border dash type. However, this doesn't appear to do anything. I am either implementing it incorrectly or it is not the correct solution. A third possibility is that it is buggy and does not work. I am using Vue with typescript. Below is my attempted implementation:
<kendo-chart :data-source="chartData"
:series="series"
:pannable-lock="'y'"
:zoomable-mousewheel-lock="'y'"
:zoomable-selection-lock="'y'"
:category-axis="categoryAxis"
:theme="'sass'"
:category-axis-title-text="'Time'"
:value-axis-title-text="'Attribute'"
:tooltip="tooltip"
:plot-area="plotArea">
</kendo-chart>
plotArea: any = {
border: {dashType: 'solid'}
};
I am loading the kendo vue ui chart and displaying that in bootstrap cards (which is inside the bootstrap tab).
But some reason that that doesn't cover the entire width of the cards and render being so small.
There is already the style as: width: 100%; height: 100%; in the SVG of the chart but that doesn't expand. But when I changed some data then it occupies the full width.
Why it is not rendering properly initially? What's the issue causing this and what is the workaround for this?
http://jsfiddle.net/pdLncxoy/
Hi There, I have a kendo UI chart who's datasource is bound to a computed property. I can see the datasource computed property is being updated but the chart is not rebinding/redrawing. Do I need to manually redraw the chart?
If we don't need to manually refresh/redraw then do you have any ideas as to why the chart wouldn't redraw when I update the datasource prop? Thanks!
Hi there,
I'm trying to use the stock chart. So far ok, save one issue. I have three value axis and want to move one of them to the right. Trying to,using axis-crossing-value, gives me following strange behavior.
When leaving all three axis to the left with
<
kendo-stockchart
:category-axis-axis-crossing-value
=
"[0,0,0]"
>
the three axis appear on the lft and the chart lokks ok (see pic 1)
When trying to move one ofthe axis to the right with
<
kendo-stockchart
:category-axis-axis-crossing-value
=
"[0,0,10000]"
>
the whole chart is sqeezed (see pic 2). It seems, thatthe chart is sqeezed in between the axis instead of moving the axis.
Any suggestion for a workaround would be great.
Thanks again
Hello,
I use yours gantt wrapper, but I have problem with refresh or change datasource when some event happened. I check reactive changes at others wrapers i.e. grid and ther this is working fine. I try also manipulate yours exemples at sandbox and plnkr, but it always fails.
I'd do something like that.
var app = new Vue({
data() {
mySource: []
},
mounted: function(){
this.mySource = [{ id: 1, end: "xx"..... }];
}
})
How can i do this? I found some post and then was admin anserw that vue-wrappers from wersion 2018.2.xxx are reactived. I will be greatfull for working plnkr.
Hello All ,
We are trying to use a graph with negative stacks. I have looked through all the available Kendo charts and graphs but could not find a similar one. Can you please point me in the right direction if you came across a similar situation. I have attached the graph for reference.
Thank you
Hi
I want to show the average line for each group on the bar chart.
For example, I want to display like an attached file.
I am developing using VUE.js. please answer about my question.