Sparklines for Java

Sparklines are 'intense, simple, wordlike graphics.'
Download

Sparklines for Java Ranking & Summary

Advertisement

  • Rating:
  • License:
  • The Apache License 2.0
  • Price:
  • FREE
  • Publisher Name:
  • logrodnek
  • Publisher web site:
  • http://www.representqueens.com/spark/

Sparklines for Java Tags


Sparklines for Java Description

Sparklines are 'intense, simple, wordlike graphics.' Sparklines are 'intense, simple, wordlike graphics.'There's a PHP library for producing sparklines, and even a sparkline web service, but I wanted something I could use to generate sparklines in both Java and JSTL (and I thought it would be a fun project). (It's also worth checking out Why's minimalist python sparklines, which encode the image data directly in the HTML as a data: URI )JSTL examples < %@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" % > < %@ taglib prefix="spark" uri="http://www.representqueens.com/taglibs/spark" % > < c:set var="test" value="5, 35, 22, 19, 16, 10, 4, 33, 9, 12, 27, 36, 22" / > < img src="< spark:bar name="test" color="red" / >" / > will produce: (I think the default size might be a little large). The "name" attribute specifies the key to find the data (Uses JspContext.findAttribute). It expects the value to be either a List, a Number[], or a String of comma separated int values. It's the only manditory attribute. The other attributes are width, height, spacing, color, highColor, lastColor, output. You can replace "bar" with "line" to get a linegraph (note: highColor and lastColor are currently not supported for line graphs). The color attributes can either be a color name (a field name from java.awt.Color), or a HTML hex color (e.g. #ff0000 for red).What's New in This Release:· This release properly URL encodes parameters for server generated sparklines.· This fixes an issue when using hex specified image colors.· The tag parameter "background" has been added as a workaround for IE6 PNG transparency.


Sparklines for Java Related Software