flrs / visavail

A D3.js Time Data Availability Visualization
https://flrs.github.io/visavail/docs/samples/basic.html
MIT License
310 stars 58 forks source link

HTML in Measure Labels #11

Closed flrs closed 7 years ago

flrs commented 7 years ago

In issue #10, ijunaid8088 posted:

Hi Thanks for all your efforts..

Actually my issue was:I want to add an fa-icon with measure string, such as if

"measure <i class='fa fa-icon'></i>"

Something like this could be possible?

This issue addresses this request.

flrs commented 7 years ago

Fixed in referenced commit. Use like this:

var dataset = [{
    "measure_html": "<span title='Price of security at end of day'>&#x1F6AA; Closing Price</span>", // HTML code
    "interval_s": 365 * 24 * 60 * 60,
    "data": [
        ["2015-01-01", 0], 
        ["2016-01-01", 1],
        ["2017-01-01", 1],
        ["2018-01-01", 1]
    ]
}];

I have uploaded an example for you.

ijunaid8989 commented 7 years ago

Thanks a lot @flrs