whiskerwing
Posts: 9
Joined: Tue Dec 28, 2021 4:40 pm

Bullet Charts from HTML Table?

Is it possible to render a bullet chart from an HTML table?

I've been able to do it with all of the basic chart types (bar, column, sparkline, pie, line), and bullet chart is the last on my proof-of-concept list, but this is the first one where the implementation involves plotbands or targets that I've seen.

Some reference URLs I've been using:

Basic chart from html data
https://www.highcharts.com/demo/column-parsed

Bullet Graph example
https://www.highcharts.com/demo/bullet-graph

Thank you for any help!
whiskerwing
Posts: 9
Joined: Tue Dec 28, 2021 4:40 pm

Re: Bullet Charts from HTML Table?

Alternately, if that's too big of an ask, are there any examples where the source data for a bullet chart is some kind of csv or single data source, rather than the hardcoded one here, I would appreciate that.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Bullet Charts from HTML Table?

Hi whiskerwing,

Thanks for contacting us with your question.

HTML table can be used to build any series. All you have to do is make sure that data fit format specified in API. Here you can find information about data format required for bullet chart: https://api.highcharts.com/highcharts/s ... ullet.data

As you can see, it requires at least two values, y and target.
Demo: https://jsfiddle.net/BlackLabel/hLw7bs2c/

Highcharts try to parse and fit your data automatically, but in some cases it is not possible and you need to do it yourself. In such cases complete and parsed callback functions come in really handy.

CSV examplehttps://jsfiddle.net/BlackLabel/yv6ts7pr/

Feel free to ask any further questions.
Regards!
Mateusz Bernacik
Highcharts Developer
whiskerwing
Posts: 9
Joined: Tue Dec 28, 2021 4:40 pm

Re: Bullet Charts from HTML Table?

Thank you! That was very helpful.
mateusz.b
Posts: 2006
Joined: Tue Jul 13, 2021 11:34 am

Re: Bullet Charts from HTML Table?

You're welcome! In case of any further questions, feel free to contact us again.
Mateusz Bernacik
Highcharts Developer

Return to “Highcharts Usage”