Jump to content
Software FX Community

ChartFx Style


beltrams
 Share

Recommended Posts

Dear Forum,

I am changing the style of my graph using a resource dictionary.

I have some sort of block like the following:

<Style x:Key="{x:Type cfx:Chart}" TargetType="{x:Type cfx:Chart}">

<Setter Property="Palette" Value="{x:Static cfx:Palettes.HighContrastBlack}"/>

<Setter Property="Border" Value="{x:Static cfx:Borders.RoundedShadow}"/>

<Setter Property="BorderBrush" Value="#FF121212"/>

</Style>

Fou can I set the charts to have the Spotlight style (andd the other properties) using this dictionary?

Link to comment
Share on other sites

Setting the Spotlight Style is no different than setting the palette, in both cases you are setting a property and the value is the result of using a static property. You will have to add an xml namespace for the Motifs namespace you are interested in and use x:Static as you are doing with Palette or Border.

About setting other properties, I am assuming you mean complex properties such as LegendBox, Axis, etc. Note that in ChartFX you cannot reuse objects, e.g. you cannot reuse an Axis or LegendBox in multiple charts so we have some code that detects if you are setting such properties through a style and clone such objects.

We support such complex-property styling with the following properties: Chart.LegendBox, Chart.AllSeries, Chart.AxisY, Chart.AxisX and Chart.PlotArea. I don't think this functionality has been heavily used, please let us know if setting certain properties on these objects do not work as expected.

JuanC

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...