Jump to content
Software FX Community

brett.burkhart

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by brett.burkhart

  1. Gotcha. That makes sense. I figured it was because there wasn't bound data. I've actually seen the "no data available" when I've bound to nothing, but I wasn't setting the min/max values. We've actually had to create these fake data series before because we don't want to show the ChartFX dummy series. :-) And yes, we bind the chart series ItemSource to our model's chart points collection, so it should be easy enough for the ViewModel to initialize the collection with fake data, then once the selected model changes, it will either dump the fake data and populate with the selected values, or the selected model will already have those values and we just set it from there. I'll try it.
  2. I'm trying to get a chart to display a predefined date range on the XAxis, in a specific step (1 hr or 30 min, whatever). When my control loads, I have yet to bind any data to the chart because the user hasn't made a selection from the list of models to detail (master-detail). I am wanting to have the chart initalize the X axis Min, Max, and Step to a specific range, which will always be the same regardless which selection the user makes. When I set the axis properties, I get runtime error for an IndexOutOfRangeException (Index was outside the bounds of the array). at ChartFX.WPF.Internal.PlotAreaCore.a(PaintMark A_0, AttributesResolver A_1, Double A_2, Double A_3, LogicalItemCollection A_4, LogicalItemCollection A_5, Int32 A_6, Boolean A_7) at ChartFX.WPF.Internal.PlotAreaCore.a(AttributesResolver A_0, Double A_1, Double A_2) at ChartFX.WPF.Internal.PlotAreaCore.a(Double A_0, Double A_1, Boolean A_2) at ChartFX.WPF.Internal.PlotAreaCore.b(Double A_0, Double A_1, Boolean A_2) at ChartFX.WPF.Internal.PlotAreaItems.OnRenderSizeChanged(SizeChangedInfo sizeInfo) at System.Windows.ContextLayoutManager.fireSizeChangedEvents() at System.Windows.ContextLayoutManager.UpdateLayout() at System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg) at System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork() at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks() at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget) at System.Windows.Media.MediaContext.Resize(ICompositionTarget resizedCompositionTarget) at System.Windows.Interop.HwndTarget.OnResize() at System.Windows.Interop.HwndTarget.HandleMessage(Int32 msg, IntPtr wparam, IntPtr lparam) at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler) <cfx:Chart Name="_chart" Gallery="Curve"> <cfx:Chart.PlotArea> <cfx:PlotAreaAttributes /> </cfx:Chart.PlotArea> <cfx:Chart.AllSeries> <cfx:AllSeriesAttributes StrokeThickness="3" /> </cfx:Chart.AllSeries> <cfx:Chart.AxesY> <cfx:Axis> <cfx:Axis.Labels> <cfx:AxisLabelAttributes Format="Currency" /> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxesY> <cfx:Chart.AxisX> <cfx:Axis> <cfx:Axis.DataFormat> <cfx:ValueFormat Format="Time" /> </cfx:Axis.DataFormat> <cfx:Axis.Labels> <cfx:AxisLabelAttributes Format="Time" CustomFormat="hh:mm" Angle="45" /> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxisX> </cfx:Chart> Then in the usercontrol.Loaded event handler... this.Chart.AxisX.Min = DateTime.Parse("9:30:00 AM"); this.Chart.AxisX.Max = DateTime.Parse("4:00:00 PM"); this.Chart.AxisX.Step = new TimeSpan(1, 0, 0); this.Chart.AxisY.Min = 0; this.Chart.AxisY.Max = 100; this.Chart.AxisY.Step = 10; Again, I don't have any data for the series, I just want an empty chart with the X & Y axis set.
  3. Gotcha! Perfect, that makes sense. I'll add the licenses.licx to the EXE project as give it a go. Thanks!
  4. OK, couple things, I guess I should've been a little more specific on our set up and what I need. Our VS solution is set up as a fat client application, not an XBAP. What I need is documentation for deploying a WPF Application with Click Once. The problem I'm having, or not having, is the application works on my box because I have the developer key installed locally. What is not working is running the application on other user's machines who do not have ChartFX installed, which they shouldn't. Here's what I'd like to see in documentation to help us deploy, a simple "hello world" application set up like, which is similar to our setup, using ClickOnce. SLN Project1 (application) Window1.xaml (uses ChartControl on the page) Project2 Properties licenses.licx References ChartFX.WPF ChartControl.xaml (has ChartFX Chart control within UserControl) What happens now, for me, this setup works fine. When we use ClickOnce to deploy, users get the "invalid license" message. Do we need a reference to ChartFX.WPF and the licenses.licx in the "Project1" project, which is the WPF application project?? Doesn't seem like you do since Project2 is set to Copy Local. ?? Also, I tried removing the licenses.licx file, then dragging a new Chart control into the designer. That worked fine, VS replaced the licenses.licx. However, it still works for me because I have ChartFX installed locally. I'll have to test ClickOnce deployment to verify, but I'm guessing it won't fix the issue. Thanks, Brett
  5. So I can't find any documentation about hwo to set up a VS solution so that 1) a licensed developer can compile and use the designer, 2) deploying via Click Once to user's machine will allow the charts to run. This seems simple and standard, but it just not working for deployment and for some developers with valid keys. Right now we're have some issues with Click Once publishing to a user's machine. The app gets published just fine, but when the user runs the app they get a message in the chart saying the license has expired. Also, we used to have the trial version installed. Some developers are on XP, some are Vista, and the build machine is Windows Server. After uninstalling the trial version on my XP box, I installed the RTM version. Everything worked fine. A developer with Vista uninstalled the trial version, installed the RTM version, used a valid developer license key, the install worked fine and he can compile and run the app, but the charts show the expired license error. Our VS solution is set up with the WPF application project as a basic shell, no references to ChartFX assemblies, only the GUI projects. We then have other VS project(s) that contain all the visuals, and also contains the reference to the ChartFX.WPF assembly, set to copy local. That same project also has a licenses.licx file with a valid entry. Also, what does Priority Support get me? And where do I include my invoice number as mentioned in the email?
  6. So, I'm still not convinced why this code does not work. public decimal X { get { return this.DateTime.Ticks; } } public decimal Y { get { return this.CrossingRate; } } <cfx:Chart.AxisX> <cfx:Axis> <cfx:Axis.DataFormat> <cfx:ValueFormat Format="Time" /> </cfx:Axis.DataFormat> <cfx:Axis.Labels> <cfx:AxisLabelAttributes Format="Time" /> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxisX> As a GUI developer, I might not have control over what the X value return is, so I can't just return a DateTime. It returns Ticks. But for some reason, when I try to set the ValueFormat and the Label format to "Time", I get an internal ChartFX error saying the Ticks value (my data value), is outside the bounds of the Min/Max ticks. I have a DateTime.Ticks...I need to bind the format to Time. I get an error.
  7. I'm trying to bind my X points to a DateTime.Ticks value, but I keeping getting an error from ChartFX saying the Ticks must be between the Min and Max tick value. Before I get into the object binding, let me show a quick example that fails. DateTime dateTime = DataUnit.DoubleToDate(DateTime.Now.Ticks);<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Ticks must be between DateTime.MinValue.Ticks and DateTime.MaxValue.Ticks. Parameter name: ticks Now for my real world exmaple: We have a generic interface for all our Points, it defines both decimal X and decimal Y properties. One object wants to display DateTime in the X axis, so its interface implementation returns the DateTime.Ticks value. public decimal X { get { return this.DateTime.Ticks; } } public decimal Y { get { return this.CrossingRate; } } <cfx:Chart.AxisX> <cfx:Axis> <cfx:Axis.DataFormat> <cfx:ValueFormat Format="Time" /> </cfx:Axis.DataFormat> <cfx:Axis.Labels> <cfx:AxisLabelAttributes Format="Time" /> </cfx:Axis.Labels> </cfx:Axis> </cfx:Chart.AxisX> This throws an error, the same error as above. If you change the object to return the DateTime itself, and not ticks, it works fine. public DateTime X { get { return this.DateTime; } }
×
×
  • Create New...