Filled chart

Charts for WPF Forum

Posted 3 years 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 3 years ago]

Comments (1)

Posted 3 years 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 (v24.1.1) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.