polymer
및 vis.js
타임 라인을 사용하여 타임 라인 웹 구성 요소를 만들고 싶습니다.폴리머 오류가있는 Vis.js 타임 라인 : 타임 라인 눈금에 문제가 있습니다.
폴리머 요소 코드
<template>
<div id="visualization" style="height: 100%;width: 100%;border: 1px solid black"></div>
</template>
<link href="http://visjs.org/dist/vis.css" rel="stylesheet" type="text/css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.18.0/vis.js"></script>
<script>
// register an element
MyElement = Polymer({
is: 'legacy-element',
ready: function() {
const container = this.$.visualization;
const items = new vis.DataSet({
type: {start: 'ISODate', end: 'ISODate'}
});
items.add([
{id: 1, content: 'item 1<br>start', start: '2014-01-23'},
{id: 2, content: 'item 2', start: '2014-01-18'},
{id: 3, content: 'item 3', start: '2014-01-21'},
{id: 4, content: 'item 4', start: '2014-01-19', end: '2014-01-24'},
{id: 5, content: 'item 5', start: '2014-01-28', type: 'point'},
{id: 6, content: 'item 6', start: '2014-01-26'}
]);
const options = {
width: '500px',
height: '300px',
};
this.timeline = new vis.Timeline(container, items, options);
}
});
</script>
내가 그것을 사용하려고합니다.
<legacy-element></legacy-element>
다음과 같은 오류가 발생합니다.
Something is wrong with the Timeline scale. Limited drawing of grid lines to 1000 lines.
나는
그러나, 성공 vis's github issues에서 제공하는 모든 솔루션을 가능하게 시도! 필요한 도움.
그것은 작동 :) 정말 내 하루가 만들어 주셔서 감사합니다 – kandarp