Skip to content

Commit

Permalink
Add grid prop & GridSettings test
Browse files Browse the repository at this point in the history
  • Loading branch information
C451 committed Dec 14, 2019
1 parent 5c26f82 commit 573e802
Show file tree
Hide file tree
Showing 5 changed files with 6,607 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/Chart.vue
Expand Up @@ -139,7 +139,8 @@ export default {
this.range[0] - this.interval,
this.range[1]
),
settings: d.settings || this.settings_ov
settings: d.settings || this.settings_ov,
grid: d.grid || {}
}))
},
section_props(i) {
Expand Down
8 changes: 6 additions & 2 deletions src/components/js/layout.js
Expand Up @@ -10,14 +10,18 @@ import GridMaker from './grid_maker.js'
function Layout(params) {

let {
sub, offsub, interval, range, ctx, layers_meta, $props:$p,
y_transforms: y_ts
chart, sub, offsub, interval, range, ctx, layers_meta,
$props:$p, y_transforms: y_ts
} = params

// Splits space between main chart
// and offchart indicator grids
function grid_hs() {

if (chart.grid) {

}

const n = offsub.length
const off_h = (2 * Math.sqrt(n) / 7) / (n || 1)
const height = $p.height - $p.config.BOTBAR
Expand Down
4 changes: 3 additions & 1 deletion test/Test.vue
Expand Up @@ -29,10 +29,12 @@ import LegendButtons from './tests/LegendButtons.vue'
import ChartTypes from './tests/ChartTypes.vue'
import DataHelper from './tests/DataHelper.vue'
import Toolbar from './tests/Toolbar.vue'
import GridSettings from './tests/GridSettings.vue'
const TESTS = {
Simple, Stocks, MouseEvents, Timeframes, Multichart,
LegendButtons, ChartTypes, DataHelper, Toolbar
LegendButtons, ChartTypes, DataHelper, Toolbar,
GridSettings
}
export default {
Expand Down

0 comments on commit 573e802

Please sign in to comment.