Hi,
I faced some problems in the infragistic graph in scoll bar adding.
Made the ultraChart1.Axis.X.ScrollScale.Visible = true;
but all the data coming in the same size of graph .
Is there any way to add scroll bar in the graph.
Here I am attaching the image of the graph.
Thanks In Advance.
Could you please take a look at the modifications that I made in the sample to be more similar with your scenario. You could use
ultraChart1.Axis.Y.Extent = 40; instead of axisY.Extend = 40. Please take a look at the code for more details and let me know if you have any questions.
Here i am sending my code and screenshots.
Here is the screenshot of datatable I get from a procedure.And I am using this datatable to the graph and the graph is displaying data.
uc_salesgraph.DataSource = dt;uc_salesgraph.DataBind();uc_salesgraph.Override.Enabled = true;uc_salesgraph.Axis.Y.Labels.ItemFormatString = "<DATA_VALUE:0.##>";
And the graph is coming like this.
And for scrolling I am using the suggested code .
private void usb_horizontal_Scroll(object sender, ScrollEventArgs e) { UltraScrollBar scrollBar = sender as UltraScrollBar; this.uc_salesgraph1.Left = -scrollBar.Value; //axisY.Extent = 40; //double currentValue = scrollBar.MaximumDragValue / rangeValue; //axisX.RangeMin = (double)scrollBar.Value / currentValue; }
Here for
//axisY.Extent = 40; //double currentValue = scrollBar.MaximumDragValue / rangeValue; //axisX.RangeMin = (double)scrollBar.Value / currentValue;
Its showing error as axisY , axisX , rangeValue not there in my graph.
As I am new to infragistics columnchart graph.Could you please help me regarding this.
Thanks In advance,
Hi again,
Yes, you could use the same code. If you have any problems to implement this code in your sample, you could send it to me and I`ll make the modification. Please feel free to ask me if you have any furhter questions.
Regrads
Thanks a lot for your suggestion.
Here I am not using composite chart with the chart area property,rather just putting data from a data table to the source of the ultrachart graph.
Can we use the above code to achieve our goal,Could you please suggest?
Thanks,
Maybe one possible approach to achieve the desired behavior could be:
private void usbHorizontal_Scroll(object sender, ScrollEventArgs e) { UltraScrollBar scrollBar = sender as UltraScrollBar; this.ultraChart1.Left = -scrollBar.Value; axisY.Extent = scrollBar.Value + 40; double currentValue = scrollBar.MaximumDragValue / rangeValue; axisX.RangeMin = (double)scrollBar.Value / currentValue; }
private void usbHorizontal_Scroll(object sender, ScrollEventArgs e)
{
UltraScrollBar scrollBar = sender as UltraScrollBar;
this.ultraChart1.Left = -scrollBar.Value;
axisY.Extent = scrollBar.Value + 40;
double currentValue = scrollBar.MaximumDragValue / rangeValue;
axisX.RangeMin = (double)scrollBar.Value / currentValue;
}
Please take a look at the attached sample for more details. If you have any questions do not hesitate to ask me
Regards