Jump to content
Datashack

kccsf

Members
  • Content Count

    17
  • Joined

  • Last visited

Community Reputation

7 Neutral

About kccsf

  • Rank
    Junior Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. No problem - glad you got it working! I am afraid I've never needed/used a javascript charting library so cannot recommend one. If i did need one I would probably give the following a try: If I wanted something simple: https://www.chartjs.org/ If I needed something more complex: https://d3js.org/ (Based on https://www.slant.co/topics/3890/~javascript-charting-libraries) Steve
  2. Rather than use ajax to request the data file from the server, I figured as you are creating the file it was simpler to just format it slightly differently and include it. If it is not in a valid javascript format it wouldn't work. Yes you can just copy that for each gauge or of course place the code in a function ie 'createGuage', accepting a data value and canvas id. The canvas element is the surface on which the graph is drawn. So you will need a canvas per graph. The 'renderTo' parameter needs to point to the id of the canvas on which it should be rendered. As you are versed in python you might wish to format your data like so: var data = { "Grid": [0.83,41.66,0.08,5.87,150], "Battery":[6.07,22,0.79,0,0], "Solar":[4.71,105.81,1020], "House":[10.24,138.1,139,870], "Inverters":[336.7,1.9,347,323,670,3.185] }; Then there is no need to split your data you can just do: var gauge = new LinearGauge({ renderTo: 'cg1' }); gauge.value = data['House'][0]; Steve
  3. Hi As you are outputting the file with your data values in can you format it slightly differently? guage.htm: <html> <head> <script src="https://cdn.rawgit.com/Mikhus/canvas-gauges/gh-pages/download/2.1.5/all/gauge.min.js"></script> <script src="guagevalues.js"></script> </head> <body> <canvas id="cg1"></canvas> <script> var guagevalues = data.split(","); var gauge = new LinearGauge({ renderTo: 'cg1' }); gauge.value = guagevalues[6]; </script> </body> </html> guagevalues.js: var data = '20180516,11:46:48,Grid,0.83,41.66,0.08,5.87,150.0,Battery,6.07,22,0.79,0.0,0,Solar,4.71,105.81,1020.0,House,10.24,138.1,139.0,870.0,Inverters,336.7,1.90,347.000,323.000,670.000,3.185'; Steve
  4. Just tried in IE 11 and seems ok Steve
  5. Hi Just tried in IE11 and I get the same problem. Removing 'display: table' from #ipsLayout_contentArea and adding 'width: 100%' to .ipsComment_content appears to make things a bit better Just took a quick look, so not tested thoroughly / in other browsers!
  6. kccsf

    Imac to HDMI

    Yes I would think that should work
  7. kccsf

    Imac to HDMI

    I would agree: "HDMI audio and video output using a third-party Mini DisplayPort to HDMI Adapter" from: https://support.apple.com/en-us/HT202214 Something like this should do you: https://www.amazon.co.uk/Thunderbolt-DisplayPort-VicTsing-Converter-Microsoft/dp/B00EDB3ZY0/ref=sr_1_5?ie=UTF8&qid=1503172462&sr=8-5&keywords=mini+displayport+hdmi Steve
  8. Hi Did you receive the files? Steve
  9. Do you have hosting sorted? Do you want to send me a pm with your email and I will send you the files? NB - I haven't added a contact form as it will need some server side code (which language depends on your host) and an smtp server. Steve
  10. Is this one to your liking? Sorry the quality is a bit rubbish, had to shrink it as would only allow 500kb upload. Steve
  11. Hi How did you get on? Steve
  12. No problem, glad it works. Good luck! Steve
  13. Hi l0gic https://uploadfiles.io/a7493 (Doesn't let me upload zip or rar here) Archive contains the source from the repo to which I've added MaxSharpFormExample. As per before set the ip and port albeit this time within Form1.vb in the MaxSharpFormExample project and if it is not already, set it as your startup project. Let me know how it goes Steve
  14. Hi l0gic Is that not just a c port of this? https://github.com/bietiekay/MAXSharp If so, the above is already in a library and comes with an example project too (albeit all of this is in c#, not vb). I downloaded it and it builds but I don't have the hardware to test. Set MaxSharpExample as the startup project, check ELVMAX_Cube_IP_Adress and ELVMAX_Cube_Port in Main.cs and give it a go. If it works I will convert the example to VB.net for you. Steve
×
×
  • Create New...