nocoo / infoviz Goto Github PK
View Code? Open in Web Editor NEWInformation visualization.
Home Page: https://infoviz.org
License: Other
Information visualization.
Home Page: https://infoviz.org
License: Other
i tried to use the radar chart to display only one dataserie. Doing so i run into the issue, that the chart won't work if you provide only one or two dataseries, as the min and max values are calculated based on the values in the series.
In your sample try:
InfoViz.chart(
$('.i-radarchart2'),
'radarchart',
{
'value_fields': [ 'Repulsion Power', 'Durability', 'Hitting Sound', 'Shock Absorption', 'Control' ],
'data': [
{ 'Repulsion Power': 1, 'Durability': 2, 'Hitting Sound': 3, 'Shock Absorption': 4, 'Control': 5 },
{ 'Repulsion Power': 2, 'Durability': 3, 'Hitting Sound': 4, 'Shock Absorption': 5, 'Control': 1 }
]
},
{
'radarchart': { 'label-distance': 8, 'label-rotation': true },
'legend': { 'legend-enabled': false }
}
);
or:
InfoViz.chart(
$('.i-radarchart2'),
'radarchart',
{
'value_fields': [ 'Repulsion Power', 'Durability', 'Hitting Sound', 'Shock Absorption', 'Control' ],
'data': [
{ 'Repulsion Power': 1, 'Durability': 2, 'Hitting Sound': 3, 'Shock Absorption': 4, 'Control': 5 }
]
},
{
'radarchart': { 'label-distance': 8, 'label-rotation': true },
'legend': { 'legend-enabled': false }
}
);
to fix this issue i pass in min and max value for the radarchart:
line 2146:
for(i = 0; i < data['data'].length; ++i) {
for(j = 0; j < data['value_fields'].length; ++j) {
// provide max or min
if (data['max']) {
v_map[data['value_fields'][j]]['v_max'] = data['max'];
}
if (data['min']) {
v_map[data['value_fields'][j]]['v_min'] = data['min'];
}
item = data['data'][i][data['value_fields'][j]];
if(item > v_map[data['value_fields'][j]]['v_max']) {
v_map[data['value_fields'][j]]['v_max'] = item;
}
if(item < v_map[data['value_fields'][j]]['v_min']) {
v_map[data['value_fields'][j]]['v_min'] = item;
}
}
}
thanks for your library. was easy to use.
I'm trying to combine a stream chart, line chart & bar chart in a single view (or single canvas). I can't find any documentation on hybrid capabilities.
Can you post an example or identify if its possible?
jQuery is only used in this part of code:
exports.chart = function(element, type, data, overwrite_options, callback) {
var target_id = $(element).attr('id') ? $(element).attr('id') : 'infoviz_' + core.guid();
$(element).attr('id', target_id);
var paper = Raphael(target_id, $(element).width(), $(element).height());
It makes InfoViz require all jQuery library, and above part of code could easily be replaced with standard document.getElementById etc stuff.
UI refine, add some shadow effect.
感觉很迟钝,给人一种效率不高的感觉,优化一下吧,我相信这肯定不是效率的问题。
最近在做的项目需要数据展示,我想用infoviz试试看。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.