Jump to content
Software FX Community

jhopper28

Members
  • Posts

    10
  • Joined

  • Last visited

jhopper28's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Update: I happened to reload my Visual Studio IDE and this problem went away. The solution to my original problem (labels off by one month) IS indeed solved by turning off AutoCenter and AutoFirstLabel styles.
  2. When I modify the AxisX.Style property in code as follows, the property values do not take effect (as inspected in the Visual Studio 2010 debugger and as seen in the resulting chart): Chart1.AxisX.Style = Chart1.AxisX.Style And Not AxisStyles.AutoCenter Chart1.AxisX.Style = Chart1.AxisX.Style And Not AxisStyles.AutoFirstLabel If I go to the Visual Studio debugger immediate window and type in those same commands, the property values DO change, and when I continue running, the chart appears as I need it to. My client
  3. Unfortunately, according to SoftwareFX support, you can't create your own Context Menu to be used only when you right click on the Axis Section. As a workaround, I'm adding the Context Menu Items to the Axis Context Menu and disabling the Context Menu Items depending where you the user is clicking, which is revealed in the MouseClick event's e (HitTestEventArgs) parameter. Something like this: Private Const MyCommandID As Integer = 1 Private Sub Chart_MouseClick(ByVal sender As System.Object, ByVal e As ChartFX.WinForms.HitTestEventArgs) _ Handles Chart.MouseClick If e.Button = MouseButtons.Right Then Chart.Commands(MyCommandID).Enabled = (e.HitType = HitType.AxisSection) End If End Sub
  4. I have several DataTables that all have the same structure, and I need to display each set of data as its own series (e.g., a line graph where each table's data is represented by a separate line) in one chart. How can I do that with data binding? I've used the CrosstabDataProvider to do something similar, but in this case, my data is not represented in a single table that needs to be pivoted, but rather several separate tables.
  5. I'm creating an AxisSection and highlighting it in the MouseDown, MouseMove and MouseUp events, and now I need to add some context menu items that appear only when the user right-clicks that section of the grid. I was guessing that I should use CommandId.ContextMenuAxisSection, but I can't find any explanation of it in the documentation or online, and I can't seem to get such a context menu to appear. When that section is right-clicked, the ContextMenuAxis appears, so I'm adding my menu items to that for now, but I really don't want those menu items to be available when the user actually clicks the axis. Is there a way to do what I want to do? What is the ContextMenuAxisSection used for?
  6. Is it possible to get a reference to a CrosstabDataProvider instance's data in tabular format for use in another control? I need to display the pivoted data (along with some other related data) in a standard DataGridView, and the provider does a fine job of pivoting the raw data I give it, so I'd like to avoid doing that work manually for other purposes if there's any way to get to it.
  7. Is there a way to access and set the ToolTip property of individual points after they're plotted from a data source but before each individual GetTip event (in a scatter chart)? I need to use a combination of plotted data and text from my data source that I've programmatically assigned to each point's label, and I would like to set the ToolTips in the same iteration through my data instead of in the GetTip event.
  8. I expected to be able to enumerate (For Each) the points on the chart and set their properties, but nothing in the ChartFX API seems to implement IEnumerable. After some trial-and-error, here's what I got working by looping through the data-bound points by index and doing reverse look-ups in my data source: For nPointIndex = 0 To MyChart.Data.Points - 1 Dim point As ChartFX.WinForms.PointAttributes = MyChart.Points(nPointIndex) Dim cost As Double = MyChart.Data.X(nPointIndex) Dim itemCount As Integer = CInt(MyChart.Data.Y(nPointIndex)) Dim foundRowIndex = dataView.Find(New Object() {cost, itemCount}) Dim row As DataRowView If foundRowIndex >= 0 Then row = dataView(foundRowIndex) point.Text = row("description").ToString() End If Next
  9. OK, so after the data is bound, how do I identify the Point for a given DataRow while I'm iterating?
  10. I've got a scatter chart bound to a DataTable with 3 columns: a cost value (X axis), a numeric count value (Y axis), and a descriptive text value for each point. I want to keep the default X and Y axis labels (currency for X, numeric for Y), but display the description field as each point's label in the scatter chart. I've tried many combinations of using PointLabels, DataSourceSettings and FieldMap properties, but I can't figure out an obvious way to do this. Is there a way to bind that 3rd field to just the point labels, or do I need to iterate over all the points and assign the text value manually to each point's label? I would appreciate any sample code for either method. Thanks, Jeff Here is my code attempt (the numeric values are laid out as desired with this code
×
×
  • Create New...