Open jinjirosan opened 6 years ago
sorry i dont know. And what white space do you mean? Could you please make a screenshot?
Thx for getting back to me.
This image shows the actual graph and this image shows the total width. There is quite some space in that cell between the text and the actual graph itself.
(edit: images urls)
Well, I am not able to reproduce the spacing. Could you please post module configuration?
of course. I've been digging through CSS and with Chrome Developer Tools but can't seem to narrow down why the spacing is there.
{
module: "MMM-cryptocurrency",
position: "top_right",
config: {
currency: ['ethereum', 'ripple', 'bitcoin', 'iota'],
conversion: 'EUR',
displayLongNames: 'false',
displayType: 'logoWithChanges',
significantDigits: '5',
showGraphs: 'true',
headers: ['change24h', 'change1h', 'change7d'],
fontSize: 'medium'
}
},
Pretty strange. Where are you running the module? Raspberry? Which version?
I'm running it on a Pi3 with an up-to-date Jessie.
yes weird. Not sure but is there a dependency in the cryptocurrency table on other modules located in Top Right position?
I have a weather graph that is wider than the cryptocurrency module.
@jinjirosan if you comment out your weather app and restart the process/reboot the mirror, does it scale correctly?
Hello
I have fixed my graph size issues by adding one line to the code
console.log(graph.src)
graph.style.maxWidth="150px"; // This line is added
graphWrapper.appendChild(graph)
Also the logos sometimes have size issues i solved it with changing these lines
logo.src = '/my-crypto/' + this.folder + apiResult[j].id + '.png'
//logo.setAttribute('width', '50px') ** remarked out
//logo.setAttribute('height', '50px') ** remarked out
logo.style.maxWidth="50px"; // added these two lines
logo.style.maxHeight="50px"; // using style is better then attr
logoWrapper.appendChild(logo)
Now the layout is always proper
@CriticalPoint, sorry for the late reply. Yes it seems it pulls the space wider.
@SpoturDeal, you fixed it! Thx for looking into this. The module is now exactly how I like to see it. (looking at your screenshot, you're also Dutch :-) )
@jindirosan Yes I am Dutch I did an extended version of this module https://github.com/spoturdeal/MMM-crypto-portfolio there you can add the values of the coin you actually own
@SpoturDeal made an amazing extended Version!!
The graph itself, on my mirror, is about 93px wide however only the right half of that is the actual graph. The left half is just empty space.
Do you know how I can remove that white space?
It currently makes the whole top right region too wide. Thx.