Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #103783
    salasidis
    Participant

    A quick question

    I am passing some data similar to
    https://www.htmlelements.com/demos/chart/area-range-line/

    I have variables A B C, but I need to refer to them by other names on the graph (‘Avg’, ‘min’, ‘max’)

    I don’t want to pass the full label, as it consumes excess microcontroller memory. Is tehre a way to alias the variables passed with different display names?

    Thanks

    • This topic was modified 2 years, 1 month ago by salasidis.
    #103792
    ivanpeevski
    Participant

    Hi salasidis,

     

    Yes, you can use displayText for that. For example:

    {dataField: ‘A’, displayText: ‘Average’, ….}

    You can also see an example in the demo here: Stacked Line Series

     

    Best Regards,
    Ivan Peevski

    Smart UI Team
    https://www.htmlelements.com/

    #103793
    salasidis
    Participant

    What do I do if I am using a rangearea

    type: ‘rangearea’,
    series: [
    { dataFieldFrom: ‘y1’, dataFieldTo: ‘y2’, displayText: ”, opacity: 0.4 }
    ]

    ? comma delimited

    #103797
    ivanpeevski
    Participant

    Hi,

    It is implemented in the same way.

    See the code for the demo here: Area Range and Line Series

     

    Best Regards,
    Ivan Peevski

    Smart UI Team
    https://www.htmlelements.com/

     

    #103798
    salasidis
    Participant

    I did, but the Area component has a dataFieldFrom and To (2 variables), but only a single displayText – the demo does not alter the pop up graph tip labels when you hover over a point. It still says Low and High – which are the actual variable names – only the legend changes to say Temperature Range.

    I would like to change the y1 and y2 in my example, to Min and Max in the ToolTip that pops up. For now I called y1 ‘<‘ and y2 ‘>’ – but text would be better. I don’;t weant to actually call them min and max in the dataset, in order to save RAM space in the embedded device.

    Thanks

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.