I use Echarts and found that it generates massive amounts of the following warnings in firefox
Expected color but found ‘undefined’.........from DOM
Expected color but found ‘null’...................from DOM
It does this when I move my mouse over the bar graphs that I use. Especially when I have tooltip:{}
enabled and defined. The same messages are also generated in the example page of Echarts.
Should I be concerned about these warnings and can I do something about it.
Thanks Oscar Goos
Related
I'm writing some quizzes for Moodle using R/exams' exams2moodle. The XML file is created fine and I can import the quiz to Moodle ok, however, any question that has R code as part of either the question or the solution has the R code on a dark background making it almost impossible to read. Is there an option somewhere that controls this?
I am using this code to create the XML:
exams2moodle(c("q1.Rmd", "q2b.Rmd", "q3.Rmd", "q4.Rmd", "q5.Rmd", "q6.Rmd"),
name = "GLM_prac1",
iname = FALSE,
converter = "pandoc-mathjax",
cloze = list(cloze_schoice_display = "MULTICHOICE_V"))
And this is an example of the issue:
The color of the R code displayed is not controlled through exams2moodle(), at least not explicitly. What exams2moodle() does, is to put verbatim code input and output into standard HTML tags for this <pre><code> ... </code></pre>. This stands for pre-formatted text with markup for typewriter code. (Actually, this is not even produced by exams2moodle() directly but by pandoc.)
The rendering of these standard HTML tags is then controlled through the CSS styles employed in your Moodle installation. In a vanilla Moodle installation you currently simply get a black font on the same light blueish background as for regular text. In previous versions the background was light gray. Given that you have light orange background for text and dark background for code, I guess that this is a setting in your Moodle installation. Hence I would recommend to reach out to the Moodle team at your university and ask them about this. This seems to be a poor setting that would likely affect others as well.
If you cannot get in touch with the Moodle team or they are unwilling to change their CSS, you can insert your own custom CSS code into your exercises. The advantage is that you have full control over the color then. The disadvantage is that you yourself have to include that style code into every exercise where it is needed. It is not hard but tedious. For example, you can include the following R code chunk in the exercise directly at the beginning of the question section:
Question
========
```{r, echo = FALSE, results = "asis"}
writeLines("<style>
pre {
background: #FFFFFF00
}
</style>")
```
This simply inserts a short HTML snippet with CSS into your Rmd exercise:
<style>
pre {
background: #FFFFFF00
}
</style>
This will instruct the browser to use the background color #FFFFFF00 (fully transparent white) for all <pre>-formatted chunks. Of course, you can also play around with this and use a different color, say #EEEEEE (light gray) or similar.
I try to use leaflet labels and on several pages it is successful. I wanted to use the same approach to display labels on another page and it responded with an obscure technical message which I did not understand:
Uncaught TypeError: Cannot read property 'call' of undefined
at e.whenReady (leaflet.js:6)
at e.addLayer (leaflet.js:6)
at e.showLabel (leaflet.label-src.js:538)
at e.showLabel (leaflet.label-src.js:287)
at e._onMarkerAdd (leaflet.label-src.js:383)
at e.fire (leaflet.js:5)
at e._layerAdd (leaflet.js:6)
at e.whenReady (leaflet.js:6)
at e.addLayer (leaflet.js:6)
at e.onAdd (leaflet.js:7)
After a lot of researching I found out that leaflet.label is deprecated for Leaflet 1.0.3, which makes sense, since we are using older leaflet version in other pages where the labels appear correctly, but on the newer leaflet versions it crashes the map. The docs say that I should use bindTooltip instead of bindLabel, but I do not know how. I have tried to call it with some content on a marker but it did not appear on the map and I did not find it in the generated structure.
So, my question is as follows: How can I use labels with Leaflet 1.0.3, which will be bound to a marker and will adjust in case of translation/zoom?
The Tooltip is indeed now directly part of Leaflet main library.
Note that it appears only on mouseover by default, but you can use the permanent option to have it remain always visible.
marker.bindTooltip("Some tooltip content", {
permanent: true
});
Example: http://playground-leaflet.rhcloud.com/tiqo/1/edit?html,output
I'm using Leaflet (v 0.7.7). It expects setting L_PREFER_CANVAS as a script tag, which is global. I wish to create 2 maps on same page, one with L_PREFER_CANVAS flag ON and once with OFF. How can I do that ?
1) I've tried setting window.L_PREFER_CANVAS before the map creation.
2) I've tried creating my layers with extended classes like this
var MyCircle = L.Circle.extend({
statics: {
CANVAS: true,
SVG: false
}
});
then using 'new MyCircle' instead of 'L.circle'.
Neither of the two methods have the desired effect, even though the map is rendered successfully
I'm looking into leaflet code but i'm not very comfortable with its inner workings yet, due to lack of js sorcery know-how i believe
Edit: A thing that partly works is cloning the entire leaflet source under a new object (M.* instead of L.), and keep my desired flag enabled for it. But its clumsy and breaks with plugins which add their functionality to L. classes. Thereby requiring more duplication to fix, which i'm trying to avoid
Would recommend you look into migrating onto Leaflet 1.0, where preferCanvas is now a traditional option inside the map constructor...Among many other significant improvements.
http://leafletjs.com/reference-1.0.0.html#map-prefercanvas
Hello I'm using ImageJ to analyse -czi and -zvi files. I'm using an automatic selection with "create selection" or "analyze particle"s. It's working well when openening/importing the files with ImageJ. But when I try to use the Bio-Format importer Plugin with the same pictures, it's not working. Not my intended ROIS are selected but the background or even nothing. With using the plugin something about the parameters of the picture changes and I don't know what it is or how to undo it. Does somebody has an idea?
One of the Solutions I realised is a Change of scale. My original files use pixels, whereas the BioFormat importer converts the scale into microns.
Analyze--> Set Scale... --> Click to remove scale or changing the scale solves one part of the problem.
For a macro following code restores the scale:
run("Set Scale...", "distance=0 known=0 pixel=1 unit=pixel");
Still somethng about the colour values changes, I can't find, create selection is still not working properly.
using \Zend\Barcode (ZF 2.3.1) I'm not able to produce a readable barcode.
I've attached the picture generated (inside a PDF) by Zend Framework's tool.
The original text was 00000001C and the factory is code39. I've tried with code128 but same problem.
For some reason, my Motorola LS2208 can not recognize this barcode.
The specs of this scanner tells it should !
An other strange thing is all "code 39" or "code 128" generated on http://www.barcoding.com/upc/ are different from the ones produced by ZF.
I'm quite new to barcode generation and I just don't have any clue of what are the possible reason of this to fails. Can someone bring me some light here ?
Is the generated barcode correct, at least ?
The ZF documentation about specific renderers is very light...
OK, I finally found an answer to this.
First, I was generating barcodes with a width of 2cm.
This is really too tiny for 9 characters using the code 39 symbols.
The screenshot I've taken was made zooming on the PDF ; it shows a code where vertical bars were overlapping themselves.
Basically the solution is : NEVER EVER provide a 'factor' value lower than 1 to BarcodeZF::factory(), because this is what have makes bars overlap.