Hi guys,
I'm trying to display in the ultrachart a set of data, so I decided to use a histogram chart type. I relied on this example
http://help.infragistics.com/Help/NetAdvantage/NET/2008.2/CLR2.0/html/Chart_Working_with_Histogram_Chart_Data.html
That example works fine but when I try with my own data, the bars do not appear only the gauss bell (See attached)
why is this happening?
Is there something that I'm doing wrong?
Here is my code
Imports Infragistics.UltraChart.Shared.StylesImports Infragistics.Win.UltraWinChartImports System.Data.SqlClientPublic Class HistorialChart Private Sub HistorialChart_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim ultraChart1 As New UltraChart Me.UltraChart1.ChartType = ChartType.HistogramChart Me.UltraChart1.HistogramChart.ColumnAppearance.StringAxis = False Me.UltraChart1.HistogramChart.ColumnAppearance.ShowInLegend = True Me.UltraChart1.HistogramChart.LineAppearance.DrawStyle = LineDrawStyle.DashDot Me.UltraChart1.Axis.X.TickmarkStyle = AxisTickStyle.DataInterval Me.UltraChart1.Axis.Y.RangeMin = 0 Me.UltraChart1.Axis.Y.RangeMax = 20 Me.UltraChart1.Axis.Y.RangeType = AxisRangeType.Custom Me.UltraChart1.Axis.X.Labels.Orientation = TextOrientation.Horizontal Me.UltraChart1.Data.DataSource = getValues() Me.UltraChart1.Data.DataBind() End Sub Function getValues() As DataTable Dim dt As New DataTable dt.Columns.Add("Values", GetType(Double)) dt.Rows.Add(New Object() {28.78}) dt.Rows.Add(New Object() {28.78}) dt.Rows.Add(New Object() {28.71}) dt.Rows.Add(New Object() {28.97}) dt.Rows.Add(New Object() {28.97}) Return dt End FunctionEnd Class
I believe this is happening because you have set TickmarkStyle on the X axis to DataInterval without specifying the actual interval. Actually, in your sample, I would recommend not setting TickmarkStyle property at all. When using the histogram chart, this property is used to set the bucket size.