HanSolo / SteelSeries-Canvas

The HTML5 Canvas port of the SteelSeries component library. Mainly contains gauges.
120 stars 76 forks source link

SteelSeries-Gauges / Mysql #37

Open ozzylamberth opened 2 years ago

ozzylamberth commented 2 years ago

What do you recommend to show a data generated every 15 seconds in my database hosted on a remote server, specifically in the following component or if you have any ideas that can guide me

function init() {
    // Initialzing gauge

    var sections = [steelseries.Section(0, 70, 'rgba(255, 0, 0, 1.0)'),
             steelseries.Section(70, 95, 'rgba(255, 255, 0, 1.0)'),
              steelseries.Section(95, 100, 'rgba(0, 255, 0, 1.0)') ];

    single1 = new steelseries.DisplaySingle('canvasSingle1', {
                        width: 120,
                        height: 50,
            section: sections
                        })
ozzylamberth commented 2 years ago

Solution to my request

function init() { // Initialzing gauge

var sections = [steelseries.Section(0, 70, 'rgba(255, 0, 0, 1.0)'),
         steelseries.Section(70, 95, 'rgba(255, 255, 0, 1.0)'),
          steelseries.Section(95, 100, 'rgba(0, 255, 0, 1.0)') ];

single1 = new steelseries.DisplaySingle('canvasSingle1', {
                    width: 120,
                    height: 50,
                    value:<?php echo $extraido['Parameter that I need to show from my MySQL Database']; ?>,
        section: sections
                    })

Thanks for the directions.