我正在使用此Info window with chart ESRI教程。
而且我想为小屏幕定制dojox饼图:
@media only screen
and (max-device-width: 320px) {
...
}
是否可以使用自定义屏幕大小的自定义dojox图表大小?
例如,饼图的宽度为{width:60 px;高度:60 px}仅当加载到最大设备宽度的屏幕上时:320像素?
我正在使用此Info window with chart ESRI教程。
而且我想为小屏幕定制dojox饼图:
@media only screen
and (max-device-width: 320px) {
...
}
是否可以使用自定义屏幕大小的自定义dojox图表大小?
例如,饼图的宽度为{width:60 px;高度:60 px}仅当加载到最大设备宽度的屏幕上时:320像素?
1条答案
按热度按时间5kgi1eie1#
是的,有可能。
然而,我担心你不能做到这一点,只有通过CSS,因为图表的大小取决于各种因素。像
chart radius
,map infoWindow size
,container size
等。**解决方案-**您可以根据屏幕大小动态更改上述值,您可以使用
window resize event
。这就是您可以实现此目的的方法。以下是工作代码-
希望这对您有所帮助:)