I'm fairly new to designing reports with iReport and I've run into a challenge that I haven't been able to resolve. I'm trying to graph timestamped data but have it shown as an area graph. I was successfully able to graph the data using the time series chart, however that format graphs the data as a line. I need an Area graph. Therefore I'm attempting to graph that same data using dates as categories. My problem is that the Area Graph draws every tick mark which results in a clutter look. I've searched on how to limit ticks but the solutions don't seem to address my problem (or the solution is above my knowledge of java :) ).
So, my question is either: How can I set a minimum tick on an Area graph? Or, how can I make a time series chart graph an area instead of a line?
Many Thanks!
If you havent already take a look at the JFreeChart demo here and review XYAreaChartDemo2.java, this example shows a TimeAxis and and AreaRenderer :
If you use the ChartFactory try using
JFreeChart chart = ChartFactory.createXYAreaChart(
"XY Area Chart Demo 2",
"Time", "Value",
dataset,
PlotOrientation.VERTICAL,
true, // legend
true, // tool tips
false // URLs
);
Related
I am working with a dataset with which I am creating a dashboard. My dataset is very simple, a first column of [yyyy-mm-dd-hh-mm], and a second column with many values.
I read in many threads and forum about the difficulty to plot dates on x-axis (including hours and minuts).
As reference I am using this dashboard built in PowerBi https://www.terna.it/it/sistema-elettrico/transparency-report/total-load .(Public data of Italian electric energy generation)
This is exactly the outcome I would like to obtain, but by now I cannot display the hours and minuts. I used their data to reproduce the dashboard.
I tried to switch from a "dates" x-axis to a "text" x-axis, but the result is not the same, and furthermore the plot does not occupy the whole page but I have to move to the right.
enter image description here
I really cannot understand how the linked dashboard was built.
Any idea?
I guess your problem is that you have been using Date Hierarchy on the x-Axis you instead of Date only.
I have been trying to recreate a modified Sankey based on Adam's work with the American Whiskey Viz and Beatles Analysis Viz that are found here:
https://public.tableau.com/s/gallery/beatles-analysis
https://public.tableau.com/s/gallery/american-whiskey-wheel
I am trying to create the same effect on my own data set. I am not sure how Adam was able to line up the sankey portion with the bar chart perfectly. I have tried many different ID2 field configurations and varying metric fields in the Curve calculated field options with no success. I haven't been able to get them to line up exactly. I would also like my bases to start in different locations along the sankey and not all originating from the left.
I realize that the examples are working with much smaller data sets but believe that this should still be possible with my data. I have tried Business ID in my curve formula and wondering if I need to have a more generic metric in my model. Andy uses Song ID which is a number between 1 and 45. My IDs range from 3-3000. You can see in the workbook attached how I am setting up these fields to get the curve of the Sankey. Is it possible to get them to line up with the barchart at the top of Dashboard 2?
UPDATE 3/22/16:
I was able to get the lines much closer to their bars by modifying the Curve-LoyaltyID2 field. I loaded it to Public for easier viewing. Some lines are still not aligning directly to their corresponding bars though.
Tableau Public
Thanks for any ideas you have!
I am trying to plot a graph like in attached image ,using tableua by getting data from a text file .
It is having 3 fields Datetime ,track ,inuse
We have 43 different track sizes.Need to plot graph for each track with all in a single graph.
Please help me out.
This should be easy to do in tableau. Try putting time on columns, "inuse" on rows and "track" on color.
I do not have your data but am using the data that tableau desktop ships with. Here is what it looks like with the superstore demo data:
To display the labels, also place track on the label shelf. If you then click on the label shelf, you can choose options about where to display them. To mimic your example, label the line ends.
Google offers a charting / graphing API and has a graph that I would like to use to present change over time, and the graph / chart is called the "Annotated Timeline", and an example of it is here:
Picture.png http://img198.imageshack.us/img198/1160/pictureea.png
The coolest feature is that you don't have to plot out all the same "x coordinate" points with each y value, so the data points don't have to all line up vertically. This is good because I don't have values for all points at every time interval:
Picture 1.png http://img843.imageshack.us/img843/5814/picture1ye.png
This would be the end of my needs except that I can't print this out without taking a screenshot of it because this particular Google Visualization is flash based.
What tool can I use to plot data with different x values for the y data points that is HTML5 compatible / not flash?
ps: Google also offers the line chart api but I don't believe it offers x axis points which are not parallel.
You can do this with amCharts. Here is an example of date-based chart which looks quite similar to google charts: http://amcharts.com/stock/events/
Another one with multiple lines: http://amcharts.com/javascript/line-chart-with-multiple-value-axes/
This example has data points at the same dates, however the chart can display data like you need too. The data provider should include all the dates you have, but it's not necessary that the data item should have values for all the graphs. Here is sample data:
{date: new Date(2010,1,2), graph1:54, graph2:2},
{date: new Date(2010,1,3), graph1:53},
{date: new Date(2010,1,4), graph1:55},
{date: new Date(2010,1,5), graph2:2}
I hope this helps.
Antanas (author of amCharts)
Highcharts also has an irregular time data example which can do this:
charts.png http://img269.imageshack.us/img269/8963/chartsf.png
I want to show a line chart, each point in the line chart will refer to a user. So whomever looks at the chart understands who the user is, I'd like each point to have a picture of the user and the user's name. Does anyone know any API that will let me do that?
I was looking at googles line chart (http://code.google.com/apis/chart/interactive/docs/gallery/linechart.html) but I cannot see anyway for me to have each data point represented as an image.
Using Java and JavaFX, you can build a StackPane where you can put two charts (one above other), where the back is a LineChart and the front is a ScatterChart. In this case, these charts will share the same X axis and Y axis, and on ScatterChart you can personalize the points with a picture.
Look:
How to personalize a chart style using Javafx and
How to produce an application with more than one chart in a StackPane
I hope this helps you.
It seems counter intuitive to have different points on the same line of a line graph represent different users.
(Line graphs) show in a linear form one or more variables that fluctuate over a period of time.
I believe if there is more than one variable that would mean there would be more than one line, so it is hard to make suggestions without more information about your specific application. With the currently available data I would recommend amcharts's Column chart with images on top: