Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
ultrachart linechart w/no line
posted

Please help. How do I create a chart that has only x axis plots along the bottom that has labels that are string values not numeric?

so the plots should be:

O            O                          O
---------------------------------------------------------------------------
PPW     Reponsible Person     OIM      PTW Admin      Inactivate

with no line. the circles represent if a form has been approved and by which role.

Please advise how to create this ultrachart.

Also I need a right margin so the chart isn't cut off.

 

UltraChart1.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval
UltraChart1.ScatterChart.IconSize = SymbolIconSize.Large
UltraChart1.ScatterChart.Icon = SymbolIcon.Circle
UltraChart1.ChartType = ChartType.ScatterChart
UltraChart1.ScatterChart.ConnectWithLines = False

Parents
  • 275
    posted

    I'm partly there. But the plots that have a 0 value shouldn't be plotted but they are. How do I check that if the bounds are "00", color the plot Transparent?

    Private Sub Chart_FillSceneGraph(ByVal sender As Object, ByVal e As Infragistics.UltraChart.Shared.Events.FillSceneGraphEventArgs) _
            Handles UltraChart2.FillSceneGraph

            Dim dataPointColour As System.Drawing.Color
            Dim symbol As Infragistics.UltraChart.Core.Primitives.Symbol
            Dim symbols As New Infragistics.UltraChart.Core.Primitives.PrimitiveCollection

            For Each p As Infragistics.UltraChart.Core.Primitives.Primitive In e.SceneGraph
                Dim polyline As Infragistics.UltraChart.Core.Primitives.Polyline

                If (TypeOf p Is Infragistics.UltraChart.Core.Primitives.Polyline) Then
                    polyline = CType(p, Infragistics.UltraChart.Core.Primitives.Polyline)
                Else
                    polyline = Nothing
                End If

                If Not polyline Is Nothing Then
                    dataPointColour = polyline.PE.Fill
                    polyline.PE.Fill = Color.Transparent

                    For Each dataPoint As Infragistics.UltraChart.Core.Primitives.DataPoint In polyline.points
                        symbol = New Infragistics.UltraChart.Core.Primitives.Symbol()
                        symbol.icon = Infragistics.UltraChart.Shared.Styles.SymbolIcon.Circle
                        symbol.iconSize = Infragistics.UltraChart.Shared.Styles.SymbolIconSize.Large
                        symbol.PE.Fill = dataPointColour
                        symbol.point = dataPoint.point
                        symbols.Add(symbol)
                    Next

                End If

            Next

            e.SceneGraph.AddRange(symbols.ToArray())
        End Sub

     

    Public Sub LoadChart()
            Dim dt As New DataTable

            dt.Columns.Add("Series Labels", GetType(String))

            dt.Columns.Add("PPW", GetType(Integer))
            dt.Columns.Add("Responsible Person", GetType(Integer))
            dt.Columns.Add("OIM", GetType(Integer))
            dt.Columns.Add("PTW Admin", GetType(Integer))
            dt.Columns.Add("De-Activate", GetType(Integer))
            dt.Columns.Add("Close", GetType(Integer))

            ' Add the rows of data
            dt.Rows.Add(New [Object]() {"Workflow", 5, 5, 0, 0, 0, 0})

            UltraChart2.ChartType = ChartType.LineChart
            UltraChart2.Axis.X.Labels.Orientation = TextOrientation.Horizontal
            UltraChart2.Axis.X.Labels.ItemFormat = Infragistics.UltraChart.Shared.Styles.AxisItemLabelFormat.ItemLabel

            Me.UltraChart2.DataSource = dt
            Me.UltraChart2.DataBind()
        End Sub

Reply Children