# Deploying a visualization

After creating your visualization, deploy it to a Pentaho product, such as the Pentaho Server or PDI.

The Pentaho platform is built on top of an [OSGi](https://www.osgi.org/) container ([Apache Karaf](https://karaf.apache.org/)). It allows for a modular approach at both development time and runtime, reducing complexity and facilitating deployment.

For example, to deploy the sample D3 bar chart visualization from the tutorial to Analyzer, copy the TGZ file into the `pentaho-solutions/system/karaf/deploy` folder.

## OSGi artifacts deployment

The Pentaho platform supports deployment via dropping files into the `deploy` folder. Artifacts are automatically installed and activated even after you restart of the product. Replacing an artifact in the `deploy` folder will reinstall it. Deleting it in the folder, will uninstall it.

The deployer is able to handle ZIP and TGZ files (such as the files generated by the `npm pack` command) that include web resources described by a `package.json` file. Multiple web packages can be contained in a single archive, which provision visualization’s dependencies for example.

Depending on the Pentaho product, the `Karaf deploy` folder is in either of the following locations:

* **PDI**

  `system/karaf/deploy`
* **Pentaho Server**

  `pentaho-solutions/system/karaf/deploy`

## Inspecting tutorial results

After deploying the sample tutorial project, the D3 bar chart visualization now appears in Analyzer and PDI. It is also available in a [CDE](https://community.hitachivantara.com/s/article/community-dashboard-editor) dashboard.

### In Analyzer

* The D3 bar chart visualization menu and placeholder icon appear on the canvas, as shown in the following example:

  ![Bar/D3 visualization example in Analyzer, showing the menu and placeholder icon](https://3256662623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTSPdUdWBWVGi0uurnXBG%2Fuploads%2Fgit-blob-baaffdde7f5ab6f860d9f8cd302c21905b1fe794%2Fsample-bar-d3-analyzer-placeholder-styled.png?alt=media)
* The D3 bar chart visualization fully renders, as shown in the following example:

  ![Rendered Bar/D3 visualization example in Analyzer](https://3256662623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTSPdUdWBWVGi0uurnXBG%2Fuploads%2Fgit-blob-b3fd90d6eb39617e40ea1cb0017eb91c461eaf59%2Fsample-bar-d3-analyzer.png?alt=media)

### In PDI

* The D3 bar chart visualization menu and placeholder icon appear on the canvas, as shown in the following example:

  ![Bar/D3 visualization example in PDI, showing the menu and placeholder icon](https://3256662623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTSPdUdWBWVGi0uurnXBG%2Fuploads%2Fgit-blob-039c77197968d27a67e47c0d7bbe8608684e7a1b%2Fsample-bar-d3-pdi-menu-selected-styled.png?alt=media)
* The D3 bar chart visualization fully renders, as shown in the following example:

  ![Rendered Bar/D3 visualization example in PDI](https://3256662623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTSPdUdWBWVGi0uurnXBG%2Fuploads%2Fgit-blob-513ce3fc5b52cd25dcb563e037f64dfad9e1ce55%2Fsample-bar-d3-pdi.png?alt=media)

### In CTools

The D3 bar chart is available for use in a dashboard. You can obtain the following dashboard from the `pentaho/pentaho-engineering-samples` directory:

![Bar/D3 visualization example in CTools](https://3256662623-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FTSPdUdWBWVGi0uurnXBG%2Fuploads%2Fgit-blob-7c37602e4d0e95d45a6a8fd068aada7579388656%2Fsample-bar-d3-cde.png?alt=media)
