ASP.NET charts trend line - asp.net

I have basic bar charts showing some value (1 value per chart) on each day. The charts are rendered using standard MS ASP.NET charts.
Now I would like to add a trend line. Has somebody done such thing and would be so kind to give me some hints how to approach this task? I know how to add a line to the chart, just would like to know whether someone already did such thing.

If I have understood the question correctly, you want to show a line graph using the same values that each bar is drawn.
You can do this by adding one more series with chart type as line to the same chart area.
Make the Y-axis for the series as secondary and keep X-axis as primary (to keep same X-axis values for both Bar & line graph). Or you can also make X-Axis of this new series as Secondary (this will show labels on top of chart area) .

Related

Spacing Between Multiple X-Axes in JFreeChart

I'm attempting to try and increase the vertical spacing between multiple x-axes using JFreeChart. Currently, my charts look like this:
Current chart
However, I need to produce something like the following so that the x-axes are more clearly defined (note that the vertical spacing between the x-axes is larger than in the first image):
Desired chart
Does any one have any idea on how to do this? I've been searching the JFreeChart API for > 2 days now and can't find anything that directly addresses the issue other than attempting to use org.jfree.chart.axis.AxisSpace in some way.
Many thanks for any help!
One approach would be to customise the axis label insets (that is, increase the space below each axis label).
http://www.jfree.org/jfreechart/api/javadoc/org/jfree/chart/axis/Axis.html#setLabelInsets-org.jfree.ui.RectangleInsets-

Create area line graph that colors in-between series?

I am trying to create a new Area Line Graph that colors the space in-between the two lines, but for some reason I cannot accomplish this. The default behavior is to color the area from the series to the x-axis. Is there a way that you can only color in the space between the two series instead?
I am trying to mimic the behavior, but with HighCharts, here: https://confluence.atlassian.com/download/attachments/185729594/report_chart_created_vs_resolved_report.png?version=3&modificationDate=1354064895573&api=v2
I think you need to use the area range chart type: http://www.highcharts.com/demo/arearange

How to display multiple colors in a lineseries?

I want to display different colors in a line series based on some condition. As per my observation we can use fillFunction on columnseries to get different colored chart items, but it does not have any effect on lineseries. Is there any way by which we can get multi colored line series?
Can it help you?
flex line chart with variable colored line
The approach is a little bit strange but it works by me.

Flex staked Y-Axis

I'm trying to make chart which is combination of bar and line chart using Flex Charting API .
Here x axis would be common and y axis would be different. Please not that y axis got different range of value one is % and other is amount. Any one got idea how to make this chart. Here line chart would be staked on top of bar chart . The line chart and never over laid or drawn on top of bar chart. Please help... please..
Thanks ,
James
Start from the CartesianChart. Add LineSeries and BarSeries (or maybe you mean ColumnSeries).
This example is close:
http://livedocs.adobe.com/flex/3/html/help.html?content=charts_types_12.html
--edit
For the chart stacking dilemma: let the charts be separate with their own axes. Just hide the horizontal axis from the top chart.

Show all series' values in stacked bars mouseover (ASP.NET CHART)

I'm using the asp.net Chart control to present a stacked bars chart.
I can create a mouseover custom tooltip using this code:
series.MapAreaAttributes = "onmouseover=\"showTooltip('#VALY');\"";
... which works fine. But I can't seem to find a way to show the rest of the values for the other series in that column.
Example:
I have 2 series (Paid and Unpaid) making up a single column in the chart. When I mouseover any of the series, I want to show both the value of the moused-over series, but also the other series contained in that particular stacked column.
Can anyone point me in the right direction?
We're also using stacked bar charts - we have click through functionality, for users to drill into the data making up each point in each series : we use something like this on each data point.
series.Points[index].MapAreaAttributes = "onclick=\"window.opener.location=this.href;window.opener.focus();return false;\"";

Resources