lux-org / lux

Automatically visualize your pandas dataframe via a single print! 📊 💡
Apache License 2.0
5.15k stars 365 forks source link

FIX-#298: Abbrev long filter values and add test #465

Closed labanyamukhopadhyay closed 2 years ago

labanyamukhopadhyay commented 2 years ago

Overview

If a title is longer than 25 characters (due to a long filter value), it is abbreviated so the visualization is not exceedingly wide or have a title that is cut off. Referencing #298

Changes

The long text is truncated in both Altair and Matplotlib charts so that chart_title = chart_title[:15] + "..." + chart_title[-10:]. tests/test_vis.py also includes test_abbrev_title to test for this behavior.

Example Output

Screen Shot 2022-03-08 at 12 19 43 PM