[Ovmsdev] Highcharts help

Derek Caudwell d.caudwell at gmail.com
Sun Sep 6 18:27:46 HKT 2020


Hi all,

Appreciate some help on the best way to initialise Highcharts when
developing a web plugin -  I am wanting to extend the bms/cellmon to
include shunt state and an extra chart showing charge rate, SOC, battery
temp etc. I started by copying the js code from bms/cellmon page however I
could not replicate the initialisation which calls a separate javascript if
Highcharts is not loaded before initialisation.

I also tried a cut down version of the Trip Power Chart (without history)
initialising in the main script code with:
chargechart = $('#chargechart').chart({
    chart: {
      type: 'line',
      events: {
        load: function () {$('#chgreceiver').on("msg:metrics", function(e,
update){
              if (update["v.b.soc"] != null) {
                 updateChart();
               }
            });
          } etc

however in updateChart() I cannot reference chargeChart to addPoints?

Cheers
Derek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openvehicles.com/pipermail/ovmsdev/attachments/20200906/51cc8492/attachment.html>


More information about the OvmsDev mailing list