Skip to content

Commit

Permalink
Rename surfaceArea to surfacePlot.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesleesaunders committed Nov 18, 2018
1 parent 5bf51f5 commit d872f6e
Show file tree
Hide file tree
Showing 21 changed files with 58 additions and 58 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Inspired by Mike Bostock's [reusable charts](http://bost.ocks.org/mike/chart/),
* [Vertical Bar Chart](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/BarChartVertical.html)
* [Bubble Chart](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/BubbleChart.html)
* [Scatter Plot](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/ScatterPlot.html)
* [Surface Area](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/SurfaceArea.html)
* [Surface Plot](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/SurfacePlot.html)
* [Components Showcase](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)
* [Observable Examples](https://www.npmjs.com/package/d3-x3dom)

Expand Down Expand Up @@ -128,7 +128,7 @@ Component modules do not generate a `x3d` tag, these should be attached to an ex
| component.barsMultiSeries() | Multi series Bar Chart | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)
| component.bubbles() | Bubble / Scatter Plot | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)
| component.bubblesMultiSeries() | Multi series Bubbles / Scatter Plot | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)
| component.surfaceArea() | Surface Area | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)
| component.surface() | Surface Area | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)
| component.viewpoint() | User's location and viewing model parameters | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/Components.html)

#### Charts
Expand All @@ -143,7 +143,7 @@ Chart modules also generate the `x3d` tag, these should be attached to a `div` t
| chart.barChartVertical() | Simple single series Bar Chart & Axis | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/BarChartVertical.html)
| chart.bubbleChart() | Multi series Bubble Chart & Axis | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/BubbleChart.html)
| chart.scatterPlot() | Scatter Plot & Axis | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/ScatterPlot.html)
| chart.surfaceArea() | Surface Area Chart & Axis | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/SurfaceArea.html)
| chart.surfacePlot() | Surface Plot & Axis | [View](https://raw.githack.com/jamesleesaunders/d3-x3dom/master/examples/SurfacePlot.html)

### Data Structures

Expand Down
46 changes: 23 additions & 23 deletions build/d3-x3dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
(global.d3 = global.d3 || {}, global.d3.x3dom = factory(global.d3));
}(this, (function (d3) { 'use strict';

var version = "1.0.16";
var version = "1.0.17";
var license = "GPL-2.0";

var _extends = Object.assign || function (target) {
Expand Down Expand Up @@ -344,7 +344,7 @@ function dataTransform(data) {
}

/**
* Reusable 3D Axis
* Reusable 3D Axis Component
*
* @module
*/
Expand Down Expand Up @@ -591,7 +591,7 @@ function componentAxis () {
}

/**
* Reusable 3D Multi Plane Axis
* Reusable 3D Multi Plane Axis Component
*
* @module
*/
Expand Down Expand Up @@ -716,7 +716,7 @@ function componentAxisThreePlane () {
}

/**
* Reusable 3D Bar Chart
* Reusable 3D Bar Chart Component
*
* @module
*/
Expand Down Expand Up @@ -870,7 +870,7 @@ function componentBars () {
}

/**
* Reusable 3D Multi Series Bar Chart
* Reusable 3D Multi Series Bar Chart Component
*
* @module
*/
Expand Down Expand Up @@ -1028,7 +1028,7 @@ function componentBarsMultiSeries () {
}

/**
* Reusable 3D Bubble Chart
* Reusable 3D Bubble Chart Component
*
* @module
*/
Expand Down Expand Up @@ -1209,7 +1209,7 @@ function componentBubbles () {
}

/**
* Reusable 3D Multi Series Bubble Chart
* Reusable 3D Multi Series Bubble Chart Component
*
* @module
*/
Expand Down Expand Up @@ -1394,16 +1394,16 @@ function componentBubblesMultiSeries () {
}

/**
* Reusable 3D Surface Area
* Reusable 3D Surface Area Component
*
* @module
*/
function componentSurfaceArea () {
function componentSurface () {

/* Default Properties */
var dimensions = { x: 40, y: 40, z: 40 };
var colors = ["blue", "red"];
var classed = "x3dSurfaceArea";
var classed = "x3dSurface";

/* Scales */
var xScale = void 0;
Expand Down Expand Up @@ -1461,7 +1461,7 @@ function componentSurfaceArea () {
* Constructor
*
* @constructor
* @alias surfaceArea
* @alias surface
* @param {d3.selection} selection - The chart holder D3 selection.
*/
function my(selection) {
Expand Down Expand Up @@ -1594,7 +1594,7 @@ function componentSurfaceArea () {
}

/**
* Reusable X3DOM Viewpoint
* Reusable X3DOM Viewpoint Component
*
* @module
*/
Expand Down Expand Up @@ -1709,7 +1709,7 @@ function componentViewpoint () {
}

/**
* Reusable 3D Ribbon Chart
* Reusable 3D Ribbon Chart Component
*
* @module
*/
Expand Down Expand Up @@ -1839,7 +1839,7 @@ var component = {
barsMultiSeries: componentBarsMultiSeries,
bubbles: componentBubbles,
bubblesMultiSeries: componentBubblesMultiSeries,
surfaceArea: componentSurfaceArea,
surface: componentSurface,
viewpoint: componentViewpoint,
ribbon: componentRibbon
};
Expand Down Expand Up @@ -2495,7 +2495,7 @@ function chartBubbleChart () {
}

/**
* Reusable 3D Scatter Plot
* Reusable 3D Scatter Plot Chart
*
* @module
*
Expand Down Expand Up @@ -2684,25 +2684,25 @@ function chartScatterPlot () {
}

/**
* Reusable 3D Surface Area
* Reusable 3D Surface Plot Chart
*
* @module
*
* @see https://datavizproject.com/data-type/three-dimensional-stream-graph/
* @example
* var chartHolder = d3.select("#chartholder");
* var myData = [...];
* var myChart = d3.x3dom.chart.surfaceArea();
* var myChart = d3.x3dom.chart.surfacePlot();
* chartHolder.datum(myData).call(myChart);
*/
function chartSurfaceArea () {
function chartSurfacePlot () {

/* Default Properties */
var width = 500;
var height = 500;
var dimensions = { x: 40, y: 40, z: 40 };
var colors = ["blue", "red"];
var classed = "x3dSurfaceArea";
var classed = "x3dSurfacePlot";
var debug = false;

/* Scales */
Expand Down Expand Up @@ -2746,7 +2746,7 @@ function chartSurfaceArea () {
* Constructor
*
* @constructor
* @alias surfaceArea
* @alias surfacePlot
* @param {d3.selection} selection - The chart holder D3 selection.
*/
function my(selection) {
Expand All @@ -2773,8 +2773,8 @@ function chartSurfaceArea () {
// Construct Axis Component
var axis = component.axisThreePlane().xScale(xScale).yScale(yScale).zScale(zScale);

// Construct Surface Area Component
var chart = component.surfaceArea().xScale(xScale).yScale(yScale).zScale(zScale).colors(colors);
// Construct Surface Component
var chart = component.surface().xScale(xScale).yScale(yScale).zScale(zScale).colors(colors);

scene.select(".axis").call(axis);

Expand Down Expand Up @@ -2898,7 +2898,7 @@ var chart = {
barChartVertical: chartBarChartVertical,
bubbleChart: chartBubbleChart,
scatterPlot: chartScatterPlot,
surfaceArea: chartSurfaceArea
surfacePlot: chartSurfacePlot
};

/**
Expand Down
2 changes: 1 addition & 1 deletion build/d3-x3dom.min.js

Large diffs are not rendered by default.

Binary file modified build/d3-x3dom.zip
Binary file not shown.
8 changes: 4 additions & 4 deletions examples/Components.html
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@
.call(bubblesMultiSeriesComponent);

// ========== Surface Component ==========
var surfaceAreaData = randomDataset5();
var surfaceAreaComponent = d3.x3dom.component.surfaceArea();
var surfaceData = randomDataset5();
var surfaceComponent = d3.x3dom.component.surface();

// Create scene
var scene3 = d3.select("#chartholder3")
Expand All @@ -79,8 +79,8 @@
scene3.call(viewpoint)
.append("group")
.attr("class", "chart")
.datum(surfaceAreaData)
.call(surfaceAreaComponent);
.datum(surfaceData)
.call(surfaceComponent);

// ========== Bars Multi Component ==========
var barsMultiSeriesData = randomDataset2();
Expand Down
4 changes: 2 additions & 2 deletions examples/SurfaceArea.html → examples/SurfacePlot.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>

<head>
<title>d3-x3dom : 3D Surface Area Example</title>
<title>d3-x3dom : 3D Surface Plot Example</title>
<script src="https://d3js.org/d3.v5.min.js"></script>
<script src="https://x3dom.org/download/dev/x3dom-full.js"></script>
<link rel="stylesheet" href="https://x3dom.org/download/dev/x3dom.css" />
Expand All @@ -21,7 +21,7 @@
var myData = randomDataset5();

// Declare the chart component
var myChart = d3.x3dom.chart.surfaceArea();
var myChart = d3.x3dom.chart.surfacePlot();

// Attach chart and data to the chartholder
chartHolder.datum(myData).call(myChart);
Expand Down
4 changes: 2 additions & 2 deletions examples/randomData.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ function randomDataset3() {
}

/**
* Random Dataset - Surface Area 2
* Random Dataset - Surface Plot 2
*
* @returns {*}
*/
Expand Down Expand Up @@ -147,7 +147,7 @@ function randomDataset4() {
}

/**
* Random Dataset - Surface Area
* Random Dataset - Surface Plot
*
* @returns {*}
*/
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-x3dom",
"version": "1.0.16",
"version": "1.0.17",
"description": "D3 X3DOM Data Visualisation Library",
"license": "GPL-2.0",
"keywords": [
Expand Down
4 changes: 2 additions & 2 deletions src/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ import chartBarChartMultiSeries from "./chart/barChartMultiSeries";
import chartBarChartVertical from "./chart/barChartVertical";
import chartBubbleChart from "./chart/bubbleChart";
import chartScatterPlot from "./chart/scatterPlot";
import chartSurfaceArea from "./chart/surfaceArea";
import chartSurfacePlot from "./chart/surfacePlot";

export default {
barChartMultiSeries: chartBarChartMultiSeries,
barChartVertical: chartBarChartVertical,
bubbleChart: chartBubbleChart,
scatterPlot: chartScatterPlot,
surfaceArea: chartSurfaceArea
surfacePlot: chartSurfacePlot
};
2 changes: 1 addition & 1 deletion src/chart/scatterPlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import dataTransform from "../dataTransform";
import component from "../component";

/**
* Reusable 3D Scatter Plot
* Reusable 3D Scatter Plot Chart
*
* @module
*
Expand Down
12 changes: 6 additions & 6 deletions src/chart/surfaceArea.js → src/chart/surfacePlot.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import dataTransform from "../dataTransform";
import component from "../component";

/**
* Reusable 3D Surface Area
* Reusable 3D Surface Plot Chart
*
* @module
*
* @see https://datavizproject.com/data-type/three-dimensional-stream-graph/
* @example
* var chartHolder = d3.select("#chartholder");
* var myData = [...];
* var myChart = d3.x3dom.chart.surfaceArea();
* var myChart = d3.x3dom.chart.surfacePlot();
* chartHolder.datum(myData).call(myChart);
*/
export default function() {
Expand All @@ -21,7 +21,7 @@ export default function() {
let height = 500;
let dimensions = { x: 40, y: 40, z: 40 };
let colors = ["blue", "red"];
let classed = "x3dSurfaceArea";
let classed = "x3dSurfacePlot";
let debug = false;

/* Scales */
Expand Down Expand Up @@ -61,7 +61,7 @@ export default function() {
* Constructor
*
* @constructor
* @alias surfaceArea
* @alias surfacePlot
* @param {d3.selection} selection - The chart holder D3 selection.
*/
function my(selection) {
Expand Down Expand Up @@ -97,8 +97,8 @@ export default function() {
.yScale(yScale)
.zScale(zScale);

// Construct Surface Area Component
const chart = component.surfaceArea()
// Construct Surface Component
const chart = component.surface()
.xScale(xScale)
.yScale(yScale)
.zScale(zScale)
Expand Down
4 changes: 2 additions & 2 deletions src/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import componentBars from "./component/bars";
import componentBarsMultiSeries from "./component/barsMultiSeries";
import componentBubbles from "./component/bubbles";
import componentBubblesMultiSeries from "./component/bubblesMultiSeries";
import componentSurfaceArea from "./component/surfaceArea";
import componentSurface from "./component/surface";
import componentViewpoint from "./component/viewpoint";
import componentRibbon from "./component/ribbon";

Expand All @@ -15,7 +15,7 @@ export default {
barsMultiSeries: componentBarsMultiSeries,
bubbles: componentBubbles,
bubblesMultiSeries: componentBubblesMultiSeries,
surfaceArea: componentSurfaceArea,
surface: componentSurface,
viewpoint: componentViewpoint,
ribbon: componentRibbon
};
2 changes: 1 addition & 1 deletion src/component/axis.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as d3 from "d3";

/**
* Reusable 3D Axis
* Reusable 3D Axis Component
*
* @module
*/
Expand Down
2 changes: 1 addition & 1 deletion src/component/axisThreePlane.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as d3 from "d3";
import componentAxis from "./axis";

/**
* Reusable 3D Multi Plane Axis
* Reusable 3D Multi Plane Axis Component
*
* @module
*/
Expand Down
2 changes: 1 addition & 1 deletion src/component/bars.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as d3 from "d3";
import dataTransform from "../dataTransform";

/**
* Reusable 3D Bar Chart
* Reusable 3D Bar Chart Component
*
* @module
*/
Expand Down
Loading

0 comments on commit d872f6e

Please sign in to comment.