D3js line chart responsiveness in angular 7

∥☆過路亽.° 提交于 2019-12-20 05:39:54

问题


We have created line chart using D3js version 5.9 in angular 7 with hard coded width(450) and height(300) for svg.

I went through some blog and got to know we can write css using ::ng-deep. I tried below code

svg dimension(angualr code): svgDimension = { width: 420, height: 300 };

css code(scss): @media only screen and (max-width:455px) {

    ::ng-deep .svgWidth{
    width: 350px;
    }
    ::ng-deep .svgHeight{
    height: 250px;
    }
    }

Need media query to resolve responiseveness issue for d3js line chart in angular.

Thanks in advance.

来源:https://stackoverflow.com/questions/56387339/d3js-line-chart-responsiveness-in-angular-7

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!