Histogram

com.worxbend.ferrite.web.view.Histogram
final case class Histogram(bars: Vector[Bar], widthLabel: String, fromLabel: String, untilLabel: String, peakLabel: String, empty: Boolean)

The timeline strip above the results.

Value parameters

empty

true when every bucket is zero. Rendered as an explicit "no events in this window" strip rather than 90 invisible bars, which read as a broken chart.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def series: Json
def seriesJson: String

series rendered for embedding in a `` element.

series rendered for embedding in a `` element.

**and `&` are escaped as `\u003c`, `\u003e` and `\u0026`, and that is a security fix, not tidiness.** The island carries the per-bucket drill-down URLs, and those are built from the *user's own filter values* — so a filter containing the literal text would terminate the element early and everything after it would be parsed as markup. That is stored XSS through a chart.

circe does not escape those characters, because they need no escaping in JSON; an HTML parser disagrees. The three \uXXXX forms are valid JSON that decodes to exactly the same string, so JSON.parse on the other side is unaffected and the element can no longer be closed from inside it. TemplateSuite asserts a hostile value survives the round trip without emitting a <.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product