Jump to content
Software FX Community

Dynamically configure the chart from a configuration file


shane2004

Recommended Posts

Hi,

I'm trying to write a generic charting service based on ChartFX 7. All configuration data are stored in the configuration file and being read into a Template. Before I bind the data into the chart control, I apply those configuration settings from template.

Something like those:

Chart.Height = template.BaseHeight;

Chart.Width = template.BaseWidth;

Chart.ToolBar.Visible = template.ToolBar;

My question is if I make the XML configuration file exactly like the property structure of Chartfx attributes, Can I dynamically bind data without explicitly indicate the properties, such as Chart.Height, Chart.Width etc?  In other words, to separate the hardcode of binding settings into a predefined XML file.

<Chart Name="Benzene">

<Height>239</Height>

<Width>345</Width>

<ToolBar>

 <Visible>True</Visible>

</ToolBar>

</Chart>

Thanks 

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.

×
×
  • Create New...