I'm using WPF and OxyPlot and I wanted to hide some points on a series... however this doesn't seem to be possible to my surprise! Am I missing something? I am iterating over a set of points on a series, and I'm concentrating on a specific region of the graph of the series where I want the data points outside that range to not display.
Related
i'm struggeling a little with my Autocad Plugin..
Since i have a huge amount of AutoCad Drawings to plot programmatically as a pdf-File i found out that some of them contain much unnecessary stuff on it.
i only want to plot a specific area which is defined in a layer. I have no problem of search for the layer and check for its properties but i can not find a single thing about coordinates or something like a height or a width..
So my question is simple: Is there a chance to get the height and width or something like that to print only the needed stuff inside the area of that layer?
Thanks
Alex
If you have a selection set of all the entities you want to plot, loop through and get each entities extents.
Compare each entity against a return value and grab the largest min and max points of everything in your selection set. This will give your the window area bounds you want to plot.
I am evaluating Teechart.Net (v4.13.12.13) for Xamarin Android (v4.12) to determine suitability for a project that requires the use of gauges to present data and I've come across a few issues that I haven't been able to figure out:
I would like to add a number of linear gauges to a chart, each with a unique title, but it seems the axis title assigned to the last gauge that was added to the chart is applied to all gauges in the chart. Am I setting the wrong property (LinearGauge.Axis.Title.Text) or is there some other way to assign unique titles to the linear gauges. The other apparent option would be to add a separate chart for each gauge, but that doesn't seem right. In the image below, I need to show two distinct temperatures but both are labelled the same.
I created a circular gauge and enabled the embedded numeric gauge. However, no matter what I try I cannot get any text displayed in the numeric gauge. It is drawn inside the gauge, but no text. I've set CircularGauge.NumericGauge.Chart.AutoRepaint to true, then false and manually repainted, all without success. Is this a bug? I tried the same code with Teechart.Net for Winforms and it works OK so I'm having doubts about the Teechart release for Xamarin.
Any help will be greatly appreciated.
I would like to add a number of linear gauges to a chart, each with a
unique title, but it seems the axis title assigned to the last gauge
that was added to the chart is applied to all gauges in the chart. Am
I setting the wrong property (LinearGauge.Axis.Title.Text) or is there
some other way to assign unique titles to the linear gauges. The other
apparent option would be to add a separate chart for each gauge, but
that doesn't seem right. In the image below, I need to show two
distinct temperatures but both are labelled the same.
This is by design. Gauges use standard chart axes (left and bottom). Each chart has one set of axes and hence the title is being overwritten. Adding separate charts would be the recommendation.
I created a circular gauge and enabled the embedded numeric gauge.
However, no matter what I try I cannot get any text displayed in the
numeric gauge. It is drawn inside the gauge, but no text. I've set
CircularGauge.NumericGauge.Chart.AutoRepaint to true, then false and
manually repainted, all without success. Is this a bug? I tried the
same code with Teechart.Net for Winforms and it works OK so I'm having
doubts about the Teechart release for Xamarin.
Using the code below doesn't plot text in the NumericGauge in WinForms either. Can you please modify it so that we can reproduce the problem here?
CircularGauge circularGauge1 = new CircularGauge(tChart1.Chart);
circularGauge1.NumericGauge.Visible = true;
Thanks in advance.
Original Question
I'm using Microsoft Chart Control to display some data points as a Line. I have a Legend with custom items used to display calculated information about the line (mean average and others).
Now I've enabled IsUserSelectionEnabled which allows the user to "zoom into" a range of values and I want the legend items to be calculated on only the data points that are currently in view.
I can use the AxisViewChanged event to be notified of the view change, but what I can't figure out is how to enumerate only those DataPoint currently in view.
Update
The zoom isn't going to work for my purpose. What I discovered is that the NewPosition and NewSize properties of the AxisViewChanged event do in fact contain the precise area selected by the user, but the resulting zoom contains points outside of that area. I need more precision than that. What I need are two cursors, but the control only gives you one.
So my question now is: How do I customize this thing to add another cursor? I'm not asking just yet and if I do I'll start a new question.
Though I do still need to figure out how to translate client coords into data coords...
Updated again
I found the coord translation functions right on the Axis. Seems obvious in retrospect.
ChartArea.Axis.PixelPositionToValue (for whichever axis you need)
ChartArea.Axis.ValueToPixelPosition
I'm using the Visiblox WPF API and am having trouble getting the chart points in my line chart to scroll horizontally. Instead of scrolling, the points are get squashed together, in which, this isn't particularly a problem, except that I expect to have 100s of data points on the chart. I have looked throughout the examples available on the Visiblox website, but couldn't find what I was looking for. Ive attached an example screenshot.
Any ideas?
Thanks for your help,
Sparky
By default Visiblox Charts will re-calculate the range to include all the data in the series, so there are two possible approaches: 1) when you add the last point, remove the first one which will effectively move the visible window one point over or 2) set an explicit axis range and update that when you want to move the visible window.
Check out the Visiblox blog for more details on how ranges work at: http://www.visiblox.com/blog/2011/03/visiblox-charts-ranges-demystified
I just had something like this recently. Everytime I'd add a point to the cart I'd run a little section of code that would check the amount of time (my x-axis dimension) that had passed since 0. I also set up a range of data I always wanted to see. I always wanted to show 120 seconds of data on the graph. So I had something like this:
private void adjustXasis(int timeCount)
{
if(timeCount>desiredRange)
{
chart.axis.Xaxis.minimum=timeCount-desiredRange;
chart.axis.Xaxis.maximum=timeCount;
}
else //two minutes not reached yet
{
chart.axis.Xaxis.minimum=0;
chart.axis.Xaxis.maximum=desiredRange;
}
}
I don't have VS in front of me and I know that syntax for the axis min/max is wrong but you get the idea.
By default Visiblox Charts will re-calculate the range to include all the data in the series, so there are two possible approaches:
1) when you add the last point, remove the first one which will effectively move the visible window one point over or
2) set an explicit axis range and update that when you want to move the visible window.
Check out the Visiblox blog for more details on how ranges work at: http://www.visiblox.com/blog/2011/03/visiblox-charts-ranges-demystified
I'm having trouble with my Silverlight Chart. My model is unsorted, that is, the sorting is done on the server side. It needs to support year transitions, but as you can see from the screenshot the charting control automatically sorts the model and fills in the gaps. The line sort be ever increasing and not taking a dip on new year.
How can I make the chart display the data in the order specified in the grid control to the left?
Btw, using SL3
alt text http://img705.imageshack.us/img705/7602/unsortedsilverlightchar.png
The line chart is not designed to do the task you seem to be asking. After all the purpose of a line chart is to help the user trace a trend or even visually interpolate an interim value. However if the interval between horizontal points is not linear and always traveling in the same direction such lines meaningless.
I would therefore suggest that the Line chart is not appropriate or that you have some other hidden data which should be used for the Y-axis which would make the lines meaningful.
Alternatives might be to use a Scatter graph or a Column series where the y-axis value has been converted to a string and thus cause the series to use a Category based axis instead of range based one.