Jump to content
Software FX Community

kelias

Members
  • Content Count

    29
  • Joined

  • Last visited

  • Days Won

    3

kelias last won the day on October 7 2015

kelias had the most liked content!

Community Reputation

3 Neutral

About kelias

  • Rank
    Member
  1. I'm binding my grid to hourly data, but when I show the DataView I just see the values and not the hours. Is there a way to add a column heading bound to the DateTime (X Axis on my chart)?
  2. I would like to build a chart with two series. One a bar the other a step. When I try this the chart only shows the step and not the bars. I can display both individually but not together. Here is the code: chtMain.Series.Clear(); chtMain.AxesY.Clear(); Axis a = new Axis {AutoScale = true, ForceZero = false, Labels = {Decimals = 2}, Title = new Title("value")}; chtMain.AxesY.Add(a); chtMain.AxisX.Labels.Format = AxisFormat.Time; chtMain.AxisX.Labels.CustomFormat = "HH:mm"; chtMain.AxisX.Title = new Title("Time"); SeriesAttributes series = new SeriesAttributes("Value"); series
  3. The XAML: <Window x:Class="ChartfxTest.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:cfx="http://schemas.softwarefx.com/chartfx/wpf/80" xmlns:cfxmotifs="http://schemas.softwarefx.com/chartfx/wpf/80/motifs" Title="MainWindow" Height="350" Width="525"> <Grid> <cfx:Chart x:Name="chtMain" Gallery="Line" UseEffects="True" UseVisuals="True" BorderThickness="0" Style="{x:Static cfxmotifs:Basic.Style}" Border="{x:Static cfx:Borders.None}" >
  4. Your example doesn't even include time. I'm doing all this in code instead of XAML. Here is an example chtMain.AxisX.Labels.Format = AxisFormat.DateTime; chtMain.AxisX.Labels.CustomFormat = "HH:mm"; When I do this the time is shown but it's still in a 12 hour clock, and then it also looses the ability to change depending on the size of the chart. So if I have 1000 data-points, it then puts a label for each data point instead of only those that fit.
  5. When I do this: chtMain.AxisX.Labels.CustomFormat = "HH:mm:ss"; I it just prints the letters and doesn't actually format the data. ie: for 23:21 I get "HH:mm:ss" instead.
  6. I know I can set the X Axis to a Date Time format like so: AxisX.Labels.Format = AxisFormat.DateTime; But is there a way to make it use a 24 hour clock on the time instead? I tried using AxisX.Labels.CustomFormat But I'm not sure how to format the string I pass into it to get the desired result.
  7. I would like the grid lines in the main area of a chart to be a different color then the color of the tick marks at the bottom of the chart. Is there a way to do this? A vertical gradient is the only way I can think of currently, but it seems like a hack.
  8. Nevermind got it working. Heres what I did: In the XAML I added two annotations for the horizontal and vertical lines. (note the binding, to span to the size of the container) <cfx:Chart.Extensions> <cfxAnnotation:Annotations x:Name="annotations"> <Line x:Name="lineH" Visibility="Visible" Fill="Black" Stroke="Black" X1="0" X2="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Canvas}},Path=Width}" /> <Line x:Name="lineV" Visibility="Visible" Fill="Black" Stroke="Black" Y1="0" Y2="{Binding RelativeSource={RelativeSource FindAn
  9. When the user moves the mouse over the chart I would like a crosshair to appear and track with the mouse. (vertical and horizonal line that intersect at the current mouse location) This should only be on the chart portion and not on the legend or titles etc.. I assume I would use annotation's to accomplish this? Do you have a sample of this anywhere? Thanks,
  10. If you use the example above and bind the collection to the chart instead of the series it doesn't seem to resize correctly. When an item is added it refreshes properly but when I remove an item the chart does not scale the x axis correctly reclaiming the space. But it does work if you assign it to each series instead. (Let me know if I'm missing something here.) Our charts use the X axis as a time, and the datapoints are not equally spaced.
  11. I have a chart that I want to appear to scroll so it only shows a certain number of data points. I have the chart bound to an ObservableCollection, so when I get an item to add to the collection I remove the first item from the collection. This works fine except with Zoom. When I zoom and data comes in the chart throws a NullReferenceException. (I have the full stacktrace at the bottom) Here is some code to reproduce the problem: using System; using System.Collections.ObjectModel; using System.ComponentModel; using System.Windows; using ChartFX.WPF; namespace ChartTest3 {
  12. kelias

    Zoom Problem

    When I attempt to zoom a chart I'm getting an exception being thrown by ChartFx: ArgumentOutOfRangeException. I have a basic chart, and I add a Line series that uses Dates as the X axis. Then I bind to an observablecollection that has the data points. The chart displays fine but when I click on button2 to do a zoom I get the error. Any ideas why this is happening? private void button2_Click(object sender, RoutedEventArgs e) { chart1.Zoom.Mode = ZoomMode.Selection; } private void NormalLineChart() { chart1
  13. I'm using a line chart and the data is time series so the X is set to dates.
×
×
  • Create New...