Silverlight Area Series chart: how to define interval for X-Axis - silverlight

I have a silverlight chart with an Area Series.
my data source returns many points representing time of day to be displayed in the chart's X-axis.
since the X-axis has many values, the values appear scrambled as each value is stuck beside the next value.
is there a method to avoid displaying all the values in the X-axis and display intervals instead ?
thanks

The DateTimeAxis has Interval and IntervalType properties that allow you to set the interval the you prefer.

Related

google-data-studio grouping most values of dimensions into others category

I am using Data-Studio to generate charts. I am generating charts for compute instances based on their CPU usage,in time-series. When I generate a chart(a line chart) a few instances are represented as lines in the chart, which have specific CPU usage values, but the majority of instances get accumulated into a category called "others" and therefore I am unable to show the metrics for others and the chart is not very useful.
Is there any way this category others can be avoided in data studio? so that all the instances are represented by a line or a bar?
I am new to Data-Studio. Kindly help. Thanks
There are a couple of ways to display the chart Without the Others series:
1) Time Series Chart
If you are using Date in the X-Axis (Dimension) then I'd suggest a Time Series chart as it's designed for Dates, and automatically sorts by Date as well as allowing for Date Range comparison (it also don't display the Others series, and series can be displayed as a line or bar).
2) Line Chart
Regarding the initial question (Line Chart) - Tested this out in a number of different Reports and Data Sources to confirm, and it seems to do the trick:
Create a Time Series chart;
Change the Chart Type to a Line chart;
Sort by Date in Ascending order.
Google Data Studio Report and a GIF to elaborate:

Can I only display 10 labels in X Axis of XtraChart line control of DevExpress?

I am using DevExpress XtraChart control, my chart is a line chart. If I set ((XYDiagram)lineChart.Diagram).AxisX.DateTimeMeasureUnit = DateTimeMeasurementUnit.Minute; and ((XYDiagram)lineChart.Diagram).AxisX.DateTimeGridAlignment = DateTimeMeasurementUnit.Minute. And if I have millions of data points in one series, I see the labels on X Axis are too many.
I don't want so many labels to display, I think I can set ((XYDiagram)lineChart.Diagram).AxisX.DateTimeGridAlignment to either hours,or day, or month or year.
But the problem is I don't know how many data points is there on the series. The number is dynamic.
Is there a way no matter how many data points are there on the series, I always only display e.g. 10 labels of X Axis? Or is there any way I can manipulate AxisX.DateTimeGridAlignment and AxisX.DateTimeMeasureUnit, so I only display 10 labels?
Thank you!

JFreeChart BarChart setUpperMargin to next interval?

I am using JFreeChart to create a BarChart. My question: is there a way to set the uppermargin of the graph to stop at the next interval? As an example, say a Bar Graph is made with range intervals of 5. Say the tallest bar ends at 30. Is there a way automatically set margins to make the graph go vertically until 35-the next interval? I know there is a setUpperMargin method but that requires inputting double values until one achieves the upper range he wants. Instead, is there a way to just set the margin to go for another interval after the end of the bar graphs? Thank you.
Query your chosen CategoryDataset for the maximal range value and use setUpperBound() on the range axis. BarChartDemo1, included in the distribution, shows how to reference an axis.

ExtJS 4 Chart - Change axes, series, and store

I have a chart that will show energy generation over a day, month, or year, depending on the user's selection. To do this on a single chart, I need to be able to change the axes, series, and store when a button is clicked. I have managed to get this working, except I have the issue of the old data, series, and axes are still showing, and the new ones are just being laid on top. Is there a way to clear or refresh/redraw a chart? Or should I just split this into 3 charts, and hide/show the charts on button click?
Here is my current code for setting axes, series and store on the fly.
chart.axes.clear();
chart.axes.addAll(dailyAxes);
chart.series.clear();
chart.series.addAll(dailySeries);
chart.bindStore(Ext.data.StoreManager.lookup('dailyEnergy'));
A little late, but what's missing is this:
chart.surface.removeAll()
This isn't ideal, as you may get a flash of empty space as it destroys the previous elements, but it does avoid the hangover of old data.
i dont know what type of chart or what is dailyAxes
but i assume u want to change axes properties..hee is an example on how to do it:
Ext.getCmp('chartid').axes.get("gauge").maximum = 100;
then u need to redraw the chart after ur done:
Ext.getCmp('chartid').redraw();

Silverlight toolkit chart too many labels on axis

I'm using the newest chart control from silverlight toolkit to plot some data. For small cases it works ok, but for bigger samples the X axis labels overlap. It would be no problem if the chart would simply omit some of the values or I could specify to just show every 10th of them ...
I couldn't find any properties providing this behavior. Any ideas?
Assuming this is a Linear axis then you can specify the interval to use via the the Interval property on the axis.
If the axis in question is Category Axis then dropping some labels may not be valuable to the user. One option is to use the LayoutTransfomer to rotate the labels to an angle reducing the width needed for each one. See this Delay Blog on the subject.

Resources