I am new to using infragistic controls. I have added a ultraSparkLine to a VB 2017 application. I am doing it using in Area format. It is displaying work being accomplished during time frame. Want I would like to do is add a horizontal line that would show target rate of what is expected as work rate. I see I can have the Trendline but that seems to show average work rate for time frame being displayed.
Is it possible to add a horizontal line at a predetermined value?
Hello Tom,
Thank you for contacting Infragistics. It's recommended that you use a DataChart and valueoverlay since the sparkline is intended for more basic specifications.
https://www.infragistics.com/help/winforms/datachart-series-value-overlay
Let me know if you have any questions.
I went ahead with an UltraChart Line Chart and was able to get fixed line. By adding another field to store procedure returning target rate value for each record.
Awesome. Let me know if you plan on migrating to UltraDataChart, it's newer and widely more supported by our developers.
I have the Line chart working but would like to try the UltraDataChart. First issue I found is that the way I bound the data to the line chart isn't available for the UltraDataChart. The code attached is edited for new control. It works with the Line Chart. But when I I try the DataBindings and the DataBind lines Visual Studio doesn't accept it. How would the setting of the data source be different for the UltraDataChart.
Dim myLineChart As UltraDataChart = CType(UDC1, UltraDataChart) Dim dt6 As New DataTable Using da As New SqlDataAdapter(sql) da.Fill(dt6) End Using myLineChart.DataBindings = dt6 myLineChart.Data.DataBind() con.Close()
Tom,
Setup would look something like the following, there is a DataSource property on the axis and the series:
var data = new EnergyDataSource(); var yAxis = new NumericYAxis(); var xAxis = new CategoryXAxis(); xAxis.DataSource = data; xAxis.Label = "Country"; var series = new LineSeries(); series.DataSource = data; series.ValueMemberPath = "Coal"; series.Title = "Coal"; series.XAxis = xAxis; series.YAxis = yAxis; var chart = new UltraDataChart(); chart.Axes.Add(xAxis); chart.Axes.Add(yAxis); chart.Series.Add(series);
do you have equivalent in VB.net
The line where you have
xAxis.DataSource = data
Datasource isn't available