Asp.Net ReportViewer Line Chart background - c#

I pass a dataset to my report, which renders a line chart showing a sprint burn down chart. One of the fiends in the dataset is 'PeriodType', which can be either 'Planning, 'Burning' or 'Retrospective'.
The chart shows dates along x axis, and the y axis holds hours.
What I would like to do, is grey the background, where the x axis has a value that is not a 'Burning' period. So the object that is used to create the chart, as mentioned, has a type field I can use.
Is there a way to change the background colour of the x 'columns' based on the flag? Some sort of conditional background colouring? I have searched, but can't seem to find such a handy thing.

Yes, that is possible.
Open the Properties pane, in the BackgroundColor or Color (whichever is relevant) property of the chart, enter an IFF statement like:
=IIF(Str(Fields!PeriodType.Value) <> "Burning", "Gray", "SomeOtherColor")
Hope that helps

Related

Center axis on barchart using visifire

I am currently working with visifire on a c# charting project.
I want to create a bar chart to show percental increase as green bars and decreases as red bars. The Axis / 0 point line should always remain at the same position.
The problem is, that the axis currently moves all around the screen depending on the values that are shown. (see the image below)
I already tried to center it with axismaximum and axisminimum set to fix values, but that doesn't work.
The way i want it to be is like this.
or this
Are there any remaining visifire cracks out there, that can understand the problem and help?
One workaround for this is finding the maximum value (absolute value, using Math.Abs) from the series, then adding its counter value to the beginning of series.
For example, if the maximum absolute value is -80%, then add a +80%. In this way, the axis can be centred.
You can use a special colour (Transparent?) for the first bar, or use other control to cover it so user will only see the real data.
Using data bindings, this should do the trick.
MinValue = -MaxValue
<vc:Chart.AxesY >
<vc:Axis AxisMaximum="{Binding MinValue}" AxisMinimum="{Binding MaxValue}" Enabled="False" AxisType="Primary" >
</vc:Axis>
</vc:Chart.AxesY>
Otherwise this is the same without databinding
<vc:Chart.AxesY >
<vc:Axis AxisMaximum="70" AxisMinimum="-70" Enabled="False" AxisType="Primary" >
</vc:Axis>
</vc:Chart.AxesY>

Teechart Linear Gauge Duplication of axis title for multiple gauges on single chart

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.

ReportViewer RDLC Chart Gap

I've got two chart types sharing one chart area. One of the charts is a smooth area chart (three of this type are generated but only one is shown in the designer), the other is a column chart.
The purpose of the column chart is to indicate where some limits are located on the smooth area chart. The charts are created well except that the smooth area chart has gaps where the limit lines show up.
How do I get rid of the gaps that are occurring? The following images are print screens of my issue.
Thanks
Turns out that the column chart data is included in the C# list that I'm using as a data source for these charts. So, when making the smooth area graphs it is using those red lines values as a data point, causing a gap because they're y value is set to 0. There is no gap, just a 0 value.
The column chart y values are actually a different parameter with a random name but using the same dataset, since the smooth area chart doesn't have that value set, they are effectively 0, so you don't see them show up as columns.
The real problem is that I basically need to show data conditionally, or get two datasets in one chart.

Microsoft Chart Controls: Label multiple y values and variable y axis?

I am currently using Microsoft Chart Controls to generate a box plot chart. I have enabled the IsValueShownAsLabel property of the chart's series, but only the first y-value(lower whisker) value is being labeled. Is there a way to enable the labeling of all y-values in the chart?
Also, is there a way to get a different axis for each data point? The different data points of the chart are not related when it comes to value ranges, so many data points with small y-values are difficult to read on the chart. I have currently enabled scrolling as a workaround, but am not satisfied with the result. I would instead like to have a different y-axis for each data point, so that the y-values for each data point take up the full height of the chart, with the min and max whisker values serving as the y-axis minimum and maximum points. Is this possible?
To get different axis you will need to look into the properties under ScaleBreakStyle under AxisY
Set something like
Chart1.ChartAreas[0].AxisY.ScaleBreakStyle.Enabled = true;
Chart1.ChartAreas[0].AxisY.ScaleBreakStyle.BreakLineStyle = Charting.BreakLineStyle.Wave;
// set this to an even lower value if required
Chart1.ChartAreas[0].AxisY.ScaleBreakStyle.CollapsibleSpaceThreshold = 15;
Not sure on how to get multiple values but can you try setting those values specifically to the labels in these format #VALY1,#VALY2 depending on the number of Y values available.

Display unsorted data in SL3 line chart

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.

Categories

Resources