MicroXYChart series colors don’t match XYChart (mixed bar + line) — how to keep palettes consistent

Micro Charts for WPF Forum

The latest build of this product (v25.1.3) was released 25 days ago, which was before this thread was created.
Posted 13 days ago by bcs99
Version: 25.1.3
Platform: .NET 9
Environment: Windows 11 (64-bit)
Avatar

I’m using both Charts (XYChart) and MicroCharts (MicroXYChart) in a WPF app. The MicroCharts act as “thumbnail previews” that open a full chart when clicked, so I’m trying to keep the series colors consistent between the two controls. 

Scenario
  • Full chart: XYChart with 3 series in this order:
    1. Bar series
    2. Bar series
    3. Line series
  • Micro chart: MicroXYChart with the same data and series order (2x bar + 1x line)
Expected

Both controls pick the same automatic series colors (e.g., first three palette colors: green, blue, orange).

Actual
  • XYChart renders series colors as green, blue, orange
  • MicroXYChart renders as green, blue, blue
  • However, when I enable hot tracking on the MicroXYChart, the legend/tooltip indicator appears to use green, blue, orange (so the third “orange” seems to exist somewhere, just not applied to the rendered series).
Question
  1. Is this difference in automatic color assignment between XYChart and MicroXYChart expected behavior (e.g., MicroCharts restarting palettes per series type), or is it a bug
  2. What’s the recommended way to ensure matching series colors between MicroCharts and Charts?

Comments (2)

Posted 12 days ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hello,

I tried creating a MicroXYChart with three series and they all used distinct colors as expected.

Both of the series palette style selectors pick colors based on the series.Index property.  I would think they would behave the same, but there must be some configuration here that is causing them not to do so.

What would be most helpful is if you could make a new simple sample project that shows this scenario with a chart and micro chart side by side with the same data.  Then send that to us in an email to our support email address and reference this thread in your email.  Be sure to exclude the bin/obj folders from the .zip you send so it doesn't get spam blocked.  We will use the sample to debug the issue and see what's going on.  Thanks!


Actipro Software Support

Posted 12 days ago by bcs99
Avatar

You are correct. I'm still not sure why my application is doing this, but creating a separate application did indeed prove that the library is working as expected (should have done this first. sorry).  I'll dig further to find the problem.  Thanks.

Add Comment

Please log in to a validated account to post comments.