How to draw a vertical line graph on WPF? - wpf

I am learning to draw a line graph inside my WPF. i found a tutorial of a horizontal line graph at this side " http://www.c-sharpcorner.com/uploadfile/mahesh/line-chart-in-wpf/ " and i manage to do it. But my question is how to draw a vertical graph?
I taking the example of the graph from the website i provided, if transform the graph to the vertical graph. The X-axis will be the int(on the top) and the Y-axis will be the Date(at the left hand side). Anyone can help me out?
The graph i want should be like this:
http://imageshack.us/photo/my-images/202/capturegfj.jpg/
p/s : sorry, i couldn't upload an image due to low reputation point.
Thanks

You can use Microsoft provided chart controls:
http://msdn.microsoft.com/en-us/library/system.windows.forms.datavisualization.charting.chart.aspx
The SeriesChartType.Line is your chart type I guess.
Here is a sample on MSDN. http://msdn.microsoft.com/en-us/library/hh297122%28v=vs.100%29.aspx

Related

Curve in D3 shape

I tried creating a funnel chart using D3 and vx. This is what i have achieved so far
https://www.webpackbin.com/bins/-L-TDMSWHUS-ZOi0jb8t
But i tried all curve options from d3-shape. But couldn't create the cure as shown in
Any help would be appreciated.
Seems like your best bet would be to make a basic area chart and to reflect it across the x-axis. I believe that would give a similar effect. For more clarification, the x-axis would go through the horizontal center of the chart in the image above

Create forest plot using JFreeChart

Does anyone have an example of how to render a forest plot using JFreeChart (or another Java-based open source charting library, but JFreeChart is preferred due to the integration with Jasper Reports)?
See https://en.wikipedia.org/wiki/Forest_plot for description of the forest plot.
I was thinking about hacking somethign together using a horizontal bar chart where left side of the axis is the categorical value, and right side is the range, but the problem is the data for a forest plot comes in a set of data like: category, min, max. Such as an odd ratio with a confidence interval that spans between -.1 to 1.2. The forrest plot would basically be a line drawn between -.1 and 1.2 with a diamond marker directly in the middle (around .55).
If anyone has experience on building this visualization in JFreeChart, it would be much appreciated!
While this is not supported directly in the current release, a reasonable facsimile should be possible. Instead of a bar chart, consider using a MinMaxCategoryRenderer having PlotOrientation.HORIZONTAL and custom icons, as shown here. Add a CategoryMarker or CategoryLineAnnotation with a dashed Stroke to the CategoryPlot for the centerline; add a CategoryItemLabelGenerator to handle the labels.

Irregular Polygon

Take a look at the attached pic, I need to mimic the grey irregular polygon header at the top of the form. If it wasn't for the angled portion on the right-hand side, it would be straightforward. What is the best method to create it? Can this be created in XAML? Should I use an image? Any pointers are greatly appreciated.
This can easily be done via the standard drawing capabilities in XAML. See Shapes and Basic Drawing for details on making custom shapes.

Draw bar chart in windows application using c#

I want to draw a bar in +ve and -ve direction in chart. Like a line at the Middle of the chart and bar are in both the direction.
Please suggest me how I can draw chart in C#.
You can use ZedGraph . It can do a lot of charting stuff. Here you can find samples, there are some bar samples there.
I used it, it's realy easy way to create any chart with this library.

Microsoft Blend - drawing polygons

I recently downloaded trial version of Microsoft Expression Blend and I can't figure out how I can draw polygons. I only found predefined shapes like pentagon,octagon, triangles but I can't find a tool to draw polygon
Use the Pen tool. See http://expression.microsoft.com/en-us/cc188984.aspx for a video tutorial.
In Expresion Blend 4:
Place a any RegularPolygon shape such as a triangle, pentagon, or Hexagon on your canvas.
Go to the Properties Panel and expand the Appearance section.
Change the point count to the number of sides you want. 8 for Octagon, etc.

Resources