User (Legacy) Posted May 4, 2006 Report Posted May 4, 2006 I can't seem to set the chart border in C# code. When I try this code: using ChartFX.WebForms.Adornments; using ChartFX.WebForms.Annotation; using ChartFX.WebForms; ... m_Chart.Border = new SimpleBorder(SimpleBorderType.Raised); I get this error: The type or namespace name 'SimpleBorder' does not exist in the namespace 'ChartFX.WebForms.Adornments' It works fine if I do it via the designer, just not in the code.
Software FX Posted May 4, 2006 Report Posted May 4, 2006 This works for me and what you are describing is a compiler error, not run-time. Are you referencing the right Adornments dll ? -- Francisco Padron www.chartfx.com
User (Legacy) Posted May 4, 2006 Author Report Posted May 4, 2006 I don't know how I could have the wrong one, as I only see one in the list. Here's what I'm referencing in the web site: ChartFX.WebForms.Adornments.dll ChartFX.WebForms.Annotation.dll ChartFX.WebForms.Base.dll ChartFX.WebForms.Dhtml.dll ChartFX.WebForms.dll The auto-refresh pathes for all of the above are c:\program files\Chart FX for Visual Studio 2005\bin\ChartFX.WebForms.... My code behind has these #usings: #using ChartFX.WebForms.Adornments; #using ChartFX.WebForms.Annotation; #using ChartFX.WebForms; And the code I wrote is this (from the Chart FX Resource Center): m_Chart.Border = new SimpleBorder(SimpleBorderType.Raised); Which gives these two errors: error CS0246: The type or namespace name 'SimpleBorder' could not be found (are you missing a using directive or an assembly reference?) error CS0103: The name 'SimpleBorderType' does not exist in the current context When I try to get intellisense to help by entering "ChartFX.WebForms.Adornments." the only things intellisense offers are IBackgroundAdornment and IBorderAdornment. Is there something else I'm missing here?
Software FX Posted May 5, 2006 Report Posted May 5, 2006 The fact that you are getting only those two suggests that you are NOT referencing ChartFX.WebForms.Adornments.dll. IBackgroundAdornment and IBorderAdornment are defined in ChartFX.WebForms.dll. Please try the following: 1) Create a NEW Web Site 2) Drop a chart in a form 3) Add the following code to your Page_Load: Chart1.Border = new ChartFX.WebForms.Adornments.SimpleBorder(ChartFX.WebForms.Adornments.SimpleBorderType.Raised); -- Francisco Padron www.chartfx.com
Recommended Posts
Archived
This topic is now archived and is closed to further replies.