最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - RGraph Charts cannot be scaled when container is resizing - Stack Overflow

programmeradmin9浏览0评论

Is it possible to scale charts? I tried:

<script>
                        
    function graf(){
        new RGraph.SVG.Bar({...}).wave();
    }
    
    const resizeObserver = new ResizeObserver((object) => {
    
        console.dir('...' );//info if action is catch
        object[0].target.innerHTML = '';//...optional no matter
        graf();
    });

    resizeObserver.observe(document.getElementById('chart-container' ) );
</script>

Each time graf() is called again, the graph and its continer of SVG tag disappear from the HTML document. It doesn't matter whether innerHTML cleanup is used. Console.dir('...') is called but with no chart, it disappears. With listeners do the same. It doesn't matter if it's onmouseover etc.

发布评论

评论列表(0)

  1. 暂无评论