Custom CSS example

Custom CSS

by yahmed

HTML

<link rel="stylesheet" href="https://s3.amazonaws.com/flexmonster/2.3/demo.css">
<script src="https://cdn.flexmonster.com/flexmonster.js"></script>

<div id="pivot-container"></div>

CSS

/* GRID */

#fm-grid-view span,
#fm-grid-view div,
#fm-grid-view td {
	font-family: Verdana !important;
}

.fm-sheet-header {
	background-color: #8cf7be !important;
}

.fm-header,
.fm-row {
	background-color: #f5fdf3 !important;
}

#fm-pivot-view .fm-grid-layout .fm-filters .fm-header,
#fm-cols-filter > div {
  background-color: #daf2e5 !important;
}

.fm-total {
	color: #263C53 !important;
	text-decoration: underline;
}

.fm-sheet-selection-canvas {
	background-color: white !important;
  opacity: 0 !important;
}

.fm-sheet-selection-canvas .fm-border {
		border: 1px solid #4897F1 !important;
}

JavaScript

var pivot = new Flexmonster({
  container: "#pivot-container",
  componentFolder: "https://cdn.flexmonster.com/",
  width: "100%",
  height: 430,
  toolbar: true,
  report: {
    dataSource: {
      filename: "data/data.csv"
    },
    slice: {
      columns: [{
        uniqueName: "Color"
      }],
      rows: [{
        uniqueName: "Country"
      }, {
        uniqueName: "[Measures]"
      }],
      measures: [{
        uniqueName: "Price",
        format: "currency"
      }, {
        uniqueName: "Discount",
        format: "currency"
      }],
    },
    formats: [{
      name: "currency",
      currencySymbol: "$",
      currencySymbolAlign: "left",
      thousandsSeparator: ",",
      decimalPlaces: 2
    }]
    ,
    options: {
      showGrandTotals: "off"
    }
  }
});