Skip to content

Commit

Permalink
v1.12.08
Browse files Browse the repository at this point in the history
  • Loading branch information
toshirot committed Aug 26, 2016
1 parent 197c290 commit df26cec
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 26 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ccchart",
"version": "1.12.07",
"version": "1.12.08",
"main": "ccchart.js",
"description": "This is a Realtime and Simple JavaScript chart library that does not depend on libraries such as jQuery or google APIs.",
"moduleType": ["globals"],
Expand Down
2 changes: 1 addition & 1 deletion ccchart-min.js

Large diffs are not rendered by default.

38 changes: 16 additions & 22 deletions ccchart.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ window.ccchart =
return {
aboutThis: {
name: 'ccchart',
version: '1.12.07',
update: 20160820,
version: '1.12.08',
update: 20160826,
updateMemo: 'http://ccchart.com/update.json',
license: 'MIT',
memo: 'This is a Simple and Realtime JavaScript chart that does not depend on libraries such as jQuery or google APIs.',
Expand Down Expand Up @@ -184,17 +184,24 @@ window.ccchart =
this.useMarker = 'css-maru';
}
}
//pieにマーカーは使わない
if(this.type === 'pie')this.useMarker = 'none';
//ツールチップカスタマイズ
if(this.useToolTip === 'yes')
this.tmpToolTip = op.config.tmpToolTip || this.gcf.tmpToolTip;

//pieにマーカーは使わない
if(this.type === 'pie')this.useMarker = 'none';
//for drawLine, drawAmplitude
//線幅 デフォルトで2
this.lineWidth =
this.util.setConfigNum(this, 'lineWidth', this.op.config.lineWidth, this.gcf.lineWidth, 2);
//線幅セット
this.lineWidthSet = this.util.setLineWidthSet(this, op);

//マーカーの幅または直径
this.markerWidth = this.util.setConfigNum(this, 'markerWidth', this.op.config.markerWidth, this.gcf.markerWidth)
console.log(1,this.markerWidth)
this.markerWidth = this.util.setConfigNum(this, 'markerWidth', this.markerWidth, this.lineWidth * 2 , 2)

console.log(3,this.markerWidth)
if(this.useCss === 'yes'){
this.bind('scroll', '_adjustcsspos');
this.bind('load', '_adjustcsspos');
Expand Down Expand Up @@ -724,13 +731,6 @@ window.ccchart =
this.hanreiMarkerStyle =
op.config.hanreiMarkerStyle || this.gcf.hanreiMarkerStyle || 'arc';

//for drawLine, drawAmplitude
//線幅 デフォルトで2
this.lineWidth =
this.util.setConfigNum(this, 'lineWidth', this.op.config.lineWidth, this.gcf.lineWidth, 2);
//線幅セット
this.lineWidthSet = this.util.setLineWidthSet(this, op);

//円グラフのドーナツ穴の半径
this.pieHoleRadius =
this.util.setConfigNum(this, 'pieHoleRadius', this.op.config.pieHoleRadius, this.gcf.pieHoleRadius, 40);
Expand Down Expand Up @@ -4871,8 +4871,7 @@ window.ccchart.m.CssHybrid =
var borderColor = op.borderColor || op.colorSet[colorIndex] || op.colorSet[colorIndex];
var bgcolor = op.bgColor || op.colorSet[colorIndex] || op.colorSet[colorIndex];
var tipBgcolor = bgcolor;
if( (this.type === 'bar' || this.type === 'stacked' )
&& this.useToolTip==='yes'){
if( (this.type === 'bar' || this.type === 'stacked' ) && this.useToolTip==='yes'){
bgcolor = (this.barTipAnchorColor === 'colorSet')?bgcolor:this.barTipAnchorColor;
}
var etc = (op.etcStyle?op.etcStyle:'');
Expand Down Expand Up @@ -4932,7 +4931,6 @@ window.ccchart.m.CssHybrid =
+ this.pfx['box-sizing'] +': border-box;'
+ this.pfx['transition'] +': background-color 200ms linear';
el.setAttribute('style', xyr+etc);

//マーカーをグループへ登録
var arc = this.cssgs[id].appendChild(el);
el = null;
Expand All @@ -4951,7 +4949,7 @@ window.ccchart.m.CssHybrid =
var unit = e.target.getAttribute('data-unit');
var bgcolor = e.target.getAttribute('data-bg');
var colNamesTitle = (this.type==='scatter'||this.type==='heatmap')?
colname:((that.colNamesTitle)?that.colNamesTitle:'');
'':((that.colNamesTitle)?that.colNamesTitle:'');
var unit = that.coj[id].unit
if(typeof unit==='string'){
unit = unit;
Expand Down Expand Up @@ -5012,9 +5010,9 @@ window.ccchart.m.CssHybrid =
}, 0);
//ツールチップのデフォルトHTMLテンプレート
//.-ccchart-ttip-dataなどでCSSから指定可能です
if(this.type==='scatter'||this.type==='heatmap'){
if(that.type==='scatter'||that.type==='heatmap'){
var htm = ''
+ '<span class="-ccchart-ttip-sct-colnamestitle">'+colNamesTitle + '</span>'+ '<br>'
+ '<span class="-ccchart-ttip-sct-colnamestitle"></span>'+ '<br>'
+ '<span class="-ccchart-ttip-sct-colname">'+colName + '</span>' + ' '
+ '<span class="-ccchart-ttip-sct-data-x">'+scatterXData + '</span>'+'<br>'
+ '<span class="-ccchart-ttip-sct-rowname">'+rowName + '</span>' + ' '
Expand All @@ -5034,7 +5032,6 @@ window.ccchart.m.CssHybrid =
that.cssTooltips[id].innerHTML = toolTemp || htm;
toolTemp = htm = '';
}

//同じセレクタのルールがあったら一旦除去して::before部分の吹き出しの色を設定
that.deleteCssRule('#-ccchart-css-tooltip-'+id+'::before');
that.hybridCss.insertRule(
Expand Down Expand Up @@ -5083,13 +5080,10 @@ window.ccchart.m.CssHybrid =
},
css_ring: function(op){
op.classStr = 'css-ring';
// op.bgColor = op.bgColor || 'rgba(0,0,0,0.5)';
if(this.type==='scatter'||this.type==='heatmap')op.borderColor = op.borderColor || this.colorSet[op.row];
this._css_arc(op);
},
css_maru: function(op){
op.classStr = 'css-maru';
if(this.type==='scatter'||this.type==='heatmap')op.bgColor = op.bgColor || this.colorSet[op.row];
this._css_arc(op);
},
css_lineTo: function(op){
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

"name": "ccchart",
"description": "This is a Realtime and Simple JavaScript chart library that does not depend on libraries such as jQuery or google APIs.",
"version": "1.12.07",
"version": "1.12.08",
"main": "ccchart.js",
"homepage": "http://ccchart.com",
"license": "MIT",
Expand Down
11 changes: 10 additions & 1 deletion update.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,16 @@ if (!window.ccchart) window.ccchart = {};
ccchart.update = [



{
ver: "1.12.08",
date: "2016.08.26",
status: "release",
updates: [
["1.bug fixed. Not plot If you do not specify a markerWidth in the scatter. thanx mosy https://github.com/toshirot/ccchart/issues/27"],
["2.bug fixed the color bug. When the css-maru and css-ring in the scatter. thanx mosy https://github.com/toshirot/ccchart/issues/28"],
["3.bug fixed the tooltip bug. https://github.com/toshirot/ccchart/issues/29"]
]
},
{
ver: "1.12.07",
date: "2016.08.20",
Expand Down

0 comments on commit df26cec

Please sign in to comment.