Jump to content
Software FX Community

MDS

Members
  • Posts

    14
  • Joined

  • Last visited

MDS's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. First, ChartFx doesn't provide any events to handle the turning on and turning off of toolbars. This makes it very difficult to sync a checkbox with the context menu inside of the chart to toggle the visibility of toolbars. The best thing I've found is the PostPaint event, but it is very generic and provides very limited event data. <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> Second, ChartFx doesn't consistently hang on to its extension collection whenever the chart data is refresh. To get the annotation toolbar, you have to create an AnnotationX object and add it to the chart's Extensions collection using the Add method. Then, you set the ToolBarObj.Visible property on the AnnotationX object. Strangely, though, the chart sometimes just drops the extensions, and I'm not sure exactly why it's doing that. Third, I've written logic to detect the absence of the AnnotationX object, recreate it, and set its ToolBarObj.Visible property based on the checkbox checked property. Oddly, this places the context menu "Toolbars" into an unsynchronized state: where you would expect the toolbar to be visible when the context is checked, it is actually not visible. Essentially, it seems that there are some odd peculiarities when trying to sync the checkbox, the actual visibility of the toolbar, and the checked state in the chart's context menu. The AnnotationX object doesn't persist with the chart. How do I sync a CheckBox Checked property with the AnnotationX.ToolBarObj.Visible property and the actual checked state of the chart's toolbars context menu? Why is the Extensions collection sometimes cleared in the Chart when the chart's DataSource property is set?
  2. Is there a way to show the ranges of the intervals for the histogram chart on the X-Axis? In other words, if I set the statistics chart to have 5 intervals and the values are from 0 to 100, how do I display 0 to 20 on the first histogram bar, 21 to 40 on the second, and so on?
  3. MDS

    Remove a StudyGroup

    Try this. Create a chart with statistics. Add a CentralTendencyMean study group programmatically. Add a CentralTendencyMedian study group programmatically. Now programmatically remove the CentralTendencyMedian study group analyses (and the CentralTendencyMedian custom study). The only way I found to do this is by using the StudiesCollection.Find method and test for null. If it is not null, then call the StudiesCollection remove method. However, this method results in an orphaned Range analysis in the CentralMedian custom study because both the Study groups above contain the range analysis. There's no way to specify which Range analysis to remove (CentralTendencyMean or CentralTendencyMedian). Very frustrating API.
  4. MDS

    Remove a StudyGroup

    You have it correct. So now I have a statistics object with a collection of studies. Some were added to the statistics studies collection as individual Analysis enumerations and some were added as StudyGroup objects. The overload of the Studies.Add method enables the addition of Analysis, Study, and StudyGroup objects. However, there is no corresponding Remove overload. There is, however, a Remove method which takes a Study object. The trick, then, is to somehow convert an Analysis enumeration value into a Study. I noticed that an Analysis value cannot be converted into a Study object (which seems strange since the StudiesCollection overload accepts an Analysis object). The question, then, is... must I use the Find method and then test for null? This seems extremely inefficient way of doing things. One recommendation for future versions on Collection classes: The overloads on your Add method should match the overloads on your Remove method.
  5. Is there a way have intervals of unequal size? For example, interval 1 is from 10 to 20, interval 2 is from 21 to 100, and interval 3 is from 101 to 1000.
  6. Is there a way to remove a StudyGroup from the studies collection? Or... is there a way to iterate over the Analysis enumerations provided by a specific StudyGroup?
  7. When I perform the following, I get an error "OverflowException was unhandled." Any idea why? If I comment out the line series1.YAxis = YAxis.Secondary;, then I don't get the error. OracleConnection connection = new OracleConnection(connectionString); string sql = "select month_num, numvalue1, numvalue2 from mytable";using (connection) { OracleCommand command = new OracleCommand(sql, connection); OracleDataAdapter dataAdapter = new OracleDataAdapter(command);dataAdapter.Fill(dataset, "Table0"); } chart1.DataSourceSettings.DataType[0] = DataType.Label; chart1.DataSourceSettings.DataType[1] = DataType.Value;chart1.DataSourceSettings.DataType[2] = DataType.Value; chart1.DataSource = dataset.Tables[0]; SeriesAttributes series0 = chart1.Series[0]; SeriesAttributes series1 = chart1.Series[1];series0.Gallery = Gallery.Bar; series1.Gallery = Gallery.Lines;series1.YAxis = YAxis.Secondary; chart1.Refresh();
×
×
  • Create New...