The x-axis in my chart is a date value. The y-axis is a positive integer. My dataset typically has lots of points over one or two days and then no data for a month or so. Then another two days of lots of activity, then another extended period of inactivity.
There's no pattern really to the data in terms of how long the periods of activity and inactivity are.
What I need to do is compress the x-axis in the areas in which there are no data points. So, the x-axis would not be constant-scale.
Is there a way to do this?
Thanks.
You could try creating your own custom axis or series..?
Related
I am using react-chartjs-2. I have a Line chart and x: time y: value. I have 2 different dataset. First dataset value is very as low as 0.00000145 and etc. The second dataset value is as high as millions. When i use this in the same chart, first dataset is at the bottom and looks like a single straight line as chart comparing 2 datasets. Time is same for both datasets. So what is the best way to see two different datasets self comparing?
I think, the best way is to make single chart, which will show correlation between two datasets - the division of first dataset's values by another's. I think, it may be representative
Consider the following table
I need to generate a bar chart with the Category Group = "Country". The chart should only display the top 3 Groups based on the count of records for a country. I have already applied a filter for the Category Group specifying the Top N Condition as 3 for Count(Country). The chart generated, applies the filter as expected based on count, but i need only 3 bars to be shown even if there are bars with duplicate values.
Below is the chart that I get.
Expected Result
Now I know that, i can create an additional column in my dataset with ranking values and then apply a filter on this column to get the expected result (i have tried this, and it works)
Is there a way to achieve the expected result without changing the underlying Dataset?
Note: The dataset shown above is a highly simplified version of my dataset. In reality i have a huge dataset with a lot of columns. The same dataset has been used for various charts (with groupings on different columns).
This was an interesting question as I've always just "solved" the tiebreaker in the dataset without much thought. However, I do see a fairly easy way to use the rnd() function to dissolve the ties as long as you don't care which of the tied countries is shown:
=(Count(Fields!Country.Value) * 1000) + (Rnd() * 100)
Which essentially just weights the count per country into the thousands and then tiebreaks with a random small value:
New York: 30XX
France: 20XX
China: 10XX
Italy: 10XX
Singapore: 10XX
If you wanted to actually solve the tiebreaker with an alphabetical preference, you could do something similar but incorporate the numeric value for the first letter of the country etc...
I just found out, I could use an x-axis minimum of 0 and an maximum of 10.5 together with an interval setting of 1.
So, I was able to achieve a top 10 limitation and the axis labels show the names - (it may be a side effect but when I changed the axis maximum to a whole number, the axis no longer shows the names but numbers).
I was not really happy with the other approaches. They seems much of an overkill to me for such a simple requirement like limiting the number of bars shown in a chart.
I'm trying to compare line graphs with completely different values and scale.
On X-axis i have values from 0-30 (Days) and on Y-axis i have stock values.
My task is to compare the data of last 30 days with a huge database which already contains different stock values.
is there any way to compare the shape to 2 graphs irrespective of what values were used in y-axis?
Thanks in advance
First Graph
Second Garph
I have a database that holds two columns. One is a 'count' field and another one is the 'timestamp' field of each count. I want to plot this data in the highcharts using a line graph. The x-axis of the graph is marked from 1-24 that corresponds to 24 hours in a day. Now the problem comes when the graph starts plotting. I want the timestamp of the count to correspond with the hour on the x-axis. So if the count starts from 14:00:00, the graph should start plotting from 14 on the x-axis leaving the first 13 points on the x-axis blank. But the graph is starting every time from 1. Thus not corresponding with the timestamp of the count in the database.
Can anyone help me out with this? I tried using data formatter and x-axis formatter, but couldn't figure out how to do it.
Thanks in advance
I have a SSRS 2008 report with a Error Bar chart. It plots dates (x-axis) versus score (y-axis), with +10/-10 for the upper/lower error range. But in the dataset, I also have two sets averages (the US and the company's).
I would like to display these averages as a constant. It should be a horizontal line that runs through the chart.
In the chart, I have as category field: the date. As datafields: the score, the US average score, and the company's average score. Thus far I can plot all these points, but it seems that the averages' points are plotted simply as points, and are treated as points that should have upper/lower error ranges.
My question is, how can I get these averages to not display as points with ranges, but as a linear constant that is connected as a straight line? It seems as though with the Error Bar chart, it only wants to plot points with ranges.
(I have screenshots of what I have and what I want, but my work is blocking any image hosting sites. I will try to upload images later if this is still unclear.)
Thank-you in advance.
(Update)
Just to be clear, the two averages aren't calculated out, they exist as a column as part of the dataset retrieved. So for each row, these values are always the same.
It turns out that each series in the SSRS chart, you can change the chart type. In my case, I had to change it to Line graph to get the constant to show as a horizontal line.
So although the chart itself is a Error bar chart, each of the series can be changed to whatever bar chart needed.
(It was my co-worker that discovered this property-- so props to him)