Skip to content

Commit

Permalink
add _keepDataInSync
Browse files Browse the repository at this point in the history
  • Loading branch information
Benoit Chevalier committed Jun 12, 2017
1 parent b5dcac6 commit b1c2d7a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
30 changes: 15 additions & 15 deletions dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ <h2>Example of a timeseries with many options and using old data format with the
<br/>
<span>Append image at the bottom of the page</span>
<button id="btnSnap">Go</button>
<px-vis-timeseries
<!--<px-vis-timeseries
id="timeSerie"
height="500"
chart-extents='{
Expand Down Expand Up @@ -174,7 +174,7 @@ <h2>Example of a timeseries with many options and using old data format with the
chart-data="[[chartData]]"
event-data="[[eventData]]"
range="[[range]]">
</px-vis-timeseries>
</px-vis-timeseries>-->

<!-- chart-extents='{
"x": ["dynamic","dynamic"],
Expand Down Expand Up @@ -226,7 +226,7 @@ <h2>Example of a timeseries with many options and using old data format with the

<br />
<br />
<h2>Example of a timeseries with mostly default data and using the new data format</h2>
<!--<h2>Example of a timeseries with mostly default data and using the new data format</h2>
<px-vis-timeseries
width = "1000"
height = "500"
Expand All @@ -242,7 +242,7 @@ <h2>Example of a timeseries with mostly default data and using the new data form
y-axis-config='{
"title": "Widgets"
}'>
</px-vis-timeseries>
</px-vis-timeseries>-->
<iron-ajax
url="../px-demo-data/demo-data/aviation/delta-egt-cruiseXY.json"
handle-as="json"
Expand Down Expand Up @@ -280,7 +280,7 @@ <h2>Example of a timeseries rendering to canvas</h2>

<br />
<br />
<h2>Example of a timeseries rendering ~645,000 datapoints to canvas</h2>
<!--<h2>Example of a timeseries rendering ~645,000 datapoints to canvas</h2>
<px-vis-timeseries
width="1000"
height="500"
Expand Down Expand Up @@ -340,7 +340,7 @@ <h2>Example of a timeseries with a custom series configuration</h2>
y-axis-config='{
"title": "Hz"
}'>
</px-vis-timeseries>
</px-vis-timeseries>-->
<iron-ajax
url="../px-demo-data/demo-data/aviation/delta-egt-cruiseXY.json"
handle-as="json"
Expand All @@ -350,7 +350,7 @@ <h2>Example of a timeseries with a custom series configuration</h2>

<br />
<br />
<h2>Example of a timeseries with a additional d3 rectangle drawn on top</h2>
<!--<h2>Example of a timeseries with a additional d3 rectangle drawn on top</h2>
<div style="width: 800px; height:800px; background-color: salmon">
<px-vis-timeseries
id="chartCustom"
Expand All @@ -369,7 +369,7 @@ <h2>Example of a timeseries with a additional d3 rectangle drawn on top</h2>
"title": "Temperature"
}'
></px-vis-timeseries>
</div>
</div>-->
</template>
<script>
window.addEventListener('WebComponentsReady', function() {
Expand Down Expand Up @@ -462,13 +462,13 @@ <h2>Example of a timeseries with a additional d3 rectangle drawn on top</h2>
"to":"2015-04-01T20:42:00.000Z"
});

chart.svg.append('rect')
.attr("y", 200)
.attr("x", 0)
.attr("height", 100)
.attr("width", 1000)
.attr('opacity',0.25)
.attr('fill', 'rgb(70,173,0)');
// chart.svg.append('rect')
// .attr("y", 200)
// .attr("x", 0)
// .attr("height", 100)
// .attr("width", 1000)
// .attr('opacity',0.25)
// .attr('fill', 'rgb(70,173,0)');



Expand Down
5 changes: 3 additions & 2 deletions px-vis-timeseries.html
Original file line number Diff line number Diff line change
Expand Up @@ -735,11 +735,12 @@
'_calcMargins(margin.*, marginNav.*, numRightAxes, numLeftAxes)',
'_setXScale(width, _internalMargin, xAxisType)',
'_setMultiYScale(height, _internalMargin, axes.*)',
'_setDomainCaller(_wwDataSyncCounter, x, y, dataExtents, seriesToAxes.*)',
'_setDomainCaller(wwDataSyncCounter, x, y, dataExtents, seriesToAxes.*)',
'_setDomainCaller(x, y, chartExtents, dataExtents)',
'_updateDomain(selectedDomain)',
'_navSelectedDomainChanged(_navSelectedDomain)',
'_langChanged(language)'
'_langChanged(language)',
'_keepDataInSync(chartData.*, chartId)'
],

listeners: {
Expand Down

0 comments on commit b1c2d7a

Please sign in to comment.