草庐IT

chart_readings

全部标签

javascript - 错误 Vue.js "Cannot read property ' props' of undefined"

在gorails上做了所有事情吗?教程,但出了点问题。Chrome中的错误消息:UncaughtTypeError:Cannotreadproperty'props'ofundefinedatnormalizeProps(vue.runtime.esm.js?ff9b:1291)atmergeOptions(vue.runtime.esm.js?ff9b:1363)atmergeOptions(vue.runtime.esm.js?ff9b:1372)atVue$3.Vue._init(vue.runtime.esm.js?ff9b:4268)atnewVue$3(vue.runtim

javascript - Chart.js 条形图溢出其包含元素

Chart.js当padding已应用于容器时,我无法让这个愚蠢的图表留在其容器中。responsive选项是否设置为true并不重要。我将box-sizing设置为什么也无关紧要。如果不适合它的容器,responsive选项的目的是什么? 最佳答案 与大多数CSS一样,答案是使用另一个包装器!我遇到了同样的问题(而且我正在使用框大小调整)只需在Canvas周围放置一个div!(div将继承框大小)祝你好运:) 关于javascript-Chart.js条形图溢出其包含元素,我们在Sta

javascript - "Cannot read property ' classList ' of null"使用classList.add时

我有这个错误,但因为我不熟悉代码。它来自startbootstrap(Creative)中的一个主题。文件是classie.js代码:/*!*classie-classhelperfunctions*frombonzohttps://github.com/ded/bonzo**classie.has(elem,'my-class')->true/false*classie.add(elem,'my-new-class')*classie.remove(elem,'my-unwanted-class')*classie.toggle(elem,'my-class')*//*jshintb

Javascript 类型错误 : Cannot read property 'indexOf' of undefined

在这段代码中,我想从cart_products数组中删除一个元素。varcart_products=["17^1","19^1","18^1"];varproduct=17;$.each(cart_products,function(key,item){if(item.indexOf(product+"^")!==-1){cart_products.splice(key,1);}});但我在GoogleChrome控制台中收到此错误:UncaughtTypeError:Cannotreadproperty'indexOf'ofundefined代码有问题吗?感谢您的帮助。

javascript - 未捕获的类型错误 : Cannot read property 'safari' of undefined

我有这个jjavascript来调整iframe的大小:$(function(){variFrames=$('iframe');functioniResize(){for(vari=0,j=iFrames.length;i在chrome中,这里有问题:if($.browser.safari||$.browser.opera){我收到这个错误有什么原因吗?我使用的是最新的JQuery?谢谢 最佳答案 您可能正在使用jQuery1.9或更高版本,在这种情况下$.browser自1.3起被弃用后被正式删除。您可以使用jQuerymigra

javascript - D3 饼图 : Uncaught Type Error - Cannot read property 'pie' of undefined

我正在尝试基于此resource创建一个d3饼图.但是,我收到以下错误:UncaughtTypeError-Cannotreadproperty'pie'ofundefined我的代码:classPieChartextendsReact.Component{constructor(){super();//-Thisiswheretheerrorisoccuring!this.pie=d3.layout.pie().value((d)=>d.value);this.colors=d3.scale.category10();}arcGenerator(d,i){return();}rend

javascript - 谷歌图表 : Pie Chart title position

我被分配去实现一些图表,老板要求我把图表的标题和图表分开,我试着把图表的区域从顶部移动一点,但是标题也跟着图表移动了,比如这个:我尝试使用:chartArea:{top:80},结果如屏幕截图所示。我确定要移动的属性只是标题,它是另一个,但我还找不到。顺便说一句,这是我的整个对象:varcolumnChartProps={fontName:'HelveticaNeueBC',legend:{position:'none'},titleTextStyle:{fontSize:18},hAxis:{color:'#121b2d'},vAxis:{gridlines:{color:'#666

javascript - "Cannot read property ' appendChild ' of null"与 Backbone 网站上的 Disqus

我在Backbone上有一个网站。当我尝试执行Disqus代码时,我得到了UncaughtTypeError:Cannotreadproperty'appendChild'ofnull我该如何解决?为什么会这样?vardisqus_shortname='mysite';/***DON'TEDITBELOWTHISLINE***/(function(){vardsq=document.createElement('script');dsq.type='text/javascript';dsq.async=true;dsq.src='//'+disqus_shortname+'.disqu

javascript - 在 angular-chart.js 模块中更改宽度和高度

我正在使用Angular模块angular-chart.js.它易于使用且非常智能。但我注意到我无法更改图表的width和height。我在某处读到我必须按如下方式定义图表的大小:varvm=$scope;vm.labels=[];vm.data=[];CrudService.getData(selDate).$promise.then(function(response){angular.forEach(response,function(val){val.datum=$filter('date')(val.datum,'dd.MM.yyyy');vm.labels.push(val

javascript - Electron 拦截文件 :///protocol to read inside zip files

我想用Electron阅读内部的zip文件,就好像它们是文件夹一样,比如/myfolder/myarchive.zip/picture.jpg。为此,我正在考虑拦截文件协议(protocol)protocol.interceptFileProtocol('file',(request,callback)=>{if(insideZipArchive){//respondwithzipfilecontents}else{//defaultBehavior}},(error)=>{if(error)console.error('Failedtoregisterprotocol')})如何调用