Giter VIP home page Giter VIP logo

pivottext's Introduction

PivotText Sisense Add-on for adding text values to pivot tables.

Setup requires modification of dashboards.6.js

Replacement should be integer values mapped to the desired text values. This key should be unique

For example, sorting your text values and then numbering with rank() to give each value a specific index Then "1": "apples", "2": "Cake", "3": "Oranges" Set the pivot table value to max of this rank value and then this can be used to add those corresponding text values in place of the keys

Could also be used for categorical data which must be calculated

NOTE: Exporting by any native Sisense means will not preserve the mapping due to the way Sisense produces exports


Setup:

  • Modification of dashboards.6.js.
    • Add dashboard and widget information to dashboardConfigs object
    • Each dashboard should be used as a key in dashboardConfigs, with value an array of widget objects
    • Each widget object should have widget_id and a dictionary object
    • Each dictionary object should have the integer value as a key with a translation object
    • The translation object maps the new text value to the "translation" key

A visual representation:

	dashboardConfigs = 
	{
		dashboard_id: 
		[
			{
				widget_id: String
				dictionary: 
				{
					oldValue: {translation: newValue}
				}
			},
			...
		],
		"48656c6c6f20576f726c6421": 
		[
			{ 
				"widget_id": "476f20537075727320476f21",
				"dictionary": 
				{
					"42": {"translation": "oranges"},
					"84": {"translation": "Bananas"}
				}
			},

			{ 
				"widget_id": "123456789abcdef",
				"dictionary": 
				{
					"1": {"translation": "apples"},
					"6": {"translation": "pears"},
					"7": {"translation": "chairs"}
				}
			}
		]
	}

Example can also be found in dashboards.6.js

pivottext's People

Contributors

kmatt10 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.