I have a plot where I stack the color white and black as values by month. I would use white as background color but the data is black and white as the color is. I'm using blue which I don't like. Any suggestions what I can use for my background? Or highlight them from the background?
White is giving the appearance as the absence of data. Data visualization is not about what you intend, it's about what they perceive.
Black and white have connotations as opposites. Some cultural connotations are good/bad, empty/full, etc. These vary. Seeing this much black and white is also harsh on the eyes.
I'm losing track that these are parts of a whole: total sales for that time period.
Is there a specific reason you have to use just this combination?
Not part of your question, but a thought on understanding trends
Stacked bar charts present visualization challenges, as it's not possible without a legend that's interactive to show the growth of the 2nd (black) category not tied to the baseline of the x-axis.
Can you allow your users to select / deselect the legend (or switch views) to display sales trends more clearly by each product line?
What stacked bars show
To identify distribution along time of parts of a whole, you need enough contrast to identify the parts, but not too much that it appears to be a completely separate entity.
The whole set for each time period is Sales. Each product could be considered an aspect of what constitutes total sales units (or revenue, it's unclear from your chart).
What happens the moment you introduce a third product?
Rather than trying to fit a solution, can you test your approach with users?
Since the goal is to impart understanding of:
- total sales, month over month
- the performance of one product as compared to another
Could you ask users how they interpret the data? 'Which product is performing better', 'What are the trends?'
It could turn out that your black/white presentation can work, but in the absence of testing for understanding the data and its trend, you will not be fulfilling the purpose of a visualization.
Stacked bar charts often use a darker colour at the bottom and lighter colour at the top. Bolder darker colours look strong and more supportive of what's on top. Your chart bars looks top heavy, with black areas 'floating', rather than the bar giving the impression of 'tapering up to the sky'. Outlining the bars would also help to stop the bleed from one bar to an adjacent bar.
Here's a quick mock-up of an alternative:
If black and white maps to the colors of the products, then consider outlining the white bar to add some contrast.
I often like using something like #f5f5f5/#f1f1f1 as a light grey background - this lets white stand out a bit (albeit, subtly). Then I can add a subtle shadow or border to the white object and it really pops (The testimonials here for example https://zudu.co.uk/). Something similar may work here but i'm not sure if shadows will work on bars that are touching?