Skip to content
Advertisement

Some Altair charts fade

Updated: Changing alt.X('yearmonthdate(TimeUTC):T' to alt.X('yearmonthdate(TimeUTC):O' made the problem go away. See bottom of post.

I have four years of data of the form:

TimeUTC FlightID DroneType
2018-08-22 19:35:23.024386+00:00 2018-08-22 19:35:23+00:00 663f-46fe-8887-d37895745506 MavicPro
2018-08-22 19:35:35.888933+00:00 2018-08-22 19:35:35+00:00 663f-46fe-8887-d37895745506 MavicPro
2018-08-22 20:05:06.239102+00:00 2018-08-22 20:05:06+00:00 a63a-4e01-b2d2-bdecc9027049 MavicPro

(There is, I think, a good reason for the microseconds in the index AND the TimeUTC column, but that is for another day.)

I plot this data by year. One set of graphs using mark_bar is produced as expected. Two of the four mark_area charts are very faded and a third is somewhat faded.

A "good" chart

A very faded chart

A somewhat faded chart

JavaScript

All the charts use the same function and the data from the same data frame.

What might be causing this fade effect and how can I fix it?

Updated:

Original problem chart created with alt.X('yearmonthdate(TimeUTC):T':

Chart using :T

Chart using alt.X('yearmonthdate(TimeUTC):O':

Chart with :O

Advertisement

Answer

The fix, such as it is, required changing:

alt.X('yearmonthdate(TimeUTC):T

to

alt.X('yearmonthdate(TimeUTC):O

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement