Is it possible to set font colors on the applet via javascript?
e.g. For the header
tChart1.getChart().getHeader().setColor ?
Setting chart colors using script
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi shoey,
Yes, you can try this:
Yes, you can try this:
Code: Select all
tChart.getHeader().getFont().setColor(Color.BLUE);
tChart.getHeader().setTransparent(false);
tChart.getHeader().setColor(Color.RED);
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Sorry, I think we misunderstand your questions, how would you like to use our component with JavaScript? Can you provide us an example of an html page which shows us the functionality you need?
In an applet you would use something like this:
But from your questions on the forum, I'm guessing this is not the kind of information you need.
Regards,
tom
In an applet you would use something like this:
Code: Select all
import com.steema.teechart.TChart;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class TChartApplet extends JApplet {
TChart chart;
JButton colorButton;
public void init() {
Container content = getContentPane();
content.setBackground(Color.white);
content.setLayout(new BorderLayout());
chart = new TChart();
content.add(chart, BorderLayout.CENTER);
colorButton = new JButton("Color");
colorButton.addActionListener( new ActionListener() {
public void actionPerformed(ActionEvent ae) {
chart.setBackColor(Color.RED);
//or chart.setBackColor(new Color(255,0,0));
}
});
content.add(colorButton, BorderLayout.NORTH);
}
}
Regards,
tom