Filled chart

Charts for WPF Forum

Posted 7 months ago by Igor Rosenberg
Version: 20.1.1
Avatar

Is it possible to create fully filled chart with custom fill colors? Maybe using a bar chart (each bar with custom color, no empty space between bars so it visualizes as full fill) or line chart (custom image as a background, but image cut by chart line - axis Y)? Thanks

Something like this

https://1drv.ms/u/s!AhZcYgfWMqqer8Y-el2HiLtkA5fugw?e=Mhqi8f

[Modified 7 months ago]

Comments (1)

Posted 7 months ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Igor,

If you use an area chart, something like this works:

<charts:XYChart Width="450" Height="300">
	<charts:XYChart.SeriesStyleSelector>
		<charts:SeriesPaletteStyleSelector>
			<charts:SeriesPaletteStyleSelector.AreaBrushCustom>
				<LinearGradientBrush EndPoint="1,0">
					<GradientStop Offset="0" Color="Blue" />
					<GradientStop Offset="0.3" Color="Green" />
					<GradientStop Offset="0.6" Color="Yellow" />
					<GradientStop Offset="1" Color="Red" />
				</LinearGradientBrush>
			</charts:SeriesPaletteStyleSelector.AreaBrushCustom>
		</charts:SeriesPaletteStyleSelector>
	</charts:XYChart.SeriesStyleSelector>
	...
</charts:XYChart>


Actipro Software Support

The latest build of this product (v21.1.2) was released 22 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.