Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » New Charts from Ralf
New Charts from Ralf [message #1722371] Thu, 04 February 2016 10:52 Go to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
Available new chart in incubator
good job, Ralf

Can i change style, attributes?

Dmitry
Re: New Charts from Ralf [message #1722378 is a reply to message #1722371] Thu, 04 February 2016 12:02 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Dmitry,

happy that you like the Chart component. BTW, here's a blog post [1]
that announces it.

> Can i change style, attributes?

You can use the `requireCss` method to include your custom CSS. Have a
look at the last code line in NvChart for an example.

If you like to add more properties, you can extend the chart widgets.
We'll also plan to extend the set of available properties. Feel free to
open a feature request or push a change to Gerrit.

Regards,
Ralf

[1]
http://eclipsesource.com/blogs/2016/02/04/new-in-the-rap-incubator-charts-with-d3-and-nvd3/

--
Ralf Sternberg

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: New Charts from Ralf [message #1722506 is a reply to message #1722378] Fri, 05 February 2016 10:36 Go to previous messageGo to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
small question
How to load d3.v3.min.js and nv.d3.min.js from local resource (not external https )?

[Updated on: Fri, 05 February 2016 10:40]

Report message to a moderator

Re: New Charts from Ralf [message #1722572 is a reply to message #1722506] Fri, 05 February 2016 22:39 Go to previous messageGo to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
close question
requireJs help me
Re: New Charts from Ralf [message #1722600 is a reply to message #1722572] Sat, 06 February 2016 11:41 Go to previous messageGo to next message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
.... or use "org.eclipse.rap.addons.chart.d3JsUrl" system property the
specify you own location.
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Re: New Charts from Ralf [message #1722602 is a reply to message #1722600] Sat, 06 February 2016 13:28 Go to previous messageGo to next message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
Ivan, I'm have never worked with JS
If I right understand to change chart I can through js and css file

try change label size and position and nothing ;-(

this is my new js for pie
rwt.chart.register("nv-pie", function(widget) {
	var h = 600;
	var r = h/2;
	var arc = d3.svg.arc().outerRadius(r);
	
	var chart = nv.models.pieChart().x(function(d) {
		return d.label;
	}).y(function(d) {
		return d.value;
	}).showLabels(true).labelType("key");

	d3.selectAll(".nv-label text")
    /* Alter SVG attribute (not CSS attributes) */
    .attr("transform", function(d){
        d.innerRadius = -250;
        d.outerRadius = r;
        return "translate(" + arc.centroid(d) + ")";}
    )
    .attr("text-anchor", "middle")
    .style({"font-size": "3em"});
	
	d3.select(".nv-legendWrap")
	  .attr("transform", "translate(100,100)");

	chart.pie.dispatch.on("elementClick.rap", function(item) {
		widget.notifySelection(item.index);
	});
	
	return chart;
});

Re: New Charts from Ralf [message #1722613 is a reply to message #1722602] Sat, 06 February 2016 21:21 Go to previous message
Dmitry Dukhov is currently offline Dmitry DukhovFriend
Messages: 190
Registered: February 2013
Senior Member
ok solved

just add updateChar() inside render with d3 requests

rap.on( "render", function() {
if( this._needsRender ) {
this._svg.datum( this._data );
this._renderer( this._svg, this );
this._needsRender = false;
updateChart();
}
}.bind( this ) );
Previous Topic:Automated builds for Eclipse RAP with Gradle
Next Topic:Load init parameters on Eclipse RAP e4
Goto Forum:
  


Current Time: Tue Mar 19 05:50:29 GMT 2024

Powered by FUDForum. Page generated in 0.02408 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top