Hi,
I got a problem here, and explain it in the screenshot. :)
Hi asgardsinc,
Please, give more details: How do you bind data to the chart? What kind of datasource you use for the chart data? Is it an array, a web service or something else?Also, you want your graph to start from a later point in time but do you want your earlier data points to be just hidden and available to the user for review?
Here is the js function I wrote to display chart:
function drawChart(igChartDataSource) { $("#value_chart").igDataChart({ width: "940px", height: "250px", axes: [{ name: "xAxis", dataSource: igChartDataSource.Values[0].ValueItems, type: "categoryX", label: "Period", labelVisibility: "visible", majorStroke: "rgb(225, 225, 225)" }, { name: "yAxis", type: "numericY", majorStroke: "rgb(225, 225, 225)" }], horizontalZoomable: false, verticalZoomable: false, windowResponse: "immediate", syncrhonizeHorizontally: true } });};function drawChartSeries(igChartDataSource) { for (var i = 0; i < igChartDataSource.Values.length; i++) { var seriesDataSource = igChartDataSource.Values[i].ValueItems; var seriesTitle = "series"+i; $("#value_chart").igDataChart("option", "series", [{ name: seriesTitle, dataSource: seriesDataSource, title: seriesTitle, type: "line", xAxis: "xAxis", yAxis: "yAxis", valueMemberPath: "Quantity", showTooltip: true, tooltipTemplate: "tooltipTemplate", markerType: "diamond", legend: { element: "legend" } }]); }}
And the igChartDataSource is a Json returned from controller:
igChartDataSource:
{ "Values": [ { "ValueItems": [ { "Period": "Dec-2010", "Quantity": 129561.00 }, { "Period": "Jan-2011", "Quantity": 40095.00 }, { "Period": "Feb-2011", "Quantity": 31453.00 }, { "Period": "Mar-2011", "Quantity": 73881.00 }, { "Period": "Apr-2011", "Quantity": 37578.00 }, { "Period": "May-2011", "Quantity": 40065.00 }, { "Period": "Jun-2011", "Quantity": 34250.00 }, { "Period": "Jul-2011", "Quantity": 55980.00 }, { "Period": "Aug-2011", "Quantity": 14892.00 } ], "ValueName": "Shipment" }, { "ValueItems": [ { "Period": "Dec-2010", "Quantity": 84096.00 }, { "Period": "Jan-2011", "Quantity": 50810.00 }, { "Period": "Feb-2011", "Quantity": 28055.00 }, { "Period": "Mar-2011", "Quantity": 75156.00 }, { "Period": "Apr-2011", "Quantity": 93408.00 }, { "Period": "May-2011", "Quantity": 119502.00 }, { "Period": "Jun-2011", "Quantity": 133999.00 }, { "Period": "Jul-2011", "Quantity": 113091.00 }, { "Period": "Aug-2011", "Quantity": 152102.00 }, { "Period": "Sep-2011", "Quantity": 211286.00 }, { "Period": "Oct-2011", "Quantity": 146194.00 }, { "Period": "Nov-2011", "Quantity": 217109.00 }, { "Period": "Dec-2011", "Quantity": 129561.00 } ], "ValueName": "PYShipments", } ]}.
I want the series to display in the the middle of the chart. just like:
Hi Graham,
I've read that before, but because I get the data provided by our client, and the data is in a mass, so I wonder if there are some other ways to deal with the style with some properties.
It seems that I forget to replay your answer, ahhhhh, feel so sorry.
Hi Lazar,
Thanks for your reply, I think I should do something to my data. :)
Did you see my answer here?
http://community.infragistics.com/forums/p/63334/321141.aspx#321141
-Graham
Hi asgardsinc
In principle, you can do what you want with the axes.minimumValue & axes.maximumValue options for the category axis. These options are of number type so this will work for you if the category series for your chart is of numeric type. If it is of a date type you will need to apply the solution you obviously found for yourselft - put empty records with null values in the beginning and at the end of your data.
Please, answer if you need some more information.
Now understand better what you want to achieve. I'll do a short research and post an advice for you.