I'm new to charts and I have an app that is supposed to show each user's personality traits on the users' profile page based on Watson. Each trait is valued between 0.01 to 1.00 (perfect), for example:
user_id | username | password_digest | openness | idealism | environmentalist | achievement
1 | John | some string | 0.123 | 0.234 | 0.150 | 0.871
In my user view show.html.slim, I have:
= bar_chart user
How should I write bar_chart so that:
- It will only include the trait columns, and not include the created_at, updated_at, and password digest
- Set the range of the bar from 0 to 1 or 0% to 100%, based on the values of each trait